This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM2432: Execute Example Code without EEPROM

Part Number: AM2432
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi,

The customer wants to execute some example codes in MCU+SDK without EEPROM.

So, they tried to remove the following codes which access EEPROM, but these codes come back when the project is built even though these codes are removed.

In the debug/syscfg folder,

  • ti_board_config.c
  • ti_board_open_close.c

Could you tell them how to modify the code in the debug/syscfg ?

Could you tell them the specific way to remove EEPROM access ?

 

Thanks and regards,

Hideaki

  • Hello Hideaki,

    I am looking at your queries and you may expect reply in one or two days .

    Regards,

    Anil.

  • Hello Hideaki,

    The above files are syscfg-generated files and we can't edit them.

    Even if you edit and compile the project again, you may get the EEPROM-generated files. 

    If you really don't want the EEPROM, why can't you disable the EEPROM peripherals from the syscfg and generate the code? This is a good approach.

    Please let me know if you face any issues while disabling the EEPROM from syscfg.

    Regards,

    Anil.

  • Hi Anil,

    The customer tried to disable the EEPROM from Sysconfig, but some errors occurred when the example project was compiled.

    Could you check whether there is any problem in their procedure below ?

     

    CCS :        ver.12.7.1

    Sys Config :   ver 1.20.0.3587

    MCU+ SDK :  mcu_plus_am243x_09_01_00_41

     

    Import the following example project

    • examples / networking / enet_layer2_icssg / icssg_layer2_dualmac / am243x-evm

     

    1)  Compile => Successfully

    2)  Select EEPROM and Remove “CONFIG_EEPROM0” on SysConfig.

         After that, compile it.

    3)  Errors occur like below.

    "C:/ti/ti_cgt_tiarmclang_3.2.0.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -I"C:/ti/ti_cgt_tiarmclang_3.2.0.LTS/include/c" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/kernel/freertos/FreeRTOS-Kernel/include" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/kernel/freertos/config/am243x/r5f" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet/utils" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet/utils/include" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet/utils/V3" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet/core" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet/core/include" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet/core/include/phy" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet/core/include/core" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet/soc/k3/am64x_am243x" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet/hw_include" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet/hw_include/mdio/V4" -DSOC_AM243X -DENET_ENABLE_PER_ICSSG=1 -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:/AM2432LAN/icssg_layer2_dualmac_am243x-evm_r5fss0-0_freertos_ti-arm-clang/Debug/syscfg"   -o"syscfg/ti_board_config.o" "syscfg/ti_board_config.c"

    subdir_rules.mk:52: recipe for target 'syscfg/ti_board_config.o' failed

     

    syscfg/ti_board_config.c:520:26: error: use of undeclared identifier 'gEepromHandle'; did you mean 'gUartHandle'?

        status = EEPROM_read(gEepromHandle[CONFIG_EEPROM0],  I2C_EEPROM_MAC_CTRL_OFFSET, &numMacMax, sizeof(uint8_t));

                             ^~~~~~~~~~~~~

                             gUartHandle

    C:/AM2432LAN/icssg_layer2_dualmac_am243x-evm_r5fss0-0_freertos_ti-arm-clang/Debug/syscfg/ti_drivers_open_close.h:90:20: note: 'gUartHandle' declared here

    extern UART_Handle gUartHandle[CONFIG_UART_NUM_INSTANCES];

                       ^

    syscfg/ti_board_config.c:520:40: error: use of undeclared identifier 'CONFIG_EEPROM0'

        status = EEPROM_read(gEepromHandle[CONFIG_EEPROM0],  I2C_EEPROM_MAC_CTRL_OFFSET, &numMacMax, sizeof(uint8_t));

                                           ^

    syscfg/ti_board_config.c:527:26: error: use of undeclared identifier 'gEepromHandle'; did you mean 'gUartHandle'?

        status = EEPROM_read(gEepromHandle[CONFIG_EEPROM0], I2C_EEPROM_MAC_DATA_OFFSET, macAddrBuf, (macAddrCnt * ENET_MAC_ADDR_LEN));

                             ^~~~~~~~~~~~~

                             gUartHandle

    C:/AM2432LAN/icssg_layer2_dualmac_am243x-evm_r5fss0-0_freertos_ti-arm-clang/Debug/syscfg/ti_drivers_open_close.h:90:20: note: 'gUartHandle' declared here

    extern UART_Handle gUartHandle[CONFIG_UART_NUM_INSTANCES];

                       ^

    syscfg/ti_board_config.c:527:40: error: use of undeclared identifier 'CONFIG_EEPROM0'

        status = EEPROM_read(gEepromHandle[CONFIG_EEPROM0], I2C_EEPROM_MAC_DATA_OFFSET, macAddrBuf, (macAddrCnt * ENET_MAC_ADDR_LEN));

                                           ^

    4 errors generated.

     

    gmake: *** [syscfg/ti_board_config.o] Error 1

     

    Building file: "syscfg/ti_board_open_close.c"

    Invoking: Arm Compiler

    "C:/ti/ti_cgt_tiarmclang_3.2.0.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -I"C:/ti/ti_cgt_tiarmclang_3.2.0.LTS/include/c" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/kernel/freertos/FreeRTOS-Kernel/include" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/kernel/freertos/config/am243x/r5f" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet/utils" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet/utils/include" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet/utils/V3" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet/core" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet/core/include" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet/core/include/phy" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet/core/include/core" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet/soc/k3/am64x_am243x" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet/hw_include" -I"C:/ti/mcu_plus_sdk_am243x_09_01_00_41/source/networking/enet/hw_include/mdio/V4" -DSOC_AM243X -DENET_ENABLE_PER_ICSSG=1 -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:/AM2432LAN/icssg_layer2_dualmac_am243x-evm_r5fss0-0_freertos_ti-arm-clang/Debug/syscfg"   -o"syscfg/ti_board_open_close.o" "syscfg/ti_board_open_close.c"

    Finished building: "syscfg/ti_board_open_close.c"

     

     

    gmake: Target 'all' not remade because of errors.

     

     

     

    Thanks and regards,

    Hideaki

  • Hello Hideaki,

    By default, the example is expecting to read the MAC address from the EEPROM configuration even though we disabled the EEPROM config from the syscfg.

    I am not sure if customers are not using the MAC addresses from the EEPROM, then how they can allocate the MAC addresses.

    Regards,

    Anil.

  • Hi Anil,

    Thank you for your prompt reply.

    They use the fixed MAC address at the evaluation. Could you give them any advice to modify the above example code using the fixed MAC address on the arbitrary address on RAM without EEPROM access ?

    Thanks and regards,

    Hideaki

  • Hello Hideaki,

    I am routing your query to PRU Ethernet expert to comment on the above issue .

    Regards,

    Anil.

  • Hi Hideaki,

    They use the fixed MAC address at the evaluation.

    You are on the right track. Can you try the steps below and let me know if it works for you.

    1. Go to the EEPROM tab and remove the default CONFIG_EEPROM0.

    2. Go to Enet (ICSS) and select Manual Entry under 'MAC address assignment' for both CONFIG_ENET_ICSS instances. Add your MAC address to the 'MAC address List' box

    On making the modifications in Step 2, you will see the auto-generated ti_enet_config.c reflect that change as below:

    Here, you can see that the call to EnetAppSoc_fillMacAddrList() is removed. This function internally calls the EnetBoard_getMacAddrList() function - this is the one giving you the errors above.

    You can comment out this function's content in the Sysconfig template file, so there are no compilation errors.

    3. Go to <mcu_plus_sdk>\source\networking\.meta\enet_icss\templates\enet_board_cfg_am64x_am243x.c.xdt file and comment out the contents of the function EnetBoard_getMacAddrList().

    Note: This function is only called to get the MAC address list when reading from EEPROM and/or eFuse, since you have set Manual Entry of MAC addresses, this function is no longer needed.

    4. Close the Sysconfig file and open it again to verify that the commented out function is auto-generated in ti_board_config.c file. From the mcu_plus_sdk folder, run make -s -C  examples\networking\enet_layer2_icssg\icssg_layer2_dualmac\am243x-evm\r5fss0-0_freertos\ti-arm-clang\  syscfg-gui

    5. Rebuild the example.

    Regards,

    Nitika

  • Hi Nitika,

    Appreciate for explaining the procedure. The customer was able to build the sample project “icssg_layer2_dualmac”.

    However, only the following step was not succeeded.

    From the mcu_plus_sdk folder, run make -s -C  examples\networking\enet_layer2_icssg\icssg_layer2_dualmac\am243x-evm\r5fss0-0_freertos\ti-arm-clang\  syscfg-gui

     

    Since they thought that there was wrong PATH for “make”, they set the specified path "C:\ti\ccs1270\ccs\utils\bin\gmake.exe".

    However, “File not found” occurred.

    Do you have any idea to resolve this ? or does this not matter ?

    -----

    PS C:\ti\mcu_plus_sdk_am243x_09_02_00_50> C:\ti\ccs1270\ccs\utils\bin\gmake.exe -s -C  examples\networking\enet_layer2_icssg\icssg_layer2_dualmac\am243x-evm\r5fss0-0_freertos\ti-arm-clang\  syscfg-gui

    process_begin: CreateProcess(NULL, C:/ti/sysconfig_1.20.0/nw/nw C:/ti/sysconfig_1.20.0 --product C:/ti/mcu_plus_sdk_am243x_09_02_00_50/.metadata/product.json --device AM243x_ALV_beta --context r5fss0-0 --part ALV --package ALV --output generated/ ../example.syscfg, ...) failed.

    make (e=2): The specified file could not be found

    makefile:279: recipe for target 'syscfg-gui' failed

    gmake: *** [syscfg-gui] Error 2

    -----

     

    Thanks and regards,

    Hideaki

  • Hi Hideaki,

    The customer was able to build the sample project “icssg_layer2_dualmac”

    That's great! The customer can continue to use CCS for viewing the sysconfig file as well. What I suggested above was to use the Makefiles (not necessary to do that).

    Now, the error that you see above is usually when sysconfig_1.20.0 is not present in the C:\ti\ directory. Can you verify that you have the correct sysconfig version in the right directory?

    Regards,

    Nitika