1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-16 04:45:22 +03:00

Merge pull request #6136 from iNavFlight/agh_fix_cmake_hex

[CMAKE] Override .hex start address with 0x08000000
This commit is contained in:
Paweł Spychalski 2020-09-21 08:31:05 +02:00 committed by GitHub
commit 283c33b097
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -189,7 +189,11 @@ endfunction()
function(add_hex_target name exe hex)
add_custom_target(${name} ALL
cmake -E env PATH=$ENV{PATH}
${CMAKE_OBJCOPY} -Oihex $<TARGET_FILE:${exe}> ${hex}
# TODO: Overriding the start address with --set-start 0x08000000
# seems to be required due to some incorrect assumptions about .hex
# files in the configurator. Verify wether that's the case and fix
# the bug in configurator or delete this comment.
${CMAKE_OBJCOPY} -Oihex --set-start 0x08000000 $<TARGET_FILE:${exe}> ${hex}
BYPRODUCTS ${hex}
)
endfunction()