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


How to output SWO trace?

Hi,

does someone know how to make SWO/SWV output (printf) work within system workbench? I can make it work with ST-Link utility. I suspect that ST-Link utility enables particular stimulus port to enable the trace. Is it possible to do that from the workbench? I’ve seen some tutorials for eclipse+GNU ARM Eclipse Plug-ins but not for the workbench. thank you for any advice.

regards,

karel

Hello Karel,

Sorry, but I don’t know how to get it to work with the workbench, but would you mind telling me how you got it to work with SWO/SWV? I have a STM32F3348DISCOVERY with the Buyck and boost power supplies.

After lots of frustration, I realized ST didn’t install the jumpers for RX amd TX from the target MCU to the STLink MCU. It does work if I hold some metal to short the jumper pads, but that gets annoying. I won’t have access to a soldering iron until Monday.

Than you,

Jeff


Hi Karel,

you can switch SWO on with openocd. Make a new cfg file for openocd with a “tpiu config” command. Please read the openocd manual for details on this setting. Add your new cfg file to your launch configuration in eclipse. (see attached picture.) My cfg file looks like this:

# This is an ST NUCLEO F302R8 board with a single STM32F302R8T6 chip.
# http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF260004Question

source [find interface/stlink-v2-1.cfg ]

transport select hla_swd

source [find ./stm32f3x.cfg ]

reset_config srst_only

tpiu config external uart off 64000000 2000000

Regards,
nevets


I forgot:

In your program you have to add syscalls.c (for GNU) and implement the function int __io_putchar(int ch).
Something like this:

int __io_putchar(int ch){
ITM_SendChar(ch);
return(ch);
}

ITM_SendChar(ch) is defined in core_cm4.h and core_cm3.h.


Tunisia

Hello Nevets,

Thank you for the tip biggrin

I have tried this using an STM32F429I-DISC1 (after soldering the SB9).
My program print status a message every 1 second (visualized using ST-Link Utility > Printf via SWO Viewer)

but even after adding the tpiu config nothing apprears
tpiu config external uart off 180000000 1800000
# cpu frequency is 180MHz and the adapter speed is 1.8MHz

Any Idea ?

Update:
I have added (itm port 0 on) before the tpiu config, and modified the tpiu config as following:
tpiu config internal swo.log uart off 180000000 1800000
=> Now I have some output in swo.log file
But I cannot display the SWO data in eclipse.


You could configure it to write to a named pipe instead of swo.log and run some other program to read and display output from there, like the attached swviewer.pl (far from complete) which reads from /tmp/swo.log

Hi all.


I’m also trying to get SWO trace out of STMF469i-discovery board in exclipse via boards internal ST-Link v2.1.

Here’s my .cfg file.

  1. This is an STM32F4 discovery board with a single STM32F469NIH6 chip.
  2. ### To be updated ### http://www.st.com/internet/evalboard/product/.jspQuestion

  1. This is for using the onboard STLINK/V2-1

source find interface/stlink-v2-1.cfg

transport select hla_swd
reset_config srst_only

tpiu config external uart off 180000000 1800000

  1. increase working area to 128KB

set WORKAREASIZE 0x20000

  1. chip name

set CHIPNAME STM32F469

source find target/stm32f4x.cfg

If I try running debug session with it I get:
“Error in final launch sequence
Failed to execute MI command:
-target-select remote localhost:3333

Error message from debugger back end:
localhost:3333: Connection timed out.
localhost:3333: Connection timed out.”



Ideas? Dunno why there’s so little about swo tracing regardless of platform and manufacturer. It’s fantastic feature compared to UART tracing and supported by pretty much every board from HW point of view :/.