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.

AM2431: AM243x EVM boot via FLASH

Part Number: AM2431
Other Parts Discussed in Thread: UNIFLASH

Hi,

I am working on a project to use the AM243x EVM with a custom OSPI SBL stored at offset 0x0 in Flash. The custom bootloader based on a state variable will load the firmware application stored at different offsets in the flash. I have validated the images and bootloader separately and everything works when I run it via CCS. 

I programmed the same images to flash via UART UNIFLASH and reset the board to OSPI BOOTMODE and I ran into an issue where the DMSC SYSFW is not starting. I connected to my SBL from CCS and saw that my SBL is forever waiting on Bootloader_socWaitForFWBoot().

So I realized, I am missing the SoC initialization/SYSFW which was done via the javascript from CCS.

I can't find documents/examples on how to build/package the DMSC SYSFW into the SBL image and make a single boot.bin image which will bootstrap the system. I will need to do the same for my custom board soon. 

  1. Is it possible to solely boot from the flash in OSPI BOOT MODE ?
  2. How do I create this boot image for both the DMSC - M3 CORE and R5 CORE-0 targets 

Thanks,

Prasanna

 

 

  • Hi Prasanna,

    I programmed the same images to flash via UART UNIFLASH and reset the board to OSPI BOOTMODE and I ran into an issue where the DMSC SYSFW is not starting. I connected to my SBL from CCS and saw that my SBL is forever waiting on Bootloader_socWaitForFWBoot().

    This issue mostly occurs when you have already flashed the SBL in OSPI and SBL OSPI had already booted and then you try to load the SBL to R5 in CCS, you have to follow some specific steps if you have to debug SBL, please refer to this FAQ:  [FAQ] AM62X/AM64X : [FAQ] Debugging SBL boot in RTOS SDK 

    So I realized, I am missing the SoC initialization/SYSFW which was done via the javascript from CCS.

    This is not needed in case you have flashed the SBL OSPI and booting in OSPI boot mode, if you don't connect to CCS and just let the board free run, do you observe the expected logs?: https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/11_01_00_17/exports/docs/api_guide_am243x/GETTING_STARTED_FLASH.html#autotoc_md63

    Is it possible to solely boot from the flash in OSPI BOOT MODE ?

    Yes

    How do I create this boot image for both the DMSC - M3 CORE and R5 CORE-0 targets 

    Please refer to this guide: https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/11_01_00_17/exports/docs/api_guide_am243x/BOOTFLOW_GUIDE.html#autotoc_md627

    You can refer to the linker file for SBL OSPI as well to understand how the final tiboot3.bin is built: https://github.com/TexasInstruments/mcupsdk-core/blob/next/examples/drivers/boot/sbl_ospi/am243x-evm/r5fss0-0_nortos/ti-arm-clang/makefile

    Best Regards,

    Meet.

  • Hi Meet,

    Thanks for your detailed response. Yes, I have already debugged my SBL using the loop_forever() method to connect to the core and run it from there. This is how I validated my SBL as well as FW App. 

    When I reset the board to OSPI BOOT and reboot, I don't see any logs on the console or a sense of the system actually booting up. I would expect to see the DMSC Firmware logs show up which I saw from CCS debugging and also my firmware application not printing any logs to the console. I am using the same USART0 instance on both my SBL and FW app. 

    I added back the loop_forever() to my SBL, flashed it to the EVM and reset the board and waited for SoC to boot and I connected to the core and saw that the SBL is stuck on waiting for Boot from SYSFW. 

    When I go back to the pre-built SBL_OSPI.hs.fs.tiimage + SDK Example Helloworld app, I see all the logs on the console.

    This is why I am wondering if the DSMC didn't start properly or my SBL blob is missing the SYSFW binary + boardcfg.

    Thanks,

    Prasanna

  • Hi Meet,

    Here is what's happening..

    - Booting from flash, no console logs, no trace of any life in the board. Use JTAG to connect to the target and when checked, the SBL is stuck at Bootloader_socWaitForFWBoot()

    - Booting from flash, use the SBL debug method to add the infinite loop to main(). Use JTAG to connect to the target and breakout of infinite loop and step through the SBL code, everything works. Console prints out all the logs. I did notice that due to the CPSW Lockup issue, during a COLD Reboot there is an additional check and reset the SoC again to make a warm reboot before SBL proceeds. 

    Without involving CCS, the SBL is stuck at the same point. I am wondering why there is a difference. 

  • Hi Prasanna,

    Thanks for the explanation, could you please share your SBL OSPI image with me.

    Best Regards,

    Meet.

  • I am trying to get this image to boot from OSPI using only the Internal SRAM of 2MB. I have disabled the external DDR on the EVM.

    Here is how I partitioned my bootloader and my FW image. Everything is target to run on the R5FSS0_0 core only.

    0x70000000 to 0x70110000 - SBL

    0x70110000 to 0x70200000 - FW Application Image

    I have disabled authentication on the bootloader for my FW Application Image for now. But I have allocated extra space (0x70080000 - 0x70110000) for authenticating the image later when everything is working.

  • Hi Prasanna,

    There is a 128kB of space from 0x701E0000, that is reserved for DMSC operations, it seems like your application might be overlapping with this region, which could be causing this issue.

    Please refer to this memory map while allocating space for SBL and application: AM243x MCU+ SDK: Memory Map Layout

    Best Regards,

    Meet.

  • Hi Meet,

    I will check this out. But how is it working fine when using CCS and stepping through the code ?

    So it's impossible to boot from the internal SRAM alone then ? Is there an image size limit ? Do you have any documentation that talks about this ?

    Thanks,

    Prasanna

  • Hi Meet,

    I tested the version by stripping out the additional buffer allocated for app image authentication. It shows the same behavior. 

    I use the internal SRAM from 0x70080000 to 0x70180000 only. This is within the acceptable range of the SBL load area. 

    Thanks,

    Prasanna

  • Hi Prasanna,

    I can try to test this once at my end, could you let me know which MCU+SDK version you are using?

  • SDK release : AM243X_10_01_00_32

  • Hi Prasanna,

    I will test this once on my end, and provide an update.

    Best Regards,

    Meet.

  • Hi Meet,

    Just following up. Do you have any updates ?

  • Hi Prasanna,

    There is indeed some issue with the SBL image you shared, could you please share the command you used to create this tiimage.

  • Hi Meet,

    Thanks for the confirmation. I am using CCS to generate the image and not manually building the images from the sdk.

    My CCS Version:

    Version: 20.3.0.14__1.9.0

    Default VS Code API: 1.96.0

    Here is what I did:

    I opened up the example project - sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang.

    I updated my example.syscfg file to remove any/all references to DDR drivers or DDR address space in the MPU and re-built the SBL.

    I built my SBL image which gave me the .hs.fs image which I am testing.

    I found something interesting in this thread regarding boardcfg. i am not sure if this is missing piece: 

    e2e.ti.com/.../4944294

  • [8]**** Build of configuration 'Debug' for project 'sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang' ****
    
    [9]"C:\\ti\\ccs2011\\ccs\\utils\\bin\\gmake" -k -j 20 all -O
    
    [10]Building file: "../example.syscfg"
    [11]Invoking: SysConfig
    [12]"C:/ti/sysconfig_1.21.2/sysconfig_cli.bat" --script "C:/Users/KTMFG/workspace_ccstheia_prasanna/sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang/example.syscfg" -o "syscfg" -s "C:/ti/mcu_plus_sdk_am243x_10_01_00_32/.metadata/product.json" -p "ALV" -r "ALV" --context "r5fss0-0" --compiler ticlang
    [13]Running script...
    [14]Validating...
    [15]info: /kernel/dpl/debug_log uartLog.baudRate: Actual Baudrate Possible: 115385 (0 % error)
    [16]Generating Code (example.syscfg)...
    [17]Writing C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang\Debug\syscfg\ti_dpl_config.c...
    [18]Writing C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang\Debug\syscfg\ti_dpl_config.h...
    [19]Writing C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang\Debug\syscfg\ti_drivers_config.c...
    [20]Writing C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang\Debug\syscfg\ti_drivers_config.h...
    [21]Writing C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang\Debug\syscfg\ti_drivers_open_close.c...
    [22]Writing C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang\Debug\syscfg\ti_drivers_open_close.h...
    [23]Writing C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang\Debug\syscfg\ti_pinmux_config.c...
    [24]Writing C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang\Debug\syscfg\ti_power_clock_config.c...
    [25]Writing C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang\Debug\syscfg\ti_board_config.c...
    [26]Writing C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang\Debug\syscfg\ti_board_config.h...
    [27]Writing C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang\Debug\syscfg\ti_board_open_close.c...
    [28]Writing C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang\Debug\syscfg\ti_board_open_close.h...
    [29]Writing C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang\Debug\syscfg\ti_enet_config.c...
    [30]Writing C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang\Debug\syscfg\ti_enet_config.h...
    [31]Writing C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang\Debug\syscfg\ti_enet_open_close.c...
    [32]Writing C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang\Debug\syscfg\ti_enet_open_close.h...
    [33]Writing C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang\Debug\syscfg\ti_enet_soc.c...
    [34]Writing C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang\Debug\syscfg\ti_enet_lwipif.c...
    [35]Writing C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang\Debug\syscfg\ti_enet_lwipif.h...
    [36]Writing C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang\Debug\syscfg\linker.cmd...
    [37]Writing C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang\Debug\syscfg\linker_defines.h...
    [38]Finished building: "../example.syscfg"
    
    [39]Building file: "syscfg/ti_enet_config.c"
    [40]Invoking: Arm Compiler
    [41]"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -I"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/include/c" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source" -DSOC_AM243X -D_DEBUG_=1 -g -Wall -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -MMD -MP -MF"syscfg/ti_enet_config.d_raw" -MT"syscfg/ti_enet_config.o" -I"C:/Users/KTMFG/workspace_ccstheia_prasanna/sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/syscfg"   -o"syscfg/ti_enet_config.o" "syscfg/ti_enet_config.c"
    [42]Finished building: "syscfg/ti_enet_config.c"
    
    [43]Building file: "syscfg/ti_enet_open_close.c"
    [44]Invoking: Arm Compiler
    [45]"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -I"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/include/c" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source" -DSOC_AM243X -D_DEBUG_=1 -g -Wall -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -MMD -MP -MF"syscfg/ti_enet_open_close.d_raw" -MT"syscfg/ti_enet_open_close.o" -I"C:/Users/KTMFG/workspace_ccstheia_prasanna/sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/syscfg"   -o"syscfg/ti_enet_open_close.o" "syscfg/ti_enet_open_close.c"
    [46]Finished building: "syscfg/ti_enet_open_close.c"
    
    [47]Building file: "syscfg/ti_power_clock_config.c"
    [48]Invoking: Arm Compiler
    [49]"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -I"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/include/c" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source" -DSOC_AM243X -D_DEBUG_=1 -g -Wall -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -MMD -MP -MF"syscfg/ti_power_clock_config.d_raw" -MT"syscfg/ti_power_clock_config.o" -I"C:/Users/KTMFG/workspace_ccstheia_prasanna/sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/syscfg"   -o"syscfg/ti_power_clock_config.o" "syscfg/ti_power_clock_config.c"
    [50]Finished building: "syscfg/ti_power_clock_config.c"
    
    [51]Building file: "syscfg/ti_dpl_config.c"
    [52]Invoking: Arm Compiler
    [53]"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -I"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/include/c" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source" -DSOC_AM243X -D_DEBUG_=1 -g -Wall -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -MMD -MP -MF"syscfg/ti_dpl_config.d_raw" -MT"syscfg/ti_dpl_config.o" -I"C:/Users/KTMFG/workspace_ccstheia_prasanna/sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/syscfg"   -o"syscfg/ti_dpl_config.o" "syscfg/ti_dpl_config.c"
    [54]Finished building: "syscfg/ti_dpl_config.c"
    
    [55]Building file: "syscfg/ti_drivers_open_close.c"
    [56]Invoking: Arm Compiler
    [57]"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -I"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/include/c" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source" -DSOC_AM243X -D_DEBUG_=1 -g -Wall -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -MMD -MP -MF"syscfg/ti_drivers_open_close.d_raw" -MT"syscfg/ti_drivers_open_close.o" -I"C:/Users/KTMFG/workspace_ccstheia_prasanna/sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/syscfg"   -o"syscfg/ti_drivers_open_close.o" "syscfg/ti_drivers_open_close.c"
    [58]Finished building: "syscfg/ti_drivers_open_close.c"
    
    [59]Building file: "syscfg/ti_pinmux_config.c"
    [60]Invoking: Arm Compiler
    [61]"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -I"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/include/c" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source" -DSOC_AM243X -D_DEBUG_=1 -g -Wall -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -MMD -MP -MF"syscfg/ti_pinmux_config.d_raw" -MT"syscfg/ti_pinmux_config.o" -I"C:/Users/KTMFG/workspace_ccstheia_prasanna/sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/syscfg"   -o"syscfg/ti_pinmux_config.o" "syscfg/ti_pinmux_config.c"
    [62]Finished building: "syscfg/ti_pinmux_config.c"
    
    [63]Building file: "syscfg/ti_drivers_config.c"
    [64]Invoking: Arm Compiler
    [65]"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -I"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/include/c" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source" -DSOC_AM243X -D_DEBUG_=1 -g -Wall -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -MMD -MP -MF"syscfg/ti_drivers_config.d_raw" -MT"syscfg/ti_drivers_config.o" -I"C:/Users/KTMFG/workspace_ccstheia_prasanna/sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/syscfg"   -o"syscfg/ti_drivers_config.o" "syscfg/ti_drivers_config.c"
    [66]Finished building: "syscfg/ti_drivers_config.c"
    
    [67]Building file: "syscfg/ti_board_config.c"
    [68]Invoking: Arm Compiler
    [69]"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -I"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/include/c" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source" -DSOC_AM243X -D_DEBUG_=1 -g -Wall -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -MMD -MP -MF"syscfg/ti_board_config.d_raw" -MT"syscfg/ti_board_config.o" -I"C:/Users/KTMFG/workspace_ccstheia_prasanna/sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/syscfg"   -o"syscfg/ti_board_config.o" "syscfg/ti_board_config.c"
    [70]Finished building: "syscfg/ti_board_config.c"
    
    [71]Building file: "syscfg/ti_board_open_close.c"
    [72]Invoking: Arm Compiler
    [73]"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -I"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/include/c" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source" -DSOC_AM243X -D_DEBUG_=1 -g -Wall -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -MMD -MP -MF"syscfg/ti_board_open_close.d_raw" -MT"syscfg/ti_board_open_close.o" -I"C:/Users/KTMFG/workspace_ccstheia_prasanna/sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/syscfg"   -o"syscfg/ti_board_open_close.o" "syscfg/ti_board_open_close.c"
    [74]Finished building: "syscfg/ti_board_open_close.c"
    
    [75]Building file: "syscfg/ti_enet_soc.c"
    [76]Invoking: Arm Compiler
    [77]"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -I"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/include/c" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source" -DSOC_AM243X -D_DEBUG_=1 -g -Wall -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -MMD -MP -MF"syscfg/ti_enet_soc.d_raw" -MT"syscfg/ti_enet_soc.o" -I"C:/Users/KTMFG/workspace_ccstheia_prasanna/sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/syscfg"   -o"syscfg/ti_enet_soc.o" "syscfg/ti_enet_soc.c"
    [78]Finished building: "syscfg/ti_enet_soc.c"
    
    [79]Building file: "syscfg/ti_enet_lwipif.c"
    [80]Invoking: Arm Compiler
    [81]"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -I"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/include/c" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source" -DSOC_AM243X -D_DEBUG_=1 -g -Wall -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -MMD -MP -MF"syscfg/ti_enet_lwipif.d_raw" -MT"syscfg/ti_enet_lwipif.o" -I"C:/Users/KTMFG/workspace_ccstheia_prasanna/sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/syscfg"   -o"syscfg/ti_enet_lwipif.o" "syscfg/ti_enet_lwipif.c"
    [82]Finished building: "syscfg/ti_enet_lwipif.c"
    
    [83]Building file: "../main.c"
    [84]Invoking: Arm Compiler
    [85]"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -I"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/include/c" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source" -DSOC_AM243X -D_DEBUG_=1 -g -Wall -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -MMD -MP -MF"main.d_raw" -MT"main.o" -I"C:/Users/KTMFG/workspace_ccstheia_prasanna/sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/syscfg"   -o"main.o" "../main.c"
    [86]Finished building: "../main.c"
    
    [87]Building target: "sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang.out"
    [88]Invoking: Arm Linker
    [89]"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/bin/tiarmclang.exe" -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -DSOC_AM243X -D_DEBUG_=1 -g -Wall -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -Wl,-m"sbl_ospi.Debug.map" -Wl,-i"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/kernel/nortos/lib" -Wl,-i"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/drivers/lib" -Wl,-i"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/board/lib" -Wl,-i"C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/lib" -Wl,--reread_libs -Wl,--diag_suppress=10063 -Wl,--diag_wrap=off -Wl,--display_error_number -Wl,--warn_sections -Wl,--gen_xml_func_hash -Wl,--xml_link_info="sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang_linkInfo.xml" -Wl,--ram_model -o "sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang.out" "./syscfg/ti_dpl_config.o" "./syscfg/ti_drivers_config.o" "./syscfg/ti_drivers_open_close.o" "./syscfg/ti_pinmux_config.o" "./syscfg/ti_power_clock_config.o" "./syscfg/ti_board_config.o" "./syscfg/ti_board_open_close.o" "./syscfg/ti_enet_config.o" "./syscfg/ti_enet_open_close.o" "./syscfg/ti_enet_soc.o" "./syscfg/ti_enet_lwipif.o" "./main.o" -Wl,-l"syscfg/linker.cmd"  -Wl,-lnortos.am243x.r5f.ti-arm-clang.debug.lib -Wl,-ldrivers.am243x.r5f.ti-arm-clang.debug.lib -Wl,-lboard.am243x.r5f.ti-arm-clang.debug.lib -Wl,-llibc.a -Wl,-llibsysbm.a
    [90]Finished building target: "sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang.out"
    
    [91]C:/ti/ccs2011/ccs/utils/bin/gmake -C C:\Users\KTMFG\workspace_ccstheia_prasanna\sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang -f makefile_ccs_bootimage_gen OUTNAME=sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang PROFILE=Debug MCU_PLUS_SDK_PATH=C:/ti/mcu_plus_sdk_am243x_10_01_00_32 CG_TOOL_ROOT=C:/ti/ti_cgt_arm_llvm_4.0.1.LTS CCS_INSTALL_DIR=C:\ti\ccs2011\ccs\ CCS_IDE_MODE=desktop DEVICE=am243x
    [92] Boot image: am243x:r5fss0-0:nortos:ti-arm-clang sbl_ospi.Debug.hs_fs.tiimage ...
    [93]C:/ti/ti_cgt_arm_llvm_4.0.1.LTS/bin/tiarmobjcopy --strip-all -O binary Debug/sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang.out C:/Users/KTMFG/workspace_ccstheia_prasanna/sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang.bin
    [94]python C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/security/security_common/tools/boot/signing/rom_image_gen.py --swrv 1 --sbl-bin C:/Users/KTMFG/workspace_ccstheia_prasanna/sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang.bin --sysfw-bin C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/drivers/sciclient/soc/am64x_am243x/sysfw-hs-fs-enc.bin --sysfw-inner-cert C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/drivers/sciclient/soc/am64x_am243x/sysfw-hs-fs-enc-cert.bin --boardcfg-blob C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/drivers/sciclient/sciclient_default_boardcfg/am243x/boardcfg_blob.bin --sbl-loadaddr 0x70000000 --sysfw-loadaddr 0x44000 --bcfg-loadaddr 0x7B000 --key C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/security/security_common/tools/boot/signing/rom_degenerateKey.pem --rom-image sbl_ospi.Debug.hs_fs.tiimage
    [95]C:\ti\ccs2011\ccs\/utils/cygwin/cp sbl_ospi.Debug.hs_fs.tiimage C:/Users/KTMFG/workspace_ccstheia_prasanna/sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang/Debug/tiboot3.bin
    [96] Boot image: am243x:r5fss0-0:nortos:ti-arm-clang sbl_ospi.Debug.hs_fs.tiimage Done !!!
    [97] .
    
    [98]**** Build finished ****

  • 8270.sbl_ospi_am243x-evm_r5fss0-0_nortos_ti-arm-clang.zip

    Attached my entire project folder here. Take a look. I am not sure what I am missing here. I believe these examples are somehow catered towards CCS debugging and not meant for standalone tests ?

    The pre-built SBL works fine every time I use it.

  • Hi Prasanna,

    Thanks for sharing the entire project! This helped me catch the issue.

    I noticed that in your main.c you make the bootConfig->scratchMemPtr = NULL; but you still have not disabled the Scratch memory support for the bootloader by setting  bootConfig->enableScratchMem to 0. This will lead to following line of code trying to real an invalid address: https://github.com/TexasInstruments/mcupsdk-core/blob/next/source/drivers/bootloader/bootloader.c#L1363, hence causing the abort.

    Adding bootConfig->enableScratchMem=0 before bootConfig->scratchMemPtr = NULL in your main.c solves this issue:

    After adding this line, I am able to boot using the Project shared by you:

    DMSC Firmware Version 10.0.8--v10.00.08 (Fiery Fox)
    DMSC Firmware revision 0xa
    DMSC ABI revision 4.0
    
    KPI_DATA: [BOOTLOADER_PROFILE] Boot Media       : NOR SPI FLASH 
    KPI_DATA: [BOOTLOADER_PROFILE] Boot Media Clock : 166.667 MHz 
    KPI_DATA: [BOOTLOADER_PROFILE] Boot Image Size  : 0 KB 
    KPI_DATA: [BOOTLOADER_PROFILE] Cores present    : 
    r5f0-0
    KPI_DATA: [BOOTLOADER PROFILE] SYSFW init                       :      11052us 
    KPI_DATA: [BOOTLOADER PROFILE] System_init                      :      11764us 
    KPI_DATA: [BOOTLOADER PROFILE] Drivers_open                     :       1670us 
    KPI_DATA: [BOOTLOADER PROFILE] Board_driversOpen                :     131236us 
    KPI_DATA: [BOOTLOADER PROFILE] Sciclient Get Version            :      10069us 
    KPI_DATA: [BOOTLOADER PROFILE] CPU load                         :       5036us                                                                             
    KPI_DATA: [BOOTLOADER PROFILE] SBL End                          :          4us                                                                             
    KPI_DATA: [BOOTLOADER_PROFILE] SBL Total Time Taken             :     170834us                                                                             
                                                                                                                                                               
    Image loading done, switching to application ... 

    Best Regards,

    Meet.

  • As per our discussion, I am now debugging my XIP image boot issue from my SBL.

    I followed the procedures as shared earlier and I can see the example project work fine in XIP mode when I use the prebuilt SBL.

    When I try to use my own SBL with the same hello_world.hs_fs and hello_world.xip images, it doesn't work and I end up with the same issue. It again goes back to the same ABORT code.

    I have verified the syscfg settings in my SBL with a default release version and they match. I am not sure what's different with my SBL image.

    It is looking like the issue discussed here but I don't see any clear resolution path : 

    (+) LP-AM243: Using XiP for singlecore application - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

  • sbl-xip-app.zip

    Find the attached memory maps and syscfg files. I am not sure what's wrong with my SBL. I am wondering if my SBL is actually enabling the DAC mode in the flash.

  • Hi Prasanna,

    I will try to test if I face the same issue if I use your SBL and update you once I am done.

    Best Regards,

    Meet.

  • Hi Meet,

    Just following up. Did you get a chance to review my settings and/or test on your end ? We are currently blocked on this item to finalize our design. Your help is appreciated.

    Thanks,

    Prasanna

  • Hi Prasanna,

    The concerned expert is out of office. Please expect a delay in response.

    Thanking you

    Yashraj

  • Hi Yashraj,

    I am blocked by this item right now. Can you give me an update ?

    Thanks,

    Prasanna

  • Hi Prasanna,

    Apologies for the delay, please allow me time till end of this week to provide an update.

    Best Regards,

    Meet.

  • Hi Meet,

    Just following up again. I am blocked by this item. Let me know if I need to reach out to the FAE again and setup a meeting

    Thanks,

    Prasanna

  • Hi Prasanna,

    Apologies for the delay.

    It seems when the scratch memory is disabled, we are disabling the DAC mode here. due to which the XIP application might not be working: https://github.com/TexasInstruments/mcupsdk-core/blob/next/source/drivers/bootloader/bootloader.c#L774

    You could try commenting this line out, or set enableDacMode to TRUE instead of FALSE and check if that resolves the issue. Please note that you would need to rebuild the libraries as well as the SBL after making this change.

    Best Regards,

    Meet.