Hy forum,
I tried for several days to see how GNU arm behaves. I'm stuck into a
loop here. I could use some help.
I have a linker script that contains:
. = ORIGIN(flash);
vectors :
{
*(.vectors)
} >flash
. = 0x000001F0;
.text :
{
*(.text)
*(.rodata)
*(.rodata*)
_end_text = .;
} >flash
then somewhere in the code I do something like
_attribute_ ((section(".vectors")))
void NMI_Handler(void)
{
int a=0;
a++;
}
_attribute_ ((section(".text")))
void Reset_Handler(void)
{
unsigned int *src, *dst;
the meaning of this code is not important as it is not correct
However I would expect function Reset_Handler to start from 1F0, yet in
the lst file I see it starting from 2c :| ??
Second question
I would like to do something like
asm(".section .vectors");
asm("B Reset_Handler");
however when I see into the lst file...same problem... a function main
that is supposed to go into .text beginning with 1F0 or higher, appears
at 0x0 :|
What am I missing here?
I would appreciate some input.
Thanks