Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world.
And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download two short videos (registration required) highlighting:

System Workbench for STM32


Semihosting with STM32

Hi, is it possible to use Semihisting on System Workbench?
I read that using OpenOCD is possible, in fact in Coide it is possible to use it.
I did not find how to use with System Workbench.
does anyone did?
thanks
Filippo

in the above link it seam the toolset is GNUARm eclipse that has suport for semithosting
in SW4STM32 typcial project the syscall.c is different and seam suporting the semihosting
it call __io_putchar(*ptr++); question
by steping at assembly level it seam it just does nohting
maybe some lib or configuration is missing to get the io done via semihosting ?

i’m also interested in using semihotsing (with posibility to switch it on and off ) so i’ll folow your thread smile


Hello System Workbench Developers.

You are doing some greta work, keep it up.

In my quest to learn more about Cortex-M chips, I am using System Workbench.

Something I have been reading about recently involves a technique called semihosting, where by the target system sends I/O to the host system debug console (OpenOCD). This is an excelletn feature, as the use of printf’s can at times be very helppful in debugging a program.

When you folks get a chance, would you kindly provide specific directions on how to achive the use of semihosting in conjunction with System Workbench.

Many thanks indeed.


Is it possible to replace the OpenOCD provided with System Workbench with a new version that supports semihosting.

semihosting is a fundemental element in being able to effectively debug bad code.


Okey, Dokey, I have this working.

So, in addition to my earlier method/technique presented to work with STM32CubeMX,

I now present Semihosting with System Workbench.


I added a copule of lines to main.c, see the attached file and look for code commented with rtt.

In Debug Configurations I added this to the Startup Tab:
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


In summary, the code I am running is FreeRTOS, with all LEDs blinking using seperate threads and USB VCP operating while also doing semihosting, with much of the code coming out of STM32CubeMX.

I hope this helps others who, like me, cannot afford the major toolchains and the Lite versions are too Lite as to be ineffective.

France

Hey richard,

This seems very interesting, but your code deos not get through correctly.

To provide code you should bracket it between CODE tags:
{CODE(colors="c")} 
    place your code here
    #include < header.h >
    #include "header.h"
{CODE}


Moreover, regretfully, code that look like HTML tags (that is between angle brackets < and >) is suppressed even in CODE blocks, except if there is a space after the opening bracket (like above) so either slightly edit your code by adding a space there or change the includes to use quotes instead... I was able to correct the rest of your post, but I don’t get the name of the files to include...

Could you edit your post to add the rpoper header files?

Thanks for sharing your results

Bernard

Tunisia

Thank you for sharing your tip
It works for me :-)

Tarek


thank a lot for sharing this thread was very helpfull to get printf to go true

i’m now trying file creation and rd/write but it is not behaving as expected
if i do not use an absolute file path like “c:\tmp\testfile” but ‘testfile” no file get create despite no error is returned ?
Same hapen If using a path to write protected place like “C:\” it’s like the “CWD” curent dir is some rd only folder

I would expect that “CWD” to be location where debuger is started ie “Debug” folder of the project. and that using relative path to cetae a file here (what’s seam to hapen with other plugin and toolchains)

In crosgcc or gcc debug configuration their is usualy a way to overhide where program ran but that’s not here for ac6 config ???

any help welcome


I am having the same problem that the current working directory is not the same as the one containing the executable. I did a search of my drive and found that the current path is “C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_1.11.0.201610101240\resources\openocd\scripts\st_board”. It would be nice to have the current directory tied to the location of the project so I don’t need to use an absolute path in my application code.

Maybe the current path can be changed in a startup script used by the debugger?


I followed what Richard said and I can only get “puts” to work, but not printf. Any idea?

I restarted the Workbench, did a new build and it worked. Sorry for posting.