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


What is %cd% in build log? (Linux.)

18:26:42 **** Build of configuration Release for project F0disco Configuration ****
make all 
Building file: /home/hbarta/Documents/ecl-ws/F0disco/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c
Invoking: MCU GCC Compiler
%cd%
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -mfloat-abi=soft -DUSE_HAL_DRIVER -DSTM32F072xB -IInc -IDrivers/STM32F0xx_HAL_Driver/Inc -IDrivers/CMSIS/Include -IDrivers/CMSIS/Device/ST/STM32F0xx/Include -Wall -fmessage-length=0 -ffunction-sections -c -MMD -MP -MF"Drivers/STM32F0xx_HAL_Driver/stm32f0xx_hal.d" -MT"Drivers/STM32F0xx_HAL_Driver/stm32f0xx_hal.o" -o "Drivers/STM32F0xx_HAL_Driver/stm32f0xx_hal.o" "/home/hbarta/Documents/ecl-ws/F0disco/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c"
/home/hbarta/Documents/ecl-ws/F0disco/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c:54:27: fatal error: stm32f0xx_hal.h: No such file or directory
 #include "stm32f0xx_hal.h"
                           ^
compilation terminated.
make: *** [Drivers/STM32F0xx_HAL_Driver/stm32f0xx_hal.o] Error 1

18:26:42 Build Finished (took 57ms)


This is the first build on a new project and as is typical, the headers are not located. On previous projects I have had to replace the relative paths with absolute paths because I could not figure out where the relative paths were relative to.

I wonder what the %cd% is on the line before the compile command. It looks like a CMD.COM environment substitution that probably does not work on Linux.

I’m happy to see the Linux plugin updated but sad to see that this problem remains unsolved.

If there is a means of solving this on my end (aside from updating all include paths) please let me know!

The %cd% is the result of an “echo %cd%” which display the build directory on Windows and does, of course, not work on Linux. We will fix it on the next update.

About the paths, how did you import the Cube generated project? It should be imported with the “Copy projects into workspace” unchecked. We are still working on a better integration of Cube projects.

Hope it will help you.

Kevin.



Hi,

I’m used to fix include paths problem under linux by adding “../../../” at the beginning of each include path in the project configuration (project generated under CubeMX and then imported in following the instructions, “Copy project into workspace” unchecked).
In such a way, include paths still are relative instead of absolute as you described.

Hope this help.

Basile

Yes - thanks! That is very helpful information. I’ll give that a try next time I load up an MX generated project.

in case you upgrade cube porject intregation would you lind about this few points
-use virtual folder and linked folder rather than linked file (use exclude from build to omit non use source file into folders)
that way user can add it’s own source file they will alway be taken into account even if project is regenerated from cube.
-link the include folder into the projects and add the project linked folder in the c/c++ path
it will help indexer and dependecies building (all external include seam not be to part project depends) and ease navigation (call tree etc..)
it appear that changing hal or any user include file is not taken into account for rebuild.
a clean and rebuid must be done what is slow


12:18:06 **** Incremental Build of configuration Debug for project prueba2_sinADC ****
make all
Building file: C:/STM32Toolchain/projects-kepler/prueba2_sinADC/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c
Invoking: MCU GCC Compiler
%cd%
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -mfloat-abi=soft -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F051x8 -I”C:/STM32Toolchain/projects-kepler/prueba2_sinADC/Inc” -I”C:/STM32Toolchain/projects-kepler/prueba2_sinADC/Drivers/STM32F0xx_HAL_Driver/Inc” -I”C:/STM32Toolchain/projects-kepler/prueba2_sinADC/Drivers/STM32F0xx_HAL_Driver/Inc/Legacy” -I”C:/STM32Toolchain/projects-kepler/prueba2_sinADC/Drivers/CMSIS/Device/ST/STM32F0xx/Include” -I”C:/STM32Toolchain/projects-kepler/prueba2_sinADC/Drivers/CMSIS/Include” -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -MMD -MP -MF”Drivers/STM32F0xx_HAL_Driver/stm32f0xx_hal.d” -MT”Drivers/STM32F0xx_HAL_Driver/stm32f0xx_hal.o” -o “Drivers/STM32F0xx_HAL_Driver/stm32f0xx_hal.o” “C:/STM32Toolchain/projects-kepler/prueba2_sinADC/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c”
/usr/bin/sh: -c: line 0: syntax error near unexpected token `(’
/usr/bin/sh: -c: line 0: `arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -mfloat-abi=soft -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F051x8 -I”C:/STM32Toolchain/projects-kepler/prueba2_sinADC/Inc” -I”C:/STM32Toolchain/projects-kepler/prueba2_sinADC/Drivers/STM32F0xx_HAL_Driver/Inc” -I”C:/STM32Toolchain/projects-kepler/prueba2_sinADC/Drivers/STM32F0xx_HAL_Driver/Inc/Legacy” -I”C:/STM32Toolchain/projects-kepler/prueba2_sinADC/Drivers/CMSIS/Device/ST/STM32F0xx/Include” -I”C:/STM32Toolchain/projects-kepler/prueba2_sinADC/Drivers/CMSIS/Include” -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -MMD -MP -MF”Drivers/STM32F0xx_HAL_Driver/stm32f0xx_hal.d” -MT”Drivers/STM32F0xx_HAL_Driver/stm32f0xx_hal.o” -o “Drivers/STM32F0xx_HAL_Driver/stm32f0xx_hal.o” “C:/STM32Toolchain/projects-kepler/prueba2_sinADC/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c”’
make: *** Drivers/STM32F0xx_HAL_Driver/stm32f0xx_hal.o Error 1

12:18:07 Build Finished (took 544ms)

------------------
I have this problem trying to build my project, which has being created with STM32CubeMX.

Thanks for ay help!


I can’t tell what platform you’re using. ‘C:’ in path points to Windows. ‘/usr/bin/sh’ in commands points to Linux/Unix/OS X. What is it?
Are you using MX stand alone or as an Eclipse plugin?
What versions of MS and Workbench are you using?

With up to date versions of the S/W I am building (mostly) without difficulty on Linux. I’m using MX 4.19 and Workbench installed on Eclipse Neon.2.


I finally did this trick: http://www.openstm32.org/forumthread1636Question (Go to “project properties”→ “C/C++ build” → settings → “tool settings” → “MCU Gcc compiler” → “Preprocessor” → “Defined Symbols”
Chose weak and packed to edit them by manually add “” around. )

And it works perfectly.

Thank you very much!