Loading...
 

STM32MP1 support available in SW4STM32

   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 download a short video showcasing this on the ac6-tools website (registration required).

System Workbench for STM32


Strange compiler error/warning flagging [SOLVED]

France

Hi,

If your code is as you show, the error is normal: the last line ( CliCmd.num = 0; ) is an assignment; it can’t be placed at global file level, but must be inside some function.

If you want to statically initialize CliCmd by just setting num to 0, you must replace your last two lines by cli_cmd CliCmd = { .num = 0 };

Be careful not to forget the dot before num; if you need to also initialize other fields separate them by commas inside the braces (the order does not mind).

Note however that, if you want to initialize all fields to zero, you may as well do nothing, as the C compiler will initailize all non-initialized variables and fields to 0.

Bernard (Ac6)