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.

AM6548: UART0 can not receive

Part Number: AM6548

Hi ti team,

We refer to step 1 in chapter 5.3.17.2 of this manual (software-dl.ti.com/.../Examples_and_Demos_Application_Demos.html) to load the mcu firmware on the EVM board and find that mcu-uart0 can only send out but not receive in.

  • Hi user5772774,

    I followed the link you provided and also explicitly looked at chapter 5.3.17.2 but I'm not clear what your issue is. For example, I don't see MCU_UART0 being mentioned in that section.

    Can you please provide more detailed steps, logs, screenshots, etc. to describe and re-create the issue you are seeing.

    Thanks, Andreas

  • Hi TI team,

    SDK Version: ti-processor-sdk-linux-am65xx-evm-06.00.00.07

    Board: EVM

    Step 1: in the kernel shell, run the command: ln -sf /lib/firmware/rti_dwwdtest/am65xx_evm/csl_rti_dwwd_test_app_mcu1_0_release.xer5f /lib/firmware/am65x-mcu-r5f0_0-fw

    Step 2: reboot the EVM board

    Step 3: in the kernel shell, run the command: cat  /dev/ttyS1, then PC send something to the ttyS1 of  EVM board  via serial , the ttyS1 can not receive anything

    if don't do Step1 to load the mcu firmware, the Step3 is ok

  • Hi user5772774,

    thanks for the steps on how to re-create the issue. I'll need to run this on my AM65x board locally to see what is going on, unfortunately we had some terrible weather here last night at Dallas and part of our campus is currently closed. It will probably be at least a day or two before I can get to my hardware and look into this. Will keep you posted in case it takes longer.

    Regards, Andreas

  • user5772774,

    it looks like our campus may re-open on Thursday, but that's not 100% clear yet. Anyways, just letting you know we are all still waiting to be able to get back to our workstations / boards, etc.

    Regards, Andreas

  • user5772774,

    while I still don't have access to my office and my hardware and with that can't do any board-level testing/validation I think I might have found an explanation from looking at the csl_rti_dwwd_test_app_mcu1_0_release.xer5f source code.

    First, that source code is part of the TI RTOS SDK available here: http://software-dl.ti.com/processor-sdk-rtos/esd/AM65X/latest/index_FDS.html in folder "\ti\pdk_am65xx_1_0_5\packages\ti\csl\example\rti\rti_dwwdtest_app" after installation. Inspecting the source code it becomes evident that the code performs pinmux setup for selected peripherals. The related pinmux helper function and initialization functions are located here: "\ti\pdk_am65xx_1_0_5\packages\ti\board\src\am65xx_evm".

    Now, to the interesting part. You say you lose the ability to receive anything on the ttyS1 UART (which I suppose is the MCU_UART0 on the device) after that csl_rti_dwwd_test_app_mcu1_0_release.xer5f firmware is running. Now looking at that example's pinmux source code, we see that the MCU_UART0 is indeed affected by the code, and the settings performed are as follows:

    static pinmuxPerCfg_t gMcu_uart0PinCfg[] =
    {
        /* MCU_UART0 -> MCU_UART0_RXD -> P4 */
        {
            PIN_MCU_OSPI1_D1, PIN_MODE(4) | \
            ((PIN_PULL_DISABLE | PIN_INPUT_ENABLE) & (~PIN_PULL_DIRECTION))
        },
        /* MCU_UART0 -> MCU_UART0_TXD -> P5 */
        {
            PIN_MCU_OSPI1_D2, PIN_MODE(4) | \
            ((PIN_PULL_DISABLE) & (~PIN_PULL_DIRECTION & ~PIN_INPUT_ENABLE))
        },
        /* MCU_UART0 -> MCU_UART0_CTS -> P1 */
        {
            PIN_MCU_OSPI1_D3, PIN_MODE(4) | \
            ((PIN_PULL_DISABLE | PIN_INPUT_ENABLE) & (~PIN_PULL_DIRECTION))
        },
        /* MCU_UART0 -> MCU_UART0_RTS -> P4 */
        {
            PIN_MCU_OSPI1_CSN1, PIN_MODE(4) | \
            ((PIN_PULL_DISABLE | PIN_INPUT_ENABLE) & (~PIN_PULL_DIRECTION))
        },
        {PINMUX_END}
    };

    Note how the MCU_UART0_TXD pin is configured as output, and the MCU_UART0_RXD pin is configured as an input - both as they should be. But there seems to be an error in the handshake signal setup. See how both MCU_UART0_CTS and MCU_UART0_RTS are signals are setup the same way, even though one is supposed to be an input and one an output? This looks wrong. So the reason for your issues is probably because RTS is setup as an input instead as an output it prohibits your PC from sending data to the AM654x. I think if you change the configuration of RTS to match that of TXD and re-build that code that issue should go away.

    It is probably better to remove all pinmux setup from the MCU code not directly needed for your function. I don't think it is a good idea to have several pieces of code running on several cores stomping over each others configuration code. I'm going to file an issue against the SDK internally to get this fixed.

    Let me know should you decide to re-build and re-try the code and if that fixes it, or if we need to dig into this some more.

    Regards, Andreas

  • Hello,

    Thank you for your support, I will try to rebuild on your way

  • Hello,

    I have tried it, but it still is not ok!

  • Hi user5772774,

    which board do you have? The "AM65x EVM" or the "AM65x Industrial Development Kit"? While both kits share a fair amount of hardware (processor board) they are being represented by different folders in the RTOS SDK:

    • C:\ti\pdk_am65xx_1_0_5\packages\ti\board\src\am65xx_evm
    • C:\ti\pdk_am65xx_1_0_5\packages\ti\board\src\am65xx_idk

    So first, I'd like to make sure we are modifying the right folder.

    Then, the main application file is this here: C:\ti\pdk_am65xx_1_0_5\packages\ti\csl\example\rti\rti_dwwdtest_app\rti_app_dwwd_v1.c

    Can you please try the following:

    1. Make a modification to the file that would make it obvious and can be used to confirm that you are indeed building the right file, and finally running that actual file on the device. For example, add an infinite while(1) {} loop near the top, to trap program execution, which you should be able to witness running on the AM654 device. Again, this is to confirm your build/update process works as you expect.
    2. Experiment with making changes to that file's main() function to see if you can narrow down the issue. For example, remove the call to Board_init(). Now the code won't work properly for sure. But does the UART now work? etc.  Basically, try a few things to narrow down the issue and report back.

    Above I was basically outlining what I'd try myself to pin this down, hoping it would enable you to make some progress. If nothing helps I may get access to an AM654x board next week (fingers crossed) to debug this directly.

    Regards,
    Andreas

  • Hello,

    1. I only connected the RXD and TXD pins of PC uart and EVM uart, so the RTS pin cannot affect the communication.

    2. After running the MCU firmware in Linux, I have reconfigured the pinmux of the RXD, TXD, RTS and CTS pins to the correct mode, but the receiving function of the MCU uart0 still does not work.

    3. I guess it should be that other parts of the MCU firmware affect the receiving function of uart0.

  • Hi user5772774,

    I appreciate your patience on this. I was finally able to get hold of and setup an AM654x EVM board and was able to re-create the concern you described. Running the RTOS RTI DWWD test firmware on the R5 indeed impacts how MCU_UART0 operates. I can transmit data to the PC still with this firmware running, but I can no longer receive data. I also tried force-configuring serial port handshake operation and just as you indicated that has no impact so the reason needs to be found somewhere else.

    I did notice that when starting up the MCU firmware a diagnostic message is transmitted out of MCU_UART0, so this confirms that this firmware is definitely touching the UART. While I cannot yet point to what exactly makes the MCU_UART0 usage break from a Linux point of view (the AM65xx RTOS SDK takes forever to build, and I wanted to go through at least one full build before experimenting with the code some more) I suspect it might be something interrupt or DMA related as the CSL UART driver is touching these components.

    CSL RTI APP: RTI App WDT timeout interrupt configured.
    CSL RTI APP: RTI App Resource Table at 41c09000.

    At any rate, different cores/programs/drivers should not really share a single UART, which is I suppose why you want the RTOS demo firmware to no longer access the MCU_UART0, that you can continue using it from Linux, correct?

    user5772774 said:
    3. I guess it should be that other parts of the MCU firmware affect the receiving function of uart0.

    I suppose you have probably tried removing the calls to Board_init() in rti_app_dwwd_v1.c? I'll experiment with that on my end as soon as my initial RTOS build is done and report back tomorrow.

    Regards, Andreas

  • Hi user5772774,

    quick update here. After rebuilding the RTOS SDK which took about 7 hours am RTI WDT test application was created with the same name like the one that comes with the Processor SDK Linux. The build output was located here:

    adannenb@beast:/opt/ti-processor-sdk-rtos-am65xx-evm-06.01.00.08
    $ find . -name csl_rti_dwwd_test_app_mcu1_0_release.xer5f
    ./pdk_am65xx_1_0_6/packages/ti/binary/csl_rti_dwwd_test_app/bin/am65xx_evm/csl_rti_dwwd_test_app_mcu1_0_release.xer5f

    Plugging this file into the AM654 EVM filesystem as image am65x-mcu-r5f0_0-fw the MCU_UART0 keeps working as expected, both for RX and TX using simple commands:

     _____                    _____           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_ 
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            
    
    Arago Project http://arago-project.org am65xx-evm ttyS2
    
    Arago 2019.05 am65xx-evm ttyS2
    
    am65xx-evm login: root
    root@am65xx-evm:~# stty -F /dev/ttyS1 -ixon -crtscts 115200
    root@am65xx-evm:~# cat /dev/ttyS1
    hhahaha
    heehehhe
    ^C
    root@am65xx-evm:~# echo test22222 > /dev/ttyS1
    root@am65xx-evm:~# echo test11111 > /dev/ttyS1
    root@am65xx-evm:~# echo test33333 > /dev/ttyS1
    root@am65xx-evm:~# dmesg | grep remoteproc0
    [    6.832656] remoteproc remoteproc0: 41000000.r5f is available
    [    6.935169] remoteproc remoteproc0: powering up 41000000.r5f
    [    6.941121] remoteproc remoteproc0: Booting fw image am65x-mcu-r5f0_0-fw, size 510784

    The filesize matches the file I built from the RTOS SDK. However no debug prints are generated like with the original firmware such as "CSL RTI APP: RTI App WDT timeout interrupt configured". From looking at the source code something should have gotten printed which it did not which made me think something is broken with this new firmware. Sure enough, double-checking with the JTAG debugger shows that the firmware has crashed (no JTAG access at all). Whereas with the original FW image located at /lib/firmware/rti_dwwdtest/am65xx_evm/csl_rti_dwwd_test_app_mcu1_0_release.xer5f those debug prints are emitted as reported earlier, AND there is no issue accessing this firmware.

    Also running the 'watchdog' demo now results in a CPU exception. So clearly something is fundamentally broken here with the firmware I built.

     _____                    _____           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_ 
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            
    
    Arago Project http://arago-project.org am65xx-evm ttyS2
    
    Arago 2019.05 am65xx-evm ttyS2
    
    am65xx-evm login: root
    root@am65xx-evm:~# watchdog
    [   40.890631] SError Interrupt on CPU3, code 0xbf000000 -- SError
    [   40.890637] CPU: 3 PID: 1034 Comm: watchdog Tainted: G           O      4.19.38-g4dae378bbe #1
    [   40.890639] Hardware name: Texas Instruments AM654 Base Board (DT)
    [   40.890642] pstate: 80000005 (Nzcv daif -PAN -UAO)
    [   40.890644] pc : vprintk_func+0x20/0x1c0
    [   40.890646] lr : printk+0x60/0x80
    [   40.890648] sp : ffff000011e4f940
    [   40.890650] x29: ffff000011e4f940 x28: ffff000011e4fd20 
    [   40.890656] x27: 0000000000000002 x26: 0000000000000000 
    [   40.890661] x25: 0000000000000000 x24: ffff800841339310 
    [   40.890666] x23: ffff800845371600 x22: ffff000008ab4700 
    [   40.890671] x21: ffff800840533578 x20: ffff000011e4f9d0 
    [   40.890676] x19: ffff000008c13648 x18: 0000000000000000 
    [   40.890681] x17: 0000000000000000 x16: ffff8008459d0000 
    [   40.890686] x15: 0000000000000000 x14: 0000000000000000 
    [   40.890690] x13: 0000000000000000 x12: 0000000000000000 
    [   40.890695] x11: fefefefefefefeff x10: ffff000011e4fa60 
    [   40.890701] x9 : 00000000ffffffc8 x8 : ffff000011e4fa20 
    [   40.890707] x7 : 0000000000000000 x6 : 0000002c3a674b3f 
    [   40.890712] x5 : 00ffffffffffffff x4 : 00000000ffff02ce 
    [   40.890716] x3 : 0000000000000000 x2 : ffff8008459d0000 
    [   40.890721] x1 : ffff000011e4f9d0 x0 : ffff000008ab4700 
    [   40.890727] Kernel panic - not syncing: Asynchronous SError Interrupt
    [   40.890731] CPU: 3 PID: 1034 Comm: watchdog Tainted: G           O      4.19.38-g4dae378bbe #1
    [   40.890735] Hardware name: Texas Instruments AM654 Base Board (DT)
    [   40.890737] Call trace:
    [   40.890739]  dump_backtrace+0x0/0x158
    [   40.890740]  show_stack+0x14/0x20
    [   40.890742]  dump_stack+0x90/0xb4
    [   40.890744]  panic+0x120/0x27c
    [   40.890746]  nmi_panic+0x6c/0x70
    [   40.890748]  arm64_serror_panic+0x74/0x80
    [   40.890750]  is_valid_bugaddr+0x0/0x8
    [   40.890751]  el1_error+0x7c/0xdc
    [   40.890753]  vprintk_func+0x20/0x1c0
    [   40.890756]  printk+0x60/0x80
    [   40.890758]  keystone_wdt_start+0x60/0xc0
    [   40.890760]  watchdog_start+0xec/0x150
    [   40.890762]  watchdog_open+0xdc/0x138
    [   40.890764]  misc_open+0x11c/0x1b0
    [   40.890766]  chrdev_open+0xa4/0x1a0
    [   40.890768]  do_dentry_open+0x110/0x340
    [   40.890770]  vfs_open+0x28/0x30
    [   40.890772]  path_openat+0x268/0x1000
    [   40.890774]  do_filp_open+0x78/0xf0
    [   40.890776]  do_sys_open+0x170/0x210
    [   40.890778]  __arm64_sys_openat+0x20/0x28
    [   40.890780]  el0_svc_common+0x84/0xf0
    [   40.890782]  el0_svc_handler+0x2c/0x80
    [   40.890784]  el0_svc+0x8/0xc
    [   40.890859] SMP: stopping secondary CPUs
    [   40.890861] Kernel Offset: disabled
    [   40.890863] CPU features: 0x0,2080200c
    [   40.890865] Memory Limit: none
    [   41.127990] ---[ end Kernel panic - not syncing: Asynchronous SError Interrupt ]---
    

    I need to go back to the team that developed this firmware to see what is missing here. We might not have the right file, or may not be using it correctly. Or there might be an issue with the file itself. Also in case you were able to successfully build and use that firmware (as evident from debug prints on MCU_UART0) please do let me know.

    Regards, Andreas

  • Hi user5772774,

    ok so I figured it out and was able to create and run a version of the csl_rti_dwwd_test_app_mcu1_0_release.xer5f firmware that leaves the MCU_UART0 alone (so you can still fully use it from Linux) and still does its intended functionality (WDT reset after timeout).

    There were several obstacles to overcome here, so let's step through those one by one.

    First, the csl_rti_dwwd_test_app project's linker command file needs to be updated to make it compatible with the Linux rproc FW loader:

    adannenb@beast:/opt/ti-processor-sdk-rtos-am65xx-evm-06.01.00.08/pdk_am65xx_1_0_6/packages/ti/csl/example/rti/rti_dwwdtest_app
    $ diff am65xx/linker_mcu1_0.lds.bak am65xx/linker_mcu1_0.lds
    63c63
    <     DDR0    (RWIX)  		: origin=0xA0100000 length=0xF00000    	             /* Reserve Memory for R5F */
    ---
    >     DDR0    (RWIX)  		: origin=0x9c100000 length=0x100000          /* Reserve Memory for R5F */

    Then, all references to the UART in the application code code need to be removed/neutralized, like this:

    adannenb@beast:/opt/ti-processor-sdk-rtos-am65xx-evm-06.01.00.08/pdk_am65xx_1_0_6/packages/ti/csl/example/rti/rti_dwwdtest_app
    $ diff -U 5 rti_app_dwwd_v1.c.bak rti_app_dwwd_v1.c
    --- rti_app_dwwd_v1.c.bak	2019-10-30 15:12:41.083926611 -0500
    +++ rti_app_dwwd_v1.c	2019-10-30 15:13:22.648634183 -0500
    @@ -163,11 +163,12 @@
     int main(void)
     {
     #ifdef WDT_RESET
         Board_initCfg   boardCfg;
     
    -    boardCfg = BOARD_INIT_UART_STDIO;
    +    /* AD: Removed UART-based STDIO init, while keeping the remainder of the functionality of init */
    +    boardCfg = 0 /* BOARD_INIT_UART_STDIO */;
         Board_init(boardCfg);
     
         /* Register Interrupt */
         isrFlag = 0U;
         RTIInterruptConfig(APP_RTI_MODULE);
    @@ -232,10 +233,12 @@
     /* ========================================================================== */
     /*                 Internal Function Definitions                              */
     /* ========================================================================== */
     static void RTIAppUtilsPrint (const char *pcString, ...)
     {
    +	/* AD: We disabled BOARD_INIT_UART_STDIO, hence neutralize all UART activity */
    +#if 0
         static char printBuffer[2000U];
         va_list arguments;
     
         /* Start the varargs processing. */
         va_start(arguments, pcString);
    @@ -244,11 +247,11 @@
         printf(printBuffer);
         UART_printf(printBuffer);
     
         /* End the varargs processing. */
         va_end(arguments);
    -
    +#endif
         return;
     }
     
     #ifndef WDT_RESET
     static void RTISetClockSource(uint32_t rtiModuleSelect,

    Next, we need to add a compiler #pragma to prevent an important resource table from getting optimized away, which would render the code not operational on Linux. This resource table was previously referenced by the debug prints we removed, this way keeping it in (it should not rely on such an implicit mechanism, we'll get this fixed).

    adannenb@beast:/opt/ti-processor-sdk-rtos-am65xx-evm-06.01.00.08/pdk_am65xx_1_0_6/packages/ti/csl/example/rti/rti_dwwdtest_app
    $ diff -U 5 rsc_table_basic.h.bak rsc_table_basic.h
    --- rsc_table_basic.h.bak	2019-10-30 15:15:35.426894485 -0500
    +++ rsc_table_basic.h	2019-10-30 14:25:29.567769303 -0500
    @@ -53,10 +53,13 @@
     };
     
     #pragma DATA_SECTION(ti_basic_ResourceTable, ".resource_table")
     #pragma DATA_ALIGN(ti_basic_ResourceTable, 4096)
     
    +/* AD: Added pragma to retain resource table - otherwise firmware will crash */
    +#pragma RETAIN(ti_basic_ResourceTable)
    +
     const struct my_resource_table ti_basic_ResourceTable = {
         {
             1, /* we're the first version that implements this */
     
             0,

    Finally, we are ready to build the code:

    adannenb@beast:/opt/ti-processor-sdk-rtos-am65xx-evm-06.01.00.08/pdk_am65xx_1_0_6/packages/ti/csl/example/rti/rti_dwwdtest_app
    $ source /opt/ti-processor-sdk-rtos-am65xx-evm-06.01.00.08/processor_sdk_rtos_am65xx_6_01_00_08/setupenv.sh 
    **************************************************************************
    Environment Configuration:
    **************************************************************************
        SDK_INSTALL_PATH        : /opt/ti-processor-sdk-rtos-am65xx-evm-06.01.00.08
        GMAKE_INSTALL_PATH      : 
        RULES_MAKE              : /opt/ti-processor-sdk-rtos-am65xx-evm-06.01.00.08/pdk_am65xx_1_0_6/packages/Rules.make
    **************************************************************************
    IPC_PLATFORM: AM65XX
    IPC_ALT_PLATFORM:
        PROC_SDK_INSTALL_PATH     : /opt/ti-processor-sdk-rtos-am65xx-evm-06.01.00.08/processor_sdk_rtos_am65xx_6_01_00_08
    
    PROCESSOR SDK BUILD ENVIRONMENT CONFIGURED
    *******************************************************************************
    adannenb@beast:/opt/ti-processor-sdk-rtos-am65xx-evm-06.01.00.08/pdk_am65xx_1_0_6/packages/ti/csl/example/rti/rti_dwwdtest_app
    $ make SOC=am65xx BOARD=am65xx_evm WDT_RESET=enable DEST_ROOT=.
    make  csl csl_utils_common csl_uart_console csl_init osal_nonos board uart sciclient  
    
    <...snip...>
    
    #
    # csl_rti_dwwd_test_app/bin/am65xx_evm/csl_rti_dwwd_test_app_mcu1_0_release.xer5f created.
    #
    make[1]: Leaving directory '/opt/ti-processor-sdk-rtos-am65xx-evm-06.01.00.08/pdk_am65xx_1_0_6/packages/ti/csl/example/rti/rti_dwwdtest_app'

    Then you move the newly-created ELF file over to your EVM using whichever method and boot media you prefer, and establish the proper symlink under /lib/firmware on the EVM.

    adannenb@beast:/opt/ti-processor-sdk-rtos-am65xx-evm-06.01.00.08/pdk_am65xx_1_0_6/packages/ti/csl/example/rti/rti_dwwdtest_app
    $ scp csl_rti_dwwd_test_app/bin/am65xx_evm/csl_rti_dwwd_test_app_mcu1_0_release.xer5f root@10.0.1.176:/lib/firmware/rti_dwwdtest/am65xx_evm/csl_rti_dwwd_test_app_mcu1_0_release-new.xer5f

    Then, after booting the EVM, you can see the remotecore0 got loaded successfully. The below also shows how UART is still working in both directions. I then follow the steps to force a watchdog-timeout as per the user instructions you referred to in your initial post, to demonstrate that this firmware is still working as evident from the reset that was triggered:

     _____                    _____           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_ 
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            
    
    Arago Project http://arago-project.org am65xx-evm ttyS2
    
    Arago 2019.05 am65xx-evm ttyS2
    
    am65xx-evm login: root
    root@am65xx-evm:~# 
    root@am65xx-evm:~# dmesg | grep remoteproc0
    [    6.563499] remoteproc remoteproc0: 41000000.r5f is available
    [    6.623499] remoteproc remoteproc0: powering up 41000000.r5f
    [    6.629473] remoteproc remoteproc0: Booting fw image am65x-mcu-r5f0_0-fw, size 297056
    [    6.649995] remoteproc remoteproc0: remote processor 41000000.r5f is now up
    root@am65xx-evm:~# stty -F /dev/ttyS1 -ixon -crtscts 115200
    root@am65xx-evm:~# echo test22222333 > /dev/ttyS1
    root@am65xx-evm:~# cat /dev/ttyS1
    hhahahahafa
    
    hehehe
    
    ^C
    root@am65xx-evm:~# watchdog
    [  107.670771] keystone_wdt_start: freq=32000, margin=ea, jiff=4294919173
    root@am65xx-evm:~# pkill watchdog
    [  113.381315] watchdog: watchdog0: nowayout prevents watchdog being stopped!
    [  113.388214] watchdog: watchdog0: watchdog did not stop!
    root@am65xx-evm:~# 
    U-Boot SPL 2019.01-g8b90adfb16 (Jul 07 2019 - 05:46:46 +0000)
    SYSFW ABI: 2.6 (firmware rev 0x0013 '19.4.1-v2019.04a (Curious Crow)')
    Trying to boot from MMC2
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.1(release):ti2019.01-rc2
    NOTICE:  BL31: Built : 04:28:26, Jul  7 2019
    I/TC: 
    I/TC: OP-TEE version: 3.2.0-583-g251f7c6-dev #1 Sun Jul  7 04:40:43 UTC 2019 aarch64
    I/TC: Initialized
    
    <snip>

    This should give you a starting point for your own work/customization I hope. In the meantime I'll go back and see how we can improve the experience on our end for someone doing such type of integration work. Please let us know if something else is needed to get you going here; if the issue is not directly related preferably by opening a new thread.

    Thanks and Regards,
    Andreas

  • Hello,

    Thank you for your patience and detailed explanation. We only use mcu firmware as a black box in Linux. We don't have an environment to build MCU firmware. could you give me the firmware you built? Or we wait until the SDK of the issue is fixed and then use the firmware inside. thanks

  • Hi user5772774,

    user5772774 said:
    e only use mcu firmware as a black box in Linux. We don't have an environment to build MCU firmware.

    If you download the TI Processor SDK RTOS (http://software-dl.ti.com/processor-sdk-rtos/esd/AM65X/latest/index_FDS.html), install it, make the changes I suggested and follow the build instruction in my example you should be able to build this binary without much trouble. The SDK comes will all tooling (scripts, compilers, etc.) needed to build the example from source.

    user5772774 said:
    could you give me the firmware you built?

    Just for reference, attached a tarball containing all my modifications and the binary (ELF) file generated from it. I just re-tested it to make sure it doesn't impact UART functionality, and that watchdog functionality still works. You could compare this archive against the contents of the RTOS SDK to see the changes made. I do not recommend you use the file I built in a production environment directly but rather that you build your own from scratch. This will also help you to get setup to perform any maintenance and other changes you may want down the road.

    user5772774 said:
    Or we wait until the SDK of the issue is fixed and then use the firmware inside.

    What is provided as part of the Linux SDK today is meant to be an example, and as such it has debug prints enabled to allow someone to follow code execution. What you want is that example without debug prints, which is something you as customer would typically have to build yourself for your specific use case/product. So I don't think we will be able to customize the official example (binary file) like this. However I did file some internal bugs against the RTOS SDK to address issues I found (as discussed in earlier posts) trying to build the example into something compatible with the Linux SDK to make this process easier, and I expect us to address those over time.

    Regards, Andreas

    pdk_am65xx_1_0_6_rti_dwwdtest_app_updated.tar.gz

  • One more thing. The steps I provided previously as well as the contents of pdk_am65xx_1_0_6_rti_dwwdtest_app_updated.tar.gz is for compatibility with the Linux SDK v06.00.00.07 as per your initial post. If you use newer versions of the Linux SDK (like v06.01.00.08) you must not make the change to the linker command file I did. The reason is that most recent Linux SDK allocates DDR for the R5FSS0_CORE1 in the 0xaxxxxxxxx address range (see Linux's k3-am654-base-board.dts), just like the most recent RTOS example code needs. Previous versions of the Linux SDK allocated the remote core DDR in the 0x9xxxxxxx range which requires the linker modification I made to re-establish compatibility.

    So back to my point earlier, the best will be if you set yourself up to build that code so that you have full control over it.

    Regards, Andreas

  • Hello,

    Ok, Thanks, I will try to build a bin file that meets my needs.

  • Hello,

    I think you'd better fix this MCU firmware issue in your released SDK, because our software needs to synchronize catchup to the latest version you released every time. For example, the MCU firmware compiled by us on SDK6.0 can't be Used on SDK6.1, so we have to re-edit the MCU firmware every time, then compile.

  • Hi user5772774,

    understood about your concern. Actually the expectation is that Linux SDK and RTOS SDK need to be on the same major/minor version to be compatible from a shared resource point of view. I do realize that this specific fact is not obvious from our current public documentation but I already submitted feedback internally to have this clarified. Personally I would prefer us to just release a single combined SDK for both Linux and RTOS (if someone doesn't want to use a part of it then they don't have to) as multi-core and multi-OS development is becoming increasingly more common especially with the new platforms we are introducing. I'm advocating for this internally but this not something solely under my control, and there are possible other avenues to ensure better consistency between the two worlds. But please do know this general topic is on our radar screen.

    This being said I'd think we are now past compatibility-breaking memory map changes so I would not expect the hiccup we encountered when mix-matching 6.0 and 6.1 SDKs to repeat itself anytime soon.

    Regards, Andreas