We would like to run our Application entierly from Internal RAM (NoDDR) so we would like to compile without FP Support (-mfloat-abi=hard -mfpu=neon). Wich takes up some BSS Space and 20480 Bytes of Stack.
The only prolblem we encounter is the initialization for the interrupt handler uses FP Instructions. (pdk_am335x_1_0_17\packages\ti\starterware\soc\armv7a\gcc\exceptionhandler.S)
One of my coworkers wrote his own initialization code without FP instructions:
@ My Assembler Function
@******************************************************************************
@****************************** Global Symbols*******************************
.global IntEnable,IntEnableMain
.global IrqAssInterf
.global IsrEnd
INTC_SIR_IRQ_ADDR: .word 0x48200040
INTC_CONTROL_ADDR: .word 0x48200048
.equ ACTIVEIRQ_MASK,0x7F
.equ NEWIRQAGR,0x01
IntEnableMain:
PUSH {r11,r14}
add r11,r13,#4
MRS r8,cpsr
@ CMP r8,#0x80
@ BCC IntDis
AND r8,#0xFFFFFF7F
MSR cpsr,r8
IntDis:
@ MOV pc, lr
NOP
POP {r11,PC}
IntEnable:
MRS r8,cpsr
AND r8,#0xFFFFFF7F
MSR cpsr,r8
MOV pc, lr
/*----------------------------------------------------------*/
IsrEnd:
/*----------------------------------------------------------
* description: This is the End of the Interrupt
* (Return Interrupt)
*
* uses: --
*
* input: --
* output: --
*----------------------------------------------------------*/
MOV R0,#NEWIRQAGR
LDR R1,INTC_CONTROL_ADDR
STR R0,[R1]
@ Restor critical context
MSR SPSR,R11
LDMFD SP!,{R0-R12,LR}
SUBS PC, LR, #4 @Return Interrupt
/*----------------------------------------------------------*/
IrqAssInterf:
/*----------------------------------------------------------
* description: Assembler Interface for the
* C-Programm IRQ Handler
*
* uses: --
*
* input: --
* output: --
*----------------------------------------------------------*/
STMFD SP!,{R0-R12,LR}
MRS R11, SPSR
LDR R10, INTC_SIR_IRQ_ADDR
LDR R10, [R10]
AND R10, R10, #ACTIVEIRQ_MASK
MOV R10,#0
MOV R9,#2
LDR LR,[PC,R9, lsl #2]
LDR PC, [PC,R10, lsl #2]
NOP
.word INTCCommonIntrHandler
.word IsrEnd
but if we use this with the intc.c it won't work until we enable the FP Support. We suspect it has some thing to do with the R13 Register even though we didn't quiet understand whats up with it.