Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


Flashing correct memory address issue

I’m running STM32 Workbench v1.8.2 on OSX. And I am trying out this example firmware: http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32-ode-function-pack-sw/fp-sns-allmems1.html?ecmp=tt4023_gl_enews_aug2016Question

I am using the Nucleo STM32L476RG shielded with the X-NUCLEO-IKSO1A1 and X-NUCLEO-IDB05A1.

According to the documentation the bootloader needs to be flashed to 0x08000000 and the firmware program needs to be flashed to 0x08004000.

Everytime I make a change to the sample code in Workbench, rebuild, and try to flash by selecting Target, it does not change the underlying program. I verified this by changing the BLE local name being advertised to something else, and when I flash the change, the name being advertised does not change at all.

I looked at the logs that come out when flashing on Workbench and I see this:

Programming Started
auto erase enabled
Info : Device id = 0x10076415
Info : STM32L4xx flash size is 1024kb, base address is 0x8000000
STM32L476.cpu: target state: halted

It says that the base address is 0x08000000, is that the issue?

Anyways, I wanted to test using STM32 ST-Link to flash the program binary to 0x08004000 and finally, the local name advertized finally reflects my change.

If Workbench is the issue, is there a way to configure it to flash at a specific address?

EDIT:

After further tries I noticed the following:

If you flash the program firmware using Workbench, it overwrites the bootloader AND it does flash to the correct location (explained later), it’s just that the program does not “restart” or “reset” (I did check the Reset after Flash checkbox) to reflect the new changes. Once I power cycle, the program no longer starts up presumably because the bootloader has been wiped out and also because it is not advertizing in BLE. So I flash the bootloader back in, and the program now runs, however, it is now the NEW program that runs, which is really interesting.

 

Newest Forum Posts

  1. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  2. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  3. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  4. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  5. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  6. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  8. Build a project in "release" mode by tang, 2025-02-20 10:36
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35
  10. Fail to debug in Win 11 C/C++ by mortenlund, 2024-12-26 20:27

Last-Modified Blogs