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 two short videos (registration required) highlighting:

System Workbench for STM32


How to use multiple ST boards simultaneously

Tunisia

Hello Jack, Pascale,

Since SW4STM32 integrates openocd 0.9+, so this is possible by using hla_serial feature.
This is kind of tricky but possible idea

Supposing that we want to debug one STM32F429I-DISC1 (containing ST-LINK V2-1) and NUCLEO-L031K6 simultaneously.

To do that, we need to obtain the embedded ST-LINK serial of each board and specify it within your customized board configuration.

Get the serial number

Here I will force openocd to tell us the serial number by provoking an error twisted

  • copy your board config file ‘nucleo_l031k6.cfg’ (or ‘stm32f429i_disc1.cfg’) from
    ‘C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_...\resources\openocd\scripts\st_board’ to your project folder
  • modify the copied cfg to provoke the error:
    after this line (source [find interface/...cfg])
    add this line (hla_serial wrong_serial)
    ⇒ resulting cfg for nucleo_l031k6

# This is an STM32L0 nucleo board with a single STM32L031K6T6 chip.
# ### To be updated ### http://www.st.com/internet/evalboard/product/.jsp
#

# This is for using the onboard STLINK/V2-1
source [find interface/stlink-v2-1.cfg]
hla_serial wrong_serial

transport select hla_swd

# increase working area to 4KB
set WORKAREASIZE 0x1000

source [find target/stm32l0.cfg]

# use hardware reset, connect under reset
reset_config srst_only srst_nogate
  • from SW4STM32 → debug configurations, create your Ac6 STM32 debugging configuration, then from ‘Debugger’ tab select the modified cfg (select ‘Use local script’ then browse for it)
  • set openocd verbosity to maximum add ‘-d3’ to OpenOCD Command
  • @see snapshot1.png
  • connect your board and launch debug session, this will fail automatically
  • from openocd console search the string ‘Device serial number’ (use ‘Find/Replace’ from contextual menu), the matched line (for me) is:
    Debug: 252 316 libusb1_common.c:67 string_descriptor_equal(): Device serial number066EFF515456707067174639’ doesn’t match requested serial ‘wrong_serial’
  • Now we have the serial number: 066EFF515456707067174639
  • reduce openocd verbosity (remove ‘-d3’)

Once we have the serial number

return to the cfg file and modify the added line, by replacing wrong_serial by the correct one:
⇒ hla_serial 066EFF515456707067174639

Do this to your boards that you want to debug simultaneously (two or more)


Finally do not forget to select a different port number for each debug configuration (from debugger tab), for me I have used ‘4444’ for L031 and ‘3333’ for F429

I have tested this with two projects, each one is opened a different instance of SW4STM32
@see snapshot2.png

Best Regards,
TarekB

Hello tarek,

thanks for your instructions... This was really helpful. Based on this I have tried to set the things up and eventually came out with a bit different approach (easier for me) how to get the stlink id using stlink utility and also how to set project specific debug configuration directly from Eclipse so it only addresses the specific stlink.
I have documented the process and I hope it will be useful to somebody later.

https://youtu.be/UpfucYBR7mgQuestion

BTW big thanks and thumbs up to openstm32 developers and community! Great tools of commercial grade!!!

Thanks for posting how to do this.

let me add that the serial numbers are easily found using ST-Link Utility. Go to Target->Settings to select the board and see the S/N. Upon connect it’s in the log window for easy cut-and-paste. Look for this line:

15:44:52 : ST-LINK SN : 066EFF323535474B43014153