OpenOCD on STM32 boards


Lawrence King
 

Today I decided to bring up a STLML476 board, specifically the Nucleo-L476RG board.

 

Compile went cleanly

west build -b nucleo_l476rg samples/basic/blinky

Then after connecting the board I tried

              west flash

Of course I got complaints about OPENOCD-MISSING, OK, I can fix that:

              sudo apt-get install openocd

And openocd and a few other packages happily  installed.

 

Now ‘west flash’ complains:

-- west flash: rebuilding

ninja: no work to do.

-- west flash: using runner openocd

-- runners.openocd: Flashing file: /home/lawrence/workspace/rc-demo/zephyrproject/zephyr/build/zephyr/zephyr.hex

Open On-Chip Debugger 0.10.0

Licensed under GNU GPL v2

For bug reports, read

              http://openocd.org/doc/doxygen/bugs.html

/home/lawrence/workspace/rc-demo/zephyrproject/zephyr/boards/arm/nucleo_l476rg/support/openocd.cfg:1: Error: Can't find board/st_nucleo_l4.cfg

in procedure 'script'

at file "embedded:startup.tcl", line 60

at file "/home/lawrence/workspace/rc-demo/zephyrproject/zephyr/boards/arm/nucleo_l476rg/support/openocd.cfg", line 1

ERROR: command exited with status 1: /usr/bin/openocd -f /home/lawrence/workspace/rc-demo/zephyrproject/zephyr/boards/arm/nucleo_l476rg/support/openocd.cfg -c init -c targets -c 'reset halt' -c 'flash write_image erase /home/lawrence/workspace/rc-demo/zephyrproject/zephyr/build/zephyr/zephyr.hex' -c 'reset halt' -c 'verify_image /home/lawrence/workspace/rc-demo/zephyrproject/zephyr/build/zephyr/zephyr.hex' -c 'reset run' -c shutdown

 

 

The top of the openocd.cfg files (line 1) says:

source [find board/st_nucleo_l4.cfg]

 

I hunted around for the ‘missing’ file “board/st_nucleo_l4.cfg” to no avail. I also tried several other boards that use openocd and found similar missing include files.

 

I did confirm that the board is correctly connected and visible:

$ sudo lsusb

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 002 Device 008: ID 0483:374b STMicroelectronics ST-LINK/V2.1 (Nucleo-F103RB)

Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

 

Obviously I am doing something silly wrong. Can anyone give me a hint? Thanks

 

 

Lawrence King

Principal Developer

Connected Transport Market Unit

https://www.Irdeto.com

+1(416)627-7302

 

1  2 - linkedin  3 - instagram  4 - youtube  6 - facebook  7

            

CONFIDENTIAL: This e-mail and any attachments are confidential and intended solely for the use of the individual(s) to whom it is addressed. It can contain proprietary confidential information and be subject to legal privilege and/or subject to a non-disclosure Agreement. Unauthorized use, disclosure or copying is strictly prohibited. If you are not the/an addressee and are in possession of this e-mail, please delete the message and notify us immediately. Please consider the environment before printing this e-mail. Thank you.

 

 

 

Join users@lists.zephyrproject.org to automatically receive all group messages.