Now, I am studying the MPC5744P programing with DEVKIT-MPC5744P.
And I have a problem that MPC5744P goes to the IVOR1 vector when the other function call this function in the sample program.
I don't understand why it is occuured ?
Does someone teach me how to solve this problem ?
<< The below is conditions when the problem is occured >>
1. Board: DEVKIT-MPC5744P ( Rev.E )
2. Sample program : LINFlexD_UART_MPC5744P
Note: This sample program is for Flash.
And I was changed from LINFlexD_1(Rev.B) to LINFlexD_0( for Rev.E).
3. Build configuration : Debug_RAM
4. Design Environment : S32 Design Studio for Power Archtecture
Hi,
I assume you are using example project "LINFlexD_UART_MPC5744P"
Have you done any modifications to this project?
I've just tested this example project with DEVKIT board and it works just fine.
Could you test "Debug" build target which is FLASH based? Do you observe the same problem?
I'd guess this happens due to uninitialized LMEM (ECC error) but I checked the example startup code and it looks ok to me:
startup.s
;# Base Address of the Local SRAM
e_lis r5, __LOCAL_DMEM_BASE_ADDR@h
e_or2i r5, __LOCAL_DMEM_BASE_ADDR@l
;# Fill Local SRAM with writes of 32GPRs
ldmem_loop:
e_stmw r0,0(r5) # Write all 32 registers to SRAM
e_addi r5,r5,128 # Increment the RAM pointer to next 128bytes
e_bdnz ldmem_loop # Loop for all of SRAM
Could you attach your project if it does not help?
Thanks.
Stan
Thank you for your reply.
Hi,
sorry for delay. I can reproduce your issue. Thanks a lot for report. I find out that PE Micro .mac script doesn't init RAM for stack. As workaround you can use your part of code. Or you can use modified .mac script from attachment and left the original startup code. In normal way this init should be done by debug probe.
PE Micro .mac script is located (with default install path) in c:\NXP\S32DS_Power_v2.1\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.9.9.201907200403\win32\gdi\P&E\ folder. You can replace existing one with attached file. the only difference is this additional row at the end of script:
meminit.l 0x50800000 0x5080FFFF
Jiri
Very thank you for your reply and confirmation.