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


Semi Hosting with Nucleo L476RG

We are checking the Nucleo-L476RG board with STLink and the Open STM32 in eclipse.
We think to be able to use printf will be very important for our development and therfore we are trying to do it.
I have checked the forum because there are a lot of information about this question and we have done some test without success.

What we have done:
added “-specs=rdimon.specs -lc -lrdimon” to (Project -> Properties -> C/C++ Build -> Settings -> MCU GCC Linker -> Linker flags)
added monitor arm semihosting enable to Debug configurations
added extern void initialise_monitor_handles(void); above main
added initialise_monitor_handles(); at the beggening og main function

With this configuration if we use printf the program goes to a fault routine, it seems printf is not working right
If we use puts no error but nothing is sent to the OCD console.

In the Cube MX I have generated the code with the 3 options in the SYS item: Disable/serial wire/trace SW and the results are the same.

I have read in the forum about use freopen(“/dev/semihosting”,”w”,stdout); I have checked and now printf doesn’t produce an error but I haven’t yet a single line while debuging in the OCD console.

Could anybody help me with this question? I am new with ST and I am locked with this question.

Thanks in advance.

After doing some more tests I have discovered the problem is in relation with FreeRtos. I forgot to explain the printf was in a FeeRtos task.
If at least a printf is done in the main before starting the scheduler, printf in the freeRtos tasks work perfectly; I don’t know exactly the reason but it is in this way.

 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs