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