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


Extremely New User - Trying to get a basic example running on my board

Hi OpenSTM support,

I have an STM32L - DISCOVERY with a STM32L152RBT6 chip. I have the ST-link connectors and JP1 connector in as per getting started instructions. I have downloaded the STM32L1Cube which gives me example projects from STM32L100C - Discovery, STM32L152C - Discovery etc. I have tried to upload both example code and continuously get ST-Link errors.

My first question is can I use the examples STM32L152C as they all seem to be using the STM32L152RCT6 chip not the STM32L152RBT6 does it make a difference? Should i be using the STM32L100C discovery or the STM32L152C as both don’t work and give the same errors.

When I build all:
Sometimes it builds well and sometimes,
13:15:51 **** Incremental Build of configuration Debug for project STM32L152C-Discovery ****
make all
make: Nothing to be done for ‘all’.

13:15:52 Build Finished (took 360ms)


Then I run:
Open On-Chip Debugger 0.10.0-dev-00004-gcef2a8c-dirty (2017-08-31-14:07)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 240 kHz
adapter_nsrst_delay: 100
Info : clock speed 240 kHz
Info : STLINK v2 JTAG v14 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : vid/pid are not identical: 0x0483/0x374B 0x0483/0x3748
Info : using stlink api v2
Info : Target voltage: 2.920119
Info : STM32L100RCTx.cpu: hardware has 6 breakpoints, 4 watchpoints
adapter speed: 240 kHz
STM32L100RCTx.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08008094 msp: 0x2000c000
STM32L: Enabling HSI
adapter speed: 4000 kHz

    • Programming Started **

auto erase enabled
Info : Device: STM32L1xx (Cat.1 - Low/Medium Density)
Info : STM32L flash size is 128kb, base address is 0x8000000
STM32L100RCTx.cpu: target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000000e msp: 0x2000c000
wrote 8192 bytes from file Debug/STM32L100C-Discovery.elf in 2.347103s (3.408 KiB/s)

    • Programming Finished **
    • Verify Started **

STM32L100RCTx.cpu: target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x2000c000
verified 6140 bytes in 0.298056s (20.117 KiB/s)

    • Verified OK **
    • Resetting Target **

adapter speed: 240 kHz
shutdown command invoked


When I debug:
Open On-Chip Debugger 0.10.0-dev-00004-gcef2a8c-dirty (2017-08-31-14:07)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 240 kHz
adapter_nsrst_delay: 100
Info : clock speed 240 kHz
Error: libusb_open() failed with LIBUSB_ERROR_ACCESS
Error: open failed (no matching adapter found)
in procedure ‘program’
in procedure ‘init’ called at file “embedded:startup.tcl”, line 473
in procedure ‘ocd_bouncer’

    • OpenOCD init failed **

shutdown command invoked


Everytime I get a shutdown command invoked and usually if it’s in debug I get errors such as:
OpenOCD Child process termination:
followed by: Check ST Link not used by another application
Unplugged target or STLink already in use or STLINK USB driver not installed
etc.

Ive looked on the forums and reinstalled my drivers, tried executing this on a PC and Laptop, check my devices there is only 1 STM32 chip running.
How can I fix this and what are the steps to get a simple blinky or project running on my board?

Thank you

Hi,

The error with the LIBUSB_ERROR_ACCESS and the “open failed” afterwards means there is an application that uses this STlink.

Are you sure there is not a “STM32 STLINK Utilities” running with the board connected for example ?

Or maybe you have a previous debug session not closed.
Check that there is no openocd.exe thread running in task manager.

For the STM32L152RBT6 mcu, this is important to use the same in your projects.
I mean, debugging a program made for STM32L152RC is not the same as STM32L152RB.
The disco with STM32L152RBT6 is maybe a very old one and is deprecated, that’s maybe why it isn’t supported in CubeL1.

Rgds,
Laurent