Closed nuket closed 8 years ago
I'm pretty sure when I've seen this error it's because I was out of memory.
@pan- Do you think that's the case?
Looks like this could be the case, but if those values returned by the linker are correct, I'm not looking forward to optimizing down 2k worth of code. Things are pretty tight on the chip already and I'm not even close to done with my firmware.
Also asked this question at the Nordic support forum, and they referred to another link with a similar conclusion.
Ok, I figured out where a ton of test code from a library was being pulled in by the mbed compile
command. Added an .mbedignore
to that folder and the problem went away.
Ticket can be closed.
@nuket @bridadan Yes, there is not enough RAM for the application.
The inclusion of the OS add a non negligible overhead. RAM optimization is a trending topic for mbed OS right now and several patches will help.
You can apply workarounds now:
.mbedignore
and add this content in it: mbed-os/features/frameworks/*
. It will save you around ~1K of RAM. Efforts are made to solve this issue cleanly (see here).-o small-build
on the command line. Thanks for the suggestions, I'll try them out incrementally!
@nuket These optimizations will be gradually included in mbed-os, I think the situation will be better in few weeks.
@pan- You're right, we're on it :)
I'm trying to build a simple project but
ld
keeps complaining, when tried with both gcc 4.9 and gcc 5.4:gcc 4.9 says:
All of the code compiles fine, it's only the link step that is erroring out. Is it possible that I'm out of memory?
The mbed-os version number, using the mbed CLI:
I tested the mbed OS Blinky example, and it builds fine.