@ -10,17 +10,21 @@ set(PL "c")
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# S e t t i n g t h e u s e d d i r e c t o r y l o c a t i o n s
# S e t t i n g t h e u s e d d i r e c t o r y l o c a t i o n s
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
set ( PROJECT_DIR ${ CMAKE_SOURCE_DIR } /.. ) # L o c a t i o n o f t h e p r o j e c t : I t M U S T b e o n e H i g h e r t h a n t h e K E D D i r e c t o r y
set ( PROJECT_DIR ${ CMAKE_SOURCE_DIR } /.. ) # L o c a t i o n o f t h e p r o j e c t : I t i s d e f a u l t e d t o o n e H i g h e r t h a n t h e K E D D i r e c t o r y : T O D O : S h a l l w e l e t t h e u s e r d e f i n e i t w e h e r e v e r h e w a n t s i t ?
set ( CMAKE_CORE_DIR ${ CMAKE_SOURCE_DIR } /cmake_core ) # L o c a t i o n o f t h e c m k a e c o r e f u n t i o n a l i t i e s / f u n t i o n s / d e f i n i t i o n s
set ( CSL_DIR ${ CMAKE_SOURCE_DIR } /csl/ ${ CSL_USED } ) # L o c a t i o n o f t h e u s e d S C L C S L _ U S E D i s p a s s e d a s a n a r g u t e m t o C M a k e f r o m r u n . s h - > " S p e c i f i c t o e a c h C S L "
set ( CSL_DIR ${ CMAKE_SOURCE_DIR } /csl/ ${ CSL_USED } ) # L o c a t i o n o f t h e u s e d S C L C S L _ U S E D i s p a s s e d a s a n a r g u t e m t o C M a k e f r o m r u n . s h - > " S p e c i f i c t o e a c h C S L "
set ( CSL_SOURCES ${ CMAKE_SOURCE_DIR } /csl/ ${ CSL_USED } /Src ) # L o c a t i o n o f t h e S o u r c e s f o r t h e s e l e c t e d C S L - > " S p e c i f i c t o e a c h C S L "
set ( CSL_SOURCES ${ CMAKE_SOURCE_DIR } /csl/ ${ CSL_USED } /Src ) # L o c a t i o n o f t h e S o u r c e s f o r t h e s e l e c t e d C S L - > " S p e c i f i c t o e a c h C S L "
set ( DRIVERS_DIR ${ CMAKE_SOURCE_DIR } /drivers ) # D i r e c t i r y f o t t h e d r i v e r s - > " C o m m o n t o a l l C S L "
set ( DRIVERS_DIR ${ CMAKE_SOURCE_DIR } /drivers ) # D i r e c t i r y f o t t h e d r i v e r s - > " C o m m o n t o a l l C S L "
set ( PERIFERALS_DIR ${ CMAKE_SOURCE_DIR } /peri f erals) # D i r e c t o r y f o t t h e wr i t t e n - > " C o m m o n t o a l l C S L "
set ( PERIFERALS_DIR ${ CMAKE_SOURCE_DIR } /peri ph erals) # D i r e c t o r y f o t t h e pe r i p h e r a l s - > " C o m m o n t o a l l C S L "
set ( PROJECT_CONFIG_FILE ${ PROJECT_DIR } /projectDefinitions.cmake )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# I N C L U D E S
# I N C L U D E S
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
include ( config/cmakeProjectConfig.cmake ) # F o r t h e m o m e n t t h e r e a r e o n l y c o l o r s
include ( ${ CMAKE_CORE_DIR } /cmakeCore.cmake ) # A l l t h e l i b r a r y a n d s u b m o d u l e f u n t i o n s a n d d e f i n i t i o n s a r e w r i t t e n h e r e
include ( ${ PROJECT_DIR } /projectDefinitions.cmake ) # H e r e i s t h e i n c l u d e W h e r e t h e u s e r s o u l d d e f i n e h i s p r o j e c t s o u r c e s a n d h e a d e r s
include ( ${ CMAKE_CORE_DIR } /errorHandler.cmake ) # F o r D e t a i l e d e r r o r m e s s a g e s .
include ( ${ PROJECT_CONFIG_FILE } ) # H e r e i s t h e i n c l u d e W h e r e t h e u s e r s o u l d d e f i n e h i s p r o j e c t s o u r c e s a n d h e a d e r s
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# C h e k i n g i f t h e c h o o s e n C S L e x i s t s , t h i s i r e d u n d a n t b e c a u s e r u n . s h m a k e s t h a t a l r e d y b u t m a k e s t h e
# C h e k i n g i f t h e c h o o s e n C S L e x i s t s , t h i s i r e d u n d a n t b e c a u s e r u n . s h m a k e s t h a t a l r e d y b u t m a k e s t h e
@ -32,7 +36,7 @@ if(EXISTS ${CSL_DIR}) # Cheking if the directory exists
message ( "Compiling for ${CSL_USED}" )
message ( "Compiling for ${CSL_USED}" )
message ( "+-------------------------------+" )
message ( "+-------------------------------+" )
message ( "${ColourReset}" )
message ( "${ColourReset}" )
set ( COMPILER_DEFS ${ CMAKE_ SOURCE_DIR} /config/compiler.cmake )
set ( COMPILER_DEFS ${ CMAKE_ CORE_DIR} /compiler.cmake ) # T O D O : C h a n g e l o c a t i o n
set ( CSL_DEFS ${ CSL_DIR } /config.cmake )
set ( CSL_DEFS ${ CSL_DIR } /config.cmake )
else ( )
else ( )
@ -55,7 +59,7 @@ include(${CSL_DEFS})
add_subdirectory ( utils )
add_subdirectory ( utils )
add_subdirectory ( csl )
add_subdirectory ( csl )
add_subdirectory ( drivers )
add_subdirectory ( drivers )
add_subdirectory ( peri f erals)
add_subdirectory ( peri ph erals)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# S a r t u p t u C o d e D e f i n i t i o n
# S a r t u p t u C o d e D e f i n i t i o n
@ -87,7 +91,7 @@ message("${ColourReset}")
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
set ( DRIVERS_LIST max7219 max31865 )
set ( DRIVERS_LIST max7219 max31865 )
message ( "${Bold Yellow }")
message ( "${Bold Blue }")
message ( "+-------------------------------+" )
message ( "+-------------------------------+" )
message ( "Cheking Drivers" )
message ( "Cheking Drivers" )
message ( "+-------------------------------+" )
message ( "+-------------------------------+" )
@ -103,7 +107,7 @@ message("${ColourReset}")
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# U s e r ' s p r o j e c t d e f i n i t i o n s
# U s e r ' s p r o j e c t d e f i n i t i o n s
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
message ( "${Bold Yellow }")
message ( "${Bold Magenta }")
message ( "+-------------------------------+" )
message ( "+-------------------------------+" )
message ( "Cheking User's Project" )
message ( "Cheking User's Project" )
message ( "+-------------------------------+" )
message ( "+-------------------------------+" )
@ -133,6 +137,7 @@ foreach(X IN LISTS PROJECT_SOURCES_DIR_LIST)
endforeach ( )
endforeach ( )
message ( "+-------------------------------+" )
message ( "+-------------------------------+" )
message ( "${ColourReset}" )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# S t i c k A l l t h e l i b r a r i e s t o g e t h e r , o n l y f o r c o d e r e d a b i l i t y f u t h e r d o w n .
# S t i c k A l l t h e l i b r a r i e s t o g e t h e r , o n l y f o r c o d e r e d a b i l i t y f u t h e r d o w n .
@ -144,7 +149,7 @@ endforeach()
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# O v e r v i e w
# O v e r v i e w
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
message ( "${Bold Blue }")
message ( "${Bold Cyan }")
message ( "+-------------------------------+" )
message ( "+-------------------------------+" )
message ( "Project Info" )
message ( "Project Info" )
message ( "+-------------------------------+" )
message ( "+-------------------------------+" )
@ -176,7 +181,7 @@ foreach(X IN LISTS PROJECT_SOURCES_DIR_LIST)
message ( " |->${X}" )
message ( " |->${X}" )
endforeach ( )
endforeach ( )
message ( " |--> Generated Library Submodules ${ Magenta}!!!This list order also defines the compilation order of submodules!!!${ColourReset}${BoldBlue }")
message ( " |--> Generated Library Submodules ${ Red}!!!This list order also defines the compilation order of submodules!!!${ColourReset}${BoldCyan }")
foreach ( X IN LISTS GENERATED_LIBRARIES )
foreach ( X IN LISTS GENERATED_LIBRARIES )
message ( " |->${X}" )
message ( " |->${X}" )
endforeach ( )
endforeach ( )
@ -194,7 +199,7 @@ target_include_directories(${EXECUTABLE} PUBLIC ${PROJECT_HEADERS_DIR} ${PROJECT
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# L I N K I N G E X E C U T E A B L E
# L I N K I N G E X E C U T E A B L E
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
message ( "${ Cya n}")
message ( "${ BoldGree n}")
message ( "+-------------------------------+" )
message ( "+-------------------------------+" )
message ( "Linker & Compiler Info" )
message ( "Linker & Compiler Info" )
message ( "+-------------------------------+" )
message ( "+-------------------------------+" )
@ -238,7 +243,7 @@ if(OUTPUT_DOXYGEN)
find_package ( Doxygen )
find_package ( Doxygen )
if ( DOXYGEN_FOUND )
if ( DOXYGEN_FOUND )
# s e t i n p u t a n d o u t p u t f i l e s
# s e t i n p u t a n d o u t p u t f i l e s
set ( DOXYGEN_IN ${ CMAKE_C URRENT_S OU RC E_DIR} /config /doxyfile.in)
set ( DOXYGEN_IN ${ CMAKE_C ORE_DIR} /doxyfile.in)
set ( DOXYGEN_OUT ${ CMAKE_CURRENT_BINARY_DIR } /doxyfile )
set ( DOXYGEN_OUT ${ CMAKE_CURRENT_BINARY_DIR } /doxyfile )
# r e q u e s t t o c o n f i g u r e t h e f i l e
# r e q u e s t t o c o n f i g u r e t h e f i l e