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


Using multiple build configurations

For my program i need a serval different versions. So i made a few build configurations. The differences in version are defined in C/ Build-> Settings->Preprocessor->Defined symbols. For each configuration i made a different symbol. Type1, Type2 ect.

Now my programs knows the the symbol and with #if defined Type1... and #if defined Type2... enable and disable the code.
However the eclipe editor keeps the code always marked gray as if not active. I know its active because if making a typo it will fail on that.
AC6 please enable the text when the define is true (or do i have to set the define somewhere else?)

I had the same problem (I think) that you’re describing and found a solution.

This is an Eclipse configuration issue and not one with the AC6 extensions.

I was able to resolve it by changing one of the indexer options, which you can get to by navigating to:

Window -> Preferences -> C/C++ -> Indexer

Look for the option “Use active build configuration” (it’s towards the bottom of the dialog) and make sure it’s selected.

Project-specific indexer settings are disabled by default when a new project is created, so while it would be possible to get the indexer to properly highlight/de-highlight #if’ed code sections based on build configuration selected without changing the global setting (which is what you’re doing if you change the setting I mentioned above) it’s more work, and something you need to remember to change every time you start a new project.

Just in case you want to use project-specific indexer settings, you can change these by navigating to:

Project -> Properties -> C/C++ General -> Indexer

Then tick on the “Use project specific settings” checkbox and select the “Use active build configuration” radio button.

The Eclipse syntax highlighting system and symbol indexer are smart enough to recognize preprocessor symbol definitions that are made based on build configuration, but it does not handle this correctly by default. It took me some time to figure out how to get this to work rolleyes


That did the trick, AC6 should enable “Use active build configuration” by default i guess.
Same for the setting Window > Preferences > General > Workspace and check the “Save automatically before build”.
Realy confusing if thats not enabled.