EmbDev.net

Forum: ARM programming with GCC/GNU tools compiling for ram


von ralawa (Guest)


Rate this post
useful
not useful
Hi,

I purchased an olimex AT91SAM7-P64 board which I would like to use with
winarm. I'm currently trying to set my environment development. If I
compile the at81sam7s64_hello with RUN_MODE=RAM_RUN and with THUMB not
set the compilation fail. The linker tells me that region DATA is full!

I do not understand why the code is so big! The keil hello example only
use 2496 bytes! So, what does it mean?

With 16kB of RAM, it seems difficult for me to debug in RAM. How do you
debug a program which is bigger than 16kB?

Thank you, and sorry for my english.
--
Eric

von Martin Thomas (Guest)


Rate this post
useful
not useful
> I purchased an olimex AT91SAM7-P64 board which I would like to use with
> winarm. I'm currently trying to set my environment development. If I
> compile the at81sam7s64_hello with RUN_MODE=RAM_RUN and with THUMB not
> set the compilation fail. The linker tells me that region DATA is full!

Maybe, the "hello"-example uses iprintf. The newlib's stdio-functions
need some memory.

> I do not understand why the code is so big! The keil hello example only
> use 2496 bytes! So, what does it mean?

First of all: I personaly do not like "!" where not appropriate.

The Keil-library for stdio-functions produces smaller binary-code.

You can replace iprintf by some kind of puts. IRC puts is already
implemented in the example. Or buy a commercial product with a library
which is optimised for low ROM/RAM targets (Rowley, Keil, IAR etc.)

> With 16kB of RAM, it seems difficult for me to debug in RAM. How do you
> debug a program which is bigger than 16kB?

In flash. Newer version of openocd and ocdremote support debugging in
flash with a "wiggler". Other tools support this too.


Martin Thomas

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.