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


STM32L4: Debug is NOT possible when PCROP is activated

Dear OpenSTM32 support,

I am attaching a test project which is reproducing the issue.

It includes a main function with an infinite loop.

My PCROP area in flash is from 0x8030000 to 0x8042000


see project linkerscript .ld: I allocate the man function in ROM_2 memory region.
If I locate ROM_2 region before the PCROP area, I can reach my while loop as expected.
If !i locate ROM_2 region after the PCROP area, the debug session won’t start with a WRPERR. It seems that OpenOCD always tries to erase all the block from memory start sector to last allocated sector.

Can you help me on this ?

Thanks for your help,
Best regards,
Sylvain

Hello,

I am facing an odd bug with my stm32f4Discovery board in AC6Workbench based on Eclipse. In fact, I use in my code pow function of math.h library. Build runs well, debugging too. When I try to run my stm32 board (click on reset button) to display the result of my pow function, only where I calculate pow like this “pow(3,2)” works and where I try this one “pow(p,l)” after initialing p and l with 2 (p=l=2) the board stops running.
I found in many forums that I should link the math source c file by checking “Use C math library (-lm)” in “Properties -> Go to C\C++ Build -> Settings -> Tool Settings -> Gcc Linker -> Libraries” or by adding a new library named “m”. I tried all these propositions and many others I found but none of them does work.

Someone could help please.
I thank all in advance

Here is the code:

  1. include “headers.h”
  2. include “math.h”




int main (void){
double dd=0, p=2, l=2;
SystemInit();
config_usart(115200);
test_print();
while (1){
dd = pow(3,2);
serial_printel_val((uint32_t)dd);
dd = pow(p,l);
serial_printel_val((uint32_t)dd);
blink_leds();
}
return 0;
}


Here is the displayed result value:
9


 

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