@ -595,8 +595,10 @@ target_compile_options(lvgl PRIVATE
# B u i l d a u t o n o m o u s binary ( without support for bootloader )
# B u i l d a u t o n o m o u s binary ( without support for bootloader )
set ( EXECUTABLE_NAME "pinetime-app" )
set ( EXECUTABLE_NAME "pinetime-app" )
set ( EXECUTABLE_FILE_NAME ${ EXECUTABLE_NAME } - ${ pinetime_VERSION_MAJOR } . ${ pinetime_VERSION_MINOR } . ${ pinetime_VERSION_PATCH } )
set ( NRF5_LINKER_SCRIPT "${CMAKE_SOURCE_DIR}/gcc_nrf52.ld" )
set ( NRF5_LINKER_SCRIPT "${CMAKE_SOURCE_DIR}/gcc_nrf52.ld" )
add_executable ( ${ EXECUTABLE_NAME } ${ SOURCE_FILES } )
add_executable ( ${ EXECUTABLE_NAME } ${ SOURCE_FILES } )
set_target_properties ( ${ EXECUTABLE_NAME } PROPERTIES OUTPUT_NAME ${ EXECUTABLE_FILE_NAME } )
target_link_libraries ( ${ EXECUTABLE_NAME } nimble nrf-sdk lvgl )
target_link_libraries ( ${ EXECUTABLE_NAME } nimble nrf-sdk lvgl )
target_compile_options ( ${ EXECUTABLE_NAME } PUBLIC
target_compile_options ( ${ EXECUTABLE_NAME } PUBLIC
$ < $ < A N D : $ < C O M P I L E _ L A N G U A G E : C > , $ < C O N F I G : D E B U G > > : $ { C O M M O N _ F L A G S } - O 0 - g 3 >
$ < $ < A N D : $ < C O M P I L E _ L A N G U A G E : C > , $ < C O N F I G : D E B U G > > : $ { C O M M O N _ F L A G S } - O 0 - g 3 >
@ -608,25 +610,28 @@ target_compile_options(${EXECUTABLE_NAME} PUBLIC
set_target_properties ( ${ EXECUTABLE_NAME } PROPERTIES
set_target_properties ( ${ EXECUTABLE_NAME } PROPERTIES
S U F F I X " . o u t "
S U F F I X " . o u t "
L I N K _ F L A G S " - m t h u m b - m a b i = a a p c s - s t d = g n u + + 9 8 - s t d = c 9 9 - L $ { N R F 5 _ S D K _ P A T H } / m o d u l e s / n r f x / m d k - T $ { N R F 5 _ L I N K E R _ S C R I P T } - m c p u = c o r t e x - m 4 - m f l o a t - a b i = h a r d - m f p u = f p v 4 - s p - d 1 6 - W l , - - g c - s e c t i o n s - - s p e c s = n a n o . s p e c s - l c - l n o s y s - l m - W l , - M a p = $ { E X E C U T A B L E _ NA M E } . m a p "
L I N K _ F L A G S " - m t h u m b - m a b i = a a p c s - s t d = g n u + + 9 8 - s t d = c 9 9 - L $ { N R F 5 _ S D K _ P A T H } / m o d u l e s / n r f x / m d k - T $ { N R F 5 _ L I N K E R _ S C R I P T } - m c p u = c o r t e x - m 4 - m f l o a t - a b i = h a r d - m f p u = f p v 4 - s p - d 1 6 - W l , - - g c - s e c t i o n s - - s p e c s = n a n o . s p e c s - l c - l n o s y s - l m - W l , - M a p = $ { E X E C U T A B L E _ FI L E _ NA M E } . m a p "
C X X _ S T A N D A R D 1 1
C X X _ S T A N D A R D 1 1
C _ S T A N D A R D 9 9
C _ S T A N D A R D 9 9
)
)
add_custom_command ( TARGET ${ EXECUTABLE_NAME }
add_custom_command ( TARGET ${ EXECUTABLE_NAME }
P O S T _ B U I L D
P O S T _ B U I L D
C O M M A N D $ { C M A K E _ S I Z E _ U T I L } $ { E X E C U T A B L E _ NA M E } . o u t
C O M M A N D $ { C M A K E _ S I Z E _ U T I L } $ { E X E C U T A B L E _ FI L E _ NA M E } . o u t
C O M M A N D $ { C M A K E _ O B J C O P Y } - O b i n a r y $ { E X E C U T A B L E _ NA M E } . o u t " $ { E X E C U T A B L E _ N A M E } . b i n "
C O M M A N D $ { C M A K E _ O B J C O P Y } - O b i n a r y $ { E X E C U T A B L E _ FI L E _ NA M E } . o u t " $ { E X E C U T A B L E _ F I L E _ N A M E } . b i n "
C O M M A N D $ { C M A K E _ O B J C O P Y } - O i h e x $ { E X E C U T A B L E _ NA M E } . o u t " $ { E X E C U T A B L E _ N A M E } . h e x "
C O M M A N D $ { C M A K E _ O B J C O P Y } - O i h e x $ { E X E C U T A B L E _ FI L E _ NA M E } . o u t " $ { E X E C U T A B L E _ F I L E _ N A M E } . h e x "
C O M M E N T " p o s t b u i l d s t e p s f o r $ { E X E C U T A B L E _ NA M E } " )
C O M M E N T " p o s t b u i l d s t e p s f o r $ { E X E C U T A B L E _ FI L E _ NA M E } " )
# B u i l d b i n a r y i n t e n d e d t o b e u s e d b y b o o t l o a d e r
# B u i l d b i n a r y i n t e n d e d t o b e u s e d b y b o o t l o a d e r
set ( EXECUTABLE_MCUBOOT_NAME "pinetime-mcuboot-app" )
set ( EXECUTABLE_MCUBOOT_NAME "pinetime-mcuboot-app" )
set ( EXECUTABLE_MCUBOOT_WITH_BOOTLOADER_NAME "pinetime-mcuboot-app-wth-bootloader" )
set ( EXECUTABLE_MCUBOOT_FILE_NAME ${ EXECUTABLE_MCUBOOT_NAME } - ${ pinetime_VERSION_MAJOR } . ${ pinetime_VERSION_MINOR } . ${ pinetime_VERSION_PATCH } )
set ( IMAGE_MCUBOOT_FILE_NAME image- ${ pinetime_VERSION_MAJOR } . ${ pinetime_VERSION_MINOR } . ${ pinetime_VERSION_PATCH } .bin )
set ( DFU_FILE_NAME dfu- ${ pinetime_VERSION_MAJOR } . ${ pinetime_VERSION_MINOR } . ${ pinetime_VERSION_PATCH } .zip )
set ( NRF5_LINKER_SCRIPT_MCUBOOT "${CMAKE_SOURCE_DIR}/gcc_nrf52-mcuboot.ld" )
set ( NRF5_LINKER_SCRIPT_MCUBOOT "${CMAKE_SOURCE_DIR}/gcc_nrf52-mcuboot.ld" )
add_executable ( ${ EXECUTABLE_MCUBOOT_NAME } ${ SOURCE_FILES } )
add_executable ( ${ EXECUTABLE_MCUBOOT_NAME } ${ SOURCE_FILES } )
target_link_libraries ( ${ EXECUTABLE_MCUBOOT_NAME } nimble nrf-sdk lvgl )
target_link_libraries ( ${ EXECUTABLE_MCUBOOT_NAME } nimble nrf-sdk lvgl )
set_target_properties ( ${ EXECUTABLE_MCUBOOT_NAME } PROPERTIES OUTPUT_NAME ${ EXECUTABLE_MCUBOOT_FILE_NAME } )
target_compile_options ( ${ EXECUTABLE_MCUBOOT_NAME } PUBLIC
target_compile_options ( ${ EXECUTABLE_MCUBOOT_NAME } PUBLIC
$ < $ < A N D : $ < C O M P I L E _ L A N G U A G E : C > , $ < C O N F I G : D E B U G > > : $ { C O M M O N _ F L A G S } - O 0 - g 3 >
$ < $ < A N D : $ < C O M P I L E _ L A N G U A G E : C > , $ < C O N F I G : D E B U G > > : $ { C O M M O N _ F L A G S } - O 0 - g 3 >
$ < $ < A N D : $ < C O M P I L E _ L A N G U A G E : C > , $ < C O N F I G : R E L E A S E > > : $ { C O M M O N _ F L A G S } - O 3 >
$ < $ < A N D : $ < C O M P I L E _ L A N G U A G E : C > , $ < C O N F I G : R E L E A S E > > : $ { C O M M O N _ F L A G S } - O 3 >
@ -637,23 +642,25 @@ target_compile_options(${EXECUTABLE_MCUBOOT_NAME} PUBLIC
set_target_properties ( ${ EXECUTABLE_MCUBOOT_NAME } PROPERTIES
set_target_properties ( ${ EXECUTABLE_MCUBOOT_NAME } PROPERTIES
S U F F I X " . o u t "
S U F F I X " . o u t "
L I N K _ F L A G S " - m t h u m b - m a b i = a a p c s - s t d = g n u + + 9 8 - s t d = c 9 9 - L $ { N R F 5 _ S D K _ P A T H } / m o d u l e s / n r f x / m d k - T $ { N R F 5 _ L I N K E R _ S C R I P T _ M C U B O O T } - m c p u = c o r t e x - m 4 - m f l o a t - a b i = h a r d - m f p u = f p v 4 - s p - d 1 6 - W l , - - g c - s e c t i o n s - - s p e c s = n a n o . s p e c s - l c - l n o s y s - l m - W l , - M a p = $ { E X E C U T A B L E _ M C U B O O T _ NA M E } . m a p "
L I N K _ F L A G S " - m t h u m b - m a b i = a a p c s - s t d = g n u + + 9 8 - s t d = c 9 9 - L $ { N R F 5 _ S D K _ P A T H } / m o d u l e s / n r f x / m d k - T $ { N R F 5 _ L I N K E R _ S C R I P T _ M C U B O O T } - m c p u = c o r t e x - m 4 - m f l o a t - a b i = h a r d - m f p u = f p v 4 - s p - d 1 6 - W l , - - g c - s e c t i o n s - - s p e c s = n a n o . s p e c s - l c - l n o s y s - l m - W l , - M a p = $ { E X E C U T A B L E _ M C U B O O T _ FI L E _ NA M E } . m a p "
C X X _ S T A N D A R D 1 1
C X X _ S T A N D A R D 1 1
C _ S T A N D A R D 9 9
C _ S T A N D A R D 9 9
)
)
add_custom_command ( TARGET ${ EXECUTABLE_MCUBOOT_NAME }
add_custom_command ( TARGET ${ EXECUTABLE_MCUBOOT_NAME }
P O S T _ B U I L D
P O S T _ B U I L D
C O M M A N D $ { C M A K E _ S I Z E _ U T I L } $ { E X E C U T A B L E _ M C U B O O T _ NA M E } . o u t
C O M M A N D $ { C M A K E _ S I Z E _ U T I L } $ { E X E C U T A B L E _ M C U B O O T _ FI L E _ NA M E } . o u t
C O M M A N D $ { C M A K E _ O B J C O P Y } - O b i n a r y $ { E X E C U T A B L E _ M C U B O O T _ NA M E } . o u t " $ { E X E C U T A B L E _ M C U B O O T _ N A M E } . b i n "
C O M M A N D $ { C M A K E _ O B J C O P Y } - O b i n a r y $ { E X E C U T A B L E _ M C U B O O T _ FI L E _ NA M E } . o u t " $ { E X E C U T A B L E _ M C U B O O T _ F I L E _ N A M E } . b i n "
C O M M A N D $ { C M A K E _ O B J C O P Y } - O i h e x $ { E X E C U T A B L E _ M C U B O O T _ NA M E } . o u t " $ { E X E C U T A B L E _ M C U B O O T _ N A M E } . h e x "
C O M M A N D $ { C M A K E _ O B J C O P Y } - O i h e x $ { E X E C U T A B L E _ M C U B O O T _ FI L E _ NA M E } . o u t " $ { E X E C U T A B L E _ M C U B O O T _ F I L E _ N A M E } . h e x "
C O M M E N T " p o s t b u i l d s t e p s f o r $ { E X E C U T A B L E _ M C U B O O T _ NA M E } "
C O M M E N T " p o s t b u i l d s t e p s f o r $ { E X E C U T A B L E _ M C U B O O T _ FI L E _ NA M E } "
)
)
# B u i l d b i n a r y t h a t w r i t e s t h e g r a p h i c a s s e t s f o r t h e b o o t l o a d e r
# B u i l d b i n a r y t h a t w r i t e s t h e g r a p h i c a s s e t s f o r t h e b o o t l o a d e r
set ( EXECUTABLE_GRAPHICS_NAME "pinetime-graphics" )
set ( EXECUTABLE_GRAPHICS_NAME "pinetime-graphics" )
set ( EXECUTABLE_GRAPHICS_FILE_NAME ${ EXECUTABLE_GRAPHICS_NAME } - ${ pinetime_VERSION_MAJOR } . ${ pinetime_VERSION_MINOR } . ${ pinetime_VERSION_PATCH } )
add_executable ( ${ EXECUTABLE_GRAPHICS_NAME } ${ GRAPHICS_SOURCE_FILES } )
add_executable ( ${ EXECUTABLE_GRAPHICS_NAME } ${ GRAPHICS_SOURCE_FILES } )
target_link_libraries ( ${ EXECUTABLE_GRAPHICS_NAME } nrf-sdk )
target_link_libraries ( ${ EXECUTABLE_GRAPHICS_NAME } nrf-sdk )
set_target_properties ( ${ EXECUTABLE_GRAPHICS_NAME } PROPERTIES OUTPUT_NAME ${ EXECUTABLE_GRAPHICS_FILE_NAME } )
target_compile_options ( ${ EXECUTABLE_GRAPHICS_NAME } PUBLIC
target_compile_options ( ${ EXECUTABLE_GRAPHICS_NAME } PUBLIC
$ < $ < A N D : $ < C O M P I L E _ L A N G U A G E : C > , $ < C O N F I G : D E B U G > > : $ { C O M M O N _ F L A G S } - O 0 - g 3 >
$ < $ < A N D : $ < C O M P I L E _ L A N G U A G E : C > , $ < C O N F I G : D E B U G > > : $ { C O M M O N _ F L A G S } - O 0 - g 3 >
$ < $ < A N D : $ < C O M P I L E _ L A N G U A G E : C > , $ < C O N F I G : R E L E A S E > > : $ { C O M M O N _ F L A G S } - O 3 >
$ < $ < A N D : $ < C O M P I L E _ L A N G U A G E : C > , $ < C O N F I G : R E L E A S E > > : $ { C O M M O N _ F L A G S } - O 3 >
@ -664,17 +671,17 @@ target_compile_options(${EXECUTABLE_GRAPHICS_NAME} PUBLIC
set_target_properties ( ${ EXECUTABLE_GRAPHICS_NAME } PROPERTIES
set_target_properties ( ${ EXECUTABLE_GRAPHICS_NAME } PROPERTIES
S U F F I X " . o u t "
S U F F I X " . o u t "
L I N K _ F L A G S " - m t h u m b - m a b i = a a p c s - s t d = g n u + + 9 8 - s t d = c 9 9 - L $ { N R F 5 _ S D K _ P A T H } / m o d u l e s / n r f x / m d k - T $ { N R F 5 _ L I N K E R _ S C R I P T } - m c p u = c o r t e x - m 4 - m f l o a t - a b i = h a r d - m f p u = f p v 4 - s p - d 1 6 - W l , - - g c - s e c t i o n s - - s p e c s = n a n o . s p e c s - l c - l n o s y s - l m - W l , - M a p = $ { E X E C U T A B L E _ G R A P H I C S _ NA M E } . m a p "
L I N K _ F L A G S " - m t h u m b - m a b i = a a p c s - s t d = g n u + + 9 8 - s t d = c 9 9 - L $ { N R F 5 _ S D K _ P A T H } / m o d u l e s / n r f x / m d k - T $ { N R F 5 _ L I N K E R _ S C R I P T } - m c p u = c o r t e x - m 4 - m f l o a t - a b i = h a r d - m f p u = f p v 4 - s p - d 1 6 - W l , - - g c - s e c t i o n s - - s p e c s = n a n o . s p e c s - l c - l n o s y s - l m - W l , - M a p = $ { E X E C U T A B L E _ G R A P H I C S _ FI L E _ NA M E } . m a p "
C X X _ S T A N D A R D 1 1
C X X _ S T A N D A R D 1 1
C _ S T A N D A R D 9 9
C _ S T A N D A R D 9 9
)
)
add_custom_command ( TARGET ${ EXECUTABLE_GRAPHICS_NAME }
add_custom_command ( TARGET ${ EXECUTABLE_GRAPHICS_NAME }
P O S T _ B U I L D
P O S T _ B U I L D
C O M M A N D $ { C M A K E _ S I Z E _ U T I L } $ { E X E C U T A B L E _ G R A P H I C S _ NA M E } . o u t
C O M M A N D $ { C M A K E _ S I Z E _ U T I L } $ { E X E C U T A B L E _ G R A P H I C S _ FI L E _ NA M E } . o u t
C O M M A N D $ { C M A K E _ O B J C O P Y } - O b i n a r y $ { E X E C U T A B L E _ G R A P H I C S _ NA M E } . o u t " $ { E X E C U T A B L E _ G R A P H I C S _ N A M E } . b i n "
C O M M A N D $ { C M A K E _ O B J C O P Y } - O b i n a r y $ { E X E C U T A B L E _ G R A P H I C S _ FI L E _ NA M E } . o u t " $ { E X E C U T A B L E _ G R A P H I C S _ F I L E _ N A M E } . b i n "
C O M M A N D $ { C M A K E _ O B J C O P Y } - O i h e x $ { E X E C U T A B L E _ G R A P H I C S _ NA M E } . o u t " $ { E X E C U T A B L E _ G R A P H I C S _ N A M E } . h e x "
C O M M A N D $ { C M A K E _ O B J C O P Y } - O i h e x $ { E X E C U T A B L E _ G R A P H I C S _ FI L E _ NA M E } . o u t " $ { E X E C U T A B L E _ G R A P H I C S _ F I L E _ N A M E } . h e x "
C O M M E N T " p o s t b u i l d s t e p s f o r $ { E X E C U T A B L E _ G R A P H I C S _ NA M E } "
C O M M E N T " p o s t b u i l d s t e p s f o r $ { E X E C U T A B L E _ G R A P H I C S _ FI L E _ NA M E } "
)
)
# F L A S H
# F L A S H
@ -713,3 +720,5 @@ elseif(USE_OPENOCD)
)
)
endif ( )
endif ( )
configure_file ( ${ CMAKE_CURRENT_SOURCE_DIR } /../docker/build.sh.in ${ CMAKE_CURRENT_SOURCE_DIR } /../docker/build.sh )