1 files changed, 5 insertions, 0 deletions
diff --git a/firmware/target/coldfire/debug-coldfire.c b/firmware/target/coldfire/debug-coldfire.c
index 249c0a75ab..ef44a82176 100644
@@ -50,6 +50,11 @@
#elif (CONFIG_KEYPAD == MPIO_HD300_PAD)
# define DEBUG_CANCEL BUTTON_MENU
+/* dbg_flash_id() hits address 0, which is nominally illegal. Make sure
+ GCC doesn't helpfully turn this into an exception.
+#pragma GCC optimize "no-delete-null-pointer-checks"
/* Tool function to read the flash manufacturer and type, if available.
Only chips which could be reprogrammed in system will return values.
(The mode switch addresses vary between flash manufacturers, hence addr1/2) */