Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
search inside all forums
Not able to reset target S32k148
Mohamed T. Jan 23, 2020 at 05:41 PM (17:41 hours)
Staff: Juan S.

  • Hello, 

    I am trying to create a new project on "S32 Design studio" with S32K148EVB. When I create a new S32DS Application project, I can flash the software and reset normally.
    But I have edited the project with my linker file and AUTOSAR OS and AUTOSAR MCAL provided by NXP
    When I flash the software it goes normally to "main" function but when I reset I get "No source available for "main() at main.c:15 0x1ffe27bc"

    I am not sure what is the problem here? I didn't change the project settings from the new S32DS Application project




    Comments

  • Hello, 

    Address 0x1ffe27bc is a RAM location. Please make sure that your linker file is correct and that your project is configured for FLASH.

    Regards,
    Juan See
    PEmicro

  • I have corrected the memory sections in the linker file to the following:

    MEMORY
    {
    flash_rsvd1 (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400
    flash_rsvd2 (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
    flash_memory (RX) : ORIGIN = 0x00000410, LENGTH = 0x0017FBF0

    int_sram     (RWX) : ORIGIN = 0x1FFE0000, LENGTH = 0x00020000
    res_ram_fls : ORIGIN = 0x20006E40, LENGTH = 0x60 /* A reserved ram section needed by FLS driver */
    res_ram_eep : ORIGIN = 0x20006EA0, LENGTH = 0x60 /* A reserved ram section needed by EEP driver */
    int_results : ORIGIN = 0x20006F00, LENGTH = 0x0100
    ram_rsvd2 : ORIGIN = 0x20007000, LENGTH = 0
    }


    Now, when I reset I get "No source available for "0xfffffffe" "
    The call stack is not even functions, it is like the following:
    0xfffffffe
    <signal handler called>() at 0xfffffff9
    0x0


    How can I make sure that the project is configured for FLASH?

  • Hi Mohamed, 

    Please contact NXP for proper linker configuration.

    My suspicion is that your vector table is not configured properly.

    Regards,
    Juan See
    PEmicro

  • Hello Juan, 

    I think so also but I also used another compiler (IAR) with NXP linker file, it flashes correctly but when I reset I get the same call stack I mentioned. Although the software runs before I reset.

    Could you tell me what happens exactly with OpenSDA when I press reset, this might help me figure out the problem. i.e, a script in path "x" is called which forces the processor Stack pointer to a certain address that I should change in debugger configuration according to my linker file?
    Or the debugging chip onboard reset the target from reset pin?
    Could you please explain what happens in the background when reset button is pressed?

  • Hi Mohamed, 

    According to the S321K1xx Reference manual. When the S32K148 exits reset, the processor sets up the stack, program counter (PC), and link register (LR). The processor reads the start SP (SP_main) from vector-table offset 0. The core reads the start PC from vector-table offset 4. LR is written to 0xFFFF_FFFF.

    Regards,
    Juan See
    PEmicro

  • I got the idea now, but now I change the vector table location in memory because it is needed by the AUTOSAR OS, so the linker file is correct according to my understanding from explanation. 
    How can I configure the debugger to the new location of the Vector table?

  • Hi Mohamed, 

    Well it appears that your vector table that you reserved for AUTOSAR OS is blank for some reason. Have you tried contacting NXP regarding that issue?

    Regards,
    Juan See
    PEmicro

  • Yeah, I got the answer that the linker file and startup code is fine. Now I am sending them the whole project as per their request to debug it

Add comment


   Want to comment? Please login or create a new PEmicro account.







© 2020 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement