cancel
Showing results for 
Search instead for 
Did you mean: 

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

MDe
Associate

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

 

23 REPLIES 23

@MDe wrote:

- I installed IDE fresh on my computer
- Created a new project in the IDE


Need more detail there.

CubeIDE has several options for creating  new projects - which did you use?

Hello SofLit,

Objectively no, I didn't go through this 267-page document just to start an empty project !
However, I just looked at this section 2.1.2 which goes from page 40 to page 53.
I followed all the steps really as illustrated in the document. In particular:
- "File - New - STM32 Project"
- CPU choice: STM32F107-VCT6 in my case
- Targeted language: C++
- Targeted Binary type: Executable
- Targeted Project Type: STM32Cube
Then, the firmware. There it was a little more complicated. I got this:
* "Please login to download a software package. Go to myST -> Login" * "Code generation could not be done most probably because the necessary firmware package is missing. Not able to complete STM32Cube project creation. See 'Firmeware Updater' for settings related to firmware package installation. Tips: Please use the Device Configuration Tool, and the use 'Projet - Generate Code' to complete the project generation."
* When I clicked on "Firmware Updater" I arrived in the "Preferences" window of the ISE. I clicked on “Check Connection”. It was ok. Then he recommended "Click on Refresh from "Help" > "Check for Target Selector Device Database Updates" and from "Help" > "Manage Embedded Software Packages" to benefit from latest updates" * I did "Apply and Close" here... and there, it passed, no more message.
And I did continued to start my first project.
Note that I am not able to return to the firmware setup screen shown on page 43 of your document. So I cannot see exactly which firmware package was finally installed or its version. It might be good to tell me where I can see that ?
Then, still in the firmware:
- Code Generator Options: Copy only the necessary library files
- Initialize all peripherals with their default Mode ?: Yes
Then project creation run and all was ok.
I then got the image on Figure 53. page 45 and discovered the whole thing.
Then, page 46 and following: 2.1.2.2 "Creating a new STM32 static library project", I did not do.
- I did not do 2.1.2.3 page 46 "Creating a new CDT project" either. I understand it is useless, it is only an alternative to the first solution I had just done to create a new project.
- We thus arrive at page 53: "2.1.2.4 Creating a new CMake project": Not done either. I suppose it is not necessary, we have a "Build Project" all done when we right-clicking on the project name.

This ends point 2.1.2 that you asked me to carefully review.


Once again, really, throughout the whole course, I really do not have done anything special. I know, from experience (since 1994...) how complicated starting work on embedded electronics can be. This is the reason why here I want to start all this step by step, carefully understand everything that happens, write everything down to be able to reinstall on a new PC, etc... In the back, this is a professional application whose product durability must be greater than 20 years. And we must also be able to delegate the thing easily to someone else.
Sorry for the length of this message.
Thank you for reading this far.
And thank you for your answer.
Did I really do something wrong?
Did I forget something?
Or is this a bug on your side?
It is in any case very disturbing to see that STM32CubeIDE "can" generate code only to find that it does not generate it.
This is all the more so since, as we have seen, you just have to go to STM32CubeMX and generate the code successfully there, without changing a single line in the project. Also meaning that, in this project, everything was good.

Thank you.
Sorry for the rigor but this is technically a difficult project (the rest is to come)

--

Mde / Belgium


@MDe wrote:

- Targeted language: C++


In that case, you wouldn't expect it to generate a main.c

I'm not sure that the code generator does C++ ?

Yes, this is correct, I selected C++.
It can be done so I did it.
And if the code generator cannot handle C++, it is not a real problem.
But at least we should be informed of it during code generation.

It's also true that, despite the fact that I had chosen C++ at the beginning, I have just examined the "main.c" file that he created, it does not contain anything that looks like C++. It has been generated in the most classic C.