From 59d1ef7666e0bd6a091c7b5c0f1d6344d7406058 Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Sat, 28 Mar 2026 17:43:08 +0100 Subject: [PATCH] added warning for when firmware gets to big thus overwriting bootloader. --- avr/devices/c03/main/main.asm | 6 ++++++ avr/devices/c03/test/main.asm | 7 +++++++ avr/devices/e01/main/main.asm | 5 +++++ avr/devices/e02/main/main.asm | 5 +++++ avr/devices/e03/main/main.asm | 5 +++++ avr/devices/n14/main/main.asm | 6 +++++- avr/devices/n16/main/main.asm | 4 ++++ avr/devices/n21/main/main.asm | 5 +++++ avr/devices/n24/main/main.asm | 5 +++++ avr/devices/n25/main/main.asm | 7 ++++++- avr/devices/n26/main/main.asm | 5 +++++ avr/devices/n27/main/main.asm | 6 ++++++ avr/devices/n28/main/main.asm | 5 +++++ avr/devices/n29/main/main.asm | 5 +++++ avr/devices/t04/main/main.asm | 5 +++++ 15 files changed, 79 insertions(+), 2 deletions(-) diff --git a/avr/devices/c03/main/main.asm b/avr/devices/c03/main/main.asm index 2c54d19..41c7362 100644 --- a/avr/devices/c03/main/main.asm +++ b/avr/devices/c03/main/main.asm @@ -319,6 +319,12 @@ test: .equ netInterfaceData = com2w_iface +deviceCodeEnd: + .if deviceCodeEnd >= BOOTLOADER_ADDR + .warning "Code reaches into boot loader!" + .endif + + .dseg diff --git a/avr/devices/c03/test/main.asm b/avr/devices/c03/test/main.asm index ee8d7cc..253eae7 100644 --- a/avr/devices/c03/test/main.asm +++ b/avr/devices/c03/test/main.asm @@ -611,6 +611,13 @@ GUI2_MODULE_END: +deviceCodeEnd: + .if deviceCodeEnd >= BOOTLOADER_ADDR + .warning "Code reaches into boot loader!" + .endif + + + .dseg diff --git a/avr/devices/e01/main/main.asm b/avr/devices/e01/main/main.asm index 5419556..2eb0c92 100644 --- a/avr/devices/e01/main/main.asm +++ b/avr/devices/e01/main/main.asm @@ -244,3 +244,8 @@ onMessageReceived: .equ netInterfaceData2 = com2w_iface +deviceCodeEnd: + .if deviceCodeEnd >= BOOTLOADER_ADDR + .warning "Code reaches into boot loader!" + .endif + diff --git a/avr/devices/e02/main/main.asm b/avr/devices/e02/main/main.asm index 7b9cefa..ba0b848 100644 --- a/avr/devices/e02/main/main.asm +++ b/avr/devices/e02/main/main.asm @@ -244,3 +244,8 @@ onMessageReceived: .equ netInterfaceData2 = com2w_iface +deviceCodeEnd: + .if deviceCodeEnd >= BOOTLOADER_ADDR + .warning "Code reaches into boot loader!" + .endif + diff --git a/avr/devices/e03/main/main.asm b/avr/devices/e03/main/main.asm index 8eccb37..8ed8884 100644 --- a/avr/devices/e03/main/main.asm +++ b/avr/devices/e03/main/main.asm @@ -204,3 +204,8 @@ onEveryLoop: +deviceCodeEnd: + .if deviceCodeEnd >= BOOTLOADER_ADDR + .warning "Code reaches into boot loader!" + .endif + diff --git a/avr/devices/n14/main/main.asm b/avr/devices/n14/main/main.asm index 2532c6e..1d79b3e 100644 --- a/avr/devices/n14/main/main.asm +++ b/avr/devices/n14/main/main.asm @@ -61,7 +61,7 @@ #define APPS_NETWORK #define APPS_REPORTSENSORS -#define APPS_STATS +;#define APPS_STATS #define APPS_MA_LIGHT @@ -214,5 +214,9 @@ onEveryLoop: +deviceCodeEnd: + .if deviceCodeEnd >= BOOTLOADER_ADDR + .warning "Code reaches into boot loader!" + .endif diff --git a/avr/devices/n16/main/main.asm b/avr/devices/n16/main/main.asm index 164f342..9a84286 100644 --- a/avr/devices/n16/main/main.asm +++ b/avr/devices/n16/main/main.asm @@ -209,4 +209,8 @@ onEveryLoop: +deviceCodeEnd: + .if deviceCodeEnd >= BOOTLOADER_ADDR + .warning "Code reaches into boot loader!" + .endif diff --git a/avr/devices/n21/main/main.asm b/avr/devices/n21/main/main.asm index 6b6639a..c3bc3a4 100644 --- a/avr/devices/n21/main/main.asm +++ b/avr/devices/n21/main/main.asm @@ -219,3 +219,8 @@ onEveryLoop: .equ netInterfaceData = com2w_iface +deviceCodeEnd: + .if deviceCodeEnd >= BOOTLOADER_ADDR + .warning "Code reaches into boot loader!" + .endif + diff --git a/avr/devices/n24/main/main.asm b/avr/devices/n24/main/main.asm index 242d8c7..7171249 100644 --- a/avr/devices/n24/main/main.asm +++ b/avr/devices/n24/main/main.asm @@ -224,3 +224,8 @@ onEveryLoop: +deviceCodeEnd: + .if deviceCodeEnd >= BOOTLOADER_ADDR + .warning "Code reaches into boot loader!" + .endif + diff --git a/avr/devices/n25/main/main.asm b/avr/devices/n25/main/main.asm index e30a9a6..cb14062 100644 --- a/avr/devices/n25/main/main.asm +++ b/avr/devices/n25/main/main.asm @@ -62,7 +62,7 @@ #define APPS_NETWORK #define APPS_REPORTSENSORS -#define APPS_STATS +;#define APPS_STATS #define APPS_MA_LIGHT @@ -219,4 +219,9 @@ onEveryLoop: +deviceCodeEnd: + .if deviceCodeEnd >= BOOTLOADER_ADDR + .warning "Code reaches into boot loader!" + .endif + diff --git a/avr/devices/n26/main/main.asm b/avr/devices/n26/main/main.asm index b35bdac..41dd86e 100644 --- a/avr/devices/n26/main/main.asm +++ b/avr/devices/n26/main/main.asm @@ -212,3 +212,8 @@ onEveryLoop: +deviceCodeEnd: + .if deviceCodeEnd >= BOOTLOADER_ADDR + .warning "Code reaches into boot loader!" + .endif + diff --git a/avr/devices/n27/main/main.asm b/avr/devices/n27/main/main.asm index ae824e5..c135c37 100644 --- a/avr/devices/n27/main/main.asm +++ b/avr/devices/n27/main/main.asm @@ -224,3 +224,9 @@ onEveryLoop: +deviceCodeEnd: + .if deviceCodeEnd >= BOOTLOADER_ADDR + .warning "Code reaches into boot loader!" + .endif + + diff --git a/avr/devices/n28/main/main.asm b/avr/devices/n28/main/main.asm index 39a6848..e7b2008 100644 --- a/avr/devices/n28/main/main.asm +++ b/avr/devices/n28/main/main.asm @@ -219,3 +219,8 @@ onEveryLoop: .equ netInterfaceData = com2w_iface +deviceCodeEnd: + .if deviceCodeEnd >= BOOTLOADER_ADDR + .warning "Code reaches into boot loader!" + .endif + diff --git a/avr/devices/n29/main/main.asm b/avr/devices/n29/main/main.asm index bcdef4a..291db38 100644 --- a/avr/devices/n29/main/main.asm +++ b/avr/devices/n29/main/main.asm @@ -219,3 +219,8 @@ onEveryLoop: +deviceCodeEnd: + .if deviceCodeEnd >= BOOTLOADER_ADDR + .warning "Code reaches into boot loader!" + .endif + diff --git a/avr/devices/t04/main/main.asm b/avr/devices/t04/main/main.asm index b292af4..b384add 100644 --- a/avr/devices/t04/main/main.asm +++ b/avr/devices/t04/main/main.asm @@ -244,3 +244,8 @@ onMessageReceived: .equ netInterfaceData2 = com2w_iface +deviceCodeEnd: + .if deviceCodeEnd >= BOOTLOADER_ADDR + .warning "Code reaches into boot loader!" + .endif +