cancel
Showing results for 
Search instead for 
Did you mean: 

Don't see \core nor main.c in project on STM32Cube

MDe
Associate III

Hello,

I am a beginner with STM32IDECube.
I have just installed Version: 1.16.1 Build: 22882_20240916_0822 (UTC) which seems to work.
I am developing a program with the STM32F107 processor as a target.
Everything works so far except that now I want to integrate my little test program (just for blinking e LED)  written in C into the project with a view, of course, to compiling it and then downloading it into the component alongside FeeRTOS and the configurations that I have made with STM32Cube for which I have generated the code.


My problem is:


1) I do not see anywhere, neither in STM32Cube nor in my directories on my disk, a file in which this basic code could have been generated ?

2) I don't see anywhere, neither in STM32Cube nor in my directories on my disk, a "\Core" directory where this could be ?
3) I don't see anywhere, neither in STM32Cube nor in my directories on my disk, a "main.c" file in which I could, possibly and if that's what needs to be done, integrate my code ?

See attached a screen capture of the only thing I see on STM32Cube.

- What's going on ?
- How could I move forward ?

Thanks,
--
MDe / Belgium

 

1 ACCEPTED SOLUTION

Accepted Solutions

@MDe wrote:

You still do not explain me why, at some point, we need to install a second application, STM32CubeMX and generate code through it, for it to work ?

 


I didn't tell you at any time you "should" install STM32CubeMX.

There are two possibilities:

1- You start from CubeMx (the standalone) tool and configure your peripherals and generate your code from there. In this case you need to generate the code with this button:

SofLit_0-1727338758225.png

2- Start from CubeIDE tool (as stated in UM2609 / section 2.1.2 Creating a new STM32 project) and use the integrated CubeMx in CubeIDE. In this case you need to generate the code with this button:

SofLit_0-1727359343229.png

Hope it's clear now.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

23 REPLIES 23
SofLit
ST Employee

Hello @MDe and welcome to the community.

You didn’t tell how you did proceed to generate your project and what tools you used for this. 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
MDe
Associate III

Hello SofLit,

Thank you for your quick response.
But I don't see what you're talking about?

I installed STM32CubeIDE in its latest version 1.16.1 on my PC. No problem except that, at startup, Eclipse behind does not know how to access certain directories. All I did is start STM32Cube as Administrator and the problem is solved.

I then simply created a new project by clicking on "Start New STM32 project" and I chosed my processor from the list, namely "STM32F107-VCT6".

I then validated the use of FreeRTOS, added a Task and configured the Clock in the "Clock and Configuration" tab

I generated the code and it is generated without error or warning.

At this stage, I want to add my code which simply flashes an LED which is on my Printed Circuit Board.

And that's where I don't see what to do further :
- Where is the code already generated ?
- How do I insert my code in my project ?

I'm probably missing something.

Thanks in advance,

--

Mde / Belgium

 

Hello,

To be efficient could you please attach your project compressed in .7z format?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
MDe
Associate III

Here it is.

Not much into it…

Hello @MDe ,

You need to generate the code by clicking on [GENERATE CODE] button in CubeMx:

SofLit_0-1727338758225.png

 

 

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
MDe
Associate III

Hello SofLit,

Thanks for your reply.

I did it many times already of course, I mentionned it in my previous message :)

And it compiles without any error or warning (but empty of course)

For generating the code I do not have a blue button "GENERATE CODE" like the one you show. What I do is go to "Project" menu then "Generate Code".

See attached the main screen I see.

Do we have different versions then ?

Is the one I have, 1.16.1, not good ?

Why this difference ? (if having any impact)

Thanks, regards,

--

MDe / Belgium

Previously you didn't attach your CubeIDE project. You shared just the ioc file.

I've just double clicked on Bal.ioc file to open it with the standalone STM32CubeMx tool downloadable from here then generated the code as described previously.

As you didn't share the CubeIDE project, I cannot reproduce the case.

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
MDe
Associate III

Please understand I shared with you (put in the zipfile) everything I have !

See attached the file structure on my disk.

Where are these files we are looking for ?

--

Mde / Belgium

 

Againg you didn't share this CubeIDE project file:

SofLit_0-1727351737665.png

This is what you shared in the zip file: only ioc file is present here:

SofLit_1-1727351815905.png

Now, as I said previously, please open the ioc file using  the standalone STM32CubeMx tool downloadable from here and generate the code using this button:

SofLit_0-1727338758225.png

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.