Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.
We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.
Thank you for your understanding.
I am not able to use inline assembly in my C source file. I tried to Enable Generate Assembler SRC file and Enable Assemble SRC file. Then i used #pragma ASM in the beginning of the assembly code and #pragma ENDASM at the end of the assembly code, but it is not able to recognize even the LDR command. The commands are not recognisable even when i am using __asm() block to write the code. Please advise.
I am using RealView compiler tools in my project. The following code seems to be working properly now.
__asm void CallApplication(uint_fast32_t ui32StartAddr) { // // Set the vector table address to the beginning of the application. // ldr r1, =0xe000ed08 str r0, [r1]
// // Load the stack pointer from the application's vector table. // ldr r1, [r0] mov sp, r1
// // Load the initial PC from the application's vector table and branch to // the application's entry point. // ldr r0, [r0, #4] bx r0 }
No other format is working. Above code is a part of boot loader code. Through this code i am trying to jump to an application which is present at another address ui32StartAddr. That application is programmed separately by using the boot loader code. But when i try to make a jump to the application, it again executes the main() of boot loader code. I am in doubt if this has to do something with the linker script or the startup file as i have used the default ones in the boot loader code as well as application code. Please advise.
Please advise.
An opportunity for you to acquire a deeper understanding. Time for some debugging.