cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to compile the generated project x-cube-subg2 for Nucleo-f429ZI

pudding
Associate II

I am not able to use the UDP Server application(x-cube-subg2) for the extention board S2915A1. When I try to compile the generated code, I get the following compilation error. I had no trouble with running the P2P application from the same package, but this one doesn't seem to compile out-of-the-box for some reason.

STM32Cube/Repository//Packs/STMicroelectronics/X-CUBE-SUBG2/5.0.0/Drivers/BSP/Components/S2LP/S2LP_Library/inc/S2LP_Csma.h:102:3: error: unknown type name 'SFunctionalState'

STM32Cube/Repository//Packs/STMicroelectronics/X-CUBE-SUBG2/5.0.0/Drivers/BSP/Components/S2LP/S2LP_Library/inc/S2LP_Csma.h:154:15: error: unknown type name 'SFunctionalState'; did you mean 'FunctionalState'?

(There are 73 errors similar to these ones)


To give a little bit of context, the type "SFunctionalState" is declared in a file called S2LP_Types.c and the header file of the file is properly included inside the complaining file.
From my perspective, the issue seems to be related to a circular dependency issue, causing the defined variables not to be included properly. Can somebody confirm that whether they are able to build the application mentioned in my case for the board Nucleo-F429ZI?

Upon working on this example I found the attached documentation particularly useful, and have applied the instructions as they are. I was able to work with the P2P application, but no luck with the UDP-Server example.

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
MGREL
ST Employee

Hello,

as documented in the "Known Limitations" sections of both main Release Notes and Getting Started Guide (p. 35): 

"When using STM32CubeMX SUBG2 pack, the Contiki-NG based projects for STM32CubeIDE must use “Standard C” library instead of the default “Reduced C” (Properties, C/C++ Build, Settings, MCU Settings, Runtime library => Standard C)." 

UDP Client and Server application are based on the 6LoWPNA Middleware (Contiki-NG), while P2P application is not.

So just enable "Standard C" library and compilation should be fine (in Debug configuration you will have some warnings because the Contiki-NG third party Middleware is not modified and there is a duplication of the DEBUG symbol).

Please let me know if this solves your issue.

 

Best regards,

Marco

View solution in original post

7 REPLIES 7
Mahmoud Ben Romdhane
ST Employee

Hello @pudding,

Let me thank you for posting and welcome to the ST Community.

For more investigation, I suggest that you provide your Ioc.File.

Thanks.

Mahmoud

pudding
Associate II

@Mahmoud Ben Romdhane 
Please find the ioc file for the nucleo-F429ZI attached.


@pudding wrote:

To give a little bit of context, the variable (sic?)  "SFunctionalState" is declared in a file called S2LP_Types..


But the error message talks about a type name - not a variable.

 


@pudding wrote:

(There are 73 errors similar to these ones).


That is typical of having omitted a needed header...

Or, perhaps, there's a typo in the declaration but all the uses are correctly spelled?

Hello @Andrew Neil,

I intended to describe the variable with the type SFunctionalState. The type is indeed declared in the included header file, but during compilation, it cannot be included due to an issue, resulting in the type not being resolved.

All the code was generated from the IOC file, and I haven’t made any contributions to the project yet. My goal here is to compile and test the provided project.

Hello @pudding 

The issue is confirmed, and it will be investigated by the STM32cubeMX team (Internal ticket number: 194828),

Thanks.

Mahmoud

MGREL
ST Employee

Hello,

as documented in the "Known Limitations" sections of both main Release Notes and Getting Started Guide (p. 35): 

"When using STM32CubeMX SUBG2 pack, the Contiki-NG based projects for STM32CubeIDE must use “Standard C” library instead of the default “Reduced C” (Properties, C/C++ Build, Settings, MCU Settings, Runtime library => Standard C)." 

UDP Client and Server application are based on the 6LoWPNA Middleware (Contiki-NG), while P2P application is not.

So just enable "Standard C" library and compilation should be fine (in Debug configuration you will have some warnings because the Contiki-NG third party Middleware is not modified and there is a duplication of the DEBUG symbol).

Please let me know if this solves your issue.

 

Best regards,

Marco

pudding
Associate II

@MGREL Thank you, I am able to compile the project now.