We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I am trying to patch the library __scatterload() function for Cortex-R5 startup code, but got some issues:
1) Before patching, the disassemble code of _main() function are:
__main0x0000015C : BLX __scatterload ; 0x1640x00000160 : BLX __rt_entry ; 0x310__scatterload0x00000164 : ADR r6,{pc}+0x54 ; 0x1b80x00000166 : LDM r6,{r10,r11}0x0000016A : ADD r10,r10,r6
2) I used $Sub$$__scatterload() as below:
void $Sub$$__scatterload(void){ ExtraFuncCall(); // Call the original scatter-load function $Super$$__scatterload();}
3) After patching in 2), the disassemble code of __main() became:
__main0x0000015C : MOV r0,r00x00000160 : BLX __rt_entry ; 0x2B0__decompress0x00000164 : ADD r2,r2,r1
..
It seems the __scatterload() function was skipped at all.
I am using ARM DS 2023.1, ARM C Compiler for Embedded 6.
Please help to see what wrong in my usage. Thanks