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


Detecting active build config at compile time

Newbie on the site using NUCLEO-F767ZI - forgive me any unintended indiscretions, but do point them out so I can learn.

How do I detect which build config is active at time of compilation?

If DEBUG is active then I want to printf info to the console
otherwise send the same info via UART

Code example ...

  1. ifdef DEBUGactive

printf(...);

  1. else

send(...);

  1. endif
France

Hi,

You’re almost right in your guess: use #ifdef DEBUG and it will work cool

Bernard (Ac6)


hi

ich have one projekt with 3 different targets

so i configured 3 different build configurations.

“TEST_A” : symbols: TEST_A
“TEST_B” : symbols: TEST_B ; FEATURE_B
“TEST_C” : symbols: TEST_B ; FEATURE_C

BUT:
In my sources i use preprocessor switches ( #ifdef / #endif ) to select the functions.

but i cant see any changes in highlighting in sources.
it seems it compiles correctly ... but you can’t see the changes if you switch the active build configuration.

is there a “trick” ?


EDIT:

i can use i any headerfile #define TEST_A ...
but i think this is also possible with different configurations like “Debug/Release”