Author Topic: STM32Cube IDE, how to correctly create .c and .h files?  (Read 322 times)

0 Members and 1 Guest are viewing this topic.

Offline rvalente

  • Regular Contributor
  • *
  • Posts: 235
  • Country: br
STM32Cube IDE, how to correctly create .c and .h files?
« on: October 12, 2019, 02:12:03 pm »
Hello Friends,

I'm getting started with the Cube IDE. Just create a basic project with cube mx and I wonder, what is the most correct way to create the .c+.h pair of files for my custom application?

Considering future changes and code generation on MX, them:

Do they must be in a user folder? Should I create a folder on IDE? Will this a be a logic folder or a true folder in the project source?
Is there a best method for not screwing stuff in the future?

Attached my project tree:
 

Offline mjs

  • Regular Contributor
  • *
  • Posts: 68
Re: STM32Cube IDE, how to correctly create .c and .h files?
« Reply #1 on: October 12, 2019, 05:14:02 pm »
I've written my own application under src/ and inc/, added them to build and then added all the calls to application code between USER CODE BEGIN / END.
This seems to be pretty solid even when doing changes in CubeMX and rebuilding the project files.

 
The following users thanked this post: thm_w, rvalente

Offline rvalente

  • Regular Contributor
  • *
  • Posts: 235
  • Country: br
Re: STM32Cube IDE, how to correctly create .c and .h files?
« Reply #2 on: October 12, 2019, 06:56:28 pm »
I will try this way, tks!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf