microbuilder / LPC11U_LPC13U_CodeBase

Open source code base for ARM Cortex M3 LPC1347 or Cortex M0 LPC11U37/LPC11U24 MCUs
Other
55 stars 38 forks source link

linker error for LPC11U #10

Closed FrankBuss closed 11 years ago

FrankBuss commented 11 years ago

I've tried to compile the development branch of your project (because I need the custom USB functionality) with Code Sourcery and Conole2 on Windows. This is the changes I made: https://github.com/FrankBuss/LPC11U_LPC13U_CodeBase/commit/c304704c450989221747591e1eb13224b7ff2be4

But when I try to compile it with "cs-make", I get this error:

LINKING bin/firmware.elf (cortex-m0 -Os CFG_BRD_LPCNFC) c:/program files (x86)/codesourcery/sourcery_codebench_lite_for_arm_eabi/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld.exe: bin/firmware.elf section .usb_ram' will not fit in regionisramUsb' c:/program files (x86)/codesourcery/sourcery_codebench_lite_for_arm_eabi/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld.exe: region `isramUsb' overflowed by 649 bytes collect2: ld returned 1 exit status cs-make: *\ [firmware] Error 1

microbuilder commented 11 years ago

Ooops ... that's a nasty bug. I made some makefile updates a while back and the .bss section was being place in the 2KB USB SRAM instead of the main 8KB block. I just pushed an update to both Master and development that should fix this.

BUT ... you won't be able to fit the NFC code and USB, etc., into an LPC11U24, so I'd suggest looking at the larger LPC11U37.

FrankBuss commented 11 years ago

Thanks for the bugfix, it works. I don't need the NFC code, was just the board which is most like my board ( http://www.crazycartridge.org ), so only a few adjustments needed. Your printf redirect implementation to USB CDC worked out of the box, nice framework.