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


Printf via SWV doesn't print anything

Tunisia

>> That was really helpful. I soldered and make the change to the linker script and YES! it is working fine.
Good to hear that

>> Now I read a lot about semihosting. What is the difference between the ITM and semihosting. Could you point me in the right direction by explaining or giving me the links of resources?
Check these links : SemihostingQuestion, ITMQuestion

>> Is semihosting possible in System WorkBench? or Is there any available methodology presently available where we can see the output in openOCD terminal?
Yes, it is possible
In Debug configuration > Startup Tab , add this :

monitor arm semihosting enable

and in Project, Properties, C/C++ Build, Settings, MCU GCC Linker, Miscellaneous, Linker flags,

-specs=nosys.specs -specs=nano.specs -specs=rdimon.specs -lc -lrdimon

since you have used rdimon.specs, you don’t need to use syscalls.c
And finally in your code, you have only to call the initialize_monitor_handles in the begin of the main routine

#include <stdio.h>
#include <stdlib.h>
# ….

extern void initialise_monitor_handles(void);

int main(void) {
  initialise_monitor_handles();

  printf("Hello !\n");

  HAL_Init();
  SystemClock_Config();

  puts("Check your openocd console.\n");
  printf("This works too\n");
  //……………
}