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


Debugging with printf, openocd and semihosting on Workbench for STM32

Hello. I’m a newbie. I have linux machine, stm32f4 discovery board, eclipse with fresh installed workbench, clean project with default configQuestion and some duck tape.

What should I do to make ocd printing printf() data in IDE console? Like this:

http://gnuarmeclipse.github.io/assets/images/2013/12/OpenOCDclientConsole.pngQuestion
http://gnuarmeclipse.github.io/assets/images/2013/12/OpenOCDTraceConsole.pngQuestion

I tried thisQuestion richardtomkins solution, but it looks like blackbox and conflicts with default libs.

Tunisia
When using -specs=rdimon ... make sure to not use -specs=nosys.specs

Without “-specs=nosys.specs” same conflicts:

/../src/syscalls.c:80: multiple definition of `_kill’
/usr/lib/eclipse/plugins/fr.ac6.mcu.externaltools.arm-none.linux64_1.3.0.201507241112/tools/compiler/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu/librdimon_nano.a(rdimon-_kill.o):_kill.c:(.text._kill+0x0): first defined here

same error for _exit, _close and other


Tunisia

remove your syscalls.c from your project ;)

Edit: syscalls.c is needed when you are not using nor nosys.specs neither rdimon.specs

syscal removed, stdio.h included, project builds perfectly but printf() does nothing.

Here is program (running in Debug mode through Step Into steps):

  1. include “stm32f4xx.h”
  2. include “stdio.h”


int main(void)
{
printf(“hello world!”);

while (1) {

}
}

Here is opeocd log:

Open On-Chip Debugger 0.9.0-dev-dirty (2015-11-13-11:40)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.htmlQuestion
Info : auto-selecting first available session transport “hla_swd”. To override use ‘transport select ‘.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 2000 kHz
adapter_nsrst_delay: 100
srst_only separate srst_nogate srst_open_drain connect_assert_srst
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : clock speed 1800 kHz
Info : STLINK v2 JTAG v14 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.926655
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : accepting ‘gdb’ connection on tcp/3333
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080005bc msp: 0x20020000
configuring PLL
Info : device id = 0x10016413
Info : flash size = 1024kbytes
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080005bc msp: 0x20020000
semihosting is enabled
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080005bc msp: 0x20020000, semihosting
configuring PLL
target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x20000042 msp: 0x20020000, semihosting
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800057c msp: 0x20020000, semihosting
Info : halted: PC: 0x08000506
Info : halted: PC: 0x08000818
Info : halted: PC: 0x0800050a
Info : halted: PC: 0x0800050a
Info : halted: PC: 0x0800050a
Info : halted: PC: 0x0800050a


PS. So strange choice for this forum engine. meh.


Tunisia

You need to call “initialise_monitor_handles();” in the beginning of your main ;)
just like richardtomkins solution :-)