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

where are the 'inc' directories & can the target be Reset

Hi, I’ve got a basic program working from
by following “UM1730 sect 4.1 SW4STM32”
(also repeated here http://www.openstm32.org/Importing+a+STCubeMX+generated+project)Question
I created an AC6/Eclipse workspace - “uPyCubeAa” and then copied in the above CubeMX directory structure
From eclipse I File -import-General-Existing Projects = specify the directory above
Then I build - and it compiles sucessfully - fantastic.
I create a Debug Configuration modifying Debug to “Mnaual spec” and Debug Device ST-LinkV2-1 & Debug Interface SWD

I have a NUCLEO-401RE board that I’ve hot wried to my target board including NRST and removed the two ST-LINK jumpers.
The ST-Link has been upgraded and “DETAILS.TXT” says Version: 0221 Build: Apr 29 2015 13:11:12
The target board is pyboard.org F405RGT6, not the STM324xG_EVAL F407 but I’m hoping this is close enough.
Then I press the debug.
It loads over the SWD and I can single step it. Fantastic.

Now I need to make some modifications to the board definitions in the include files.
I start poking around in the Eclipse “Project Explorer” - but can’t find a directory representing the “inc” files.
Is there one?

How should I add a project specific include.h file - I tried a number methods and the .h files ended up in strange unexpected places, and then didn’t seem like I could put a search path to them !

So I take the project define file “stm324xg_eval.h” and modify the LEDS defintion for my target.
I build and download again, and single step.
The pointer into the source file starts off correct, but after a couple of “step over” over init routines points into the top of the file, and then seems to find the right place.
I press the Terminate button to stop the ST-Link.
So I change the optomization on the compiler to -O0 (none) from -Os (size).
And start again, rebuilding.
So now it behaves.
Now I step into a BSP_LED_Init()
The changes I’ve made to the file - get into a problem - and the ST-Link stops working.

Error: jtag status contains invalid mode value - communication failure
Polling target stm32f4x.cpu failed, GDB will be halted. Polling again in 6300ms”

The Reset button is greyed out, so I guess that is not working.
I try pressing the Terminate button and then the Debug.
At the same time I monitor the hardware NRST line - it remains inactive high.
Then I try to launch again pressing the Debug and I get an error in Launch Sequence.
Error in final launch sequence
Failed to execute MI command:
-target-select remote localhost:3333

Error message from debugger back end:
localhost:3333: The system tried to join a drive to a directory on a joined drive.
localhost:3333: The system tried to join a drive to a directory on a joined drive.

which I think means GDB has failed.

To get control, I have to exit Eclipse, power down the target board, remove the ST-Link USB mini connector,
then reinsert ST-Link USB mini, power the target board - NRST is now active low.
Then startup Eclipse, and press button Debug selecting “STM324FxG_EVAL Debug”
It now links the target, ST-Link releases NRST and downloads the .ELF successfully.

So is there a way of enabling a reset on the target board?

What version of CubeMX are you using? I have 4.11 and the generated project has subdirectories:

If I open “Includes” one of the subdirectories is $PROJECT_DIR/Inc and if I expand that I see all the header files.

CubeMX Ver 4.11
STM32Cube V1.0
I have the list of include files, but can’t access the ‘inc’ directory.

When I created a .h in the src directory - it didn’t actually put it physically in that directory.
Just wondering what the model is, and looking to do periodic snapshot/back up.


Hi... I guess I’m asking these questions to be able to use the environment for being able to prove a concept for a real product development.
I do appreciate the examples for being able to see how the peripherals are driven.
Its a starting point, and then usually want to push the code in the direction for a product concept.
So haveing made some incremental Code modifications to a project, now I would like to be able to snapshot it and do a backup. In the past this has been the most effective way of maintaining stability and moving a project forward.
The purpose is if the stability is lost, having a previous snapshot to restore to an empty directory and do a code compare.

I try File-export - general file - archive - specify the extensions I’m interested in
Problems were encountered during export:
Error exporting STM32F429I-Discovery/Middlewares/STemWin/Config/LCDConf.c: File not found: ..\uPF329discoA\V1.9.0F249disco\Projects\STM32F429I-Discovery\Demonstrations\Config\LCDConf.c.
File not found: C:\Users\neilh77\sw\uPF329discoA\V1.9.0F249disco\Projects\STM32F429I-Discovery\Demonstrations\Config\LCDConf.c.

So looks like this must be a turd left somewhere, there is no file in this directory “LCDConf.c” but there is “GUIConf.c”
So any suggestions for a stability snapshot/backup appreciated.

I use “File->Export->General->File System” and export the entire project tree. If I need go read it back in I use “File->Import->Existing Projects Into Workspace”.

The example projects are in the repository filesystem tree, and have relative paths referencing other objects in that tree. That may be the cause of your error. I leave the examples unmodified any copy any bits I want to a project that was created in my workspace.

exporting a project that contain “virtual folder” and linked resource is not always the “good” way to snapshot or backup work.
Export will actulay copy link target and produce a real file struture (no link) what is not what one may expect
it can be convenient to export complex project with “sub project” or part of it linked and actulay hide this in the exported project (self contained)
it may brake project mainly because export will not address the “external include”
For relative path it will brake if you retsroe to a diferent place or the external move dare needed to be backup also
aboslute path wil do if you move project btu are yet not bakcup

Note that ST sample project are hard to backup as all project point to the lib hal/midllewaer etc.. :-(

A better way to build eclipse project that better export (are better indexed with better build depedencioes as wel) is to add all “include” folder as linked folder into the project tree (relative to project or by extending soem variable for instance ‘STM32xxxCUBE_BASE_LIB)
then add include path as “worksapce” path (absolute path will be resolved by eclispe)

if you do that “export” would word also for the extra folder as now part/linked to the prohject
also thsoe file will get in build dependencies what is not the case for non project “external inc”.

It’s good to use “variable” to link the lib and thrid party rather than relative path
as it more easy to manage upgrade or change in project or dependencies location (only change a variable not the full project)

if you want to bakcup just only what is contained in a “project” do not use export just copy/zip the project outside eclipse.
or use export file system sugested by alec

thanks to Alec - Export-General-File System and import works for me except as & diabolo38 points out it doesn’t export .h files
Its pretty standard to make changes to .h files to try different configurations - so very strange they are not part of the project tree.

One of the basic problesm with the import from CubeMX is that the files don’t actually exist in the project directory - they are elsewhere so not possible to snapshot the structure - absolute problem, very painfull.
Thanks to diabolo38 for also pointing out how to get the include files as direct links - that would be so much nicer.
I couldn’t figure out a way of creating a linked directory for the include files - so I suppose it has to happen at project creation time.

Right now I think I have to try and move the files out of the CubeMX structure asap - it works for the demo, but I’ve screwed up the project by trying to move a file from one directory to another, and its messed up the build. Unbelievale and I can’t figure out the virtual project structure. So it is not a safe repeatable reliable environment for software production. I define production software as something that I can stand behind to be sold with an STM32F processor, AND reliably make functional changes.

Creation of linked file or folder is simple and can be doen any time (if you use cubemx that’s not recomanded)
it can be done by menu”new file/folder” -> advance->link ...” etc
delateation just selct and press del or derigth clcik del (this only delete the link not the target file)
but it can be much simpler to use drag and drop to add new link

basicaly go into the explorer or equivalent (win linux mac work all os work)
grab the folder to link say “wher i have installed CUBE_MX”/Driver/STM32F4xx_HAL_Driver/Inc
drop it in the “virtual” or the folder of the porject wher you want it
eclispe will show you a popup select” link to file and folder” then select relative path absolute or use any variable you want voila.
you may try the other option for learning what it is ;)

Note that virtual folder appear with a “white rectable” decorator
Note that all linked file/folder appear with the link “arrow” decorator

in a project you can view and edit the exiting (or broken) linked resources by going into poject properties -> Resource -> linked resources”