cancel
Showing results for 
Search instead for 
Did you mean: 

STM32wl55 subghz linker error using cubemx

SK.20
Associate

Hi there,

I want to run some commands and get results on our custom designed STM32wl55 PCB.

I started the project using cubemx but there is a subghz linker error.

Could you please help me how to solve it?

Thanks

Error: L6218E: Undefined symbol HAL_SUBGHZ_Init (referred from main.o).

Error: L6218E: Undefined symbol MX_LoRaWAN_Init (referred from main.o).

Error: L6218E: Undefined symbol MX_LoRaWAN_Process (referred from main.o).

Error: L6218E: Undefined symbol HAL_SUBGHZ_IRQHandler (referred from stm32wlxx_it.o).

Not enough information to list image symbols.

9 REPLIES 9
Khouloud ZEMMELI
ST Employee

Hello @SK.20​ ,

Thanks for your post,

Could you please share your ioc file to check the problem?

Khouloud

Thanks for your reply,

Here is the attached file.

Cheers

IREMI.1
Associate II

Hi SK,

your ioc is not so bad as from first description

I can see that Middlewares -> LoraWAN have been enabled in the meantime.

MX_SUBGHZ_Init doesn't need to to called, this should be removed in the panel

 ProjectManager -> Advanced Settings -> generate Func Calls and pinning the "do not generate function call" and unpinning "visibility"

 for both MX_SUbGhz_Init and MX_LPUART1_Init

The initialisation of these modules is done by MX_LoraWAN_Init.

Notice also that in the RF example provided the following checkbox is always pinned (but not in your ioc):

 ProjectManager -> Code Generator -> Generate peripheral init as pair of .c/h files per peripherals

Hello @SK.20​ ,

Sorry for the delay,

I have checked from my side using your ioc file (thank you for providing it, it helped me to reproduce the issue) with the latest CubeMX version (6.3.0) and I only find this error:

Error: L6218E: Undefined symbol MX_SUBGHZ_Init (referred from radio_driver.o)

Could you please check with the latest Cube version to confirm if you're facing the same error as in my case or not?

Thanks for your feedback and for your contribution, Issue will be fixed., as a workaround ( already mentioned by @IREMI.1​ , and thank you for you intervention), the recommended configuration is to tick the "Do not Generate function call" and untick the Visibility for SUBGHZ IP.

Hope this answer helped, when your question is answered please select the reply as Best to help other to find that answer more faster :)

Khouloud

IREMI.1
Associate II

Hi Khouloud, Have you tried this from my previuos message?

MX_SUBGHZ_Init doesn't need to to called, this should be removed in the panel

 ProjectManager -> Advanced Settings -> generate Func Calls and pinning the "do not generate function call" and unpinning "visibility"

Hello @IREMI.1​ ,

Yes I confirm what you said, to manually fix this issue is to change the Function call configuration.

Thank you for your contribution :)

Khouloud

Hi Khouloud/SK,

actually is not exact to talk about issue fixed by work-around.

It is rather a missing configuration in MX parameters from user side.

In fact by default MX choses to generate "Init" calls to the enabledIP in the maim.c

But in the LoraProject we want that the IP SUbGhz_Init (and other IPs) to be initialised inside MX_LoraWAN_Init at a specific moment.

MX allows to configure that by selecting "Do not Generate function call" and to export the SUbGhz_Init function api.

We understand this adds difficulties to users and asked MX to set the default value of those checkbox the opposite, but for a number of reasons not sure they will accept ...

Hi @IREMI.1​ ,

I don't see the "Advanced Settings -> generate Func Calls" option in CubeMX 6.4.0. Was it removed? Please see the attached picture.

I am having the same issue, so I manually workaround it by making MX_SUBGHZ_Init() non-static, and not calling it in main(). Is it the right approach for now?

Thank you!0693W00000HpySUQAZ.png

Sorry. I see the option now.