EmbDev.net

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


Author: ralawa (Guest)
Posted on:

Rate this post
0 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

Author: Martin Thomas (Guest)
Posted on:

Rate this post
0 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

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.