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


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)