diff --git a/firmware/application/CMakeLists.txt b/firmware/application/CMakeLists.txt index c5bf6f50..988f5bcd 100644 --- a/firmware/application/CMakeLists.txt +++ b/firmware/application/CMakeLists.txt @@ -52,7 +52,7 @@ set(USE_LINK_GC yes) # Linker extra options here. set(USE_LDOPT) -# Enable this if you want link time optimizations (LTO) +# Enable this if you want link time optimizations (LTO) - this flag affects chibios only set(USE_LTO no) # If enabled, this option allows to compile the application in THUMB mode. @@ -293,7 +293,7 @@ set(CPPSRC # apps/ui_jammer.cpp # apps/ui_keyfob.cpp # apps/ui_lcr.cpp - apps/ui_level.cpp + apps/ui_level.cpp apps/ui_looking_glass_app.cpp apps/ui_mictx.cpp apps/ui_modemsetup.cpp @@ -304,7 +304,7 @@ set(CPPSRC apps/ui_pocsag_tx.cpp apps/ui_rds.cpp apps/ui_recon_settings.cpp - apps/ui_recon.cpp + apps/ui_recon.cpp apps/ui_remote.cpp apps/ui_scanner.cpp apps/ui_sd_over_usb.cpp @@ -492,6 +492,7 @@ add_custom_command( ) add_executable(${PROJECT_NAME}.elf ${CSRC} ${CPPSRC} ${ASMSRC}) +set_source_files_properties(${EXTCPPSRC} PROPERTIES COMPILE_FLAGS -fno-lto) set_target_properties(${PROJECT_NAME}.elf PROPERTIES LINK_DEPENDS ${LDSCRIPT}) add_definitions(${DEFS}) include_directories(. ${INCDIR}) diff --git a/firmware/tools/check_for_shared_external_code.py b/firmware/tools/check_for_shared_external_code.py index 7d7ad676..34cea08b 100644 --- a/firmware/tools/check_for_shared_external_code.py +++ b/firmware/tools/check_for_shared_external_code.py @@ -49,5 +49,5 @@ for i in range(0, len(image), 4): snippet = image[i:i+4] val = int.from_bytes(snippet, byteorder='little') offset = val & 0xFFFF - if (val >= external_apps_address_start) and (val < external_apps_address_end) and ((val & 0xFFFF) < maximum_application_size) and ((val & 0x3)==0): + if (val >= external_apps_address_start) and (val < external_apps_address_end) and ((val & 0xFFFF) < maximum_application_size): print ("External code address", hex(val),"at offset", hex(i),"in", sys.argv[1]) diff --git a/firmware/tools/export_external_apps.py b/firmware/tools/export_external_apps.py index 37f04e40..b187eddb 100755 --- a/firmware/tools/export_external_apps.py +++ b/firmware/tools/export_external_apps.py @@ -76,7 +76,7 @@ def patch_image(path, image_data, search_address, replace_address): external_application_image += new_snippet else: external_application_image += snippet - if (val >= external_apps_address_start) and (val < external_apps_address_end) and ((val & 0xFFFF) < maximum_application_size) and ((val & 0x3)==0): + if (val >= external_apps_address_start) and (val < external_apps_address_end) and ((val & 0xFFFF) < maximum_application_size): print ("WARNING: External code address", hex(val), "at offset", hex(x*4), "in", path) return external_application_image diff --git a/firmware/tools/make_spi_image.py b/firmware/tools/make_spi_image.py index 2ce3273a..38e9e68b 100755 --- a/firmware/tools/make_spi_image.py +++ b/firmware/tools/make_spi_image.py @@ -91,7 +91,7 @@ for i in range(0, len(spi_image), 4): snippet = spi_image[i:i+4] val = int.from_bytes(snippet, byteorder='little') checksum += val - if (val >= external_apps_address_start) and (val < external_apps_address_end) and ((val & 0xFFFF) < maximum_application_size) and ((val & 0x3)==0): + if (val >= external_apps_address_start) and (val < external_apps_address_end) and ((val & 0xFFFF) < maximum_application_size): print ("WARNING: External code address", hex(val), "at offset", hex(i), "in", sys.argv[3]) final_checksum = 0