EmbDev.net

Forum: ARM programming with GCC/GNU tools General question: Memory configuration at91sam7S128


Author: Timo P (Guest)
Posted on:

Rate this post
0 useful
not useful
Hello!

At the moment I am earning my first experience in programming an 
AT91SAM7 chip. The project is createt by an external engineer who is not 
working for us anymore.

Now I tried to modify the project. Programming in C ist not my Problem.
I added the variable char s[12]; to my project. And got the error 
message:

/home/Peraglie/CodeSourcery/gcc/bin/../lib/gcc/arm-none-eabi/4.4.1/../.. 
/../../arm-none-eabi/bin/ld:
error: no memory region specified for loadable section `.ARM.exidx'
collect2: ld returned 1 exit status
make: *** [logicdemo-sniffer.elf] Fehler 1


Questions:
- Do I have to prepare the usage of memory in any kind?
- if yes, in which kind? I`ve heard that there is a file atmel-rom.ld
- What have I to do in my makefile in case of using any variables?

THANKS FOR YOUR HELP!!!

Author: Martin Thomas (mthomas) (Moderator)
Posted on:

Rate this post
0 useful
not useful
Timo P wrote:
> Hello!
>
> At the moment I am earning my first experience in programming an
> AT91SAM7 chip. The project is createt by an external engineer who is not
> working for us anymore.
>
> Now I tried to modify the project. Programming in C ist not my Problem.
> I added the variable char s[12];

Is this the only extension done? Does the unmodified code from the 
"external engineer" build without any modification?

Create a minimal example (sources, makefile, linker-script) so the issue 
can be reproduced. At least show the output of the build-process of the 
unmodified project sources.

>to my project. And got the error
> message:
>
> /home/Peraglie/CodeSourcery/gcc/bin/../lib/gcc/arm-none-eabi/4.4.1/../.. 
/../../arm-none-eabi/bin/ld:
> error: no memory region specified for loadable section `.ARM.exidx'
> collect2: ld returned 1 exit status
> make: *** [logicdemo-sniffer.elf] Fehler 1

hmm, this might be related to exceptions. Do you use C++?

>
> Questions:
> - Do I have to prepare the usage of memory in any kind?
> - if yes, in which kind? I`ve heard that there is a file atmel-rom.ld

To make the linker happy you can try to add the following lines to your 
linker-script:
/* .ARM.exidx is sorted, so has to go in its own output section.  */
__exidx_start = .;
.ARM.exidx :
{
  *(.ARM.exidx* .gnu.linkonce.armexidx.*)
} >FLASH
__exidx_end = .;

The lines should follow the lines for the output-section where the .text 
input-sections are located.

> - What have I to do in my makefile in case of using any variables?

A minimal example is needed. Difficult to see what needs to be done 
without knowing what is already there.

Author: Timo P (Guest)
Posted on:

Rate this post
0 useful
not useful
Hallo Martin!

Vor der einzigen Änderung char s[20]; ließ sich der code einwandfrei 
kompilieren.

Ich habe folgenden Code geadded:

.= ALIGN(4);
.ARM.exidx :
{
     KEEP (*(.ARM.exidx))
} > ram

Abhilfe hat das schon geschaffen. Nur ist mir immer noch nicht klar, was 
".ARM.exidx" bedeutet!?!


Im übrigen nutze ich unter Fedora 12 ARM-NONE-EABI-GCC mit FreeRTOS 
zusammen.

Author: Martin Thomas (Guest)
Posted on:

Rate this post
0 useful
not useful
(Dies ist das englischsprachige Forum. Daher hier weiter auf 
englisch...)

I little bit more information on .ARM.exidx can be found in the EABI 
documentation available in the technical library on arm.com. IRC this 
input section is related to unwinding. I guess parts of the libraries 
included with CS G++ (libgcc and/or libstdcpp and/or newlib/libc) place 
code in this section (C++ exceptions and maybe some kind of 
FP-"exceptions" like div. by 0). This might be a new feature so the 
problem did not show up in previous versions. Now that the project 
builds you should also find useful information in the map-file's 
cross-reference section.

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.