CODE_RAM is full when CLI SSHv2 is added to NET+OS 7.4 project

When I include CLI SSHv2 service into my project then image.elf is failed to build. The messages:
/usr/lib/gcc/arm-elf/4.2.0/…/…/…/…/arm-elf/bin/ld: region CODE_RAM is full (image.elf section .text)
/usr/lib/gcc/arm-elf/4.2.0/…/…/…/…/arm-elf/bin/ld: section .init [00004000 -> 00004067] overlaps section restartBuf [00004000 -> 0000449f]
/usr/lib/gcc/arm-elf/4.2.0/…/…/…/…/arm-elf/bin/ld: section .data [000044a0 -> 0001f3cf] overlaps section .text [00004070 -> 0021cb03]
collect2: ld returned 1 exit status
make: *** [image.elf] Error 1
make: Target `all’ not remade because of errors.

I tried to make the system as small as possible by removing all except CLI SSHv2, the problem stays.

Any clue?


There is a white paper that is included in kits and/or pulled down via the package manager.

In essence look for file customize.ldr in directory 


Carefully edit customize.ldr and search for the definition of MAX_CODE_SIZE. I believe the default is 2M (2 megabytes). Increase this to give yourself enough "headroom". Try 3M as a starting point. Save the file and rebuild. You could need more room depending on the size of your application. Clearly this is application dependent so your mileage may vary.