-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
CMakeLists.txt
47 lines (37 loc) · 1.85 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#
# Copyright (c) .NET Foundation and Contributors
# See LICENSE file in the project root for full license information.
#
include(binutils.common)
include(binutils.ChibiOS)
nf_setup_target_build(
HAS_NANOBOOTER
BOOTER_LINKER_FILE
mbn_quail_booter
CLR_LINKER_FILE
mbn_quail_CLR
BOOTER_EXTRA_LINKMAP_PROPERTIES
",--library-path=${CMAKE_SOURCE_DIR}/targets/ChibiOS/_common,--defsym=__main_stack_size__=0x400,--defsym=__process_stack_size__=0x400,--defsym=__crt_heap_size__=0x10000"
CLR_EXTRA_LINKMAP_PROPERTIES
",--library-path=${CMAKE_SOURCE_DIR}/targets/ChibiOS/_common,--defsym=__main_stack_size__=0x400,--defsym=__process_stack_size__=0x800,--defsym=__crt_heap_size__=0x10000"
)
# if HEX2DFU tool is available pack the binaries into a DFU package
if(HEX2DFU_TOOL_AVAILABLE)
####################################################################################################
## when changing the linker file make sure to update the new addresses for the image files below ##
## DO NOT use the leading 0x notation, just the address in plain hexadecimal formating ##
####################################################################################################
if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
nf_generate_dfu_package(
${CMAKE_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin 08000000
${CMAKE_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin 08008000
${CMAKE_SOURCE_DIR}/build/nanobooter-nanoclr.dfu
)
else()
nf_generate_dfu_package(
${CMAKE_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin 08000000
${CMAKE_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin 08004000
${CMAKE_SOURCE_DIR}/build/nanobooter-nanoclr.dfu
)
endif()
endif()