General question: Memory configuration at91sam7S128

Guest #1573240
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!!!
Moderator
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:
1
/* .ARM.exidx is sorted, so has to go in its own output section.  */
2
__exidx_start = .;
3
.ARM.exidx :
4
{
5
  *(.ARM.exidx* .gnu.linkonce.armexidx.*)
6
} >FLASH
7
__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.
Guest
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.
Guest
(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

A question of your own? This thread is over 16 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.