From 690092d5647af713ae968927a51476f9bd7a55cc Mon Sep 17 00:00:00 2001 From: bloqaudio Date: Mon, 14 Sep 2026 08:29:39 -0500 Subject: [PATCH] Move DHCP out of BANK2 into BANK3 BANK2 outgrew its 48 KB window on PCB_SWTG018AS_V2_1_0 (49182 bytes, 30 over) once the spanning tree code learnt about link aggregation, and the image builder refuses to link. Only KP_9000_6XHML_X2 is built in CI, so the overflow was not caught there. dhcp.c is self-contained: its three exports are __banked, the rest of the module is only reached from inside it, it holds no __code pointers, and its uip calls already crossed into BANK1. Moving the pragma is the whole change. BANK2 49182 -> 43691 on PCB_SWTG018AS_V2_1_0, BANK3 5709 -> 11206, BANK1 +6 for the trampolines; the generated assembly shows no plain lcall leaving the module's bank. --- dhcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dhcp.c b/dhcp.c index a1f74372..2fbce36c 100644 --- a/dhcp.c +++ b/dhcp.c @@ -50,7 +50,7 @@ __xdata uip_ipaddr_t server; #define DHCP_PARAM_DNS 6 #define DHCP_END 255 -#pragma codeseg BANK2 +#pragma codeseg BANK3 #pragma constseg BANK2 struct dhcp_pkt {