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


ac6_flasher execute directly

Hello everybody,

I just want to know if is it possible to download firmware without use debug menu.
I found ac6_stm32flasher.exe but I don’t know how to use it directly.

Regards

In a command prompt, you can get the usage with -help:

C:\...flasher>ac6_stm32flash.exe 
Usage ac6-stm32-flash [options] [-loader filename] [-binary filename]
Options :
        -prog                    Program the connected STM32 target
        -erasesector                     Erase the sectors of the STM32 target
        -erasechip                       Erase the STM32 target
        -erasechip                       Erase the STM32 target
        Required option to program :
        -loader                        Pass the algorithm loader
        -binary                        Pass the binary file

(and yes, the -erasechip line is duplicated!)
For example, to program an F429 with the LCD16.bin code in D:\bins:

C:\...flasher>stm32flash.exe -prog -loader algo\stm32f4xx.bin -binary D:\bins\LCD16.bin
ST-Link opened
INIT ... running
PROGRAMING ... start
progress:25%
progress:50%
progress:75%
PROGRAMING ... done
UNIT ... running
status = 1
Done


Hope this helps,
newbrain


Thank you for your help.
An other question :
What is the difference between -loader and -binary ?
My software doesn’t have a loader in the STM32.
Is that command is right if I don’t use a loader in the STM32 :
stm32flash.exe -erasechip -erasechip -prog -binary D:\bins\LCD16.bin

I want to use this command in Eclipse External tools.

Regards


You’re welcome,
I’ll try to answer for as much as I know, that being not much: consider that I downloaded System Workbench just yesterday...

As far as I can understand, the loader contains the chip-specific flashing algorithm; the flasher complains if you don’t use that option.
All the needed loaders should be in the algo directory, so if you are using e.g. an STM32F4xx, you specify -loader algo\stm32f4xx.bin and so on for other µC.
I suppose bad things can happen if the wrong loader is used (or maybe not, but I won’t try on the single board I have wink).

The note about -erasechip was simply to state that the -help option prints that line twice, for whatever reason. I don’t think you need to specify it twice, and I do not know whether you can combine more than one command on a single line (-prog and -erasechip), as I only tried the -help (just a lucky guess) and then the -prog options.

HTH,
newbrain

Hi

Can anyone tell me how I can get the flahser command lien programmer for STM32F please?

France

Hi,

If you use the latest version of System Workbench for STM32, the simplest way to flash a program to your board (assuming you are able to debug programs running on your board) is to right-ck=lick on your project then Target >> Program chip...; a dialog will allow you to select the ELF executable you want to download and voilà...

Bernard (Ac6)


Good idea adding it to external tools.

This batch file might help:

@echo off

set flasherdir=your path to the flasher

set binfile=%~dpn1.bin
set binname=%~n1.bin

cd %flasherdir%

if exist %binfile% (
echo Starting to flash %binname%
ac6_stm32flash.exe -erasesector -loader algo\stm32f4xx.bin
ac6_stm32flash.exe -prog -loader .\algo\stm32f4xx.bin -binary %binfile%
echo Resetting board
ac6_stm32reset.exe
) else (
echo Cannot find bin file: %binname%
)

exit


Save the script to, say, “flash.bat”, and put its full path+name in the “Location:” field of the ext.tool run configuration.
Use whatever you prefer as working directory.
For the “Arguments:” field, click “Variables...” button, and choose “selected_resource_loc”.

To use it to flash a .bin you just need to click on any .elf or .bin file in the project explorer to select it and then run the tool by clicking the External tools button.
The batch script tries to change the extension to .bin; if the file is found, it first partly erase the flash, then flash the binary and finally resets the board.

It works for me, but YMMV.
If your target board catches fire, your cat is teleported to Mars or you start speaking ancient tongues, I take no responsibility!


Hello,

Thank you very much, I will test this script.
I will post the result of my test.

Have a nice day !
Regards
Gerald HILD


Hi,
I downloaded and Installed a install_sw4stm32_win_32bits-v1.0.exe, but I can’t locate the ac6_stm32flasher.exe file. Was it excluded from current release ? From where I can download it ?

Also I wolud like to know what I need to change in Project Propperties to force eclipse generation of intel hex files ?


Hi,

1-
The “ac6_stm32flasher.exe” ($ECLIPSE_HOME/plugins/fr.ac6.mcu.externaltools.win32.xxxx/tools/flasher) is an obselete tool. It does not support all the boards.

