carl9170 firmware: abort build if stack frame > 128
authorChristian Lamparter <chunkeey@googlemail.com>
Thu, 16 Sep 2010 19:59:46 +0000 (21:59 +0200)
committerChristian Lamparter <chunkeey@googlemail.com>
Thu, 16 Sep 2010 19:59:46 +0000 (21:59 +0200)
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
carlfw/CMakeLists.txt
carlfw/carl9170.lds

index b7057177e28e50222cf0527c0d25a74268979135..95a4cc41427f96e4324006d966870889efe0e731 100644 (file)
@@ -6,7 +6,7 @@ include("../extra/sh-elf-linux.cmake")
 include("../config.cmake")
 
 set(CARLFW_CFLAGS_WARNING "-W -Wall -Wextra -Wunreachable-code -Winline -Wlogical-op -Wno-packed-bitfield-compat -Winit-self -Wshadow -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wformat=2 -Wcast-align -Wmissing-format-attribute -Wmissing-prototypes -Wtype-limits -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wdisabled-optimization -Wpointer-arith -Wvolatile-register-var -Waddress -Wbad-function-cast -Wunsafe-loop-optimizations")
-set(CARLFW_CFLAGS_EXTRA "-mbitops -std=gnu99 -ffunction-sections")
+set(CARLFW_CFLAGS_EXTRA "-mbitops -std=gnu99 -ffunction-sections -Wframe-larger-than=128 -Werror")
 
 if (CONFIG_CARL9170FW_AGGRESSIVE_CFLAGS)
        set(CARLFW_CFLAGS_AGGRESSIVE "-fomit-frame-pointer -fsee -frename-registers -ftree-vectorize")
index 0c4ebd659d395b096142d8d78d15389498f951ae..726a9e2acddeb66fa478937f834d6ef155ac4b82 100644 (file)
@@ -27,11 +27,15 @@ MEMORY
     irqctl   : ORIGIN = 0x1d2000, LENGTH = 4k
     usb      : ORIGIN = 0x1e1000, LENGTH = 4k
     pta      : ORIGIN = 0x1e2000, LENGTH = 4k
-    pram     : ORIGIN = 0x200000, LENGTH = 16k
+    pram     : ORIGIN = 0x200000, LENGTH = 16256
+    bogus    : ORIGIN = 0x300000, LENGTH = 8k
 }
 
 SECTIONS
 {
+       .eeprom : { *(.eeprom*) } > eeprom
+       .sram   : { *(.sram*) } > sram
+
        /*
         * The ar9170 boot code will execute the code
         * at address 0x04 from the loaded firmware as
@@ -50,8 +54,6 @@ SECTIONS
        .rodata : { *(.rodata*) } > pram
        .bss    : { *(.bss) } > pram
        .data   : { *(.data*) } > pram
-       .fwdsc  : { KEEP(*(.fwdsc)) } > pram
 
-       .sram   : { *(.sram*) } > sram
-       .eeprom : { *(.eeprom*) } > eeprom
+       .fwdsc  : { KEEP(*(.fwdsc)) } > bogus
 }