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


MCU Setting not inherited by subfolder

If you set different compile options than a top-level options to a subfolder, MCU Settings are not used to compile the subfolder.

All the source codes need to be compiled with -mfloat-abi=hard for my board.
I want to compile 3rd party sources like DSP, Drivers and Middlewares with less warning options. So I set different compile options to those folders. The problem is that -mflost-abi=soft is used automatically to compile those folders.

I think the cause of the problem is
- MCU Settings are not used to compile subfolders with different compile options
- When -mfloat-abi is not specified(there’s no way to specify that!), -mfloat-abi=soft is used automatically

workaround


Modify plugin.xml as follows,

isDefault=”true” -> change to “false”
command=”-mfloat-abi=soft”

isDefault=”false” -> change to “true”
command=”-mfloat-abi=hard”

and restart eclipse with -clean.

Hello,

Which OS are you working on ?
Are you up to date with the plugins ? Menu Help => Check For Updates

I don’t reproduce your issue, i have changed the settings on a subfolder (removed “all warnings” checkbox) and the overall mcu settings for fpu is still set to “hard”.

I don’t understand exactly the issue, just after you created the prj, was the “Mcu settings” for the project already setting a “soft” option for fpu ?

Rgds,
Laurent


Hi Laurent,

I forgot to say that you need to restart eclipse to reproduce the bug. Without restarting, flags on the subfolder looks OK.

I’m using System Workbench version 1.11.0.201610101240 on Ubuntu linux.

Here’s steps to reproduce the bug.
1. Launch eclipse
2. Create a new workspace.
3. File->New->C project
4. Enter project name. Choose Ac6 STM32 MCU GCC as toolchains. Click Next.
5. Click Next
6. Choose STM32F7 as Series. Choose NUCLEO-F746ZG as Board. Click Finish.
7. Right click the top level folder(project) and open project settings.
8. check C/C++ Build->Settings->MCU GCC Compiler. It has -mfloat-abi=hard in All options.
9. Right click src/ folder ->New->Folder. Create a subfolder.
10. Right click the subfolder and open properties.
11. Open C/C++ Build->Settings->MCU GCC Compiler->Warnings. Check “Pedantic”.
12. Close eclipse and launch it again.
13. Check the compile options of the subfolder. It now has -mfloat-abi=soft

Hello,

OK, i reproduce the issue on Windows 7 too.
Yes, it seems when SW4STM32 is closed, it saves the prj but with wrong options on this new directory.

I hope it will be corrected in next version.

By then, you can live with your workaround.

Thanks,
Laurent


Thank you, this was also a problem for me. I haven an STM32F746G-Discovery board
I got the error message in System Workbench STM32

arm-none-eabi-gcc: error: -mfloat-abi=soft and -mfloat-abi=hard may not be used together

and your solution works fine.

I edited this file:

...\SystemWorkbench\plugins\fr.ac6.mcu.ide_1.11.0.201610101240\plugin.xml

I hope, when the bug is fixed, the setting will be inherited from root project settings!

Edit:
Now I have new problem. The compiler no has an error:

sorry, unimplemented: Thumb-1 hard-float VFP ABI

I think this may be related to the default setting for ” -mcpu=cortex-m7 “, but I can’t find it in any .xml file as default. Does anybody know where it is?

Edit 2:

I don’t know the root-cause, but here is my work-around:

Open the .cproject in your project and for each folder there will be some configuration. Look for the part for the sub-folder and change it to match your root project folder. For me this looks like this(X,Y,Z,W are just n
umbers):

option id=”fr.ac6.managedbuild.option.gnu.cross.mcu.XXXXXXX.YYYYYYYY” name=”Mcu” superClass=”fr.ac6.managedbuild.option.gnu.cross.mcu” value=”STM32F746NGHx” valueType=”string”/>
option id=”fr.ac6.managedbuild.option.gnu.cross.board.ZZZZZ.WWWWWWWW name=”Board” superClass=”fr.ac6.managedbuild.option.gnu.cross.board” value=”STM32F746G-DISCO” valueType=”string”/>

Hello,

Can you check you have a mcu device selected in Project Properties -> C/C++ Build -> Settings -> Target tab ?
And a board created.

Dear LaurentL,
the problem is not with the main project. I specified my board correctly there.
The problem is with manually created folders (other than “Src”) in the project at the root level.
These sub-folders (I use a virtual folder “Common”) do not inherit the compiler settings from the parent project.
To be clear, when I right-click on my sub-folder, there is not “Target” tab on the page: “Properties -> C/C++ Build -> Settings” . Only the “Tool Settings” is available there.

That’s why compilation fails.


I have the same problem for STM32F437 project. Different folders compiled with different options. Some folders lost options “-mcpu=cortex-m4” “-mfloat-abi=hard” “-mfpu=fpv4-sp-d16”.
Workaround from first message help me and I add manualy option “-mcpu=cortex-m4” but in this case I can not compile projects for STM103 because it has not FPU.
Do you have a plan to fix this bug?


Hi all,

For information the bug of “MCU Setting not inherited by subfolder” has been fixed in the System Workbench V2.3

Regards,
vionf