Skip to main content
May 31, 2021
Question

Issue with STM32CubeIDE - Import STM32Cube Example. After importing it compiles, when doing simple HW change in CubeMX there are many compilation errors.

  • May 31, 2021
  • 5 replies
  • 3223 views

Here is what I try to do:

  • Imported SubGHz_Phy_PingPong to my workspace.
  • Double click on IOC to launch CubeMX and do simple HW change, in my case enabling EXTIO interrupts
  • After code generation there are many compilation errors
  • Can be reproduced with other examples too.

Errors are related to multiple definitions of many functions. I have noticed that additional lines were automatically added to makefile (-include Application/User/*) which probably causes this issue. Please suggest workaround.

This topic has been closed for replies.

5 replies

Khouloud OTHMAN
Associate
June 3, 2021

Hello @_JUhri.1​,

Let le first welcome you to the STM32 Community :smiling_face_with_smiling_eyes:

Please excuse the somewhat late reply and thank you for having reported.

Following the scenario as you have described above, I didn't reproduce the issue from my side.

Could you please attach your .ioc file for further check, it will be helpful to find faster the root cause of your issue.

Thanks in advance,

Khouloud.

Cartu38 OpenDev
Graduate II
June 4, 2021

How do you have imported example ? Please share menu you've relied on (dependending of way ... I may have various explanation to your issue)

June 4, 2021

Hi,

please find attached IOC file. My feeling is that the problem is related to fact that I have installed the CubeMX and CubeIDE under account with admin rights and now running them under different account with regular/limited user rights.

The project in my workspace was generated by File --> Import --> Import STM32Cube Example --> then selected SubGHz_Phy_PingPong. Compiles OK, but when I launch CubeMX (=doubleclick IOC in CubeIDE), change something and regenerate the code it compiles with many errors as explained. I have found out that under STM32CubeIDE\Application a new directory "User" is created, it is included in automatic makefile generation and spoils the compile. When I remove this directory everything surprisingly compiles as before, the HW changes I have made in CubeMX are also included. So in fact I have found the workaround, hope this helps.

Best Regards,

Jan.

SHATE.1
Associate III
June 4, 2021

Hello

I'm an electronic engineer from ArcelorMittal and I have the same problem!!!

when i open the project LORAWAN end node from example and i compile, everything is well and i can build and programm it in my Nucleo board and i can connect to my gateway. But when i try to change something in CubeMX, transmission period or HW modification and i build again, i have 1124 errors!!!

i found too the file " user " in application folder and when i delete it and build i have 882 errors and the problem of compilation still here!!!

What's the solution please? I have the impression that ST don't Master well their CubeMX with the STM32WL serie in addition there's no tutorial how to configure and use this serie like other series of MCU that we can find easily on youtube a video showing very well how we can use all the peripheral.

really i have a big deception of ST because there's months that i try to use their product. first with M4 serie with external lora module using Expansion Package and it's another catastrophic thing and when the STM32WL is here i was happy thinking that my horror will finish but NOT YET!!!!! CubeMX don't work well with the STM32WL serie.

So please if you have a solution or idea don't hesitate to help me

Thank you in advance

Cartu38 OpenDev
Graduate II
June 4, 2021

@SHATE.1​ @_JUhri.1​ I've been able to reproduce the same. Sounds like a shame about STM examples packaging but I've found proper way to recover.

1) From original STM example (takes care not corrupted already but your previous actions ... maybe best is to remove FW pack repository and unzip it back) let's import it.

2) Once done just remove Core & Target & App & User folders (in other words keep only Starup folder)

3) Open .ioc file (x2 click on)

4) Ask for code generation

=> Here you're. Your project is updated and compiles fine.

Then feel free to use it / improve it like you were expecting to do !

0693W00000Ba9HCQAZ.jpg

SHATE.1
Associate III
June 7, 2021

Thank you for your intention to help but it's not what i'm looking for!!! i don't want to delete the application of LORAWAN end node but to use it and change the MCU because i have a custom board using STM32WLE5J8I.

But i tried your method but unfortunally i always have errors!!!! i see that you use the SubGHz point to point project but i'm using the LORAWAN end node one. i always have errors when i delete Core & Target & App & User folders!!!

When i import for example another example as for the STM32WB serie and Bluetooth application, everything is OK!!! i can change the HW configuration with .ioc file and i build and always i have 0 error 0 warning!!!

The only difficult that ST have with it's STMCube portfolio is in LORAWAN middleware!!!

Hope that ST can quickly fix this problem because really it's very dangerous for customer that are engaged with ST MCU and have project and planning that can't wait!!!

Thanks a lot

Cartu38 OpenDev
Graduate II
June 7, 2021

@SHATE.1​ sorry but you're amending first a post initiated by @_JUhri.1​ . Such post is about SubGHz_Phy_PingPong example ... so please do not complain then if you're mixing stuff. Best is to open your own topic ... helping community and increasing chance to you to get proper help.

Such said I've got too a look to LORAWAN end node example. Issue appears to be the same. Just import back a fresh LORAWAN end node example material then delete Core & Target & App & User & Drivers & Middlewares folders. Finally ask for code generation. Works then on my side then.

0693W00000BaHV7QAN.jpg

Tsanz.1
Visitor II
April 29, 2023

I have already download the "LoRaWAN software expansion for STM32Cube" but I don't find the .ioc for any project. Where or how can I obtain it?