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


BLE warnings on ST example

Hi,

While trying to use ST example for BLE, I got 63 times this warning:
packed’ attribute ignored -Wattributes

I imported ‘SensorDemo’ project from X-CUBE_BLE1Question.
(youare wellcome to import it too in order to view all the warnings).
It is worth mentioning that this project version for IAR compiled free of warnings.


my HW:
stm32L476 NUCLEO + X-NUCLEO-IDB05A1.
OS:
Windows 10.
AC6:
1.14.1


Can someone assist?

Thanks.

Hi Udibit,


It happend beacuse your example use some files to compile according with IAR compiler.

The __packed attribute is kinda different on GCC compiler, as described here:

https://www.iar.com/contentassets/e20cfa542d1a4734aa6b234bea42f11a/example-5.pdfQuestion

To solve this, you can go to:

Project Proprieties -> C/C++ General -> Paths and Symbols -> (TAB) Symbols

and press to add a symbol, and:

name: __packed
value: attribute packed

You should do it to __weak too


I saw this on a generated project from STM32CubeMX.

Thanks danilopucci.

The suggested correction did not work.
Can you recheck the symbol value?
you wrote:
name: __packed
value: attribute packed?
(please atached image or file)

But, your direction did assist me, since I understood that this kind of warnings are probably due to some macro defined in the BlueNRG package that are already defined in the code generated by the GNU ARM Eclipse plug-in.
Therefore, I found the following workaround:
__packed is also defined in cdefs.h (file in Atollic installation directory) - I have commented that line (see attached file)

I am not completely satisfied with this solution because it makes changes in Eclipse file (which is common to different projects).

The archaic forum engine badly alters any entered source code to something intangible.

Yes, this is a programming related forum where we can’t paste code so we have to attach it as a picture...

You can use conditional definitions.

Edit:

Oops, sorry dear moderators, I just unintentionally pressed the “report” button on the parent post.


Hi Udibit,

Ooops, when I posted I didnt see that the format was corrupted, as Bugmenot said.

Yeah, this is a solution but not the best one, as you said.

See attached screenshots.

It is Project Proprieties -> C/C++ General -> Paths and Symbols -> (TAB) #Symbols


Yes, I have figured it out and try it - but no help, warnings remains.

As I wrote it is probably due to some macro defined in the BlueNRG package that are already defined in the code generated by the GNU ARM Eclipse plug-in (cdefs.h).