cancel
Showing results for 
Search instead for 
Did you mean: 

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

_JUhri.1
Associate II

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.

19 REPLIES 19

Hello @_JUhri.1​,

Let le first welcome you to the STM32 Community 😊

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
Lead II

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

_JUhri.1
Associate II

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.

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
Lead II

@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

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

@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

Thanks for your answer

Effectively, when i delete folders that you indicated (  Core & Target & App & User & Drivers & Middlewares folders) and i open .ioc and make a modification of HW or any other thing i have no errors when i compile!! thank you it look good but i have to test the behavior of my end node device when if it will be connected to the gateway.

For the modification of the MCU of the nucleo to the STM32WLE5J8I, have you please an idea with conservation of the application?

Thank you

Myself updating device as sounds .ioc file project based generation is working quite well here I would relying on STM32CubeMX standalone application.

1) Run a 6.2.1 STM32CubeMX session

2) Load .ioc file which is part of such LORAWAN end node example

3) Move to your compatible target device

4) Add project name and location

5) Ask for code generation

6) Open such project within STM32CubeIDE

7) Works for me and compile success !

Despite sounds like a pain to leave IDE it works fine and takes me 2 minutes to conclude !

0693W00000BaIkhQAF.jpg 

0693W00000BaIkwQAF.jpg0693W00000BaIl1QAF.jpg0693W00000BaIlpQAF.jpg