Build epoch in info, flash-status command, cmake version embedding
This commit is contained in:
@@ -30,6 +30,11 @@ pico_generate_pio_header(picomap ${CMAKE_CURRENT_LIST_DIR}/w6300/qspi.pio)
|
||||
pico_enable_stdio_usb(picomap 0)
|
||||
pico_enable_stdio_uart(picomap 0)
|
||||
pico_set_binary_type(picomap copy_to_ram)
|
||||
string(TIMESTAMP BUILD_EPOCH "%s" UTC)
|
||||
math(EXPR VERSION_MAJOR "${BUILD_EPOCH} >> 16")
|
||||
math(EXPR VERSION_MINOR "${BUILD_EPOCH} & 65535")
|
||||
pico_set_binary_version(picomap MAJOR ${VERSION_MAJOR} MINOR ${VERSION_MINOR})
|
||||
target_compile_definitions(picomap PRIVATE BUILD_EPOCH=${BUILD_EPOCH})
|
||||
pico_add_extra_outputs(picomap)
|
||||
target_link_libraries(picomap ${LIB_DEPS})
|
||||
|
||||
@@ -40,5 +45,7 @@ pico_generate_pio_header(picomap_test ${CMAKE_CURRENT_LIST_DIR}/w6300/qspi.pio)
|
||||
pico_enable_stdio_usb(picomap_test 0)
|
||||
pico_enable_stdio_uart(picomap_test 0)
|
||||
pico_set_binary_type(picomap_test copy_to_ram)
|
||||
pico_set_binary_version(picomap_test MAJOR ${VERSION_MAJOR} MINOR ${VERSION_MINOR})
|
||||
target_compile_definitions(picomap_test PRIVATE BUILD_EPOCH=${BUILD_EPOCH})
|
||||
pico_add_extra_outputs(picomap_test)
|
||||
target_link_libraries(picomap_test ${LIB_DEPS})
|
||||
|
||||
Reference in New Issue
Block a user