[Icc-arm] FIQ and custom startup file
Gennadiy Kiryukhin
genna at atsi-tester.com
Fri Aug 31 15:17:29 PDT 2007
I have added some code to the my custom startup file (s file). When
trying to compile it, I get error:
Unable to fit C$$init section into memory.
What is C$$init and how does it affect it?
Where does C$$code start?
Can I define my own "area" and place it at 0x00001C? How?
Where can I get more information on how to write a startup file?
I am trying to place my FIQ at that address.
Here is what I have discovered so far. I have not tested the code, but
it compiles without errors.
IMPORT _main
AREA "C$$init",CODE,READONLY
// exception vector section
LDR PC,cstart_addr // Reset
SUB PC,PC,#8 // Undefined instruction
SUB PC,PC,#8 // Software interrupt
cstart_addr: DCD _cstart // In place of prefetch data abort
SUB PC,PC,#8 // Data abort
SUB PC,PC,#8 // Not used
LDR PC,[PC,#-0xFF0] // IRQ Vector
AREA "C$$code",CODE,READONLY
_my_fiq_processor:
; FIQ code is placed here
// the rest of the file without change follows...
I had to use the prefetch data abort vector for storing the address of
_cstart label. The reason for this is if I tried to place the
"cstart_addr ..." after the FIQ code, the compiler would give me an
error because the offset was too big. Don't see the reason for the error
since my FIQ was under 1K in size and LDR PC, xxx allows the address to
be within 4K limit relative to the current command.
There is one problem with that. I am not sure where 'C$$code' area
starts. If I take that line out and make my FIQ to be a part of C$$init,
the compiler says:
!E Unable to fit C$$init section into memory
Thanks,
Gennadiy
More information about the Icc-arm
mailing list