example program of AUTOSAR OS 4.0 on S32K148

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

example program of AUTOSAR OS 4.0 on S32K148

1,745 Views
miyazaki_0728_4
Contributor I

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!

Tags (1)
0 Kudos
2 Replies

1,514 Views
miyazaki_0728_4
Contributor I

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

0 Kudos

1,514 Views
hungnguyenphi
NXP Employee
NXP Employee

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:

  1. If you are using S32DS to loading code please tick to the check box "Set PC (absolute hex address ore symbol:)" in the "Debug Configurations\GDB PEMicro interface Debugging\Startup" and set address "Reset_Handler". Please see attached file for more information.
  2. Or we can add an entry point for debugger by add compiler option in file "S32K_AUTOSAR_OS_4_0_98_RTM_1_0_0\sample\standard\compiler_options.mak".

- 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.

0 Kudos