cancel
Showing results for 
Search instead for 
Did you mean: 

Code generation issue with Discovery board B-L072Z-LRWAN1

NicRoberts
Senior II

I have a Discovery board B-L072Z-LRWAN1 and I am trying to set up a project using CubeIDE but get the following,

NicRoberts_0-1768308697317.png

So I check to see if the L0 & LRWAN packages are in the repository,

NicRoberts_1-1768308848946.png

Yes, they're there. I click OK & Cube carries on setting itself up & up pops the ioc window. I press configure & generate & get some C code but the build option is greyed out.

 

What am I missing here?

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
NicRoberts
Senior II

OK so no idea why that was happening as a solution though I've upgraded to CubeIDE 2.0 & initialized all the boiler plate code with CubeMX separately. All imported & built with with no issues.

(note: I'm liking the separation of IDE & MX, IDE opens sooooooo much quicker now) 

View solution in original post

10 REPLIES 10
Andrew Neil
Super User

What versions of CubeIDE and CubeMX are you using?

 

Note that CubeIDE v2.0.0 no longer integrates CubeMX - they are now separate, standalone tools:

STM32CubeIDE 2.0.0 new workflow tutorial

IDE Version 2.0.0 - why remove MX ?

STM32CubeIDE 2.0.0 released

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

version 1.17.0

Interestingly the examples for both the  L0_FW & the LRWAN for the board open up & build with no issues.

I guess the examples are already complete - don't rely on stuff installed in the IDE ?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

No idea, why would Cube not allow a new project to build given that it knows where all the support drivers for the board are?

The problem with the new project is code generation - not building ?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Well I'm not sure to be honest. I got the warning above when creating a new project but code is generated after a few clicks (as outlined in the OP) but I cant build that generated code as the build options are all greyed out.

NicRoberts
Senior II

OK so no idea why that was happening as a solution though I've upgraded to CubeIDE 2.0 & initialized all the boiler plate code with CubeMX separately. All imported & built with with no issues.

(note: I'm liking the separation of IDE & MX, IDE opens sooooooo much quicker now) 

mattias norlander
ST Employee

Hi @NicRoberts ,

I am fairly convincned that the issue is MX/FW related rather that IDE related... Let me explain the process: 

  1. When MX is generating resources into a new or an existing project it first tries to generate c/c++ code
  2. Once all code has been generated the the last step is to create/update IDE project files (.cproject/.project files in case of CubeIDE...).

If the first step fails, then for new projects you will not even have IDE project files.
The file tree in CubeIDE may show you source code, but without .cproject/.project files there is no description on how to build the projects, consequently the build toolbar buttons would be greyed out.

Since MX failed to detect or download the selected FW version the first step failed, as a consequence you ended up with some source code but broken .cproject file and the consequence is that the IDE has no clue how to build the source tree. It cannot even understand that this file tree is an Eclipse/CDT (CubeIDE) project.

I leave this explanation for other users who may one day this issue so that they can understand the reason why.

I understood that you resolved the issue by upgrading to latest version. Happy to hear things work for you. In theory your old IDE/MX version should also work assuming that the MX "CubeFW download/install" feature plays nicely...

 

Kind regards, Mattias