Hi,
I am trying to run an example program of AUTOSAR OS 4.0 on S32K148.
Because I don't have Lauterbach debugger , I am using OpenSDA to download elf into the device.
I am trying to run the program, but it doesn't succeed so far.
According to the linker script(please see the attached file), it has the following memory definition:
MEMORY
{
OsInternalROM (rx) : ORIGIN = 0x00000800, LENGTH = 0x0003F7FF /* 253 Kbytes */
OsInternalRAM (rwx) : ORIGIN = 0x1FFFC000, LENGTH = 0x00006FFF /* 28 Kbytes */
}
As far as I know, it usually starts from 0x00000000, but not 0x0000800. Therefore, I temporary move the address to 0x00000000. But, I am seeing fault messages as follows:
Target has been RESET and is active.
UsageFault: The processor has attempted to execute an undefined instruction.
BusFault: A bus fault has occurred on exception entry.
HardFault: A fault has been escalated to a hard fault.
Could you help me where I should look at? Any suggestion would be helpful.
compiler: GNU C compiler(gcc-arm-none-eabi-4_9)
thanks!
Hi Hung
Thank you very much for your answer. I'll check your suggestions after getting back to my office. I am on business trip.
Best Regards,
--
Hideki Miyazaki
Hi HIDEKI,
I would like to answer your question:
With this project we need set an entry point for debugger if using OpenSDA to download ELF into the device. It has been set for Lauterbach debugger in s32k.cmm file. There are two way to do this:
- If using GHS please add “-e Reset_Handler” to ldopt in line 58
- If using GCC please add “--entry=Reset_Handler” to ldopt in line 101
- If using IAR please add “--entry Reset_Handler” to ldopt in line 185
Best regards,
Hung.