Преглед на файлове

CMakeLists.txt: drop the hard-coded entry address in favor of a lookup of the .app_bin section in the map file

Maarten van der Schrieck преди 6 месеца
родител
ревизия
5ab801799f
променени са 1 файла, в които са добавени 2 реда и са изтрити 3 реда
  1. 2
    3
      CMakeLists.txt

+ 2
- 3
CMakeLists.txt Целия файл

@@ -136,10 +136,9 @@ function(picowota_build_combined NAME)
136 136
 	# Build the bootloader with the sections to fill in
137 137
 	pico_set_linker_script(picowota ${PICOWOTA_SRC_DIR}/bootloader_shell.ld)
138 138
 
139
-	# TODO: The hard-coded address here is a bit nasty
140 139
 	add_custom_target(${NAME}_hdr DEPENDS ${APP_BIN})
141
-	add_custom_command(TARGET ${NAME}_hdr DEPENDS ${APP_BIN}
142
-		COMMAND ${PICOWOTA_SRC_DIR}/gen_imghdr.py -a 0x1005B000 ${APP_BIN} ${APP_HDR_BIN}
140
+	add_custom_command(TARGET ${NAME}_hdr DEPENDS ${APP_BIN} picowota
141
+		COMMAND ${PICOWOTA_SRC_DIR}/gen_imghdr.py --map ${PICOWOTA_BIN_DIR}/picowota.elf.map --section .app_bin ${APP_BIN} ${APP_HDR_BIN}
143 142
 	)
144 143
 
145 144
 	add_custom_target(${COMBINED} ALL)

Loading…
Отказ
Запис