This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM625-Q1: Issue in booting R5F from a custom application

Part Number: AM625-Q1
Other Parts Discussed in Thread: SYSCONFIG, UNIFLASH

Tool/software:

Hi 

I am working on the SK-AM-62-LP board and trying to boot the R5F code with a simple custom application. We're not using CCS studio to generate binary.

Instead, we have our own CMakeLists.txt, toolchain.cmake, and linker.cmd and .syscfg that we use for driver sources generation using sysconfig tool.

 

The binary which is generated when I flash through SBL prebuilt file is failing as shown in the below screenshot.

To me, it looks like r5f is not getting initialized for some reason but I am not able to understand/debug this scenario.

We have tried to make our makefile as close as possible to the makefile in CCS project and used all necessary tools available in mcu_plus_sdk_am62x_11_00_00_16 for it.

Let me know if you require any more information on this. We can share the files if required

Regards

Mayank

  • There is a development in this case. We figured that there was an option missed in the singing --authtype. After including it we are able to see it as passed

    But we still don't see any output on the DMR5/wakeup uart.

    As mentioned here

    software-dl.ti.com/.../DEVELOP_AND_DEBUG_DMR5.html

    we've linked the necessary libararies and also calling the  sciServer_init();

  • Hi Mayank,

    As you are using SBL NULL, I assume you are not booting any application on DM R5, could you confirm if you are loading some application on DM R5 via CCS, if not then it is expected that you will not have any logs from DM R5 as it is not running any application.

    You are getting the boot logs from SBL NULL as expected: software-dl.ti.com/.../EVM_SETUP_PAGE.html

    Best regards,

    Meet.

  • Yes, I am loading a simple Freertos application which should print on the wake-up UART. I am flashing through uart_uniflash.py since CCS can't load the DM R5 application.

  • Hi Mayank,

    You have to check 3rd USB serial port,for examples which run from DM R5F (WKUP R5F), please refer to this: software-dl.ti.com/.../EVM_SETUP_PAGE.html

    I am getting the expected logs on the WKUP UART:

    Sciserver Testapp Built On: Jun 17 2025 11:38:10
    Sciserver Version: v2025.04.0.0-REL.MCUSDK.K3.11.00.00.16+
    RM_PM_HAL Version: v11.00.07
    Starting Sciserver..... PASSED
    [IPC RPMSG ECHO] Version: REL.MCUSDK.K3.11.00.00.16+ (Jun 17 2025 11:40:01):  
    

    Best Regards,

    Meet.

  • Yes, I am checking the 3rd USB serial port(Wakeup UART) and getting this output when using the TI environment.

    As I mentioned, I am using a custom application and not using CCS Studio to generate binary.

    The source code, linker, .syscfg file are similar in both scenarios. 

    Since this is a custom project, we have used the tool available in mcu_plus_sdk_am62x_11_00_00_16 to create our binaries. The binary that gets created does not seem to be working.

    Make procedure of our custom project nearly mimics the Make in the TI CCS environment. Are there any dirty specific details that need to be considered to load and run DM R5?

  • Can you share your syscfg file? You need to enable the UART log for your application from syscfg.

    Is it possible to share your makefile as well? Is it exactly same as the makefile in the SDK?

  • Since this and open forum. We can provide the file over mail. Will that be okay ?

  • Could you just make sure that this Enable UART is checked in the syscfg:

  • Yes, that is checked. We've directly used the syscfg file from a TI example

  • Are you calling loop_forever at the start of your DM application? If yes then it is possible it is stuck there. If this is also not the issue then you can try to debug the application and try to see where you are facing the issue, this guide can help you with the same: https://software-dl.ti.com/mcu-plus-sdk/esd/AM62X/10_01_00_33/exports/docs/api_guide_am62x/DEVELOP_AND_DEBUG_DMR5.html#autotoc_md308

  • The issue we're facing is that the image generated by our custom project isn't running as expected.
    The main UART is displaying the correct output (I'll attach the logs), but there's no output on the DM/R5 UART.
    I'm also attaching the following for your reference:
    • A sample FreeRTOS (main.c) file that I'm compiling.
    • The build logs from the terminal.
    Please help us identify the root cause. Let me know if you require any more information


    /*===========================================================================*/
    /**
     * @file main.c
     *
     * @brief Main VIP source file.
     *
     * @author Lukasz Kupczak <lukasz.kupczak@aptiv.com>
     *
     *------------------------------------------------------------------------------
     *
     * Copyright © 2025 Aptiv. All rights reserved.
     * Information Contained Herein Is Proprietary and Confidential
     *
     *------------------------------------------------------------------------------
     *
     * @section DESC DESCRIPTION:
     *   None.
     *
     * @section ABBR ABBREVIATIONS:
     *   None.
     *
     * @section TRACE TRACEABILITY INFO:
     *   - Design Document(s):
     *     - None.
     *
     *   - Requirements Document(s):
     *     - None.
     *
     *   - Applicable Standards (in order of precedence: highest first):
     *     - SW REF 264.15D "Delphi C Coding Standards"
     *     - SW REF 264.01E "Delphi C++ Coding Standards"
     *
     * @section DFS DEVIATIONS FROM STANDARDS:
     *   - None.
     */
    /*===========================================================================*/
    
    /*===========================================================================*\
     * System Header Files
    \*===========================================================================*/
    
    /*===========================================================================*\
     * Project Header Files
    \*===========================================================================*/
    
    
    /*===========================================================================*\
     * 'using namespace' Section
    \*===========================================================================*/
    
    /*===========================================================================*\
     * Local Preprocessor #define Constants
    \*===========================================================================*/
    
    /*===========================================================================*\
     * Local Preprocessor #define MACROS
    \*===========================================================================*/
    
    /*===========================================================================*\
     * Local Type Definitions
    \*===========================================================================*/
    
    /*===========================================================================*\
     * Exported Object Definitions
    \*===========================================================================*/
    
    /*===========================================================================*\
     * Local Function Prototypes
    \*===========================================================================*/
    
    /*===========================================================================*\
     * Local Object Definitions
    \*===========================================================================*/
    
    /*===========================================================================*\
     * Local Inline Function Definitions and Function-Like Macros
    \*===========================================================================*/
    
    /*===========================================================================*\
     * Public Function Definitions
    \*===========================================================================*/
    /*
     *  Copyright (C) 2018-2025 Texas Instruments Incorporated
     *
     *  Redistribution and use in source and binary forms, with or without
     *  modification, are permitted provided that the following conditions
     *  are met:
     *
     *    Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     *    Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the
     *    distribution.
     *
     *    Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     */
    
    #include <stdlib.h>
    #include <kernel/dpl/DebugP.h>
    #include <kernel/dpl/ClockP.h>
    #include "ti_drivers_config.h"
    #include "ti_board_config.h"
    #include "ti_drivers_open_close.h"
    #include "ti_board_open_close.h"
    #include "FreeRTOS.h"
    #include "task.h"
    #include <drivers/device_manager/sciserver/sciserver_init.h>
    
    #define TASK_PRI_MAIN_THREAD  (configMAX_PRIORITIES-1)
    
    
    #define TASK_SIZE (16384U/sizeof(configSTACK_DEPTH_TYPE))
    
    StackType_t gMainTaskStack[TASK_SIZE] __attribute__((aligned(32)));
    StaticTask_t gMainTaskObj;
    TaskHandle_t gMainTask;
    StackType_t gAppMgrTaskStack[TASK_SIZE] __attribute__((aligned(32)));
    StaticTask_t gAppMgrTaskObj;
    TaskHandle_t gAppMgrTask;
    DM_LPMData_t gDMLPMData __attribute__((section(".lpm_data"), aligned(4)));
    
    void empty_main(void *args);
    
    void main_thread(void *args)
    {
        int32_t status = SystemP_SUCCESS;
    
        /* Open drivers */
        Drivers_open();
        /* Open flash and board drivers */
        status = Board_driversOpen();
        DebugP_assert(status==SystemP_SUCCESS);
    
        /* Init LPM specific data */
        Sciclient_initDeviceManagerLPMData(&gDMLPMData);
    
        sciServer_init();
    
        //empty_main(NULL);
    
        /* Close board and flash drivers */
        Board_driversClose();
        /* Close drivers */
        Drivers_close();
    
        vTaskDelete(NULL);
    }
    
    void app_mgr_thread(void *args)
    {
        DebugP_log("In Applicatiom Manager Thread from VIP REPO!!\r\n");
    
        while(1){
            vTaskDelay(1000);
            DebugP_log("Running App Mgr Thread!!\r\n");
        }
    
    }
    
    
    int main()
    {
        /* init SOC specific modules */
        System_init();
        Board_init();
    
        gMainTask = xTaskCreateStatic( main_thread,   /* Pointer to the function that implements the task. */
                                      "main_thread", /* Text name for the task.  This is to facilitate debugging only. */
                                      TASK_SIZE,  /* Stack depth in units of StackType_t typically uint32_t on 32b CPUs */
                                      NULL,            /* We are not using the task parameter. */
                                      TASK_PRI_MAIN_THREAD,   /* task priority, 0 is lowest priority, configMAX_PRIORITIES-1 is highest */
                                      gMainTaskStack,  /* pointer to stack base */
                                      &gMainTaskObj ); /* pointer to statically allocated task object memory */
        configASSERT(gMainTask != NULL);
    
        gAppMgrTask = xTaskCreateStatic( app_mgr_thread,   /* Pointer to the function that implements the task. */
                                      "app_mgr_thread", /* Text name for the task.  This is to facilitate debugging only. */
                                      TASK_SIZE,  /* Stack depth in units of StackType_t typically uint32_t on 32b CPUs */
                                      NULL,            /* We are not using the task parameter. */
                                      TASK_PRI_MAIN_THREAD,   /* task priority, 0 is lowest priority, configMAX_PRIORITIES-1 is highest */
                                      gAppMgrTaskStack,  /* pointer to stack base */
                                      &gAppMgrTaskObj ); /* pointer to statically allocated task object memory */
        configASSERT(gAppMgrTask != NULL);
    
        /* Start the scheduler to start the tasks executing. */
        vTaskStartScheduler();
    
        /* The following line should never be reached because vTaskStartScheduler()
        will only return if there was not enough FreeRTOS heap memory available to
        create the Idle and (if configured) Timer tasks.  Heap management, and
        techniques for trapping heap exhaustion, are described in the book text. */
        DebugP_assertNoLog(0);
    
        return 0;
    }
    
    /*===========================================================================*\
     * Protected Function Definitions
    \*===========================================================================*/
    
    /*===========================================================================*\
     * Private Function Definitions
    \*===========================================================================*/
    
    /*===========================================================================*/
    /**
     * @file main.c
     *
     * @section RH REVISION HISTORY (top to bottom: last revision to first revision)
     *
     * - 18 Apr 2025 Lukasz Kupczak
     *   - Created initial file
     */
    /*===========================================================================*/
    
    kj1mdj@ubuntu-0f068756-ee88-42ec-b9cb-2e4b295516e4:~/wkspaces/NextGenRadio$ NextGenRadio-build-VIP
    Building VIP...
      USE_MANUAL_PINMUX   = OFF
      USE_MANUAL_BOARD    = OFF
      USE_MANUAL_DRIVERS  = OFF
      BUILD_DIR           = /home/user/wkspaces/NextGenRadio/build/VIP
    -- The C compiler identification is TIClang 4.0.3
    -- The CXX compiler identification is TIClang 4.0.3
    -- The ASM compiler identification is TIClang
    -- Found assembler: /home/NextGenRadio-docker/ti-cgt-armllvm/bin/tiarmclang
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /home/NextGenRadio-docker/ti-cgt-armllvm/bin/tiarmclang - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /home/NextGenRadio-docker/ti-cgt-armllvm/bin/tiarmclang - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Using GENERATED config
    -- Configuring done (1.7s)
    -- Generating done (0.0s)
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        USE_MANUAL_BOARD
        USE_MANUAL_DRIVERS
        USE_MANUAL_PINMUX
    
    
    -- Build files have been written to: /home/user/wkspaces/NextGenRadio/build/VIP
    [  7%] Building C object sw/app/CMakeFiles/app_library.dir/source/main.c.obj
    [ 14%] Linking C static library libapp_library.a
    [ 14%] Built target app_library
    [ 21%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_board_config.c.obj
    [ 28%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_board_open_close.c.obj
    [ 35%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_dpl_config.c.obj
    [ 42%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_drivers_config.c.obj
    [ 50%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_enet_open_close.c.obj
    [ 57%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_enet_config.c.obj
    [ 64%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_pinmux_config.c.obj
    [ 71%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_drivers_open_close.c.obj
    [ 78%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_enet_lwipif.c.obj
    [ 85%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_power_clock_config.c.obj
    [ 92%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_enet_soc.c.obj
    [100%] Linking C executable bin/vip_r5f.elf.out
    Creating stripped .elf.out
    Generating .rprc (full and stripped)
    Generating .rprc.xip (full and stripped)
    [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.rprc.tmp] Parsing file ...
    Found section 0 with adddress 0x41010040, size 0x00001a48 bytes
    Found section 1 with adddress 0x41011a88, size 0x00000350 bytes
    Found section 2 with adddress 0x41011dd8, size 0x000001a8 bytes
    Found section 3 with adddress 0x41012380, size 0x00001020 bytes
    Found section 4 with adddress 0x9db00000, size 0x00001000 bytes
    Found section 5 with adddress 0x9dcb8500, size 0x000166e0 bytes
    Found section 6 with adddress 0x9dcdec00, size 0x0000b000 bytes
    Found section 7 with adddress 0x9dce9c00, size 0x00006260 bytes
    Found section 8 with adddress 0x9dcefe80, size 0x00000784 bytes
    [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.rprc.tmp] Found 9 sections. 9 are non-XIP sections, 0 are XIP sections, NON-XIP entryPoint = 0x9dccdb20
    Merging section @ 0x41011a88 of size 0x00000350, with section @ 0x41010040 of size 0x00001a48
    Merging section @ 0x41011dd8 of size 0x000001a8, with section @ 0x41010040 of size 0x00001d98
    Merging section @ 0x9dce9c00 of size 0x00006260, with section @ 0x9dcdec00 of size 0x0000b000
    Writing section header  #0, adddress 0x41010040, size 0x00001f40 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.rprc]
    Writing section data with adddress 0x41010040, size 0x00001a48 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.rprc]
    Writing section data with adddress 0x41011a88, size 0x00000350 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.rprc]
    Writing section data with adddress 0x41011dd8, size 0x000001a8 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.rprc]
    Writing section header  #1, adddress 0x41012380, size 0x00001020 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.rprc]
    Writing section data with adddress 0x41012380, size 0x00001020 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.rprc]
    Writing section header  #2, adddress 0x9db00000, size 0x00001000 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.rprc]
    Writing section data with adddress 0x9db00000, size 0x00001000 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.rprc]
    Writing section header  #3, adddress 0x9dcb8500, size 0x000166e0 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.rprc]
    Writing section data with adddress 0x9dcb8500, size 0x000166e0 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.rprc]
    Writing section header  #4, adddress 0x9dcdec00, size 0x00011260 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.rprc]
    Writing section data with adddress 0x9dcdec00, size 0x0000b000 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.rprc]
    Writing section data with adddress 0x9dce9c00, size 0x00006260 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.rprc]
    Writing section header  #5, adddress 0x9dcefe80, size 0x00000784 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.rprc]
    Writing section data with adddress 0x9dcefe80, size 0x00000784 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.rprc]
    [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.rprc] Parsing file ...
    Found section 0 with adddress 0x41010040, size 0x00001f40 bytes
    Found section 1 with adddress 0x41012380, size 0x00001020 bytes
    Found section 2 with adddress 0x9db00000, size 0x00001000 bytes
    Found section 3 with adddress 0x9dcb8500, size 0x000166e0 bytes
    Found section 4 with adddress 0x9dcdec00, size 0x00011260 bytes
    Found section 5 with adddress 0x9dcefe80, size 0x00000784 bytes
    [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.rprc] Found 6 sections. 6 are non-XIP sections, 0 are XIP sections, NON-XIP entryPoint = 0x9dccdb20
    [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.rprc.xip] Parsing file ...
    [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.rprc.xip] Found 0 sections. 0 are non-XIP sections, 0 are XIP sections, NON-XIP entryPoint = 0x00000000
    [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.rprc.tmp] Parsing file ...
    Found section 0 with adddress 0x41010040, size 0x00001a48 bytes
    Found section 1 with adddress 0x41011a88, size 0x00000350 bytes
    Found section 2 with adddress 0x41011dd8, size 0x000001a8 bytes
    Found section 3 with adddress 0x41012380, size 0x00001020 bytes
    Found section 4 with adddress 0x9db00000, size 0x00001000 bytes
    Found section 5 with adddress 0x9dcb8500, size 0x000166e0 bytes
    Found section 6 with adddress 0x9dcdec00, size 0x0000b000 bytes
    Found section 7 with adddress 0x9dce9c00, size 0x00006260 bytes
    Found section 8 with adddress 0x9dcefe80, size 0x00000784 bytes
    [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.rprc.tmp] Found 9 sections. 9 are non-XIP sections, 0 are XIP sections, NON-XIP entryPoint = 0x9dccdb20
    Merging section @ 0x41011a88 of size 0x00000350, with section @ 0x41010040 of size 0x00001a48
    Merging section @ 0x41011dd8 of size 0x000001a8, with section @ 0x41010040 of size 0x00001d98
    Merging section @ 0x9dce9c00 of size 0x00006260, with section @ 0x9dcdec00 of size 0x0000b000
    Writing section header  #0, adddress 0x41010040, size 0x00001f40 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section data with adddress 0x41010040, size 0x00001a48 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section data with adddress 0x41011a88, size 0x00000350 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section data with adddress 0x41011dd8, size 0x000001a8 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section header  #1, adddress 0x41012380, size 0x00001020 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section data with adddress 0x41012380, size 0x00001020 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section header  #2, adddress 0x9db00000, size 0x00001000 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section data with adddress 0x9db00000, size 0x00001000 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section header  #3, adddress 0x9dcb8500, size 0x000166e0 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section data with adddress 0x9dcb8500, size 0x000166e0 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section header  #4, adddress 0x9dcdec00, size 0x00011260 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section data with adddress 0x9dcdec00, size 0x0000b000 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section data with adddress 0x9dce9c00, size 0x00006260 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section header  #5, adddress 0x9dcefe80, size 0x00000784 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section data with adddress 0x9dcefe80, size 0x00000784 bytes to file [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.rprc]
    [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.rprc] Parsing file ...
    Found section 0 with adddress 0x41010040, size 0x00001f40 bytes
    Found section 1 with adddress 0x41012380, size 0x00001020 bytes
    Found section 2 with adddress 0x9db00000, size 0x00001000 bytes
    Found section 3 with adddress 0x9dcb8500, size 0x000166e0 bytes
    Found section 4 with adddress 0x9dcdec00, size 0x00011260 bytes
    Found section 5 with adddress 0x9dcefe80, size 0x00000784 bytes
    [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.rprc] Found 6 sections. 6 are non-XIP sections, 0 are XIP sections, NON-XIP entryPoint = 0x9dccdb20
    [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.rprc.xip] Parsing file ...
    [/home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.rprc.xip] Found 0 sections. 0 are non-XIP sections, 0 are XIP sections, NON-XIP entryPoint = 0x00000000
    Generating .appimage and .xip.appimage (full and stripped)
    Number of Input Files 1
    
    Number of Input Files 1
    
    Number of Input Files 1
    
    Number of Input Files 1
    
    Signing all appimage variants (.hs_fs)
    Generating certificate for /home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.appimage ...
    Generating certificate for /home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.appimage ...
    Generating certificate for /home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f.xip.appimage ...
    Generating certificate for /home/user/wkspaces/NextGenRadio/build/VIP/bin/vip_r5f_stripped.xip.appimage ...
    [100%] Built target vip_r5f.elf
    Building VIP finished. Output files:
    total 3.1M
    -rw-r--r-- 1 kj1mdj user 177K Jun 30 07:31 vip_r5f.appimage
    -rw-r--r-- 1 kj1mdj user 178K Jun 30 07:31 vip_r5f.appimage.hs_fs
    -rw-r--r-- 1 kj1mdj user 1.4M Jun 30 07:31 vip_r5f.elf.out
    -rw-r--r-- 1 kj1mdj user 177K Jun 30 07:31 vip_r5f.rprc
    -rw-r--r-- 1 kj1mdj user 177K Jun 30 07:31 vip_r5f.rprc.tmp
    -rw-r--r-- 1 kj1mdj user   20 Jun 30 07:31 vip_r5f.rprc.xip
    -rw-r--r-- 1 kj1mdj user 177K Jun 30 07:31 vip_r5f_stripped.appimage
    -rw-r--r-- 1 kj1mdj user 178K Jun 30 07:31 vip_r5f_stripped.appimage.hs_fs
    -rw-r--r-- 1 kj1mdj user 302K Jun 30 07:31 vip_r5f_stripped.elf.out
    -rw-r--r-- 1 kj1mdj user 177K Jun 30 07:31 vip_r5f_stripped.rprc
    -rw-r--r-- 1 kj1mdj user 177K Jun 30 07:31 vip_r5f_stripped.rprc.tmp
    -rw-r--r-- 1 kj1mdj user   20 Jun 30 07:31 vip_r5f_stripped.rprc.xip
    -rw-r--r-- 1 kj1mdj user   52 Jun 30 07:31 vip_r5f_stripped.xip.appimage
    -rw-r--r-- 1 kj1mdj user 1.7K Jun 30 07:31 vip_r5f_stripped.xip.appimage.hs_fs
    -rw-r--r-- 1 kj1mdj user   52 Jun 30 07:31 vip_r5f.xip.appimage
    -rw-r--r-- 1 kj1mdj user 1.7K Jun 30 07:31 vip_r5f.xip.appimage.hs_fs
    


  • Hi Mayank,

    Please share the flashing logs as well.

  • Hi Meet

    Attached the flashing logs

    
    C:\ti\mcu_plus_sdk_am62x_11_00_00_16\tools\boot>python uart_uniflash.py -p COM21 --cfg=sbl_prebuilt/am62x-sk-lp/default_sbl_null_hs_fs.cfg
    
    Parsing config file ...
    Parsing config file ... SUCCESS. Found 4 command(s) !!!
    
    Executing command 1 of 4 ...
    Found flash writer ... sending sbl_prebuilt/am62x-sk-lp/sbl_uart_uniflash_stage1.release.hs_fs.tiimage
    Sent flashwriter sbl_prebuilt/am62x-sk-lp/sbl_uart_uniflash_stage1.release.hs_fs.tiimage of size 265901 bytes in 26.19s.
    
    Executing command 2 of 4 ...
    Command arguments : --file=../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk-lp/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs --operation=flash --flash-offset=0x0
    Sending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk-lp/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimageSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk-lp/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimageSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk-lp/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimageSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk-lp/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimageSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk-lp/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimageSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk-lp/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimageSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk-lp/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage                                                                                                                                                                            Sent ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk-lp/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs of size 141748 bytes in 16.72s.
    [STATUS] SUCCESS !!!
    
    Executing command 3 of 4 ...
    Command arguments : --file=sbl_prebuilt/am62x-sk-lp/sbl_null.release.hs_fs.tiimage --operation=flash --flash-offset=0x0
    Sent sbl_prebuilt/am62x-sk-lp/sbl_null.release.hs_fs.tiimage of size 291629 bytes in 30.28s.
    [STATUS] SUCCESS !!!
    
    Executing command 4 of 4 ...
    Command arguments : --file=C:/Users/kj1mdj/Downloads/vip_r5f_stripped.appimage.hs_fs --operation=flash --flash-offset=0xA00000
    Sent C:/Users/kj1mdj/Downloads/vip_r5f_stripped.appimage.hs_fs of size 182055 bytes in 19.95s.
    [STATUS] SUCCESS !!!
    
    All commands from config file are executed !!!
    
    C:\ti\mcu_plus_sdk_am62x_11_00_00_16\tools\boot>

  • Hi Mayank,

    It is difficult for me to comment on what could be the issue with the build environment here, as you mentioned that the application works with the default MCU+SDK build environment, it is likely that there could be some issues with your build setup. For now, I would suggest you to connect to CCS and check where your application is stuck or what is not working. This debugging will help to identify whether there is some issue with the UART itself or you are stuck elsewhere due to another issue, from the logs you sent, it seems like the SBL is working and was able to load the application to R5F. This guide will help you to debug your application: https://software-dl.ti.com/mcu-plus-sdk/esd/AM62X/11_00_00_16/exports/docs/api_guide_am62x/DEVELOP_AND_DEBUG_DMR5.html#autotoc_md325 

    Please try this and let me know your observations so that I can further suggest something.

  • Hi Meet,

    Please take a look at our image generation procedure and tell us whether you consider it correct.

    It is done within CMakeLists.txt file, is executed on Linux host and it generates multiple images.

    # ==================== GLOBAL BUILD VARIABLES ===================
    
    [............]
    
    set(EXECUTABLE_NAME vip_r5f.elf)
    
    set(LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/config/toolchain/linker.cmd)
    
    [............]
    
    set(TI_STRIP_TOOL_PATH ${TI_ARM_CLANG_BIN_DIR}/tiarmstrip)
    set(TI_APPIMAGE_GEN_PATH $ENV{MCU_PLUS_SDK_PATH}/tools/boot/multicoreImageGen/MulticoreImageGen)
    set(TI_APPIMAGE_CERT_PY_PATH $ENV{MCU_PLUS_SDK_PATH}/tools/boot/signing/appimage_x509_cert_gen.py)
    set(TI_ELF2RPRC_JS_PATH $ENV{MCU_PLUS_SDK_PATH}/tools/boot/out2rprc/elf2rprc.js)
    set(TI_XIPGEN_PATH $ENV{MCU_PLUS_SDK_PATH}/tools/boot/xipGen/xipGen.out)
    
    set(ELF_OUT_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${EXECUTABLE_NAME}.out)
    set(STRIPPED_ELF_OUT_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/vip_r5f_stripped.elf.out)
    
    set(RPRC_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/vip_r5f.rprc)
    set(STRIPPED_RPRC_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/vip_r5f_stripped.rprc)
    set(TMP_RPRC_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/vip_r5f.rprc.tmp)
    set(TMP_STRIPPED_RPRC_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/vip_r5f_stripped.rprc.tmp)
    set(XIP_RPRC_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/vip_r5f.rprc.xip)
    set(STRIPPED_XIP_RPRC_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/vip_r5f_stripped.rprc.xip)
    
    set(APPIMAGE_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/vip_r5f.appimage)
    set(STRIPPED_APPIMAGE_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/vip_r5f_stripped.appimage)
    set(SIGNED_APPIMAGE_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/vip_r5f.appimage.hs_fs)
    set(SIGNED_STRIPPED_APPIMAGE_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/vip_r5f_stripped.appimage.hs_fs)
    set(APPIMAGE_XIP_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/vip_r5f.xip.appimage)
    set(SIGNED_APPIMAGE_XIP_PATH ${APPIMAGE_XIP_PATH}.hs_fs)
    set(STRIPPED_APPIMAGE_XIP_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/vip_r5f_stripped.xip.appimage)
    set(SIGNED_STRIPPED_APPIMAGE_XIP_PATH ${STRIPPED_APPIMAGE_XIP_PATH}.hs_fs)
    
    set(TI_XIPGEN_FLASH_START_ADDR 0x60000000)
    
    set(TI_APPIMAGE_GEN_DEVICE_ID "55")
    set(TI_APPIMAGE_GEN_ENDIANNESS "LE")
    set(TI_APPIMAGE_GEN_CORE_ID "0x04")
    
    set(TI_APPIMAGE_CERT_PY_AUTHTYPE 0)
    set(TI_APPIMAGE_CERT_PY_CORE_ID r5_cl0_c0)
    set(TI_APPIMAGE_CERT_PY_KEY_PATH $ENV{MCU_PLUS_SDK_PATH}/tools/boot/signing/app_degenerateKey.pem)
    set(TI_APPIMAGE_CERT_PY_KEY_VERSION 1.5)
    set(TI_APPIMAGE_CERT_PY_LOADADDR 84000000)
    
    set(TI_ELF2RPRC_JS_SW_VERSION 1.0)
    
    find_program(NODE_EXECUTABLE node REQUIRED)
    find_program(PYTHON3_EXECUTABLE python3 REQUIRED)
    
    # ==================== GLOBAL BUILD OPTIONS =====================
    
    add_compile_options(-g)
    
    add_link_options(
       -Wl,--diag_suppress=10063
       -Wl,--priority
       -Wl,--ram_model
       -Wl,--reread_libs
       -Wl,${LINKER_SCRIPT}
    )
    
    # ==================== POST PROCESSING STEPS ====================
    
    add_custom_command(TARGET ${EXECUTABLE_NAME} POST_BUILD
       COMMAND ${TI_STRIP_TOOL_PATH} -o ${STRIPPED_ELF_OUT_PATH} ${ELF_OUT_PATH}
       COMMENT "Creating stripped .elf.out"
    )
    
    add_custom_command(TARGET ${EXECUTABLE_NAME} POST_BUILD
       COMMAND ${NODE_EXECUTABLE}
          ${TI_ELF2RPRC_JS_PATH}
          ${ELF_OUT_PATH}
          ${TI_ELF2RPRC_JS_SW_VERSION}
          ${RPRC_PATH}
       COMMAND ${NODE_EXECUTABLE}
          ${TI_ELF2RPRC_JS_PATH}
          ${STRIPPED_ELF_OUT_PATH}
          ${TI_ELF2RPRC_JS_SW_VERSION}
          ${STRIPPED_RPRC_PATH}
       COMMENT "Generating .rprc (full and stripped)"
    )
    
    add_custom_command(TARGET ${EXECUTABLE_NAME} POST_BUILD
       COMMAND ${CMAKE_COMMAND} -E copy ${RPRC_PATH} ${TMP_RPRC_PATH}
       COMMAND ${CMAKE_COMMAND} -E copy ${STRIPPED_RPRC_PATH} ${TMP_STRIPPED_RPRC_PATH}
       COMMAND ${TI_XIPGEN_PATH}
          -i ${TMP_RPRC_PATH}
          -o ${RPRC_PATH}
          -x ${XIP_RPRC_PATH}
          --flash-start-addr ${TI_XIPGEN_FLASH_START_ADDR} -v
       COMMAND ${TI_XIPGEN_PATH}
          -i ${TMP_STRIPPED_RPRC_PATH}
          -o ${STRIPPED_RPRC_PATH}
          -x ${STRIPPED_XIP_RPRC_PATH}
          --flash-start-addr ${TI_XIPGEN_FLASH_START_ADDR} -v
       COMMENT "Generating .rprc.xip (full and stripped)"
    )
    
    add_custom_command(TARGET ${EXECUTABLE_NAME} POST_BUILD
       COMMAND ${TI_APPIMAGE_GEN_PATH}
          ${TI_APPIMAGE_GEN_ENDIANNESS}
          ${TI_APPIMAGE_GEN_DEVICE_ID}
          ${APPIMAGE_PATH}
          ${TI_APPIMAGE_GEN_CORE_ID}
          ${RPRC_PATH}
       COMMAND ${TI_APPIMAGE_GEN_PATH}
          ${TI_APPIMAGE_GEN_ENDIANNESS}
          ${TI_APPIMAGE_GEN_DEVICE_ID}
          ${STRIPPED_APPIMAGE_PATH}
          ${TI_APPIMAGE_GEN_CORE_ID}
          ${STRIPPED_RPRC_PATH}
       COMMAND ${TI_APPIMAGE_GEN_PATH}
          ${TI_APPIMAGE_GEN_ENDIANNESS}
          ${TI_APPIMAGE_GEN_DEVICE_ID}
          ${APPIMAGE_XIP_PATH}
          ${TI_APPIMAGE_GEN_CORE_ID}
          ${XIP_RPRC_PATH}
       COMMAND ${TI_APPIMAGE_GEN_PATH}
          ${TI_APPIMAGE_GEN_ENDIANNESS}
          ${TI_APPIMAGE_GEN_DEVICE_ID}
          ${STRIPPED_APPIMAGE_XIP_PATH}
          ${TI_APPIMAGE_GEN_CORE_ID}
          ${STRIPPED_XIP_RPRC_PATH}
       COMMENT "Generating .appimage and .xip.appimage (full and stripped)"
    )
    
    add_custom_command(TARGET ${EXECUTABLE_NAME} POST_BUILD
       COMMAND ${PYTHON3_EXECUTABLE} ${TI_APPIMAGE_CERT_PY_PATH}
          --authtype ${TI_APPIMAGE_CERT_PY_AUTHTYPE}
          --bin ${APPIMAGE_PATH}
          --core ${TI_APPIMAGE_CERT_PY_CORE_ID}
          --key ${TI_APPIMAGE_CERT_PY_KEY_PATH}
          --keyversion ${TI_APPIMAGE_CERT_PY_KEY_VERSION}
          --loadaddr ${TI_APPIMAGE_CERT_PY_LOADADDR}
          --output ${SIGNED_APPIMAGE_PATH}
       COMMAND ${PYTHON3_EXECUTABLE} ${TI_APPIMAGE_CERT_PY_PATH}
          --authtype ${TI_APPIMAGE_CERT_PY_AUTHTYPE}
          --bin ${STRIPPED_APPIMAGE_PATH}
          --core ${TI_APPIMAGE_CERT_PY_CORE_ID}
          --key ${TI_APPIMAGE_CERT_PY_KEY_PATH}
          --keyversion ${TI_APPIMAGE_CERT_PY_KEY_VERSION}
          --loadaddr ${TI_APPIMAGE_CERT_PY_LOADADDR}
          --output ${SIGNED_STRIPPED_APPIMAGE_PATH}
       COMMAND ${PYTHON3_EXECUTABLE} ${TI_APPIMAGE_CERT_PY_PATH}
          --authtype ${TI_APPIMAGE_CERT_PY_AUTHTYPE}
          --bin ${APPIMAGE_XIP_PATH}
          --core ${TI_APPIMAGE_CERT_PY_CORE_ID}
          --key ${TI_APPIMAGE_CERT_PY_KEY_PATH}
          --keyversion ${TI_APPIMAGE_CERT_PY_KEY_VERSION}
          --loadaddr ${TI_APPIMAGE_CERT_PY_LOADADDR}
          --output ${SIGNED_APPIMAGE_XIP_PATH}
       COMMAND ${PYTHON3_EXECUTABLE} ${TI_APPIMAGE_CERT_PY_PATH}
          --authtype ${TI_APPIMAGE_CERT_PY_AUTHTYPE}
          --bin ${STRIPPED_APPIMAGE_XIP_PATH}
          --core ${TI_APPIMAGE_CERT_PY_CORE_ID}
          --key ${TI_APPIMAGE_CERT_PY_KEY_PATH}
          --keyversion ${TI_APPIMAGE_CERT_PY_KEY_VERSION}
          --loadaddr ${TI_APPIMAGE_CERT_PY_LOADADDR}
          --output ${SIGNED_STRIPPED_APPIMAGE_XIP_PATH}
       COMMENT "Signing all appimage variants (.hs_fs)"
    )

  • Hi Lukasz,

    Please also try to debug the application as I mentioned in my previous response and let me know the observation.

  • Hi Meet,

    Mayank will be debugging M4/R5 apps.

    Apart from that, I kindly request you once again to verify whether the way we generate images is correct.

    It is extremely important for us, because we have CI builds and project composed of many already existing proprietary building blocks, so we won't be using neither Code Composer Studio nor raw Makefiles for our development, verification and deliveries. We need to use our own build structure based on CMake. That is why we have to confirm that the way we generate these images reflects Makefiles generated by CCS.

    In addition to my previous message:

    We use drivers generated by sysconfig, based on .syscfg file from ipc_rpmsg_echo_linux example for R5F.

    We use linker.cmd from ipc_rpmsg_echo_linux example for R5F.

    Also, I am adding output of our build to what I shared before.
    Please also check the sizes of output files as some of them seem to be too interestingly small..

    Building VIP...
      USE_MANUAL_PINMUX   = OFF
      USE_MANUAL_BOARD    = OFF
      USE_MANUAL_DRIVERS  = OFF
      BUILD_DIR           = /home/USER/vsc-workspace/Project/build/VIP
    -- The C compiler identification is TIClang 4.0.3
    -- The CXX compiler identification is TIClang 4.0.3
    -- The ASM compiler identification is TIClang
    -- Found assembler: /home/Project-docker/ti-cgt-armllvm/bin/tiarmclang
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /home/Project-docker/ti-cgt-armllvm/bin/tiarmclang - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /home/Project-docker/ti-cgt-armllvm/bin/tiarmclang - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Using GENERATED config
    -- Configuring done (0.4s)
    -- Generating done (0.0s)
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        USE_MANUAL_BOARD
        USE_MANUAL_DRIVERS
        USE_MANUAL_PINMUX
    
    
    -- Build files have been written to: /home/USER/vsc-workspace/Project/build/VIP
    [  7%] Building CXX object sw/app/CMakeFiles/app_library.dir/source/main.cpp.obj
    [ 14%] Linking CXX static library libapp_library.a
    [ 14%] Built target app_library
    [ 21%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_dpl_config.c.obj
    [ 28%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_board_config.c.obj
    [ 35%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_board_open_close.c.obj
    [ 42%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_drivers_config.c.obj
    [ 57%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_drivers_open_close.c.obj
    [ 57%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_enet_open_close.c.obj
    [ 71%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_enet_soc.c.obj
    [ 64%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_enet_config.c.obj
    [ 78%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_pinmux_config.c.obj
    [ 85%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_enet_lwipif.c.obj
    [ 92%] Building C object CMakeFiles/vip_r5f.elf.dir/config/generated/ti_power_clock_config.c.obj
    [100%] Linking CXX executable bin/vip_r5f.elf.out
    "/home/USER/vsc-workspace/Project/VIP/config/toolchain/linker.cmd", line 74: warning: 
       no matching section
    "/home/USER/vsc-workspace/Project/VIP/config/toolchain/linker.cmd", line 78: warning: 
       no matching section
    "/home/USER/vsc-workspace/Project/VIP/config/toolchain/linker.cmd", line 90: warning: 
       no matching section
    "/home/USER/vsc-workspace/Project/VIP/config/toolchain/linker.cmd", line 95: warning: 
       no matching section
    "/home/USER/vsc-workspace/Project/VIP/config/toolchain/linker.cmd", line 101: warning: 
       no matching section
    "/home/USER/vsc-workspace/Project/VIP/config/toolchain/linker.cmd", line 107: warning: 
       no matching section
    "/home/USER/vsc-workspace/Project/VIP/config/toolchain/linker.cmd", line 116: warning: 
       LOAD placement ignored for "GROUP_4":  object is uninitialized
    Creating stripped .elf.out
    Generating .rprc (full and stripped)
    Generating .rprc.xip (full and stripped)
    [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f.rprc.tmp] Parsing file ...
    Found section 0 with adddress 0x41010040, size 0x00001020 bytes
    Found section 1 with adddress 0x9dcb0000, size 0x00004800 bytes
    Found section 2 with adddress 0x9dcb7200, size 0x000009f0 bytes
    Found section 3 with adddress 0x9dcb7c00, size 0x00000380 bytes
    Found section 4 with adddress 0x9dcb7f80, size 0x00000040 bytes
    [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f.rprc.tmp] Found 5 sections. 5 are non-XIP sections, 0 are XIP sections, NON-XIP entryPoint = 0x9dcb44d8
    Merging section @ 0x9dcb7f80 of size 0x00000040, with section @ 0x9dcb7c00 of size 0x00000380
    Writing section header  #0, adddress 0x41010040, size 0x00001020 bytes to file [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f.rprc]
    Writing section data with adddress 0x41010040, size 0x00001020 bytes to file [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f.rprc]
    Writing section header  #1, adddress 0x9dcb0000, size 0x00004800 bytes to file [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f.rprc]
    Writing section data with adddress 0x9dcb0000, size 0x00004800 bytes to file [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f.rprc]
    Writing section header  #2, adddress 0x9dcb7200, size 0x000009f0 bytes to file [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f.rprc]
    Writing section data with adddress 0x9dcb7200, size 0x000009f0 bytes to file [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f.rprc]
    Writing section header  #3, adddress 0x9dcb7c00, size 0x000003c0 bytes to file [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f.rprc]
    Writing section data with adddress 0x9dcb7c00, size 0x00000380 bytes to file [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f.rprc]
    Writing section data with adddress 0x9dcb7f80, size 0x00000040 bytes to file [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f.rprc]
    [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f.rprc] Parsing file ...
    Found section 0 with adddress 0x41010040, size 0x00001020 bytes
    Found section 1 with adddress 0x9dcb0000, size 0x00004800 bytes
    Found section 2 with adddress 0x9dcb7200, size 0x000009f0 bytes
    Found section 3 with adddress 0x9dcb7c00, size 0x000003c0 bytes
    [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f.rprc] Found 4 sections. 4 are non-XIP sections, 0 are XIP sections, NON-XIP entryPoint = 0x9dcb44d8
    [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f.rprc.xip] Parsing file ...
    [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f.rprc.xip] Found 0 sections. 0 are non-XIP sections, 0 are XIP sections, NON-XIP entryPoint = 0x00000000
    [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f_stripped.rprc.tmp] Parsing file ...
    Found section 0 with adddress 0x41010040, size 0x00001020 bytes
    Found section 1 with adddress 0x9dcb0000, size 0x00004800 bytes
    Found section 2 with adddress 0x9dcb7200, size 0x000009f0 bytes
    Found section 3 with adddress 0x9dcb7c00, size 0x00000380 bytes
    Found section 4 with adddress 0x9dcb7f80, size 0x00000040 bytes
    [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f_stripped.rprc.tmp] Found 5 sections. 5 are non-XIP sections, 0 are XIP sections, NON-XIP entryPoint = 0x9dcb44d8
    Merging section @ 0x9dcb7f80 of size 0x00000040, with section @ 0x9dcb7c00 of size 0x00000380
    Writing section header  #0, adddress 0x41010040, size 0x00001020 bytes to file [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section data with adddress 0x41010040, size 0x00001020 bytes to file [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section header  #1, adddress 0x9dcb0000, size 0x00004800 bytes to file [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section data with adddress 0x9dcb0000, size 0x00004800 bytes to file [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section header  #2, adddress 0x9dcb7200, size 0x000009f0 bytes to file [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section data with adddress 0x9dcb7200, size 0x000009f0 bytes to file [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section header  #3, adddress 0x9dcb7c00, size 0x000003c0 bytes to file [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section data with adddress 0x9dcb7c00, size 0x00000380 bytes to file [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f_stripped.rprc]
    Writing section data with adddress 0x9dcb7f80, size 0x00000040 bytes to file [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f_stripped.rprc]
    [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f_stripped.rprc] Parsing file ...
    Found section 0 with adddress 0x41010040, size 0x00001020 bytes
    Found section 1 with adddress 0x9dcb0000, size 0x00004800 bytes
    Found section 2 with adddress 0x9dcb7200, size 0x000009f0 bytes
    Found section 3 with adddress 0x9dcb7c00, size 0x000003c0 bytes
    [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f_stripped.rprc] Found 4 sections. 4 are non-XIP sections, 0 are XIP sections, NON-XIP entryPoint = 0x9dcb44d8
    [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f_stripped.rprc.xip] Parsing file ...
    [/home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f_stripped.rprc.xip] Found 0 sections. 0 are non-XIP sections, 0 are XIP sections, NON-XIP entryPoint = 0x00000000
    Generating .appimage and .xip.appimage (full and stripped)
    Number of Input Files 1
    
    Number of Input Files 1
    
    Number of Input Files 1
    
    Number of Input Files 1
    
    Signing all appimage variants (.hs_fs)
    Generating certificate for /home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f.appimage ...
    Generating certificate for /home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f_stripped.appimage ...
    Generating certificate for /home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f.xip.appimage ...
    Generating certificate for /home/USER/vsc-workspace/Project/build/VIP/bin/vip_r5f_stripped.xip.appimage ...
    [100%] Built target vip_r5f.elf
    Building VIP finished. Output files:
    total 600K
    -rw-r--r-- 1 USER USER  26K Jul  2 10:26 vip_r5f.appimage
    -rw-r--r-- 1 USER USER  28K Jul  2 10:26 vip_r5f.appimage.hs_fs
    -rw-r--r-- 1 USER USER 289K Jul  2 10:26 vip_r5f.elf.out
    -rw-r--r-- 1 USER USER  26K Jul  2 10:26 vip_r5f.rprc
    -rw-r--r-- 1 USER USER  26K Jul  2 10:26 vip_r5f.rprc.tmp
    -rw-r--r-- 1 USER USER   20 Jul  2 10:26 vip_r5f.rprc.xip
    -rw-r--r-- 1 USER USER  26K Jul  2 10:26 vip_r5f_stripped.appimage
    -rw-r--r-- 1 USER USER  28K Jul  2 10:26 vip_r5f_stripped.appimage.hs_fs
    -rw-r--r-- 1 USER USER  60K Jul  2 10:26 vip_r5f_stripped.elf.out
    -rw-r--r-- 1 USER USER  26K Jul  2 10:26 vip_r5f_stripped.rprc
    -rw-r--r-- 1 USER USER  26K Jul  2 10:26 vip_r5f_stripped.rprc.tmp
    -rw-r--r-- 1 USER USER   20 Jul  2 10:26 vip_r5f_stripped.rprc.xip
    -rw-r--r-- 1 USER USER   52 Jul  2 10:26 vip_r5f_stripped.xip.appimage
    -rw-r--r-- 1 USER USER 1.7K Jul  2 10:26 vip_r5f_stripped.xip.appimage.hs_fs
    -rw-r--r-- 1 USER USER   52 Jul  2 10:26 vip_r5f.xip.appimage
    -rw-r--r-- 1 USER USER 1.7K Jul  2 10:26 vip_r5f.xip.appimage.hs_fs

  • Hi Meet
    .
    I have tried debugging the R5 core. I don't see the control going to the main. All I see is a location address in the Call Stack when I halt the program.
    Also, it's a custom project, so I am unsure how successful I was in debugging it correctly. Attaching the screenshot. Let us know if I performed it correctly

    1. I started the debugging session

    2. Connected the R5 Target

    3. Loaded the symbol 

    4. Put the breakpoint in main.

    5. Continue the debugging. R5 core shows running, but the control does not reach the main

    6. I halt the program where I see an address(See in the call stack in screenshot attached)


      

    It'd be appreciated if you could look into the image generation from the CMake file that Lukasz has provided. That could give us a hint if the image generation is done properly.

  • Hi Mayank, Lukasz,

    Also, I am adding output of our build to what I shared before.
    Please also check the sizes of output files as some of them seem to be too interestingly small..

    There are two different build logs shared by you, one was shared by Mayank and one by Lukasz. In the logs shared by Lukasz I do see that the image size is quite smaller than the expected one and there are some warnings as well, in the logs shared by Mayank I don't find any such issues and the image size is also as expected.

    All I see is a location address in the Call Stack when I halt the program.

    For this issue, could you please share your image with me. I will try to test this at my end to see if I can reproduce the issue.

    Best Regards,

    Meet.

  • Hi Meet,

    Please find my build output attached below:

    build_output.zip

    Best Regards,

    Łukasz

  • Hi Meet 

    Please find th build

     Build_Binaries.zip

    Regards

    Mayank

  • Hi Mayank,

    There seems to be some problem with your vip_r5f_stripped.appimage.hs_fs image, could you try once with vip_r5f.appimage.hs_fs image.

  • HI Meet,

    Flashed  vip_r5f.appimage.hs_fs as well,

    C:\ti\mcu_plus_sdk_am62x_11_00_00_16\tools\boot>
    C:\ti\mcu_plus_sdk_am62x_11_00_00_16\tools\boot>python uart_uniflash.py -p COM21 --cfg=sbl_prebuilt/am62x-sk-lp/default_sbl_null_hs_fs.cfg
    
    Parsing config file ...
    Parsing config file ... SUCCESS. Found 4 command(s) !!!
    
    Executing command 1 of 4 ...
    Found flash writer ... sending sbl_prebuilt/am62x-sk-lp/sbl_uart_uniflash_stage1.release.hs_fs.tiimage
    Sent flashwriter sbl_prebuilt/am62x-sk-lp/sbl_uart_uniflash_stage1.release.hs_fs.tiimage of size 265901 bytes in 25.6s.
    
    Executing command 2 of 4 ...
    Command arguments : --file=../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk-lp/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs --operation=flash --flash-offset=0x0
    Sending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk-lp/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimageSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk-lp/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimageSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk-lp/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimageSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk-lp/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimageSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk-lp/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimageSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk-lp/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimageSending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk-lp/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage                                                                                                                                                                            Sent ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk-lp/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs of size 141748 bytes in 16.7s.
    [STATUS] SUCCESS !!!
    
    Executing command 3 of 4 ...
    Command arguments : --file=sbl_prebuilt/am62x-sk-lp/sbl_null.release.hs_fs.tiimage --operation=flash --flash-offset=0x0
    Sent sbl_prebuilt/am62x-sk-lp/sbl_null.release.hs_fs.tiimage of size 291629 bytes in 30.27s.
    [STATUS] SUCCESS !!!
    
    Executing command 4 of 4 ...
    Command arguments : --file=C:/Users/kj1mdj/Downloads/vip_r5f.appimage.hs_fs --operation=flash --flash-offset=0xA00000
    Sent C:/Users/kj1mdj/Downloads/vip_r5f.appimage.hs_fs of size 182055 bytes in 19.95s.
    [STATUS] SUCCESS !!!
    
    All commands from config file are executed !!!

    The result is the same, no output on wakeup UART

  • Hi Mayank,

    I was able to reproduce this error at my end, after debugging SBL NULL it seems that there is some problem while setting the entrypoint for your images, that is why the app is not able to run. After the self reset R5 jumps back to the entry point of SBL NULL itself instead of jumping to applications address, that's why you see the R5 core stuck at 0x43... address (HSMRAM address) you shared earlier. Give me sometime to debug further what could be the issue here.

    Best Regards,

    Meet.

  • Hello,

    Please find th build

     Build_Binaries.zip

    Analysing the ".map" file, I see that the object files "boot_armv7r_asm.obj" and "boot_armv7r.obj" are not linked as part of the "freertos.am62x.r5f.ti-arm-clang.release.lib" library. These object files provide the SDK specific "_c_int00" function (aka startup routine). In absence of these object files, the compiler itself provide the default "_c_int00" function which would cause issues.

    In case you have custom build setup for libraries too, it is likely that you missed compiling the "boot_armv7r.c" and "boot_armv7r_asm.S" files.

    Please see the default makefile where these files are included for compilation:

  • Hi 

    I included "boot_armv7r.c" and "boot_armv7r_asm.S" files in the compilation, but the issue remains the same.

    Attaching the updated binaries and the map file.

    8228.Build_Binaries.zip

    Although we were under the impression that the library dependencies are resolved automatically. As we did not face any errors while compiling/ linking this library.

    Also, it was not mentioned here to include these as part of DM/R5 development

    dev.ti.com/.../DEVELOP_AND_DEBUG_DMR5.html

  • but the issue remains the same.

    Please connect to the WKUP R5F core and share the address at which it is suspended at. Please do not load anything. After booting, if you don't observe logs on the WKUP UART port then only connect to the core and share the address.

  • Hi Prashant,

    If I connect the target, I seethe  address as shown in attachment below

  • Hi Mayank,

    The issue is with the core ID that is being passed with your TI_APPIMAGE_GEN_PATH command. Please set TI_APPIMAGE_GEN_CORE_ID to "4" instead of "0x04"

    Best Regards,

    Meet.

  • Hi Meet

    Changing TI_APPIMAGE_GEN_CORE_ID to "4" breaks something, and we don't see the CPU R5f initialization. Kindly see the screenshot

    Regards

    Mayank

  • Hi Mayank,

    This is due to wrong software version set in the makefile. TI_ELF2RPRC_JS_SW_VERSION. is set to 1.0, it should be set to 0xb000010, to match the installer software version.

  • Hi Meet,

    Changes CoreID to 4, Sw version to 0xb000010. Also added the boot_armv7r files.

    Now it is behaving the same as earlier. Initialization is passed, but NO output onthe  wakeup UART

  • Hi Mayank,

    Please share your latest binaries for this.

  • Hi 

    Please find the binary attached

    3581.bin.zip

  • Hi Mayank,

    I am now able to at least boot the binary shared by you, so it seems that the issue with the booting is resolved. I could see while debugging that it is getting stuck inside xTaskCreateStatic API, as I don't have access to all your files I can't comment further on what could be the issue. I would recommend you debugging the R5 application now using the guide I shared before: https://software-dl.ti.com/mcu-plus-sdk/esd/AM62X/11_00_00_16/exports/docs/api_guide_am62x/DEVELOP_AND_DEBUG_DMR5.html#autotoc_md325

    Best regards,

    Meet.

  • Hi Meet

    I do see control reaching the main now while debugging.

    Now it fails at the task creation it seems,

    The error I see in debugging is below:

    MAIN_Cortex_R5_0_0: ASSERT: 0.559s: FreeRTOS-Kernel/tasks.c:prvCreateStaticTask:1265: (uint32_t)(puxStackBuffer != ((void*)0)) failed !!!

    Although the same code which I am currently using is working in the TI environment. So I dont see issue from the code side.(I have already attached the main.c in the previous comment)

    Is there anything else needs to included, any library or any memory configuration needs to be done so that  this buffer allocation doesn't fail?

  • Hi Mayank,

    Please give me some time to investigate further and get back to you.

    Best Regards,

    Meet.

  • Hi Meet,

    Any updates on this?

    Regards

    Maynk

  • It is not feasible to reverse engineer the binary.

    Instead, could you please keep the cmake build setup to the example alone and not the libraries. Basically, build the example using your custom build setup but link the libraries as it is from the SDK.

    This should tell us the following:

    • If the issue does not occur then you have issues in the way you are building the libraries using cmake.
    • If the issue still occurs then you have issues in the way you are building example using cmake.
  • Hi Meet/ Prashant

    The issue is resolved now. Thanks for all the support.

    Regards

    Mayank

  • Hello,

    May I know what was the issue?

  • Hi

    It seems by defualt the include file inside FreeRTOS.h files, which were taken by the r5 code, were pointing to some other location. Hence, it was not getting the correct FreeRTOSConfig.h and portmacro.h

  • Thank you for the explanation. Please feel free to create queries in case of any other issues.