How to know use limit program size?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to know use limit program size?

291 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fumio yoshizawa on Thu Apr 10 22:51:13 MST 2014
Hi,
I want to know about limit program size.
Because I met error at build phrase about this. (collect2.exe: error: ld returned 1 exit status)
Remove some routine and build I get this result.
text   data      bss    dec    hex    filename
4764   4         448    5216  1460   RS486_t1.axf

My target board use LPC11U14(LPC11U14FBD48).  (Flash  32kb , SRAM  6kb)
code_red info say.
the flash consumption of your application will then be text + data.
the RAM consumption of your application will then be data + bss.

I think still enough memory exist.
Please tell me about cause of the error.

Best Regards,
Fumio Yoshizawa,  from Japan.
0 Kudos
4 Replies

266 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by thommaughan on Thu Mar 10 17:46:10 MST 2016
I had the same problem with a copied project (create new project and then copy src files) and after following the FAQ found I had C->Misc as Redlib(auto) and Assembler->Arch as Redlib(auto), BUT in the Linker->Manged Linker Script I had Redlib(none), I changed it to Redlib(no host) and all was well.

Thom
0 Kudos

266 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Mon Apr 14 23:23:21 MST 2014
Probably you are linking the wrong C library...

See http://www.lpcware.com/content/faq/lpcxpresso/linker-undefined-reference
0 Kudos

266 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fumio yoshizawa on Mon Apr 14 22:34:15 MST 2014
Thank's.

This is a error message.

Building target: rs486-t2.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -L"C:\Users\fy3\Documents\LPCXpresso_7.1.1_125\workspace\rs-468-t2\CMSISv2p00_LPC11Uxx\Debug" -L"C:\Users\fy3\Documents\LPCXpresso_7.1.1_125\workspace\rs-468-t2\LPC11Uxx_Driver_Lib\Debug" -Xlinker -Map="rs486-t2.map" -Xlinker --gc-sections -mcpu=cortex-m0 -mthumb -T "rs486-t2_Debug.ld" -o "rs486-t2.axf"  ./src/aeabi_romdiv_patch.o ./src/cr_startup_lpc11uxx.o ./src/crp.o ./src/i2c.o ./src/main.o ./src/rs485.o   -lCMSISv2p00_LPC11Uxx -lLPC11Uxx_Driver_Lib
c:/nxp/lpcxpresso_7.1.1_125/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a(fpprintf.o): In function `printf':
fpprintf.c:(.text.printf+0x38): undefined reference to `__sys_write'
c:/nxp/lpcxpresso_7.1.1_125/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a(_deferredlazyseek.o): In function `__flsbuf':
_deferredlazyseek.c:(.text.__flsbuf+0x88): undefined reference to `__sys_istty'
c:/nxp/lpcxpresso_7.1.1_125/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a(_writebuf.o): In function `_Cwritebuf':
_writebuf.c:(.text._Cwritebuf+0x16): undefined reference to `__sys_flen'
_writebuf.c:(.text._Cwritebuf+0x26): undefined reference to `__sys_seek'
_writebuf.c:(.text._Cwritebuf+0x3a): undefined reference to `__sys_write'
c:/nxp/lpcxpresso_7.1.1_125/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a(alloc.o): In function `_Csys_alloc':
alloc.c:(.text._Csys_alloc+0xe): undefined reference to `__sys_write'
alloc.c:(.text._Csys_alloc+0x12): undefined reference to `__sys_appexit'
c:/nxp/lpcxpresso_7.1.1_125/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a(fseek.o): In function `fseek':
fseek.c:(.text.fseek+0x16): undefined reference to `__sys_istty'
fseek.c:(.text.fseek+0x3a): undefined reference to `__sys_flen'
collect2.exe: error: ld returned 1 exit status
make: *** [rs486-t2.axf] Error 1

I add one subrutine like this.
0 Kudos

266 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu Apr 10 23:43:08 MST 2014
What are the error messages emitted by the Linker?
0 Kudos