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 (registration required) various documents highlighting:

System Workbench for STM32


The discussion of standard IO dynamic switching among semihost, UARTx, and NULL on STM32

Hi Bernard,
Thank you for support.
By searching around, I feel that it seems making more senses to override couple of system call functions to achieve my goal.
I want to implement a standard Input/Output and Error to be run-time switching between semihosting debug channel, NULL, UARTx and more. I thought the best to do it is that overrider the below system call functions:
_open(,,,) , _close(,,,) , _read(,,,) , _write(,,,) .

As such, the application code can do things like freopen(“/dev/semihosting”,”w”,stdout); freopen(“/dev/null”,”w”,stdout); freopen(“/dev/ttyS0”,”w”,stdout); freopen(“/dev/ttyS1”,”w”,stdout); etc. and after then the printf(“sothing to output to std”); will output the steam to the devices properly,

As this moment, I had successfully direct the standard output through debug semihosting and UART1 and UART2 respectively, on a STM32F4 Discovery board, hard coded, can’t redirect at run-time.
There some issues I need to resolve.
The first one is that, once in the user code has some of initialization code executed for semihosting, it has to have the debugger semihosting connected, or the firmware will hanging. This problem will to be some sort of critical to preventing the standard Input/Output to be redirecting at run-time. I was heard about someone talking that if carefully handling it in NMI, this firmware hanging can be prevented. I want to find more details if anyone can provide me more information.
The second question is, what is the best strategy to override the system call functions? At this moment what I did to enable semihosting is to add link flag ” -specs=rdimon.specs -lc -lrdimon “. This liked a version of newlib and preventing me to rewrite/override some of system call function. Can someone suggest me the link flag in order to allow me to override the sys call functions of _open(,,,) , _close(,,,) , _read(,,,) , _write(,,,) , and meanwhile avoid to have to do many other unnecessary codings?

Thanks,
-Andy