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.

AM6422: R5F OSPI Startup failure

Part Number: AM6422
Other Parts Discussed in Thread: UNIFLASH, SYSCONFIG

Tool/software:

Hello,

We use SDK version 8.6 and R5F real-time core. When I change to OSPI mode to start, sometimes the print message only prints the version number after startup, and the application no longer runs.

After powering on again, it will be normal.What could be the reason? We drew the hardware ourselves

  • Hello Wanglili,

    Are you flashing using uart uniflash, if yes, then are you passing the default sbl null config file? If so, then can you attach the cfg file which you flashed using uart uniflash?

    Regards,

    Vaibhav

  • Hello,

    I used uart uniflash.This is my cfg  file.When the new hardware is not programmed, use the sblnull file to test the hardware. After the application is compiled, use the sblospi file to update the application.

    7103.default_sbl_ospi.cfgdefault_sbl_null.cfg

  • I see,   you are using sbl null file to test the hardware.   

    but from the image that you sent,   it boots from sbl_null, right?     



    I mean if it boots ospi  image sbl_ospi.release.hs_fs.tiimage , it should print. 

    eg:

    [BOOTLADER PROFILE] SYSFW init
    [BOOTLADER PROFILE] System_init

    right? 
    Sbl null won't boot app image, only opsi  will boot app image. 



    Hardware,  I think you are fine, since uniflash is working fine,  your uart, ospi and flash drivers must be correct. 

    Software: 1. Do you have debugger, to see if you app saved in flash got corrupted? 
    2. is it possible that you made a mistake.   toggle between sbl null and ospi boot image. 

  • Hi,

    I think maybe I did not describe it clearly.After I solidify the application into flash, it will run the application normally after booting, but the print information only prints this part and then stops printing, which means the program is not running.I was not in debugging mode during the whole process.

  • I see, I am interested at which point did your program stop running.  boot sequensce. RBL ---> fsbl ---> app.

    I assume you couldn't run your app at all, then probably it is app corrupted or memory corruption. 

    situation 1.  If it stucks at fsbl, do below
    To limit down the problem, i propose you to use debug version of  sbl.  eg::

    --file=sbl_prebuilt/am64x-evm/sbl_ospi.debug.hs_fs.tiimage --operation=flash --flash-offset=0x0


    situation 2. it stucks at middle of app. (very unlikely in your case.)

    Can you paste the behavior of your not working version. boot from ospi? to see which message is last messge. 

    Thanks. 
  • I paste the message here.

    In normal print the message like:


    Starting NULL Bootloader ...

    DMSC Firmware Version 8.6.4--v08.06.04 (Chill Capybar
    DMSC Firmware revision 0x8
    DMSC ABI revision 3.1

    INFO: Bootloader_runCpu:155: CPU r5f1-0 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU m4f0-0 is initialized to 400000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU a530-0 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU a530-1 is initialized to 800000000 Hz !!!
    INFO: Bootloader_loadSelfCpu:207: CPU r5f0-0 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runSelfCpu:217: All done, reseting self ...

    main init ok!

    when it does not work ,it print the message like :

    DMSC Firmware Version 8.6.4--v08.06.04 (Chill Capybar
    DMSC Firmware revision 0x8
    DMSC ABI revision 3.1

    There are no meaasge else!

  • Hello Wanglili,

    This means that the flow is stuck before the following snippet gets printed out.

    INFO: Bootloader_runCpu:155: CPU r5f1-0 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU m4f0-0 is initialized to 400000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU a530-0 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU a530-1 is initialized to 800000000 Hz !!!
    INFO: Bootloader_loadSelfCpu:207: CPU r5f0-0 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runSelfCpu:217: All done, reseting self ...

    So we can do the following as a part of next step.

    1. I am going to run this at my end with SDK version 8.6 and check if the same happens with me.

    2. If the same behaviour is not seen at my setup, then I would need you to debug this for sure.

    Please expect follow up in sometime.

    Regards,

    Vaibhav

  • HI, Wang:

    It seems that your fsbl is not successfully run. 

    Your debug message "INFO" is not popped, you have a status failure somewhere.


    "INFO"  is missing, indicate that UART flush is never called, "UART_flushTxFifo
    (gUartHandle[CONFIG_UART0]);"
    "DMSC" Info indicates that the communication between your core with m3 is fine. DMSC is m3.
     
    There might be some reasons: I believe below one is highly possible

    hardware issue: 

    1. Your ospi line has some noise during the fsbl boot. (highly possible)   Once noise happened, your data got corrupted and image reading is failed. 

    How to debug:
    Can you use logic analyser monitor the data.  sort the ospi ping monitor the data. during ospi boot. 
    compare the data with working, and not working. 
    if you have Jtag, you can debug step by step.   Try to look at the your app offset: 0x60080000
    Thanks
  • HI, vaibhav:

    no need to run SDK 8.6. you see,

    1. he is using his own hardware.  if you run on demo, for sure it will work. 

    2. his hardware sometimes is working, sometimes not working.  This indicates it is not consistent. (so it is very unlikely for software has some error. especially there is no memory allocation, in this case.) 


  • Hi, Wang:

    Besides, Have you done "cold reboot". completely power off reboot, I mean completely power off, eg: unplug and plug back uart.

    this will eliminate ram issue and poz issue.  reset power issue.   I remember, I fixed "button reset".   The behavior between "cold reboot" and "reset pin" reset  should be the same. if it is not, then you need to check your reset pin.

    Thanks. 

  • Hi,

    Do you mean "Main Domain POR status output" and "Main Domain external warm reset request input"pin? Every time I power on, it is a cold start operation. Sometimes it starts normally, sometimes it does not. I can not understand what you mean. Can you explain it in more detail?

  • I said the wrong name, it is RESET_REQZ and MCU_RESETZ.

  • Jun, thank you for chiming in.

    Hello Wanglili,

    , but the print information only prints this part and then stops printing, which means the program is not running.I was not in debugging mode during the whole process.

    This means that we need to do debugging. 

    Can you please make sure you have a debugger connected to your hardware?

    Once you have the above ready we can start with the debugging process, and I will list you the steps.

    Regards,

    Vaibhav

  • Hi, Wanglili

    RESET_REQz  is warm reset pin.  MCU_RESETZ  MCU reset is for m4 cores. 

    I see, since you use a code start everytimes.  so reset pin design should not be an issue. 

    Probablly the problem is comming from ospi. 

    Hi, Valbhav:

    I will continue to observe.  it sounds like a ospi problem. 

    we will see. 

    Thanks.

  • Hi,

    We wait your reply!Thank you!

  • hi, Wang:

    now, you are going to debug right?  I mean, I will be an observer.(not provide help any more) and  see how   helps you to debug. 

    in my opinion:  your 10 pins of ospi definitely has some problem during the boot. 

    To debug:

    1. if you have break point, jtag, it is more easy.  provides the running trace.

               however, you will need to flash debug version in oder to set up break point.
               sbl_ospi.debug.hs_fs.tiimage

      

    2. if you don't have jtag, you can add  more prints

         DebugP_log("") in your sbl and recompile .   add DebugP_Log("") before your flash image get and put a debug after, you will see your code stuck over there. (I could be not right.)

         to see which line of code got stuck.
    take this example.    under  SDK\examples\drivers\boot\sbl_ospi

    and rebuild it. that is the source code of   
    sbl_ospi.release.hs_fs.tiimage  and add more debug and recompile and run by gmake



  • Hi,

    I have a debugging environment, but the problem is that this phenomenon occurs every time I power on. How can I locate the problem? Please give me specific steps.

  • which debug environment do you have?

    if you have already the debugging environment 

    1. add "printf" in main.c to see which line got stuck

    2. set breakpoint, step by step see which line of code is failing. 

    if you have a jtag, 

    add a while (1) at the begining of main.  recompile. and hook your jtag and break the loop. 


    or you can directly run sbl_ospi.debug.out in your code, You will need to upload m3 firmware manually by scilcient.  (more complicated)



  • Hello Wanglili,

    I have a debugging environment, but the problem is that this phenomenon occurs every time I power on. How can I locate the problem? Please give me specific steps.

    So apart from Jun's suggestions, I am going to point out the steps in detail for you to read through:

    1. Go inside the main.c file which is present at: MCU_PLUS_SDK_INSTALL_PATH\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\main.c
    2. Introduce the code line "loop_forever();" at line 55 as shown below.


    3. Once done, go to the directory: MCU_PLUS_SDK_INSTALL_PATH\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang and run the command gmake PROFILE=debug
    4. Once done you can go ahead and replace the sbl_null.release.hs_fs.tiimage as show below in line 24 with the path to the newly built tiimage named as "sbl_null.debug.hs_fs.tiimage"
    5. Now flash normally using uart uniflash and once done, connect to the R5 core from the CCS IDE.
    6. Once connected to the R5 core, you need to load symbols and you should be loading the following: MCU_PLUS_SDK_INSTALL_PATH\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\sbl_null.debug.out
    7. Now, you will see the code is stuck at loop_forever API introduced earlier. 
    8. Set the value of loop from 1 to 0. And now you can step over one by one, and let me know at which specific API this is failing.

    Please do let me know if you need clarification in any step.

    Looking forward to your results.

    Regards,

    Vaibhav

  • Hi,

    I understand the process you mentioned, but the problem is not that printing stops every time. It is an accidental event and the probability of it happening is very low. In this case, if I use the method you mentioned, will there be a problem of not being able to catch the phenomenon?

  • Hello,

    Thanks for your response.

    It is an accidental event and the probability of it happening is very low

    So sometimes you are seeing the complete logs ? As in the following supposed to be correct logs: 

    Starting NULL Bootloader ...

    DMSC Firmware Version 8.6.4--v08.06.04 (Chill Capybar
    DMSC Firmware revision 0x8
    DMSC ABI revision 3.1

    INFO: Bootloader_runCpu:155: CPU r5f1-0 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU m4f0-0 is initialized to 400000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU a530-0 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU a530-1 is initialized to 800000000 Hz !!!
    INFO: Bootloader_loadSelfCpu:207: CPU r5f0-0 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runSelfCpu:217: All done, reseting self ...

    and sometimes you are not seeing them completely.

    Is my understanding correct? If YES, then this has to be UART logging issue.

    Looking forward to your response.

    Regards,

    Vaibhav

  • Yes,your understanding is correct.In most cases, I can see the printed information normally.

  • Hi Wanglili,

    Can you try loading symbols while the SBL gets stucked after printing the Sciclient version?

    Once the SBL is stucked, connect to the R5F core and load the symbols to check at which instruction it is currently stucked.

    Regards,

    Tushar

  • Ok,I will try,I will tell you if have progress.

  • Hi,

    I plan to use CCS to compile the sbl_null_am64x-evm_r5fss0-0_nortos_ti-arm-clang project,I added some print information to verify where the program went wrong. When I finished compiling, I wanted to burn the program into the hardware through the serial port.But I only see .out and .bin files in the Release file. I want to generate sbl_null.release.hs_fs.tiimage file.I saw the sbl_null.Release.hs_fs.tiimage file in the project root directory. Is it the file I want?I changed it to sbl_null.release.hs_fs.tiimage, and updated it to the hardware through the serial port. It showed that the update was successful, but no information was printed when it was changed to OSPI mode.I followed the above instructions to use the makefile, but it shows an error。

    “go to the directory: MCU_PLUS_SDK_INSTALL_PATH\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang and run the command gmake PROFILE=debug”

    C:\Users\Administrator\workspace_v12\sbl_null_am64x-evm_r5fss0-0_nortos_ti-arm-clang>gmake PROFILE=debug
    makefile:14: /imports.mak: No such file or directory
    makefile:15: /devconfig/devconfig.mak: No such file or directory
    gmake: *** No rule to make target '/devconfig/devconfig.mak'. Stop.

    C:\Users\Administrator\workspace_v12\sbl_null_am64x-evm_r5fss0-0_nortos_ti-arm-clang> gmake PROFILE=release
    makefile:14: /imports.mak: No such file or directory
    makefile:15: /devconfig/devconfig.mak: No such file or directory
    gmake: *** No rule to make target '/devconfig/devconfig.mak'. Stop.

    Can I use CCS to correctly generate the files used?Please tell me the detailed operation, thank you!

  • Let me clarify that it was my mistake. Now I can generate the required files.

  • Hi,

    I followed the instruction to make sbl_null.debug.hs_fs.tiimage,I use command gmake PROFILE=release,and I checked the corresponding generated files and found only the sbl_null.release.hs.tiimage file, but no sbl_null.release.hs_fs.tiimage.

  • Hi wanglili,

    I have tried to build the sbl_null example using the above command and I am able to see the sbl_null.release.hs_fs.tiiimage getting generated.

    Can you please share the makefile you used to build the sbl_null example?

    Regards,

    Tushar

  • Hi,

    I list the code

    #
    # Auto generated makefile
    #
    
    export MCU_PLUS_SDK_PATH?=$(abspath ../../../../../../..)
    include $(MCU_PLUS_SDK_PATH)/imports.mak
    include $(MCU_PLUS_SDK_PATH)/devconfig/devconfig.mak
    
    CG_TOOL_ROOT=$(CGT_TI_ARM_CLANG_PATH)
    
    CC=$(CG_TOOL_ROOT)/bin/tiarmclang
    LNK=$(CG_TOOL_ROOT)/bin/tiarmclang
    STRIP=$(CG_TOOL_ROOT)/bin/tiarmstrip
    OBJCOPY=$(CG_TOOL_ROOT)/bin/tiarmobjcopy
    ifeq ($(OS), Windows_NT)
    	PYTHON=python
    else
    	PYTHON=python3
    endif
    
    PROFILE?=release
    ConfigName:=$(PROFILE)
    
    OUTNAME:=sbl_null.$(PROFILE).out
    
    BOOTIMAGE_PATH=$(abspath .)
    BOOTIMAGE_NAME_GP:=sbl_null.$(PROFILE).tiimage
    BOOTIMAGE_NAME_HS:=sbl_null.$(PROFILE).hs.tiimage
    BOOTIMAGE_NAME_HS_FS:=sbl_null.$(PROFILE).hs_fs.tiimage
    BOOTIMAGE_BIN_NAME:=sbl_null.$(PROFILE).bin
    
    ifeq ($(DEVICE_TYPE),HS)
    	BOOTIMAGE_NAME=$(BOOTIMAGE_NAME_HS)
    else
    	BOOTIMAGE_NAME=$(BOOTIMAGE_NAME_GP)
    endif
    
    FILES_common := \
    	main.c \
    	ti_drivers_config.c \
    	ti_drivers_open_close.c \
    	ti_board_config.c \
    	ti_board_open_close.c \
    	ti_dpl_config.c \
    	ti_pinmux_config.c \
    	ti_power_clock_config.c \
    
    FILES_PATH_common = \
    	.. \
    	../../.. \
    	generated \
    
    INCLUDES_common := \
    	-I${CG_TOOL_ROOT}/include/c \
    	-I${MCU_PLUS_SDK_PATH}/source \
    	-Igenerated \
    
    DEFINES_common := \
    	-DSOC_AM64X \
    
    CFLAGS_common := \
    	-mcpu=cortex-r5 \
    	-mfloat-abi=hard \
    	-mfpu=vfpv3-d16 \
    	-mthumb \
    	-Wall \
    	-Werror \
    	-g \
    	-Wno-gnu-variable-sized-type-not-at-end \
    	-Wno-unused-function \
    
    CFLAGS_cpp_common := \
    	-Wno-c99-designator \
    	-Wno-extern-c-compat \
    	-Wno-c++11-narrowing \
    	-Wno-reorder-init-list \
    	-Wno-deprecated-register \
    	-Wno-writable-strings \
    	-Wno-enum-compare \
    	-Wno-reserved-user-defined-literal \
    	-Wno-unused-const-variable \
    	-x c++ \
    
    CFLAGS_debug := \
    	-D_DEBUG_=1 \
    
    CFLAGS_release := \
    	-Os \
    
    LNK_FILES_common = \
    	linker.cmd \
    
    LIBS_PATH_common = \
    	-Wl,-i${MCU_PLUS_SDK_PATH}/source/kernel/nortos/lib \
    	-Wl,-i${MCU_PLUS_SDK_PATH}/source/drivers/lib \
    	-Wl,-i${CG_TOOL_ROOT}/lib \
    
    LIBS_common = \
    	-lnortos.am64x.r5f.ti-arm-clang.${ConfigName}.lib \
    	-ldrivers.am64x.r5f.ti-arm-clang.${ConfigName}.lib \
    	-llibc.a \
    	-llibsysbm.a \
    
    LFLAGS_common = \
    	-Wl,--diag_suppress=10063 \
    	-Wl,--ram_model \
    	-Wl,--reread_libs \
    
    
    LIBS_NAME = \
    	nortos.am64x.r5f.ti-arm-clang.${ConfigName}.lib \
    	drivers.am64x.r5f.ti-arm-clang.${ConfigName}.lib \
    	libc.a \
    	libsysbm.a \
    
    LIBS_PATH_NAME = \
    	${MCU_PLUS_SDK_PATH}/source/kernel/nortos/lib \
    	${MCU_PLUS_SDK_PATH}/source/drivers/lib \
    	${CG_TOOL_ROOT}/lib \
    
    FILES := $(FILES_common) $(FILES_$(PROFILE))
    ASMFILES := $(ASMFILES_common) $(ASMFILES_$(PROFILE))
    FILES_PATH := $(FILES_PATH_common) $(FILES_PATH_$(PROFILE))
    CFLAGS := $(CFLAGS_common) $(CFLAGS_$(PROFILE))
    DEFINES := $(DEFINES_common) $(DEFINES_$(PROFILE))
    INCLUDES := $(INCLUDES_common) $(INCLUDE_$(PROFILE))
    LIBS := $(LIBS_common) $(LIBS_$(PROFILE))
    LIBS_PATH := $(LIBS_PATH_common) $(LIBS_PATH_$(PROFILE))
    LFLAGS := $(LFLAGS_common) $(LFLAGS_$(PROFILE))
    LNKOPTFLAGS := $(LNKOPTFLAGS_common) $(LNKOPTFLAGS_$(PROFILE))
    LNK_FILES := $(LNK_FILES_common) $(LNK_FILES_$(PROFILE))
    
    OBJDIR := obj/$(PROFILE)/
    OBJS := $(FILES:%.c=%.obj)
    OBJS += $(ASMFILES:%.S=%.obj)
    DEPS := $(FILES:%.c=%.d)
    
    vpath %.obj $(OBJDIR)
    vpath %.c $(FILES_PATH)
    vpath %.S $(FILES_PATH)
    vpath %.lib $(LIBS_PATH_NAME)
    vpath %.a $(LIBS_PATH_NAME)
    
    $(OBJDIR)/%.obj %.obj: %.c
    	@echo  Compiling: am64x:r5fss0-0:nortos:ti-arm-clang $(OUTNAME): $<
    	$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) -MMD -o $(OBJDIR)/$@ $<
    
    $(OBJDIR)/%.obj %.obj: %.S
    	@echo  Compiling: am64x:r5fss0-0:nortos:ti-arm-clang $(LIBNAME): $<
    	$(CC) -c $(CFLAGS) -o $(OBJDIR)/$@ $<
    
    all: $(BOOTIMAGE_NAME)
    
    SYSCFG_GEN_FILES=generated/ti_drivers_config.c generated/ti_drivers_config.h
    SYSCFG_GEN_FILES+=generated/ti_drivers_open_close.c generated/ti_drivers_open_close.h
    SYSCFG_GEN_FILES+=generated/ti_dpl_config.c generated/ti_dpl_config.h
    SYSCFG_GEN_FILES+=generated/ti_pinmux_config.c generated/ti_power_clock_config.c
    SYSCFG_GEN_FILES+=generated/ti_board_config.c generated/ti_board_config.h
    SYSCFG_GEN_FILES+=generated/ti_board_open_close.c generated/ti_board_open_close.h
    
    $(OUTNAME): syscfg $(SYSCFG_GEN_FILES) $(OBJS) $(LNK_FILES) $(LIBS_NAME)
    	@echo  .
    	@echo  Linking: am64x:r5fss0-0:nortos:ti-arm-clang $@ ...
    	$(LNK) $(LNKOPTFLAGS) $(LFLAGS) $(LIBS_PATH) -Wl,-m=$(basename $@).map -o $@ $(addprefix $(OBJDIR), $(OBJS)) $(LIBS) $(LNK_FILES)
    	@echo  Linking: am64x:r5fss0-0:nortos:ti-arm-clang $@ Done !!!
    	@echo  .
    
    clean:
    	@echo  Cleaning: am64x:r5fss0-0:nortos:ti-arm-clang $(OUTNAME) ...
    	$(RMDIR) $(OBJDIR)
    	$(RM) $(OUTNAME)
    	$(RM) $(BOOTIMAGE_NAME)
    	$(RM) $(BOOTIMAGE_BIN_NAME)
    	$(RMDIR) generated/
    
    scrub:
    	@echo  Scrubing: am64x:r5fss0-0:nortos:ti-arm-clang sbl_null ...
    	$(RMDIR) obj
    ifeq ($(OS),Windows_NT)
    	$(RM) \*.out
    	$(RM) \*.map
    	$(RM) \*.appimage*
    	$(RM) \*.rprc*
    	$(RM) \*.tiimage*
    	$(RM) \*.bin
    else
    	$(RM) *.out
    	$(RM) *.map
    	$(RM) *.appimage*
    	$(RM) *.rprc*
    	$(RM) *.tiimage*
    	$(RM) *.bin
    endif
    	$(RMDIR) generated
    
    $(OBJS): | $(OBJDIR)
    
    $(OBJDIR):
    	$(MKDIR) $@
    
    
    .NOTPARALLEL:
    
    .INTERMEDIATE: syscfg
    $(SYSCFG_GEN_FILES): syscfg
    
    syscfg: ../example.syscfg
    	@echo Generating SysConfig files ...
    	$(SYSCFG_NODE) $(SYSCFG_CLI_PATH)/dist/cli.js --product $(SYSCFG_SDKPRODUCT) --context r5fss0-0 --part Default --package ALV --output generated/ ../example.syscfg
    
    syscfg-gui:
    	$(SYSCFG_NWJS) $(SYSCFG_PATH) --product $(SYSCFG_SDKPRODUCT) --device AM64x_beta --context r5fss0-0 --part Default --package ALV --output generated/  ../example.syscfg
    
    #
    # Generation of boot image which can be loaded by ROM Boot Loader (RBL)
    #
    ifeq ($(OS),Windows_NT)
    EXE_EXT=.exe
    endif
    ifeq ($(OS),Windows_NT)
      BOOTIMAGE_CERT_GEN_CMD=powershell -executionpolicy unrestricted -command $(MCU_PLUS_SDK_PATH)/tools/boot/signing/x509CertificateGen.ps1
    else
      BOOTIMAGE_CERT_GEN_CMD=$(MCU_PLUS_SDK_PATH)/tools/boot/signing/x509CertificateGen.sh
    endif
    BOOTIMAGE_TEMP_OUT_FILE=temp_stdout_$(PROFILE).txt
    
    BOOTIMAGE_CERT_KEY=$(APP_SIGNING_KEY)
    
    BOOTIMAGE_CERT_KEY=$(APP_SIGNING_KEY)
    BOOTIMAGE_CERT_GEN_CMD=$(PYTHON) $(MCU_PLUS_SDK_PATH)/tools/boot/signing/rom_image_gen.py
    SYSFW_PATH=$(MCU_PLUS_SDK_PATH)/source/drivers/sciclient/soc/am64x_am243x
    SYSFW_LOAD_ADDR=0x44000
    BOARDCFG_LOAD_ADDR=0x7B000
    BOARDCFG_BLOB=$(MCU_PLUS_SDK_PATH)/source/drivers/sciclient/sciclient_default_boardcfg/am64x/boardcfg_blob.bin
    
    
    SBL_RUN_ADDRESS=0x70000000
    
    SBL_PREBUILT_PATH=$(MCU_PLUS_SDK_PATH)/tools/boot/sbl_prebuilt/am64x-evm
    
    $(BOOTIMAGE_BIN_NAME): $(OUTNAME)
    	$(OBJCOPY) --strip-sections -O binary $(OUTNAME) $(BOOTIMAGE_BIN_NAME)
    
    $(BOOTIMAGE_NAME): $(BOOTIMAGE_BIN_NAME)
    	@echo  Boot image: am64x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_PATH)/$@ ...
    ifeq ($(DEVICE_TYPE),HS)
    ifeq ($(ENC_SBL_ENABLED),yes)
    	$(BOOTIMAGE_CERT_GEN_CMD) --swrv 1 --sbl-enc --enc-key $(APP_ENCRYPTION_KEY) --sbl-bin $(BOOTIMAGE_PATH)/$(BOOTIMAGE_BIN_NAME) --sysfw-bin $(SYSFW_PATH)/sysfw-hs-enc.bin --sysfw-inner-cert $(SYSFW_PATH)/sysfw-hs-enc-cert.bin --boardcfg-blob $(BOARDCFG_BLOB) --sbl-loadaddr $(SBL_RUN_ADDRESS) --sysfw-loadaddr $(SYSFW_LOAD_ADDR) --bcfg-loadaddr $(BOARDCFG_LOAD_ADDR) --key $(BOOTIMAGE_CERT_KEY) --debug DBG_FULL_ENABLE --rom-image $(BOOTIMAGE_PATH)/$(BOOTIMAGE_NAME)
    else
    	$(BOOTIMAGE_CERT_GEN_CMD) --swrv 1 --sbl-bin $(BOOTIMAGE_PATH)/$(BOOTIMAGE_BIN_NAME) --sysfw-bin $(SYSFW_PATH)/sysfw-hs-enc.bin --sysfw-inner-cert $(SYSFW_PATH)/sysfw-hs-enc-cert.bin --boardcfg-blob $(BOARDCFG_BLOB) --sbl-loadaddr $(SBL_RUN_ADDRESS) --sysfw-loadaddr $(SYSFW_LOAD_ADDR) --bcfg-loadaddr $(BOARDCFG_LOAD_ADDR) --key $(BOOTIMAGE_CERT_KEY) --debug DBG_FULL_ENABLE --rom-image $(BOOTIMAGE_PATH)/$(BOOTIMAGE_NAME)
    endif
    else
    	$(BOOTIMAGE_CERT_GEN_CMD) --swrv 1 --sbl-bin $(BOOTIMAGE_PATH)/$(BOOTIMAGE_BIN_NAME) --sysfw-bin $(SYSFW_PATH)/sysfw.bin --boardcfg-blob $(BOARDCFG_BLOB) --sbl-loadaddr $(SBL_RUN_ADDRESS) --sysfw-loadaddr $(SYSFW_LOAD_ADDR) --bcfg-loadaddr $(BOARDCFG_LOAD_ADDR) --key $(BOOTIMAGE_CERT_KEY) --rom-image $(BOOTIMAGE_PATH)/$(BOOTIMAGE_NAME)
    	$(BOOTIMAGE_CERT_GEN_CMD) --swrv 1 --sbl-bin $(BOOTIMAGE_PATH)/$(BOOTIMAGE_BIN_NAME) --sysfw-bin $(SYSFW_PATH)/sysfw-hs-fs-enc.bin --sysfw-inner-cert $(SYSFW_PATH)/sysfw-hs-fs-enc-cert.bin --boardcfg-blob $(BOARDCFG_BLOB) --sbl-loadaddr $(SBL_RUN_ADDRESS) --sysfw-loadaddr $(SYSFW_LOAD_ADDR) --bcfg-loadaddr $(BOARDCFG_LOAD_ADDR) --key $(BOOTIMAGE_CERT_KEY) --rom-image $(BOOTIMAGE_PATH)/$(BOOTIMAGE_NAME_HS_FS)
    endif
    	$(COPY) $(BOOTIMAGE_PATH)/$(BOOTIMAGE_NAME) tiboot3.bin
    	$(COPY) $(BOOTIMAGE_PATH)/$(BOOTIMAGE_NAME) $(SBL_PREBUILT_PATH)/
    
    	$(RM) $(BOOTIMAGE_TEMP_OUT_FILE)
    	@echo  Boot image: am64x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_PATH)/$@ Done !!!
    ifeq ($(DEVICE_TYPE),GP)
    	$(COPY) $(BOOTIMAGE_PATH)/$(BOOTIMAGE_NAME_HS_FS) $(SBL_PREBUILT_PATH)/
    	@echo  Boot image: am64x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_PATH)/$(BOOTIMAGE_NAME_HS_FS) Done !!!
    endif
    
    	@echo  .
    
    -include $(addprefix $(OBJDIR)/, $(DEPS))
    

  • Hi Wanglili,

    Thanks for sharing the above makefile. The makefile looks correct and supposed to generate the sbl_null.release.hs_fs.tiimage.

    Can you try rebuilding the sbl_null example once?

    Clean the already built example and rebuilt it using below commands.

    gmake clean PROFILE=release
    gmake PROFILE=release

    Also please copy the build logs and share with us.

    Regards,

    Tushar

  • I remake and the message and file is here.

    C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang>gmake clean PROFILE=release
     Cleaning: am64x:r5fss0-0:nortos:ti-arm-clang sbl_null.release.out ...
    C:/ti/ccs1210/ccs/utils/cygwin/rm -rf obj/release/
    C:/ti/ccs1210/ccs/utils/cygwin/rm -f sbl_null.release.out
    C:/ti/ccs1210/ccs/utils/cygwin/rm -f sbl_null.release.hs.tiimage
    C:/ti/ccs1210/ccs/utils/cygwin/rm -f sbl_null.release.bin
    C:/ti/ccs1210/ccs/utils/cygwin/rm -rf generated/
    
    C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang>gmake PROFILE=release
    Generating SysConfig files ...
    C:/ti/sysconfig_1.14.0/nodejs/node C:/ti/sysconfig_1.14.0/dist/cli.js --product C:/ti/mcu_plus_sdk_am64x_08_06_00_43/.metadata/product.json --context r5fss0-0 --part Default --package ALV --output generated/ ../example.syscfg
    Running script...
    Validating...
    info: /kernel/dpl/debug_log uartLog.baudRate: Actual Baudrate Possible: 115385 (0 % error)
    Generating Code (example.syscfg)...
    Writing C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\generated\ti_dpl_config.c...
    Writing C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\generated\ti_dpl_config.h...
    Writing C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\generated\ti_drivers_config.c...
    Writing C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\generated\ti_drivers_config.h...
    Writing C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\generated\ti_drivers_open_close.c...
    Writing C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\generated\ti_drivers_open_close.h...
    Writing C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\generated\ti_pinmux_config.c...
    Writing C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\generated\ti_power_clock_config.c...
    Writing C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\generated\ti_board_config.c...
    Writing C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\generated\ti_board_config.h...
    Writing C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\generated\ti_board_open_close.c...
    Writing C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\generated\ti_board_open_close.h...
    Writing C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\generated\ti_enet_config.c...
    Writing C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\generated\ti_enet_config.h...
    Writing C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\generated\ti_enet_open_close.c...
    Writing C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\generated\ti_enet_open_close.h...
    Writing C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\generated\ti_enet_soc.c...
    Writing C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\generated\ti_enet_lwipif.c...
    Writing C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\generated\ti_enet_lwipif.h...
    Writing C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\generated\ti_pru_io_config.inc...
    C:/ti/ccs1210/ccs/utils/cygwin/mkdir -p obj/release/
     Compiling: am64x:r5fss0-0:nortos:ti-arm-clang sbl_null.release.out: ../main.c
    C:/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/bin/tiarmclang -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mthumb -Wall -Werror -g -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function  -Os  -IC:/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c -IC:/ti/mcu_plus_sdk_am64x_08_06_00_43/source -Igenerated   -DSOC_AM64X   -MMD -o obj/release//main.obj ../main.c
     Compiling: am64x:r5fss0-0:nortos:ti-arm-clang sbl_null.release.out: generated/ti_drivers_config.c
    C:/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/bin/tiarmclang -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mthumb -Wall -Werror -g -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function  -Os  -IC:/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c -IC:/ti/mcu_plus_sdk_am64x_08_06_00_43/source -Igenerated   -DSOC_AM64X   -MMD -o obj/release//ti_drivers_config.obj generated/ti_drivers_config.c
     Compiling: am64x:r5fss0-0:nortos:ti-arm-clang sbl_null.release.out: generated/ti_drivers_open_close.c
    C:/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/bin/tiarmclang -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mthumb -Wall -Werror -g -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function  -Os  -IC:/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c -IC:/ti/mcu_plus_sdk_am64x_08_06_00_43/source -Igenerated   -DSOC_AM64X   -MMD -o obj/release//ti_drivers_open_close.obj generated/ti_drivers_open_close.c
     Compiling: am64x:r5fss0-0:nortos:ti-arm-clang sbl_null.release.out: generated/ti_board_config.c
    C:/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/bin/tiarmclang -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mthumb -Wall -Werror -g -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function  -Os  -IC:/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c -IC:/ti/mcu_plus_sdk_am64x_08_06_00_43/source -Igenerated   -DSOC_AM64X   -MMD -o obj/release//ti_board_config.obj generated/ti_board_config.c
     Compiling: am64x:r5fss0-0:nortos:ti-arm-clang sbl_null.release.out: generated/ti_board_open_close.c
    C:/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/bin/tiarmclang -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mthumb -Wall -Werror -g -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function  -Os  -IC:/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c -IC:/ti/mcu_plus_sdk_am64x_08_06_00_43/source -Igenerated   -DSOC_AM64X   -MMD -o obj/release//ti_board_open_close.obj generated/ti_board_open_close.c
     Compiling: am64x:r5fss0-0:nortos:ti-arm-clang sbl_null.release.out: generated/ti_dpl_config.c
    C:/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/bin/tiarmclang -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mthumb -Wall -Werror -g -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function  -Os  -IC:/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c -IC:/ti/mcu_plus_sdk_am64x_08_06_00_43/source -Igenerated   -DSOC_AM64X   -MMD -o obj/release//ti_dpl_config.obj generated/ti_dpl_config.c
     Compiling: am64x:r5fss0-0:nortos:ti-arm-clang sbl_null.release.out: generated/ti_pinmux_config.c
    C:/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/bin/tiarmclang -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mthumb -Wall -Werror -g -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function  -Os  -IC:/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c -IC:/ti/mcu_plus_sdk_am64x_08_06_00_43/source -Igenerated   -DSOC_AM64X   -MMD -o obj/release//ti_pinmux_config.obj generated/ti_pinmux_config.c
     Compiling: am64x:r5fss0-0:nortos:ti-arm-clang sbl_null.release.out: generated/ti_power_clock_config.c
    C:/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/bin/tiarmclang -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mthumb -Wall -Werror -g -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function  -Os  -IC:/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c -IC:/ti/mcu_plus_sdk_am64x_08_06_00_43/source -Igenerated   -DSOC_AM64X   -MMD -o obj/release//ti_power_clock_config.obj generated/ti_power_clock_config.c
     .
     Linking: am64x:r5fss0-0:nortos:ti-arm-clang sbl_null.release.out ...
    C:/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/bin/tiarmclang   -Wl,--diag_suppress=10063 -Wl,--ram_model -Wl,--reread_libs   -Wl,-iC:/ti/mcu_plus_sdk_am64x_08_06_00_43/source/kernel/nortos/lib -Wl,-iC:/ti/mcu_plus_sdk_am64x_08_06_00_43/source/drivers/lib -Wl,-iC:/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/lib   -Wl,-m=sbl_null.release.map -o sbl_null.release.out obj/release/main.obj obj/release/ti_drivers_config.obj obj/release/ti_drivers_open_close.obj obj/release/ti_board_config.obj obj/release/ti_board_open_close.obj obj/release/ti_dpl_config.obj obj/release/ti_pinmux_config.obj obj/release/ti_power_clock_config.obj -lnortos.am64x.r5f.ti-arm-clang.release.lib -ldrivers.am64x.r5f.ti-arm-clang.release.lib -llibc.a -llibsysbm.a   linker.cmd
     Linking: am64x:r5fss0-0:nortos:ti-arm-clang sbl_null.release.out Done !!!
     .
    C:/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/bin/tiarmobjcopy --strip-sections -O binary sbl_null.release.out sbl_null.release.bin
     Boot image: am64x:r5fss0-0:nortos:ti-arm-clang C:/ti/mcu_plus_sdk_am64x_08_06_00_43/examples/drivers/boot/sbl_null/am64x-evm/r5fss0-0_nortos/ti-arm-clang/sbl_null.release.hs.tiimage ...
    python C:/ti/mcu_plus_sdk_am64x_08_06_00_43/tools/boot/signing/rom_image_gen.py --swrv 1 --sbl-enc --enc-key C:/ti/mcu_plus_sdk_am64x_08_06_00_43/tools/boot/signing/custMek_am64x_am243x.txt --sbl-bin C:/ti/mcu_plus_sdk_am64x_08_06_00_43/examples/drivers/boot/sbl_null/am64x-evm/r5fss0-0_nortos/ti-arm-clang/sbl_null.release.bin --sysfw-bin C:/ti/mcu_plus_sdk_am64x_08_06_00_43/source/drivers/sciclient/soc/am64x_am243x/sysfw-hs-enc.bin --sysfw-inner-cert C:/ti/mcu_plus_sdk_am64x_08_06_00_43/source/drivers/sciclient/soc/am64x_am243x/sysfw-hs-enc-cert.bin --boardcfg-blob C:/ti/mcu_plus_sdk_am64x_08_06_00_43/source/drivers/sciclient/sciclient_default_boardcfg/am64x/boardcfg_blob.bin --sbl-loadaddr 0x70000000 --sysfw-loadaddr 0x44000 --bcfg-loadaddr 0x7B000 --key C:/ti/mcu_plus_sdk_am64x_08_06_00_43/tools/boot/signing/custMpk_am64x_am243x.pem --debug DBG_FULL_ENABLE --rom-image C:/ti/mcu_plus_sdk_am64x_08_06_00_43/examples/drivers/boot/sbl_null/am64x-evm/r5fss0-0_nortos/ti-arm-clang/sbl_null.release.hs.tiimage
    C:/ti/ccs1210/ccs/utils/cygwin/cp C:/ti/mcu_plus_sdk_am64x_08_06_00_43/examples/drivers/boot/sbl_null/am64x-evm/r5fss0-0_nortos/ti-arm-clang/sbl_null.release.hs.tiimage tiboot3.bin
    C:/ti/ccs1210/ccs/utils/cygwin/cp C:/ti/mcu_plus_sdk_am64x_08_06_00_43/examples/drivers/boot/sbl_null/am64x-evm/r5fss0-0_nortos/ti-arm-clang/sbl_null.release.hs.tiimage C:/ti/mcu_plus_sdk_am64x_08_06_00_43/tools/boot/sbl_prebuilt/am64x-evm/
    C:/ti/ccs1210/ccs/utils/cygwin/rm -f temp_stdout_release.txt
     Boot image: am64x:r5fss0-0:nortos:ti-arm-clang C:/ti/mcu_plus_sdk_am64x_08_06_00_43/examples/drivers/boot/sbl_null/am64x-evm/r5fss0-0_nortos/ti-arm-clang/sbl_null.release.hs.tiimage Done !!!
     .
    
    C:\ti\mcu_plus_sdk_am64x_08_06_00_43\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang>

    there is no new file about sbl_null.release.hs_fs.tiimage

  • Hi wanglili,

    The screenshot you shared above contains the sbl_null.release.hs_fs.tiimage.

    Please refer below screenshot.

    In your shared screenshot it is present in between sbl_null.debug.tiimage & sbl_null.release.tiimage.

    Regards,

    Tushar

  • Hi,

    The time of this file is 2024.06.12,is not now.This is not the file I compiled this time.

  • Hi Wanglili,

    Apologies, I missed the date and time details.

    I assume that you have set the DEVICE_TYPE parameter to HS somehow. That's why you are not able to generate the HSFS image.

    Can you please try below command and let me know are you able to build the hsfs version of tiimage?

    gmake PROFILE=release DEVICE_TYPE=GP

    Regards,

    Tushar

  • I can see the file.

  • Hi Wanglili,

    I can see the file.

    Thanks for the confirmation.

    Regards,

    Tushar

  • Hi,you say "then this has to be UART logging issue",can you explain it in detail for me,thank you !and how can I solve the question.

  • Hi Wanglili,

    "then this has to be UART logging issue",can you explain it in detail for me,t

    I am not sure but I think by above statement, Vaibhav wants to say that it may be possible UART is somehow not able to print the SBL logs. But this is just an assumption. we don't know what is going wrong until we debug the SBL binary.

    Regards,

    Tushar

  • I understand this. My current operation is to add the loop_forever function to line 55, then download the file generated by the command makefile to the hardware through the serial port, and then change the dip switch to OSPI mode. At this time, since the loop_forever function has been looping, there is no print information. At this time, I use JTAG to connect to the R5F core, and then select Load Symbols to download the MCU_PLUS_SDK_INSTALL_PATH\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\sbl_null.debug.out file,it disp like this:

    I think the code should be displayed normally, and this is incorrect. What could be the reason?

  • Hi,

    I can monitor the running steps in the boot program by adding print information through the serial port. The following is the print information I added. In actual operation, it should run to line 159 and then stop running the following program, right?

    However, the actual printed content sometimes contains the following content that should not appear,like this:

    In most cases, there is no information that should not appear.

    At present, the use of CCS environment to connect to JTAG simulation that I mentioned before has not been successful. I hope you can give some suggestions

  • but your print is so basic, it is ver hard for Tushar to provide further help. Please add more print. 

    so now, you know where your code failed. but you can add more debug log before your failure, 

    eg: 17 16 15 14 13 12 11.

    DebugP_log(" 21 status, %d", status);  //at some point , your status will be come -1.  you just need  your print will be something like. 


    15 status 0   


    16 status -1

      and between 15 and 16, you run some function. that function failed.

  • Hi Wanglili,

    MCU_PLUS_SDK_INSTALL_PATH\examples\drivers\boot\sbl_null\am64x-evm\r5fss0-0_nortos\ti-arm-clang\sbl_null.debug.out file,it disp like this:

    You can click on the locate file option and then go to path ${MCU+SDK}/source/drivers/sciclient/sciclient.c.

    However, the actual printed content sometimes contains the following content that should not appear,like this:

    I am not able to understand the above prints  function what they are indicating. Let say in the first line you have "1 2 3 4 5 6 7 8", I have no idea where you put this logging and after which line's execution "1" is printed and so on.

    At failure case, what logs are you getting? Are you not getting "1 2 3 4 5 6 7 8" as shown in above screenshot?

    If not it means before printing 1, it is failing.

    However, the actual printed content sometimes contains the following content that should not appear,like this:

    Can you please print the status value also while printing "22"?

    Regards,

    Tushar

  • Hi,

    When a problem occurs, 1 cannot be printed either.

    /*
     *  Copyright (C) 2018-2022 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 "ti_drivers_config.h"
    #include "ti_drivers_open_close.h"
    #include <drivers/sciclient.h>
    #include <drivers/bootloader/soc/bootloader_soc.h>
    #include <drivers/bootloader.h>
    
    
    /* call this API to stop the booting process and spin, do that you can connect
     * debugger, load symbols and then make the 'loop' variable as 0 to continue execution
     * with debugger connected.
     */
    void loop_forever(void)
    {
        volatile uint32_t loop = 1;
        while(loop)
            ;
    }
    
    int main(void)
    {
        int32_t status;
    
        Bootloader_socWaitForFWBoot();
    
    #ifndef DISABLE_WARM_REST_WA
        /* Warm Reset Workaround to prevent CPSW register lockup */
        if (!Bootloader_socIsMCUResetIsoEnabled())
        {
            Bootloader_socResetWorkaround();
        }
    #endif
        if (!Bootloader_socIsMCUResetIsoEnabled())
        {
            /* Update devGrp to ALL to initialize MCU domain when reset isolation is
            not enabled */
            Sciclient_BoardCfgPrms_t boardCfgPrms_pm =
                {
                    .boardConfigLow = (uint32_t)0,
                    .boardConfigHigh = 0,
                    .boardConfigSize = 0,
                    .devGrp = DEVGRP_ALL,
                };
    
            status = Sciclient_boardCfgPm(&boardCfgPrms_pm);
    
            /* Enable MCU PLL. MCU PLL will not be enabled by DMSC when devGrp is set
            to Main in boardCfg */
            Bootloader_enableMCUPLL();
        }
    
        Bootloader_socOpenFirewalls();
    
        Bootloader_socNotifyFirewallOpen();
    
        System_init();
        Drivers_open();
    
        DebugP_log("\r\n");
        DebugP_log("Starting NULL Bootloader ... \r\n");
        status = Sciclient_getVersionCheck(1);
        DebugP_log("1 ");//24.09.13
        if(status == SystemP_SUCCESS)
        {
            Bootloader_Params bootParams;
            Bootloader_BootImageInfo bootImageInfo;
            Bootloader_Handle bootHandle;
    
            Bootloader_Params_init(&bootParams);
            DebugP_log("2 ");//24.09.13
            /* set default which will basically allow to simply power on reset the CPU and run a while(1) loop */
            Bootloader_BootImageInfo_init(&bootImageInfo);
            DebugP_log("3 ");//24.09.13
    
            bootHandle = Bootloader_open(CONFIG_BOOTLOADER0, &bootParams);
            DebugP_log("4  ");//24.09.13
            if(bootHandle != NULL)
            {
                    DebugP_log("5 ");//24.09.13
                uint32_t coreVariant = Bootloader_socGetCoreVariant();
                DebugP_log("6 ");//24.09.13
                if((coreVariant == BOOTLOADER_DEVICE_VARIANT_QUAD_CORE) || (coreVariant == BOOTLOADER_DEVICE_VARIANT_DUAL_CORE))
                {
                        DebugP_log("7 ");//24.09.13
                    if(status == SystemP_SUCCESS)
                    {
                        DebugP_log("8 ");//24.09.13
                        status = Bootloader_bootCpu(bootHandle, &bootImageInfo.cpuInfo[CSL_CORE_ID_R5FSS1_0]);
                    }
                    DebugP_log("9 ");//24.09.13
                    if((Bootloader_socIsR5FSSDual(BOOTLOADER_R5FSS1) == TRUE) && (status == SystemP_SUCCESS))
                    {
                        DebugP_log("10 ");//24.09.13
                        status = Bootloader_bootCpu(bootHandle, &bootImageInfo.cpuInfo[CSL_CORE_ID_R5FSS1_1]);
                    }
                    DebugP_log("11 ");//24.09.13
                }
                DebugP_log("12 ");//24.09.13
                /* Do not boot M4 when MCU domain is reset isolated */
                if (!Bootloader_socIsMCUResetIsoEnabled())
                {
                    DebugP_log("13 ");//24.09.13
                    if(status == SystemP_SUCCESS)
                    {
                        DebugP_log("14 ");//24.09.13
                        status = Bootloader_bootCpu(bootHandle, &bootImageInfo.cpuInfo[CSL_CORE_ID_M4FSS0_0]);
                    }
                    DebugP_log("15 ");//24.09.13
                }
                DebugP_log("16 ");//24.09.13
                if(status == SystemP_SUCCESS)
                {
                    DebugP_log("17 ");//24.09.13
                    status = Bootloader_bootCpu(bootHandle, &bootImageInfo.cpuInfo[CSL_CORE_ID_A53SS0_0]);
                }
                DebugP_log("18 ");//24.09.13
                if(status == SystemP_SUCCESS)
                {
                    DebugP_log("19 ");//24.09.13
                    status = Bootloader_bootCpu(bootHandle, &bootImageInfo.cpuInfo[CSL_CORE_ID_A53SS0_1]);
                }
                DebugP_log("20 ");//24.09.13
                if(status == SystemP_SUCCESS)
                {
                    DebugP_log("21 ");//24.09.13
                    /* Reset self cluster, both Core0 and Core 1. Init RAMs and run dummy loop  */
                    status = Bootloader_bootSelfCpu(bootHandle, &bootImageInfo);
                }
                DebugP_log("22 ");//24.09.13
                /* it should not return here, if it does, then there was some error */
                Bootloader_close(bootHandle);
                DebugP_log("23 ");//24.09.13
            }
            DebugP_log("24 ");//24.09.13
        }
        DebugP_log("25 ");//24.09.13
        if(status != SystemP_SUCCESS )
        {
            DebugP_log("Some tests have failed!!\r\n");
        }
            DebugP_log("26  \r\n");//24.09.13
        Drivers_close();
        DebugP_log("27  \r\n");//24.09.13
        System_deinit();
        DebugP_log("28  \r\n");//24.09.13
    
        return 0;
    }
    
    
    

    I will add the status value also while printing 22.

  • Hello,

    I have seen your above logs and it looks like in success case you see all the logs getting printed from 1 until the very end.

    But as you have mentioned that the failure case does not involve 1 being logged/printed onto the console.

    On this note, we need to narrow down the specific API where this is going wrong, so you can simply go ahead and tell me where it is stopping in the following section:

    int main(void)
    {
    int32_t status;

    Bootloader_socWaitForFWBoot();

    #ifndef DISABLE_WARM_REST_WA
    /* Warm Reset Workaround to prevent CPSW register lockup */
    if (!Bootloader_socIsMCUResetIsoEnabled())
    {
    Bootloader_socResetWorkaround();
    }
    #endif
    if (!Bootloader_socIsMCUResetIsoEnabled())
    {
    /* Update devGrp to ALL to initialize MCU domain when reset isolation is
    not enabled */
    Sciclient_BoardCfgPrms_t boardCfgPrms_pm =
    {
    .boardConfigLow = (uint32_t)0,
    .boardConfigHigh = 0,
    .boardConfigSize = 0,
    .devGrp = DEVGRP_ALL,
    };

    status = Sciclient_boardCfgPm(&boardCfgPrms_pm);

    /* Enable MCU PLL. MCU PLL will not be enabled by DMSC when devGrp is set
    to Main in boardCfg */
    Bootloader_enableMCUPLL();
    }

    Bootloader_socOpenFirewalls();

    Bootloader_socNotifyFirewallOpen();

    System_init();
    Drivers_open();

    DebugP_log("\r\n");
    DebugP_log("Starting NULL Bootloader ... \r\n");
    status = Sciclient_getVersionCheck(1);

    It has to be stopping in the above function calls.

    Put more debug logs in the above segment of the code so that you see them whenever the failure case occurs. 

    For example, if the "Starting NULL Bootloader ..." is logged then we know its getting stuck in Sciclient_getVersion() and so on. So I would need you to put more logs in the above segment of code and let us know where its getting stuck at.

    Regards,

    Vaibhav

  • Hi,

    I am sorry I did not say which part the problem was. What we encountered was that after printing "Starting NULL Bootloader ... \r\n", a small part of the version number was printed but not all.

  • Hello,

    I am sorry I did not say which part the problem was. What we encountered was that after printing "Starting NULL Bootloader ... \r\n", a small part of the version number was printed but not all.

    So can you share that log as well?

    So, the other thing that strikes my mind is some UART errata which is fixed in the current releases.

    Post your response with the logs, I can proceed to explain about the UART dependency to output characters. Again UART could be one of the issue, but I am not confirming that it is the only reason.

    Regards,

    Vaibhav

  • Hello,

    I remember the location of the printed information, although I have not found the log I saved yet, the information is

    DMSC Firmware Version 8.6.4--v08.06.04 (Chill Capybar

    DMSC Firmware

    Print only here, no other printing information.

    If we do not plan to update to the latest SDK, how can we modify it to solve the serial port problem?

  • Hi,

    Is there any news?

  • Hello,

    Thank you very much for your patience.

    DMSC Firmware Version 8.6.4--v08.06.04 (Chill Capybar

    DMSC Firmware

    Print only here, no other printing information.

    If we do not plan to update to the latest SDK, how can we modify it to solve the serial port problem?

    This looks like a problem of UART to me.

    So you are currently on SDK 8.6.

    There has been additions and improvements to the UART drivers over time.

    Before porting over to the latest UART drivers, can you go ahead and mention if the UART for your project sbl_null is configured in Interrupt or Polling mode?

    You can check this by opening up the UART tab in the example.sysconfig file.

    My assumption right now would be that it is in polled mode. If YES, then can you go ahead and change it to Interrupt mode of operation, rebuild the application and see if you still see the logging issues on the UART COM Ports?

    Looking forward to your response.

    Regards,

    Vaibhav

  • Hi,

    It is  in polled mode.I will change it to  Interrupt mode of operation and have a test.Thank you for your help.