You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
I have a CMakeLists.txt version of the Makefile and Makefile.common and I think it'd be a good idea to add it, some of my reasons are:
A decent amount of people use IDEs for their projects, sure, Makefiles work well enough with IDEs but not always
And even if they don't use IDEs, a CMakeLists.txt does make life easier for debugging and suggestions/completions
I think a CMakeLists.txt that can be used as a template is in line with what is taught/learned through the Discovering STM32 book
And it gives the user freedom of choice!
Now, some details regarding the CMakeLists.txt file I have been using:
It is a single file that simulates both the Makefile and the Makefile.common, I am open to changing it from 1 file to 2 files that are closer to the current Makefile layout if it's truly wanted/needed
There are modifications that I know I'd have to make so its more of a template, namely:
Lines 14 to 16 which just link the library directly, instead I would add the LIBROOT so it matches the Makefile.common
Adding TOOLROOT as well since my compiler is available in the search path and installed system-wide but that is not the case for everyone
Organize the file a bit more since I was jumping between looking at what the Makefile and Makefile.common did and modifying or adding things as I needed them
As you can see on lines 29 to 35 we have to manually add the files, I would add variables so we shorten this
Example: ${PERIPH_SRC}/stm32f10x_gpio.c
Obviously the naming convention is up for discussion haha
Excited to hear what you think about this idea!
The text was updated successfully, but these errors were encountered:
Hello!
I have a
CMakeLists.txt
version of theMakefile
andMakefile.common
and I think it'd be a good idea to add it, some of my reasons are:Makefiles
work well enough with IDEs but not alwaysCMakeLists.txt
does make life easier for debugging and suggestions/completionsCMakeLists.txt
that can be used as a template is in line with what is taught/learned through theDiscovering STM32
bookNow, some details regarding the CMakeLists.txt file I have been using:
Makefile
and theMakefile.common
, I am open to changing it from 1 file to 2 files that are closer to the currentMakefile
layout if it's truly wanted/needed14
to16
which just link the library directly, instead I would add theLIBROOT
so it matches theMakefile.common
TOOLROOT
as well since my compiler is available in the search path and installed system-wide but that is not the case for everyoneMakefile
andMakefile.common
did and modifying or adding things as I needed them29
to35
we have to manually add the files, I would add variables so we shorten this${PERIPH_SRC}/stm32f10x_gpio.c
Excited to hear what you think about this idea!
The text was updated successfully, but these errors were encountered: