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


Newbie: Sensortile can debug but then cannot run independently

SETUP
sensortile attached to nucleo-l476rg, windows,
System Workbench for STM32 - OpenOCD (for Windows 32bits)
Version: 1.13.2.201703061529
Build id: @build@
gnu tools arm embedded Version: 1.13.2.201703061525
openocd for windows Version: 1.13.2.201703061523

PROBLEM
I am able to click “Debug” which works, i get a breakpoint in main at 0x10100, then click resume and sensortile starts happily advertising as desired. But when i disconnect from the nucleo board I can’t get the sensortile to advertise. I have tried “Run” instead of Debug, and other combinations but the sensorTile just won’t start advertising unless it’s connected to Nucleo. How can i program SensorTile and have it run powered in its own cradle?

Thanks in advance!
Allan


___
Here’s the console working fine with nucleo:

Open On-Chip Debugger 0.10.0-dev-00275-gd486ac2-dirty (2017-03-06-15:22)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
padded zone erase set to 1
adapter_nsrst_delay: 100
srst_only separate srst_nogate srst_open_drain connect_assert_srst
adapter speed: 1800 kHz
Info : clock speed 1800 kHz
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : STLINK v2 JTAG v27 API v2 M v15 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.238896
Info : STM32L476.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : accepting ‘gdb’ connection on tcp/3333
adapter speed: 240 kHz
STM32L476.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00010100 msp: 0x464c457c
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
adapter speed: 4000 kHz
Info : Device id = 0x10076415
Info : STM32L4xx flash size is 1024kb, base address is 0x8000000
adapter speed: 240 kHz
STM32L476.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00010100 msp: 0x464c457c
adapter speed: 240 kHz
STM32L476.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00010100 msp: 0x464c457c
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
adapter speed: 4000 kHz
Info : Erase the padded zone before the write
Warn : Adding extra erase range, 0x00004000 to 0x00004187
Warn : Adding extra erase range, 0x00004190 to 0x000047ff
Info : Padding image section 0 with 8 bytes
STM32L476.cpu: target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x21000000 pc: 0x20000068 msp: 0x464c457c
Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (2092). Workaround: increase “set remotetimeout” in GDB
adapter speed: 240 kHz
STM32L476.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00010100 msp: 0x464c457c

I may have the same problem? I can debug and connect using the android app, when I disconnect I need to wait a while before I can reconnect... but sometimes it doesn’t work I think the code in the example software is not as robust as it could be? (maybe its the android side).

However what drew me to this post was “Run” instead of debug, this doesn’t even light the ‘disconnected’ flashing led - Run doesn’t seem to get to the first line of the program, maybe you have the same problem? Here is my test code:

main()
{
  HAL_Init();
  InitTargetPlatform(TARGET_SENSORTILE);
  LedOnTargetPlatform();
}


When I Debug button it turns on the LED (the tiny one), when I Run button it doesn’t.

The code in FP-SNS-ALLMEMS1 is better than that in the 3 example programs (en.stsw-stlkt01). It reconnects better and explains the boot loader configuration much better! Which source are you starting with?

I am using BlueMicrosystems2 generally. But I just tried ALLMEMS1, same thing.

I don’t understand reconnection or boot loader configuration, if you give me some pointers I’ll be happy to look into that (newbie!).

Also I did see the below post on debugging with random SWD, I actually have NUCLDEO-L476RG so that’s not my problem, but i did try configuration..Debugger..Manual spec ST-LinkV2 and SWD like in that post, but still no luck.

eevblog.com/forum/microcontrollers/debug-problems-with-stm32f030/msg1172575/#msg1172575


I also try to bring up the SensorTile project from STM “stsw-stlkt01” example “SensorTile\Applications\BLE_SampleApp\SW4STM32\STM32L4xx-SensorTile”
There are few issues I have and not understands

1. If I imported the project into Workspace, the project would not build. Complaining missing the Build file. I can only build the project at source file folder.

2. After I build and debug the project, debugger could not locate source file, e.g. Main will only show in assembly code instead of C code.

I search around and could not find where debugger configure the C source location.

Thanks for advice

Found the problem for #2, STM release project had disable “Debugger” info. So after enabled it in Project preferences, it is OK.
I too have a similar issue, did you get any further with this?

I sorted the run problem out, you need to burn the boot loader and the application differently if you want to run outside the debug environemtn (don’t use the little green play button). There is a script CleanALLMEMS1_SW4STM32_ST.sh which is included with the source which will upload the boot loader and the compiled application to the sensor tile. Then you can reset without the debugger connected and it all works!