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.

LP-AM243: [LP-AM243] AM2434 Firmware Upgrade Over Ethernet - Need Follow-up

Part Number: LP-AM243
Other Parts Discussed in Thread: AM2434, AM2432, , SYSCONFIG

Tool/software:

hii ,

My previous thread on firmware upgrade over Ethernet (link: LP-AM243: AM2434 Firmware Upgrade Over Ethernet - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums) was closed before I got a response. Can someone help address my query?

Thanks,

Kavaskar

  • Hi,

    As mentioned in your earlier thread, you can port the already existing AM263x example for AM243x if it meets your requirement.

    Regarding QSPI, EDMA, and an HSM client on AM263x - you can use OSPI and UDMA available on AM243x and remove the HSM client part.

    When porting to AM243x, I would suggest to start with an empty example and add the necessary components and files to it.

    Regards,

    Nitika

  • Hi Nitika,

    I followed your suggestion and created an empty project for AM243x, adding the necessary bootloader components. However, I encountered the following issues:

    In the sbl_enet.c file, there is an error related to #include <drivers/edma.h>.

    Since AM243x uses UDMA instead of EDMA, should I replace these calls with UDMA equivalents, or is there an alternative approach?

    If replacement is required, could you confirm the necessary UDMA APIs to use?

    Please let me know how to proceed with these issues.

    Best regards,
    Kavaskar.

  • Hi Kavaskar,

    Last time this use case was addressed was to enable Ethernet boot on AM243x/AM64x (Errata i2331 makes this method unsuitable for Production systems).

    You can refer to the sbl_enet.c file changes from there as well. Please find the zip file in this E2E - am2431-support-of-ethernet-boot

    Regards,

    Nitika

  • Hi Nitika ,

    When I attempt to build the ZIP file in my SDK (C:\ti\mcu_plus_sdk_am243x_10_01_00_32), I encounter the following error:

    [0]**** Build of configuration Debug for project bootloader_2 ****
    [1]"C:\\ti\\ccs2002\\ccs\\utils\\bin\\gmake" -k -j 12 all -O 
    ...
    [9]makefile:153: recipe for target 'bootloader_2.out' failed
    [10]"syscfg/linker.cmd", line 74: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section, or the section contains padded functions. Run placement with alignment fails for section "GROUP_4" size 0x17ad06. Available memory ranges:
    [11]   MSRAM        size: 0x40000      unused: 0x38230      max hole: 0x38228   
    [12]"syscfg/linker.cmd", line 60: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section, or the section contains padded functions. Placement with alignment fails for section "GROUP_2" size 0x5c068. Available memory ranges:
    [13]   MSRAM        size: 0x40000      unused: 0x38230      max hole: 0x38228   
    [14]error #10010: errors encountered during linking; "bootloader_2.out" not built
    [15]tiarmclang: error: tiarmlnk command failed with exit code 1 (use -v to see invocation)
    [16]gmake[1]: *** [bootloader_2.out] Error 1
    [17]makefile:149: recipe for target 'all' failed
    [18]gmake: *** [all] Error 2
    

    However, when I build the same code in the AM64x SDK (mcu_plus_sdk_am64x_10_00_00_20), it compiles successfully. Can I use the generated .tiimage from the AM64x SDK on my AM2434 board?

    Additionally, I referred to the Ethernet boot documentation, which mentions switching to Ethernet boot mode. How can I configure the DIP switch settings on my LP-AM2434 to enable Ethernet boot mode?

    Moreover, our custom board (AM2432) is always in OSPI boot mode, and I don’t have the option to switch the boot mode. How can I update the firmware in this case?

    Regards,

    Kavaskar

  • Hi Kavaskar,

    Apologies if my reply above was not clear.

    The zip file that I shared contains a completely different implementation - Ethernet boot, that is not suitable for production systems.

    Your use case is just to flash using Ethernet, so the AM263x implementation is what you should port for AM243x. What you can use the zip file for is to see how QSPI, EDMA and HSM client in the AM263x implementation can be replaced with OSPI and UDMA present on AM243x.

    In the sbl_enet.c file, there is an error related to #include <drivers/edma.h>.

    Taking a step back, you can fix these errors by referring to the sbl_enet.c in the zip file and modifying the AM263x code accordingly.

    Regards,

    Nitika

  • Hi Nitika,

    I went through the Ethernet boot documentation, which mentions switching to Ethernet boot mode. How can I configure the DIP switch settings on my LP-AM2434 to enable it?

    Additionally, our custom board (AM2432) is always set to OSPI boot mode, and I don’t have the option to change it. In this case, how can I update the firmware?

    Thanks,
    Kavaskar

  • Hi Kavaskar,

    How can I configure the DIP switch settings on my LP-AM2434 to enable it?

    On LP-AM243, you do not have an option to switch to Ethernet boot mode (limited dip switches are not available on an LP compared to the EVM). 

    If you look at the AM263x documentation, it mentions that you need to flash the sbl_qspi_enet in the same way as you flash sbl_null and then switch to OSPI boot mode. On powering on the board, the application image is sent over ethernet to the EVM. 

    Additionally, our custom board (AM2432) is always set to OSPI boot mode, and I don’t have the option to change it. In this case, how can I update the firmware?

    Is switching to UART boot mode also not possible? How are you currently flashing your board?

    Regards,

    Nitika

  • Hi Nitika,

    My custom board always boots in OSPI mode.

    Currently, I first connect to the target through CCS and use a GEL script to switch from OSPI to UART mode. Then, I run a Python script via CMD to flash the board. After flashing is complete, I reset the board.

    Do you have the sbl_qspi_enet driver for the AM2434? If so, could you please share it with me?

    Thanks,
    Kavaskar

  • Hi Kavaskar,

    Do you have the sbl_qspi_enet driver for the AM2434? If so, could you please share it with me?

    As mentioned in the previous thread, we currently don't have sbl_qspi_enet driver currently supported in our AM243x SDK, it is available for AM263x (which will have to be ported for AM243x).

    Regards,

    Nitika

  • Hi Nitika,

    As per your suggestion, I implemented the flow. However, the function

    EnetApp_initPhyStateHandlerTask(&gEnetSBL_LLDObj.appEvents);

    is missing in AM243x but is available in AM64x/AM63x. I have attached the error log—please provide the relevant function for AM243x.

    Thanks,
    Kavaskar

    [0]**** Build of configuration Debug for project sbl_eboot ****
    [1]"C:\\ti\\ccs2002\\ccs\\utils\\bin\\gmake" -k -j 12 all -O 
     
    [2]Building file: "../sbl_enet.c"
    [3]Invoking: Arm Compiler
    [4]"C:/ti/ccs2002/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -I"C:/ti/ccs2002/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/security" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/networking/enet" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/networking/enet/utils" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/networking/enet/utils/include" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/networking/enet/core" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/networking/enet/core/include" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/networking/enet/core/include/core" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/networking/enet/core/include/phy" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/networking/enet/hw_include" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/networking/enet/hw_include/mdio/V4" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/networking/enet/soc/k3/am64x_am243x" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/middleware" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/board/ethphy/port" -I"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/board/ethphy/enet/rtos_drivers/include" -DSOC_AM243X -D_DEBUG_=1 -g -Wall -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -MMD -MP -MF"sbl_enet.d_raw" -MT"sbl_enet.o" -I"D:/vpg_project/sbl_eboot/Debug/syscfg"   -o"sbl_enet.o" "../sbl_enet.c"
    [5]Finished building: "../sbl_enet.c"
     
    [6]Building target: "sbl_eboot.out"
    [7]Invoking: Arm Linker
    [8]"C:/ti/ccs2002/ccs/tools/compiler/ti-cgt-armllvm_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"empty.Debug.map" -Wl,-i"C:/ti/ccs2002/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/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/mcu_plus_sdk_am243x_10_01_00_32/source/sdl/lib" -Wl,-i"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/security/lib" -Wl,-i"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/networking/enet/lib" -Wl,-i"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/kernel/freertos/lib" -Wl,-i"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/middleware/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_eboot_linkInfo.xml" -Wl,--ram_model -o "sbl_eboot.out" "./empty.o" "./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" "./sbl_enet.o" -Wl,-l"syscfg/linker.cmd"  -Wl,-lfreertos.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,-lenet-cpsw.am243x.r5f.ti-arm-clang.debug.lib -Wl,-lmiddleware.am243x.r5f.ti-arm-clang.debug.lib -Wl,-llibc.a -Wl,-llibsysbm.a 
    [9]makefile:153: recipe for target 'sbl_eboot.out' failed
     
    [10] undefined                       first referenced
    [11]  symbol                             in file     
    [12] ---------                       ----------------
    [13] EnetApp_initPhyStateHandlerTask ./sbl_enet.o    
     
    [14]error #10234-D: unresolved symbols remain
    [15]error #10010: errors encountered during linking; "sbl_eboot.out" not built
    [16]tiarmclang: error: tiarmlnk command failed with exit code 1 (use -v to see invocation)
    [17]gmake[1]: *** [sbl_eboot.out] Error 1
    [18]makefile:149: recipe for target 'all' failed
    [19]gmake: *** [all] Error 2
    [20]**** Build Finished 

  • Hi Kavaskar,

    Can you confirm that your sysconfig Enet settings match the example you are referring to.

    Specifically, can you check the RTOS variant selected in Enet (CPSW) > System Integration Config, it should be set to 'No RTOS' - this will add the function EnetApp_initPhyStateHandlerTask in the auto-generated file ti_enet_open_close.c.

    Regards,

    Nitika

  • Hi Nitika,

    Thank you for your response. The build was successful, but the .tiimage file was not generated.
    Could you please let me know if I might have missed something?

    Thanks,
    Kavaskar

  • Hi Kavaskar,

    Can you share your example Makefile with me?

    Regards,

    Nitika

  • ################################################################################
    # Automatically-generated file. Do not edit!
    ################################################################################
    
    SHELL = cmd.exe
    
    CG_TOOL_ROOT := C:/ti/ccs2002/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS
    
    GEN_OPTS__FLAG := 
    GEN_CMDS__FLAG := -Wl,-l"syscfg/linker.cmd" 
    
    ORDERED_OBJS += \
    "./empty.o" \
    "./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" \
    "./sbl_enet.o" \
    $(GEN_CMDS__FLAG) \
    -Wl,-lfreertos.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,-lenet-cpsw.am243x.r5f.ti-arm-clang.debug.lib \
    -Wl,-lmiddleware.am243x.r5f.ti-arm-clang.debug.lib \
    -Wl,-llibc.a \
    -Wl,-llibsysbm.a \
    
    -include ../makefile.init
    
    RM := DEL /F
    RMDIR := RMDIR /S/Q
    
    # All of the sources participating in the build are defined here
    -include sources.mk
    -include subdir_vars.mk
    -include subdir_rules.mk
    -include objects.mk
    
    ifneq ($(MAKECMDGOALS),clean)
    ifneq ($(strip $(C55_DEPS)),)
    -include $(C55_DEPS)
    endif
    ifneq ($(strip $(C_UPPER_DEPS)),)
    -include $(C_UPPER_DEPS)
    endif
    ifneq ($(strip $(S67_DEPS)),)
    -include $(S67_DEPS)
    endif
    ifneq ($(strip $(S62_DEPS)),)
    -include $(S62_DEPS)
    endif
    ifneq ($(strip $(S_DEPS)),)
    -include $(S_DEPS)
    endif
    ifneq ($(strip $(OPT_DEPS)),)
    -include $(OPT_DEPS)
    endif
    ifneq ($(strip $(C??_DEPS)),)
    -include $(C??_DEPS)
    endif
    ifneq ($(strip $(ASM_UPPER_DEPS)),)
    -include $(ASM_UPPER_DEPS)
    endif
    ifneq ($(strip $(S??_DEPS)),)
    -include $(S??_DEPS)
    endif
    ifneq ($(strip $(C64_DEPS)),)
    -include $(C64_DEPS)
    endif
    ifneq ($(strip $(CXX_DEPS)),)
    -include $(CXX_DEPS)
    endif
    ifneq ($(strip $(S64_DEPS)),)
    -include $(S64_DEPS)
    endif
    ifneq ($(strip $(INO_DEPS)),)
    -include $(INO_DEPS)
    endif
    ifneq ($(strip $(CLA_DEPS)),)
    -include $(CLA_DEPS)
    endif
    ifneq ($(strip $(S55_DEPS)),)
    -include $(S55_DEPS)
    endif
    ifneq ($(strip $(SV7A_DEPS)),)
    -include $(SV7A_DEPS)
    endif
    ifneq ($(strip $(C62_DEPS)),)
    -include $(C62_DEPS)
    endif
    ifneq ($(strip $(C67_DEPS)),)
    -include $(C67_DEPS)
    endif
    ifneq ($(strip $(PDE_DEPS)),)
    -include $(PDE_DEPS)
    endif
    ifneq ($(strip $(K_DEPS)),)
    -include $(K_DEPS)
    endif
    ifneq ($(strip $(C_DEPS)),)
    -include $(C_DEPS)
    endif
    ifneq ($(strip $(CC_DEPS)),)
    -include $(CC_DEPS)
    endif
    ifneq ($(strip $(C++_DEPS)),)
    -include $(C++_DEPS)
    endif
    ifneq ($(strip $(C43_DEPS)),)
    -include $(C43_DEPS)
    endif
    ifneq ($(strip $(S43_DEPS)),)
    -include $(S43_DEPS)
    endif
    ifneq ($(strip $(ASM_DEPS)),)
    -include $(ASM_DEPS)
    endif
    ifneq ($(strip $(S_UPPER_DEPS)),)
    -include $(S_UPPER_DEPS)
    endif
    ifneq ($(strip $(CPP_DEPS)),)
    -include $(CPP_DEPS)
    endif
    ifneq ($(strip $(SA_DEPS)),)
    -include $(SA_DEPS)
    endif
    endif
    
    -include ../makefile.defs
    
    # Add inputs and outputs from these tool invocations to the build variables 
    EXE_OUTPUTS += \
    sbl_eboot.out 
    
    EXE_OUTPUTS__QUOTED += \
    "sbl_eboot.out" 
    
    
    # All Target
    all: $(OBJS) $(GEN_CMDS)
    	@$(MAKE) --no-print-directory -Onone "sbl_eboot.out"
    
    # Tool invocations
    sbl_eboot.out: $(OBJS) $(GEN_CMDS)
    	@echo 'Building target: "$@"'
    	@echo 'Invoking: Arm Linker'
    	"C:/ti/ccs2002/ccs/tools/compiler/ti-cgt-armllvm_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"empty.Debug.map" -Wl,-i"C:/ti/ccs2002/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/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/mcu_plus_sdk_am243x_10_01_00_32/source/sdl/lib" -Wl,-i"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/security/lib" -Wl,-i"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/networking/enet/lib" -Wl,-i"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/kernel/freertos/lib" -Wl,-i"C:/ti/mcu_plus_sdk_am243x_10_01_00_32/source/middleware/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_eboot_linkInfo.xml" -Wl,--ram_model -o "sbl_eboot.out" $(ORDERED_OBJS)
    	@echo 'Finished building target: "$@"'
    	@echo ' '
    	@$(MAKE) --no-print-directory post-build
    
    # Other Targets
    clean:
    	-$(RM) $(GEN_MISC_FILES__QUOTED)$(GEN_FILES__QUOTED)$(EXE_OUTPUTS__QUOTED)
    	-$(RM) "empty.o" "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" "sbl_enet.o" 
    	-$(RM) "empty.d" "syscfg\ti_dpl_config.d" "syscfg\ti_drivers_config.d" "syscfg\ti_drivers_open_close.d" "syscfg\ti_pinmux_config.d" "syscfg\ti_power_clock_config.d" "syscfg\ti_board_config.d" "syscfg\ti_board_open_close.d" "syscfg\ti_enet_config.d" "syscfg\ti_enet_open_close.d" "syscfg\ti_enet_soc.d" "syscfg\ti_enet_lwipif.d" "main.d" "sbl_enet.d" 
    	-$(RMDIR) $(GEN_MISC_DIRS__QUOTED)
    	-@echo 'Finished clean'
    	-@echo ' '
    
    post-build:
    	-$(MAKE) -C D:\vpg_project\sbl_eboot -f makefile_ccs_bootimage_gen OUTNAME=sbl_eboot PROFILE=Debug MCU_PLUS_SDK_PATH=C:/ti/mcu_plus_sdk_am243x_10_01_00_32 CG_TOOL_ROOT=C:/ti/ccs2002/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS CCS_INSTALL_DIR=C:\ti\ccs2002\ccs\ CCS_IDE_MODE=desktop DEVICE=am243x
    	-@echo ' '
    
    .PHONY: all clean dependents
    .SECONDARY:
    
    -include ../makefile.targets
    
    

  • Hi Nitika,

    I’ve attached my sbl_ospi_enet driver for the AM2434 device. Could you please review it and let me know if I’ve missed any configuration or if anything looks incorrect?

    Please let me know if there’s anything I should modify.

    Thanks and regards,
    Kavaskar                                                 sbl_eboot.zip

  • Hi Kavaskar,

    The Makefile of SBL examples have additional commands to generate more files. You can refer to the existing SBL example for more info.

    Can you replace the Makefile in your ti-arm-clang folder with the one attached below and let me know if it works.

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/908/8422.makefile

    Regards,

    Nitika  

  • The .tiimage file has been successfully generated. I’ll test the driver next and keep you posted.