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


"Program chip" not working as expected

Hi,

I’m triying to program the Nucleo Board using “Program Chip” option in the project’s menu but I don’t get the result I expect.

What I want is to avoid going into debug mode everytime I want to flash my device. I have already read different threads where this is talked about but the only solution that was proposed by AC6 is not working.

To test it I have done the following.

I created a simple project with STM32CubeMX and just made a LED toggle every 100ms. I programmed the chip using the debug button. It goes to debug perspective and after I hit the run button I can see the LED toggling every 100ms.

Then, I stop the debugging and go to C/C++ perspective. I change the delay of the LED to 500ms, then I build the project and I right click the project and click on Target > Program chip...

Then I double click on the elf file of my project in the new window that has opened and then I get this in the console.

09:55:54 **** Programing project Camaleon Controller on chip ****
/home/twistx77/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.externaltools.openocd.linux64_1.13.0.201701261144/tools/openocd/bin/openocd -f nucleo_f070rb.cfg -s /home/twistx77/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.debug_1.12.0.201701261204/resources/openocd/scripts/st_board -s /home/twistx77/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.debug_1.12.0.201701261204/resources/openocd/scripts -c “program \\\"Debug/Camaleon Controller.elf\\\" verify reset exit”
Open On-Chip Debugger 0.10.0-dev-00274-g2ee83e0-dirty (2017-01-26-11:43)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
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: 1000 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 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
in procedure ‘program’
in procedure ‘init’ called at file “embedded:startup.tcl”, line 473
in procedure ‘ocd_bouncer’

    • OpenOCD init failed **

shutdown command invoked

I can check that the new program hasn’t been flashed.

How can I fix that.

I just want a button to upload my hex file to the device and start running without debugging.

Thanks.

Hello,

This is the right menu to program without debugging.

Did you terminate the debug session before trying the Target => Program ?

If not, the STlink is already opened and the connection to program the file will fail.

Check that you havn’t any openocd running and it should work.

Rgds,
Laurent


Hi Laurent,

Thanks for your quick response.

After trying different things I found the problem.

If my project has more than one word name it doesn’t work as expected. Since it seems the programmer searches for one word file.

I did the same thing with a project name Cameleon Controller and one with the name test and only the “test” one works.

I get this error with Cameleon Controller:

11:18:53 **** Programing project Camaleon Controller on chip ****
/home/twistx77/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.externaltools.openocd.linux64_1.13.0.201701261144/tools/openocd/bin/openocd -f nucleo_f070rb.cfg -s /home/twistx77/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.debug_1.12.0.201701261204/resources/openocd/scripts/st_board -s /home/twistx77/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.debug_1.12.0.201701261204/resources/openocd/scripts -c “program \\\"Debug/Camaleon Controller.elf\\\" verify reset exit”
Open On-Chip Debugger 0.10.0-dev-00274-g2ee83e0-dirty (2017-01-26-11:43)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
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: 1000 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 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v28 API v2 M v16 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.263810
Info : stm32f0x.cpu: hardware has 4 breakpoints, 2 watchpoints
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
adapter speed: 950 kHz
stm32f0x.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x08000c34 msp: 0x20004000
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

    • Programming Started **

auto erase enabled
Error: Invalid command argument
image.base_address option value (‘Controller.elf”’) is not valid

    • Programming Failed **

shutdown command invoked

I have made bold the error.

As you can see it tries to use Controller.elf and the right name is Camaleon Controller.elf.


I guess is a bug.

Thanks for the help. I will have to rename my project or see how it can generate a elf with a diferent name for now.