Hello carlos candido,
although I cannot catch your intention, do you wat to change the return addresses of the __ISR_times_1oous()?
The __ISR_times_1oous should be invoked by the intermediate function as the following.
void __attribute__ (( naked )) __ISR_times_1oous(void) /* for normal gcc */
{
asm volatile(
"movs r0, #4¥t¥n"
"mov r1, lr¥t¥n"
"tst r0, r1¥t¥n" /* Check EXC_RETURN[2] */
"beq 1f¥t¥n"
"mrs r0, psp¥t¥n"
"ldr r1,=__ISR_times_1oous_main¥t¥n"
"bx r1¥t¥n"
"1:mrs r0,msp¥t¥n"
"ldr r1,=__ISR_times_1oous_main¥t¥n"
: /* no output */
: /* no input */
: "r0" /* clobber *
);
or
void __stackless __ISR_times_1oous(void) /* for IAR gcc */
{
asm volatile(
"movs r0, #4¥t¥n"
"mov r1, lr¥t¥n"
"tst r0, r1¥t¥n" /* Check EXC_RETURN[2] */
"beq 1f¥t¥n"
"mrs r0, psp¥t¥n"
"ldr r1,=__ISR_times_1oous_main¥t¥n"
"bx r1¥t¥n"
"1:mrs r0,msp¥t¥n"
"ldr r1,=__ISR_times_1oous_main¥t¥n"
: /* no output */
: /* no input */
: "r0" /* clobber *
);
and, in both cases,
void __ISR_times_1oous_main(unsigned int *intr_args)
{
intr_args[6]="return address"
}
I hope these will help you.
Best regards,
Yasuhiko Koumoto.