For now, we recommend you to launch the debug to program your chip or to download and to use “STM32 ST-LINK Utility” (at http://www.st.com/web/en/catalog/tools/PF258168).Question
We are currently working on a new feature to program/erase the chip from the Windows and Unix-based systems versions.

2-
To generate an intel hex file, you need to change the post-build command.
Select the project > Properties > C/C++ Build > Settings > Build Steps
Then replace the command by :
arm-none-eabi-objcopy -O ihex “${BuildArtifactFileBaseName}.elf” “${BuildArtifactFileBaseName}.hex”

Kevin.


France

Hi everybody,

If you use the latest version of System Workbench for STM32, the simplest way to flash a program to your board (assuming you are able to debug programs running on your board) is to right-ck=lick on your project then Target >> Program chip...; a dialog will allow you to select the ELF executable you want to download and voilà...

Bernard (Ac6)


Hello!

I have a question about “Target -> program chip/erase chip”. I had this function in my “ac6 workbench for STM32” recently I was already using it and it worked fine. Now suddenly it’s missing... I didn’t reinstall my workbench or anything... Do you have any idea why is that so and how to solve it (maybe in settings somewhere?)

Best regards,
Jure

Are you sure the project is a C or C++ project for AC6 (with gcc toolchain) ?

And did you build the project sucessfully ?

On which version you are working ? plugin ide version.

Yes I am sure this project is a C/C++ project for AC6.

I have Ac6 C/C++ EMbedded Development Tools for MCU (Version 2.0.0.201705161428) (Plug-in id: fr.ac6.mcu.ide)

My project builds successfully, I can also debug my program and it is working. I am just wondering why this funtion (target -> program/erase chip is gone)

My tool chain editor: Current Tool Chain: Ac6 STM32 MCU GCC
Current builder: Gnu Maker Builder

Used Tools (MCU GCC Compiler, MCU GCC Linker, MCU GCC Assembler)

Hi, may I ask you whether you figured out why the “Target->Program Chip” option was missing when right-clicking on the project?

I’m having the same problem, suddenly. It was working before. Having a lot of trouble finding out what’s going on, so any help very much appreciated!

Hi!
Yes I remember that I found the problem, but I cannot tell you exactly what was wrong at the moment... I will look into it and hopefully I recall from my memory.
Tomorrow I’ll let you know either way.

Thank you for any hints, I’m totally blocked by this problem so I’ll appreciate any advice you might have!
France

Hello pibegotan ,

Such Target menu lack issue is a well known one. It happens only within sw4stm32 September release. Such has been fixed shortly at that time. See http://www.openstm32.org/tiki-view_forum_thread.php?threadId=5694QuestionQuestion

Definitively recommended way to flash target Thanks IDE are Target > Program chip ... and Target < Erase chip ... shortcuts.

From my mind you may have to get some trials on your side :
1) Let’s create a brand new project (fake one) within your current workspace. Let’s have a try from such project context to double check if Target menu is available or not. If available means your working project is badly set or corrupted at a point missing some project nature within .project file. If not available let’s move to next trial ...
2) Let’s ensure you’re not relying on sw4stm32 September release ... best would be to update your current sw4stm32 instance to latest release (issued 2 weeks ago)

Feel free to share outcomes.
Br.

France

Hello pibegotan,

Definitively “Target” menu is ONLY “Project Explorer” view based. Such “Target” menu is not available from “Navigator” view or nay other. I guess such maybe considered by sw4stm32 dev. team.

Br,
cartu38

France

Hello kembl2101,

Definitively “Target” menu is ONLY “Project Explorer” view based. Such “Target” menu is not available from “Navigator” or “C/C++ projects” view. I guess such maybe considered by sw4stm32 dev. team.

Br,
cartu38


France

Hello kembl2101,

According your shared snapshots, you’re not relying on latest sw4stm32 release.

Such Target menu lack issue is a well known one. It happens only within sw4stm32 September release. Such has been fixed shortly at that time. See http://www.openstm32.org/tiki-view_forum_thread.php?threadId=5694Question

Definitively recommended way to flash target Thanks IDE are Target > Program chip ... and Target < Erase chip ... shortcuts.

My advice would be so to initiate some of your sw4stm32 instance update.

Feel free to share outcomes.
Br.


this happened to me. i was not getting target in the menu.
i had selected to open something in Navigator early in the day. that opens up a pane right in the same area as the project... and does not allow you to flash. close the navigator tab if it’s there.

when you right click and select to view an item in the navigator, that’s what triggers the problem.

France

Hello oliver27b,

Definitively “Target” menu is “Project Explorer” view based. Such “Target” menu is not available from “Navigator” view. I guess such maybe considered by sw4stm32 dev. team.

Br,
cartu38

I confirm: the option was not in the menu and I had to close the “Project explorer” view and re-open it to get the “Target” menu back. Thanks for the tip!

Make sure you are right clicking your project under Project Explorer tab, not under C/C++ Projects or Navigator tab.