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.

minimal SBL for the am263px

Other Parts Discussed in Thread: SYSCONFIG

Split off from e2e.ti.com/.../am6442-remoteproc-linux-debugging-questions

Hey Nick,

Thanks for all the links, I have everything working now.

I have a couple more slightly unrelated questions.

To provide some background, I am working on creating a super minimal SBL for the am263px. The goal of the SBL is to initialize FSI, stream the mcelf image over FSI, and then boot the r5 cores. We are using the UART boot mode and streaming the SBL over UART from a connected am64. This approach was necessitated by the fact that UART is too slow to stream the mcelf image. I am currently trying to reduce the size of the SBL as much as possible in order to reduce UART streaming time. I saw your post on reducing UART boot streaming time, which was helpful, but I have some question regarding SBL size optimization.

  1.  This post says that "If the device is HS-FS device, the loading of HSMRt Firmware (TIFS-MCU Firmware) is optional". However, I cannot completely remove the HSMCLIENT dependency in sysconfig without getting linking errors (see below). The bootloader_soc.c code is complaining as it is missing references; however, I think that I could get rid of all the complaining code because we are skipping verification of the bootloader. Am I right in thinking this code can be removed, and if so, is there any way that I can alter sysconfig to accomplish this?
      symbol                          in file                                                                                                                                                                                   
     ---------                    ----------------                                                                                                                                                                              
     HsmClient_procAuthBootFinish /home/jweyer/aec-toolchain/sysroots/x86_64-aecsdk-linux/usr/share/ti/mcu_plus_sdk_am263px_11.00.00.19/source/drivers/lib/drivers.am263px.r5f.ti-arm-clang.nortos.debug.lib<bootloader_soc.obj>
     HsmClient_procAuthBootStart  /home/jweyer/aec-toolchain/sysroots/x86_64-aecsdk-linux/usr/share/ti/mcu_plus_sdk_am263px_11.00.00.19/source/drivers/lib/drivers.am263px.r5f.ti-arm-clang.nortos.debug.lib<bootloader_soc.obj>
     HsmClient_procAuthBootUpdate /home/jweyer/aec-toolchain/sysroots/x86_64-aecsdk-linux/usr/share/ti/mcu_plus_sdk_am263px_11.00.00.19/source/drivers/lib/drivers.am263px.r5f.ti-arm-clang.nortos.debug.lib<bootloader_soc.obj>
     gHSMClient                   /home/jweyer/aec-toolchain/sysroots/x86_64-aecsdk-linux/usr/share/ti/mcu_plus_sdk_am263px_11.00.00.19/source/drivers/lib/drivers.am263px.r5f.ti-arm-clang.nortos.debug.lib<bootloader_soc.obj>
    
    error: unresolved symbols remain
    error: errors encountered during linking;
       "/home/jweyer/source/repos/ApcGen5/src/dsp/boot/sbl_uart_mcelf.out" not
       built

  2. Is there any way to completely remove all debugging logic? In sysconfig->Debug Log I can uncheck all debugging options, this certainly reduces the SBL size; however, I can't seem to completely remove it because sysconfig->bootloader and sysconfig->int xbar have dependencies on it. Is there a way to completely remove all debugging logic?
  3. We are using custom makefiles to build images (not using CCS) and I've seen that the sysconfig CLI offers the `--dependentScript` option. I am hoping to use this option, or some other technique, to include other sysconfig scripts. For example, I would like to have a base sysconfig script "foo.syscfg" and the optionally add debugging logic with another debugging sysconfig script "debug.syscfg". Is something like this possible? My best guess on how to accomplish this is below (see cmd_syscfg):
    quiet_cmd_syscfg = SYSCFG  $<
          cmd_syscfg = $(SYSCFG_NODE) $(SYSCFG_CLI_PATH)/dist/cli.js $(SYSCFG_V) --script $< --dependentScript $(*** DEBUG SCRIPT HERE? ***) --product $(SYSCFG_SDKPRODUCT) --context $(R5_CORE_CONTEXT_$(R5_CORE_ID)) --device AM263Px --part AM263P4 --package ZCZ_S --output $(obj)/generated/ $(QUIET_REDIRECT_INFO_AND_WARNING)
    define do_syscfg
    	@echo "  $(quiet_cmd_syscfg)"
    	$(Q)$(cmd_syscfg)
    endef


  4. Do you have any other suggestions on how to reduce the size of the SBL or speed up SBL streaming over UART?

Thanks for all your help,

- Jared

  • Hello Jared,

    I have split your question about AM263Px SBL optimization off into a separate thread for the AM263Px team to address.

    Within the context of Linux loading a non-Linux core, you can strip out debug information and other unneeded data as documented in the AM64x multicore academy > 
    How to optimize remote core project memory
    https://dev.ti.com/tirex/explore/node?node=A__AeakdFP2wJ-rLsVTOacY7Q__AM64-ACADEMY__WI1KRXP__LATEST 

    However, I am not sure about optimizing binary sizes from the perspective of SBL boot on a non-Linux processor.

    Regards,

    Nick

  • Hi Jared,

    Apologies for delay in response here:

     This post says that "If the device is HS-FS device, the loading of HSMRt Firmware (TIFS-MCU Firmware) is optional". However, I cannot completely remove the HSMCLIENT dependency in sysconfig without getting linking errors (see below). The bootloader_soc.c code is complaining as it is missing references; however, I think that I could get rid of all the complaining code because we are skipping verification of the bootloader. Am I right in thinking this code can be removed, and if so, is there any way that I can alter sysconfig to accomplish this?

    For this just commenting out HSMRT load api (as highlighted in FAQ) in sbl main.c file , would be sufficient.


    • Is there any way to completely remove all debugging logic? In sysconfig->Debug Log I can uncheck all debugging options, this certainly reduces the SBL size; however, I can't seem to completely remove it because sysconfig->bootloader and sysconfig->int xbar have dependencies on it. Is there a way to completely remove all debugging logic?

    This should not matter, if you have already unchecked the debugP log options, additionally, you can remove the profile points from the SBL

  • We are using custom makefiles to build images (not using CCS) and I've seen that the sysconfig CLI offers the `--dependentScript` option. I am hoping to use this option, or some other technique, to include other sysconfig scripts. For example, I would like to have a base sysconfig script "foo.syscfg" and the optionally add debugging logic with another debugging sysconfig script "debug.syscfg". Is something like this possible? My best guess on how to accomplish this is below (see cmd_syscfg):

    For this could you please create a seperate thread, our tools team would be able to help with this.

  • Do you have any other suggestions on how to reduce the size of the SBL or speed up SBL streaming over UART?

    Jared, have you considered using other media to transfer image and application instead of UART, as it is inherently a slow speed interface.

    I do not have further suggestions on reducing the speed, other than what has already been talked about in the FAQ.

  • Hi Nilabh,

    Thanks for your input. I will create another thread for the tooling question.