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.

AM2432: uart_bootloader.py failed to load *.appimage

Part Number: AM2432
Other Parts Discussed in Thread: AM2434, , AM2431

Used SDK's uart_bootloader.py from TI's SDK to load appimage through UART to RAM, but it always failed as below:  py uart_bootloader.py -p COM14 -b sbl_prebuilt/am243x-evm/sbl_uart.debug.tiimage -f ~/git/ti_rot41_prod/ti/firmware/projects/app_test_am243/Debug/app_test_am243.appimage  any help is appreciated. 

$ py uart_bootloader.py -p COM14 -b sbl_prebuilt/am243x-evm/sbl_uart.debug.tiimage -f ~/git/ti_rot41_prod/ti/firmware/projects/app_test_am243/Debug/app_test_am243.appimage
Sending the UART bootloader sbl_prebuilt/am243x-evm/sbl_uart.debug.tiimage ...
Sending sbl_prebuilt/am243x-evm/sbl_uart.debug.tiimage: 0%| | 0/290973 [00:00<?, ?Sending sbl_prebuilt/am243x-evm/sbl_uart.debug.tiimage: 0%| | 1029/290973 [00:02<1Sending sbl_prebuilt/am243x-evm/sbl_uart.debug.tiimage: 0%| | 1029/290973 [00:02<1
..........................................

Sending sbl_prebuilt/am243x-evm/sbl_uart.debug.tiimage: 100%|#########9| 290178/290973 [00:29Sending sbl_prebuilt/am243x-evm/sbl_uart.debug.tiimage: 291207bytes [00:29, 10719.20bytes/s] Sent bootloader sbl_prebuilt/am243x-evm/sbl_uart.debug.tiimage of size 290973 bytes in 29.75s.

Sending the application C:/Users/Hong/git/ti_rot41_prod/ti/firmware/projects/app_test_am243/Debug/app_test_am243.appimage ...
..........................................

Sending C:/Users/Hong/git/ti_rot41_prod/ti/firmware/projects/app_test_am243/Debug/app_test_am243.appimage: 97%|#########6| 116277/120064 [00:11<00:00, 10718.45byteSending C:/Users/Hong/git/ti_rot41_prod/ti/firmware/projects/app_test_am243/Debug/app_test_am243.appimage: 97%|#########6| 116277/120064 [00:11<00:00, 10718.45byteSending C:/Users/Hong/git/ti_rot41_prod/ti/firmware/projects/app_test_am243/Debug/app_test_am243.appimage: 98%|#########7| 117306/120064 [00:11<00:00, 10718.45byteSending C:/Users/Hong/git/ti_rot41_prod/ti/firmware/projects/app_test_am243/Debug/app_test_am243.appimage: 99%|#########8| 118335/120064 [00:11<00:00, 10717.83byteSending C:/Users/Hong/git/ti_rot41_prod/ti/firmware/projects/app_test_am243/Debug/app_test_am243.appimage: 99%|#########8| 118335/120064 [00:11<00:00, 10717.83byteSending C:/Users/Hong/git/ti_rot41_prod/ti/firmware/projects/app_test_am243/Debug/app_test_am243.appimage: 99%|#########9| 119364/120064 [00:11<00:00, 10717.83byteSending C:/Users/Hong/git/ti_rot41_prod/ti/firmware/projects/app_test_am243/Debug/app_test_am243.appimage: 120393bytes [00:11, 10717.11bytes/s] Sent application C:/Users/Hong/git/ti_rot41_prod/ti/firmware/projects/app_test_am243/Debug/app_test_am243.appimage of size 120064 bytes in 13.12s.
[STATUS] ERROR: Application load FAILED !!!

  • Alternatively, I could load sbl_uart.debug.tiimage through UART first, and then used JTAG to debug app_test_am243.appimage without any issues. 

  • Note the exact same script py uart_bootloader.py -p COM14 -b sbl_prebuilt/am243x-evm/sbl_uart.debug.tiimage -f ~/git/ti_rot41_prod/ti/firmware/projects/app_test_am243/Debug/app_test_am243.appimage worked on AM2434 EVM board, but failed here for AM2432.  

  • Hi ,

    The app_test_am243.appimage you have created, how many CPUs images does it have ? Is it a single CPU image which is giving you a problem ?

    Best Regards,
    Aakash

  • Hello Aakash, 


     app_test_am243.appimage uses only single CPU. We can use JTAG to download the same image's *.out file to the board and run well, but the UART boot as above using uart_loader.py always failed.

    Thanks,

    Hong

  • Further debug on this issue. Stepped back on sbl_null_am243x-evm_r5fss0-0_nortos_ti-arm-clang project by commenting out the initialization for core 3 and core 4.  It always failed for r5f0-1's init, which is supported to work for our am2432 part. The same code is used on sbl_uart. This needs to be resolved.  

    Starting NULL Bootloader ...
    DMSC Firmware Version 22.1.1--v2022.01 (Terrific Llam
    DMSC Firmware revision 0x16
    DMSC ABI revision 3.1
    INFO: Bootloader_runCpu:151: CPU m4f0-0 is initialized to 400000000 Hz !!!
    INFO: Bootloader_loadSelfCpu:203: CPU r5f0-0 is initialized to 800000000 Hz !!!
    ERROR: Bootloader_socCpuSetEntryPoint:830: CPU set config failed for r5f0-1
    Some tests have failed!!
  • Hi ,

    SBL_NULL is suppose to work with all CPUs without check. Hence, it will load all the CPU's in WFI. This is a good catch, that you should not need to comment the other CPU's manually.

    r5f0-1 CPU initialization should have worked, which is one issue. For this I need to replicate the same on my setup.

    Can you share your *.appimage ? Also, sbl_uart takes the decision of initializing the CPUs based on *.appimage data. This should not have been a problem.
    I am interested in checking out the *.appimage content which might not be okay here.
    Best Regards,
    Aakash
  • Hello Aakash,

    Thanks a lot for your reply. Note what we have is AM2432, which only has two cores. That is why I commented out core 3 and core 4's initialization.  

    The same *.appimage could be loaded successfully using uart_loader.py on an AM2434 EVM board, but it only failed on our AM2432 product board. The issue occurred on any *.appimage like gpio_led_blink_am243x-evm_r5fss0-0_nortos_ti-arm-clang.appimage. 

    Thanks,

    Hong 

  • Sending C:/Users/Hong/workspace_v12/gpio_led_blink_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_led_blink_am243x-evm_r5fss0-0_nortos_ti-arm-clang.appimage: 39103bytesSending C:/Users/Hong/workspace_v12/gpio_led_blink_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_led_blink_am243x-evm_r5fss0-0_nortos_ti-arm-clang.appimage: 39104bytesSending C:/Users/Hong/workspace_v12/gpio_led_blink_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_led_blink_am243x-evm_r5fss0-0_nortos_ti-arm-clang.appimage: 39105bytesSending C:/Users/Hong/workspace_v12/gpio_led_blink_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_led_blink_am243x-evm_r5fss0-0_nortos_ti-arm-clang.appimage: 39106bytes Sent application C:/Users/Hong/workspace_v12/gpio_led_blink_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_led_blink_am243x-evm_r5fss0-0_nortos_ti-arm-clang.appimage of size 38472 bytes in 5.47s.
    [STATUS] ERROR: Application load FAILED !!!

  • Hi Hong,

    Have you installed the latest CCS update that includes support for AM2432/AM2431 part numbers? it was rolled out last Friday

    regards,

    Michael

  • Hello Michael,

    Could you please kindly share the link for the update? I tried to install it from CCS, but it kept reporting "This repository is currently not available.".

    On the other hand, the above issue I reported is for the SDK package. It seems the AM243X SDK package by default supports AM2434 part, but it doesn't work well for AM2432 part, see the above error I reported and also copied one error message below. Do you in case know when TI would release SDK package that supports our AM2431/AM2432 part? 

    ERROR: Bootloader_socCpuSetEntryPoint:830: CPU set config failed for r5f0-1
    Some tests have failed!!

    Thanks,

    Hong 

  • Hi Hong,

    CCS manages its own updates using Eclipse update framework. You can find user guide here: https://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_updates.html

    In general, all you need to do is proceed with installing updates when message pops up upon CCS start (default configuration). As of last Friday SitaraMCU device update component would show up in the list of available updates. If you already proceeded with the update installation you will see AM2432/1 devices appear in the list of available targets in the Target Configuration dialog (provided you have completed the installation and restarted the CCS). 

    The error message "This repository is currently not available." may refer to some other repository present in the update sites list that is no longer active. Please refer to the UG above for managing the repository list.

    Regarding SDK support for the single/dual core variants: looks like you are right, all the examples are provided for the quad-core that is present on the EVMs but there is no clear guidance yet how to change it for single/dual. I am not 100% sure that this is the reason for the failure reported by SBL in your case though, I will let Aakash comment here.

    thanks

    Michael

  • Hello Michael,

    My ccs doesn't show any updates that are found, and it doesn't have AM2432/1 devices appear in the list of available targets in the Target Configuration either. 

    Thanks,

    Hong

  • Hi Hong,

    Please open the Available SW sites dialog as described in UG: https://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_updates.html#managing-update-sites

    On the right-hand side there is an option "Import" - please try importing the bookmarks file I attached below. I exported it from my CCS where the update worked.

    <?xml version="1.0" encoding="UTF-8"?>
    <bookmarks>
       <site url="http://software-dl.ti.com/dsps/dsps_public_sw/sdo_ccstudio/gcc/Updates/win32" selected="true" name="&quot;ARM GCC Updates&quot;"/>
       <site url="http://software-dl.ti.com/ccs/esd/msp430/" selected="true" name="&quot;GCC For MSP430&quot;"/>
       <site url="http://software-dl.ti.com/ccs/esd/gcc_arm/9.2.1/" selected="true" name="ARM GCC Compiler Tools"/>
       <site url="https://www.blackhawk-dsp.com/updates/ccsv9" selected="true" name="Blackhawk CCSv10 Emulation Update"/>
       <site url="https://software-dl.ti.com/ccs/esd/CCSv12/Updates" selected="true" name="Code Composer Studio v12 Updates"/>
       <site url="http://software-dl.ti.com/dsps/dsps_public_sw/sdo_ccstudio/codegen/Updates/p2linux/" selected="true" name="Code Generation Tools Updates"/>
       <site url="http://software-dl.ti.com/dsps/dsps_public_sw/sdo_ccstudio/codegen/Updates/p2mac/" selected="true" name="Code Generation Tools Updates"/>
       <site url="http://software-dl.ti.com/dsps/dsps_public_sw/sdo_ccstudio/codegen/Updates/p2win32/" selected="true" name="Code Generation Tools Updates"/>
       <site url="https://software-dl.ti.com/dsps/dsps_public_sw/sdo_ccstudio/codegen/Updates/p2win32" selected="true" name="Code Generation Tools Updates"/>
       <site url="https://software-dl.ti.com/ccs/non-esd/dvt/ccs6.0" selected="true" name="DVT Updates"/>
       <site url="http://software-dl.ti.com/ccs/non-esd/eclipse_ide/v11.0/all_extras_repo/" selected="true" name="Eclipse_CDT"/>
       <site url="http://software-dl.ti.com/dsps/dsps_public_sw/sdo_ccstudio/CCSv5/Updates/" selected="true" name="Exported Repository"/>
       <site url="file:/C:/ti/ccs1200/ccs/eclipse/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.cpp.profile" selected="true" name="file:/C:/ti/ccs1200/ccs/eclipse/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.cpp.profile"/>
    </bookmarks>
    

    regards

    Michael

  • Hello Michael,

    Thanks for sharing the updating links. After automatically updating finished, I still don't see AM2432 in the list of Target Configuration. Does AM2432 appear on your side? 


    Thanks,

    Hong 

  • Hi Hong,

    yes, it does appear on my side:

    Can you manually go to Help->Check for updates? and then restart the CCS after the checks/installation is complete?

    thanks

    Michael

  • Hi ,

    We are trying to replicate the issue on our end. This is taking longer time than expected due to holidays. Please expect some delay in response.

    We will try to get back to you on this by 5th Jan 2023.

    Best Regards,
    Aakash

  • Hello Aakash,

    Thank you very much for your help,

    Hong 

  • Hello Michael,

    My ccs finally updated successfully, and now I am able to see AM2431_ALV/AM2432_ALV configuration.  Thanks a lot for your help,

    Hong

  • Hi Hong,

    Please migrate to MCU_PLUS_SDK 08.05 release as this is the official release which caters boot facility for devices with lesser number of R5F cores.

    Although the feature is working for SBL_NULL on AM2432 (which was mentioned as not working earlier), there are problems with SBL_UART and SBL_OSPI.

    This is the fix for the same -

    I have tested the same with the following fix and also raised an internal ticket for the same.

    Apologies for the inconvinience.

    Best Regards,
    Aakash

  • Hello Aakash,

    Thanks a lot for your help.  After switching to SDK 08_05 release, the failure is still there for me on AM2432.  Did you in case run the same test on AM2432 and passed? 

    Hong@honzhzha-97VT0T3 MINGW64 /c/ti/mcu_plus_sdk_am243x_08_05_00_24/tools/boot
    $ py uart_bootloader.py -p COM14 -b sbl_prebuilt/am243x-evm/sbl_uart.debug.tiimage -f C:/Users/Hong/workspace_v12/gpio_led_blink_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_led_blink_am243x-evm_r5fss0-0_nortos_ti-arm-clang.appimage
    .......
    Sending C:/Users/Hong/workspace_v12/gpio_led_blink_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_led_blink_am243x-evm_r5 Sent application C:/Users/Hong/workspace_v12/gpio_led_blink_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_led_blink_am243x-evm_r5fss0-0_nortos_ti-arm-clang.appimage of size 38472 bytes in 5.44s.
    [STATUS] ERROR: Application load FAILED !!!

  • Hi ,

    The above fix was mentioned for 08.05 itself. The issue was seen in 08.05 only. 08.04 release officially did not cater the support of AM2432 and AM2431 devices. Hence, the request was to migrate to the latest versions.

    Also, the sbl_null is expected to be fully functional on this version of the release which contrasts to your previous observation.

    Best Regards,
    Aakash

  • Hello Aakash,

    I don't understand what is the bug you pointed it out, since 8.05's sbl_uart example is exactly the same as you posted above. 

    And it still failed on my AM2432 board for the same error message.


    Thanks,

    Hong 

  • Hi ,

    Let me attach a patch for the fix. This will help you fix the issue faster. In the mean time, did you try SBL NULL on 08.05 ? Is the issue reproducible ?

    Best Regards,
    Aakash

  • Hi ,

    Please find the attached pacth file for sbl_ospi and sbl_uart.

    /cfs-file/__key/communityserver-discussions-components-files/908/oracle_5F00_am2432_5F00_patch.diff

    Hope this resolves your issue.

    Best Regards,
    Aakash

  • Hello Aakash,

    Thanks a lot for your help, this did fix some of the issues. But there is no issues occurred. I noticed that after merging in your fix, it is able to boot the *.appimage, but the serial output print is garbage.  To dig further, I notice that the *.app image uses Clock Freq of 96000000 in CONFIG_UART_CONSOLE (example.syscfg) file.  This caused the UART output garbage information. Could you please help to explain why this Clock Freq setting has to be the same between sbl_uart and *.appimage?  The UART was initialized again in the hello world example, I don't understand why it would not function well with this difference. 


    py uart_bootloader.py -p COM14 -b C:/Users/Hong/workspace_v12/sbl_uart_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_uart_am243x-evm_r5fss0-0_nortos_ti-arm-clang.tiimage -f C:/Users/Hong/workspace_v12/hello_world_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/hello_world_am243x-evm_r5fss0-0_nortos_ti-arm-clang.appimage
    ......................
    Sent application C:/Users/Hong/workspace_v12/hello_world_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/hello_world_am243x-evm_r5fss0-0_nortos_ti-arm-clang.appimage of size 38520 bytes in 7.02s.
    [STATUS] Application load SUCCESS !!!
    Connect to UART in 5 seconds to see logs from UART !!!


  • Hi ,

    Are you implying that your hello_world_am243x-evm example works perfectly (with prints etc) if you use it via CCS load but the issue is seen only with SBL_UART/SBL_NULL ?

    Best Regards,
    Aakash

  • Hi Hong,

    The OOB configuration for UART is like this -

    Can you check with these configurations ?

    Best Regards,
    Aakash

  • Hello Aakash,

    For hello_world_am243x-evm project, if setting Clock Freq to be 96MHz as below. It worked well when using JTAG scripting console to initialize SoC (js:> loadJSFile "C:\ti\mcu_plus_sdk_am243x_08_03_00_18\tools\ccs_load\am243x\load_dmsc.js"), then use JTAG to debug this project. However, if using sbl_uart project to load this hello world via UART, this failed due to the Clock Freq differences between sbl_uart project and this project. My question is since the UART is re-initialized in this helloworld project, why did this fail? 

    Hong 

  • Hi ,

    This issue looks non-understandable to me.

    Can you try to keep the same frequency in both sbl_uart as well as hello_world_application ?

    Also, if this is not an intended fix, let's schedule a call for this issue. Please send me an invite at a-kedia@ti.com and do invite  for the same.

    Best Regards,
    Aakash

  • Hi ,

    I rechecked the hello_world example with your settings in dev-boot mode and CCS load.

    I see the correct print on the CCS terminal but not on the Serial Terminal.

    Are you sure about your observations ?

    Best Regards,
    Aakash

  • Hello Aakash,

    The right side's Serial Terminal did have output but at Baud rate of 230400. If you change the baud rate to 230400, you should see the print of "Hello World!". Will talk to you shortly over the zoom meeting. 


    Hong

  • Hello Aakash,

    Thank you very much for the meeting, which helped me to understand the issue. 

    To summarize, the hello_world project only calculates the divisor based on the "Clock Frequency" value, but the "Clock Frequency" is set by the sbl_uart, other sbl or JTAG init script. Thus, the Clock Frequency needs to be the same between sbl and our application image.  TI changed UART's Clock Frequency from 96 MHz at 08.03 SDK release to 48 MHz at 08.05 release. I used sbl_uart example from 08.05 SDK suggested by ti, and our kitchen_sink project and my hello_world project is based on 08.03, which caused double UART baud rate issue.

    Thanks again,

    Hong