-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
The stack pointer is initialized twice:
- In line 325
- In line 352
Additionally, the instruction in line 326 is not necessary. It loads the address of Reset_Handler into r0 but that is not used afterwards.
Seems like an artifact of jumping to Reset_Handler from there.
openbsw/executables/referenceApp/platforms/s32k148evb/main/src/bsp/startUp.S
Lines 317 to 352 in 403d15f
| /* ISR reloction */ | |
| ISB | |
| DSB | |
| DMB | |
| ldr r0, =_NVIC_VTOR | |
| ldr r1, =__isr_vector | |
| str r1, [r0] | |
| ldr r0, [r1] | |
| mov sp, r0 | |
| ldr r0, [r1, #4] | |
| ISB | |
| DSB | |
| DMB | |
| /* enable fpu */ | |
| ldr r0, = _CPACR | |
| ldr r1, [r0] | |
| orr r1, r1, #0x00F00000 | |
| str r1, [r0] | |
| /* Init the rest of the registers */ | |
| ldr r1,=0 | |
| ldr r2,=0 | |
| ldr r3,=0 | |
| ldr r4,=0 | |
| ldr r5,=0 | |
| ldr r6,=0 | |
| ldr r7,=0 | |
| mov r8,r7 | |
| mov r9,r7 | |
| mov r10,r7 | |
| mov r11,r7 | |
| mov r12,r7 | |
| /* Initialize the stack pointer */ | |
| ldr r0,=__StackTop | |
| mov r13,r0 |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels