A bare metal example project enabling peripheral interrupt (eg. PIT) generated on S32DS for ARM v 1.3 does not work on S32DS for Arm v 2.0 and S32DS for Arm 2018.R1. AjeshKumar
已解决! 转到解答。
Hi Ankur,
I'd suggest you to update vector file (vt_MAC57D54H_M4.s):
.section .vt,"a" /* place vectors into .vt linker section */
vt:
.word _stack_e /* initial SP */
.word exception_trap /* Reset */
/* exceptions*/
.word exception_trap /* 2 NMI */
.word exception_trap /* 3 HardFault */
...
.section .text /* exception_traps, interrupt_trap goes into .text */
.thumb
exception_trap:
b exception_trap
interrupt_trap:
b interrupt_trap
now adjust the linker file:
SECTIONS
{
/* Interrupt vectors area */
.intvec :
{
M4_0_VECTOR_TABLE = .;
M4_0_VECTOR_RAM = .;
KEEP(*(.vt*)) /* avoid removing the section if vt is not referenced */
M4_0_VECTOR_SIZE = .;
} > GRAM
In the .map file you should see now vector table placed at address 0x3F000100:
.intvec 0x3f000100 0x200
0x3f000100 M4_0_VECTOR_TABLE = .
0x3f000100 M4_0_VECTOR_RAM = .
*(.vt*)
.vt 0x3f000100 0x200 ./Project_Settings/Startup_Code/vt_MAC57D54H_M4.o
0x3f000100 vt
0x3f000300 M4_0_VECTOR_SIZE = .
Hope it helps.
Stan
Hi Stanislav,
Attached is the project with which I am experiencing the issue. When the project is build/debug through S32DS ver 2.0 I see repeated resets on the hardware and this is always the case. When the same project is build/debug through S32DS ver 1.3 all works well. I will wait for your response.
Regards,
Ankur
Hi Ankur,
I'd suggest you to update vector file (vt_MAC57D54H_M4.s):
.section .vt,"a" /* place vectors into .vt linker section */
vt:
.word _stack_e /* initial SP */
.word exception_trap /* Reset */
/* exceptions*/
.word exception_trap /* 2 NMI */
.word exception_trap /* 3 HardFault */
...
.section .text /* exception_traps, interrupt_trap goes into .text */
.thumb
exception_trap:
b exception_trap
interrupt_trap:
b interrupt_trap
now adjust the linker file:
SECTIONS
{
/* Interrupt vectors area */
.intvec :
{
M4_0_VECTOR_TABLE = .;
M4_0_VECTOR_RAM = .;
KEEP(*(.vt*)) /* avoid removing the section if vt is not referenced */
M4_0_VECTOR_SIZE = .;
} > GRAM
In the .map file you should see now vector table placed at address 0x3F000100:
.intvec 0x3f000100 0x200
0x3f000100 M4_0_VECTOR_TABLE = .
0x3f000100 M4_0_VECTOR_RAM = .
*(.vt*)
.vt 0x3f000100 0x200 ./Project_Settings/Startup_Code/vt_MAC57D54H_M4.o
0x3f000100 vt
0x3f000300 M4_0_VECTOR_SIZE = .
Hope it helps.
Stan