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.

TMDS243EVM: Cannot initialize CPSW interface without EEPROM

Part Number: TMDS243EVM
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

I'm trying to run the example available in SDK11 that runs MQTT client on this board (for reference i put it here). From sysconfig i removed EEPROM and related I2C used to access it. On CPSW settings, in "System integration config -> MAC Address Assignment Method" I set "Manual entry". However, when I compile the project, files generated form sysconfig keep trying reading the EEPROM. The result is that build process fail throwing the following errors:

  • use of undeclared identifier 'CONFIG_EEPROM0' ti_board_config.c /cpsw_lwip_mqtt_am243x-evm_r5fss0-0_freertos_ti-arm-clang/Debug/syscfg line 334 C/C++ Problem
  • use of undeclared identifier 'gEepromHandle'; did you mean 'gUartHandle'? ti_board_config.c /cpsw_lwip_mqtt_am243x-evm_r5fss0-0_freertos_ti-arm-clang/Debug/syscfg line 327 C/C++ Problem

Hereafter a copy of sysconfig that I'm using and a screenshot of the setting that I change in CPSW:

/**
 * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
 * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
 * @cliArgs --device "AM243x_ALV_beta" --part "ALV" --package "ALV" --context "r5fss0-0" --product "MCU_PLUS_SDK_AM243x@11.00.00"
 * @v2CliArgs --device "AM2434" --package "FCBGA (ALV)" --variant "AM2434-D" --context "r5fss0-0" --product "MCU_PLUS_SDK_AM243x@11.00.00"
 * @versions {"tool":"1.24.1+4189"}
 */

/**
 * Import the modules used in this configuration.
 */
const gpio            = scripting.addModule("/drivers/gpio/gpio", {}, false);
const gpio1           = gpio.addInstance();
const i2c             = scripting.addModule("/drivers/i2c/i2c", {}, false);
const i2c1            = i2c.addInstance();
const debug_log       = scripting.addModule("/kernel/dpl/debug_log");
const dpl_cfg         = scripting.addModule("/kernel/dpl/dpl_cfg");
const mpu_armv7       = scripting.addModule("/kernel/dpl/mpu_armv7", {}, false);
const mpu_armv71      = mpu_armv7.addInstance();
const mpu_armv72      = mpu_armv7.addInstance();
const mpu_armv73      = mpu_armv7.addInstance();
const mpu_armv74      = mpu_armv7.addInstance();
const mpu_armv75      = mpu_armv7.addInstance();
const mpu_armv76      = mpu_armv7.addInstance();
const mpu_armv77      = mpu_armv7.addInstance();
const default_linker  = scripting.addModule("/memory_configurator/default_linker", {}, false);
const default_linker1 = default_linker.addInstance();
const general         = scripting.addModule("/memory_configurator/general", {}, false);
const general1        = general.addInstance();
const region          = scripting.addModule("/memory_configurator/region", {}, false);
const region1         = region.addInstance();
const section         = scripting.addModule("/memory_configurator/section", {}, false);
const section1        = section.addInstance();
const section2        = section.addInstance();
const section3        = section.addInstance();
const section4        = section.addInstance();
const section5        = section.addInstance();
const section6        = section.addInstance();
const section7        = section.addInstance();
const section8        = section.addInstance();
const section9        = section.addInstance();
const section10       = section.addInstance();
const section11       = section.addInstance();
const section12       = section.addInstance();
const enet_cpsw       = scripting.addModule("/networking/enet_cpsw/enet_cpsw", {}, false);
const enet_cpsw1      = enet_cpsw.addInstance();

/**
 * Write custom configuration values to the imported modules.
 */
gpio1.$name                    = "CONFIG_GPIO0";
gpio1.pinDir                   = "OUTPUT";
gpio1.useMcuDomainPeripherals  = true;
gpio1.MCU_GPIO.$assign         = "MCU_GPIO0";
gpio1.MCU_GPIO.gpioPin.$assign = "MCU_SPI1_CS0";

i2c1.$name           = "CONFIG_I2C1";
i2c1.I2C.$assign     = "I2C1";
i2c1.I2C.SCL.$assign = "I2C1_SCL";
i2c1.I2C.SDA.$assign = "I2C1_SDA";
i2c1.I2C_child.$name = "drivers_i2c_v0_i2c_v0_template2";

debug_log.enableUartLog = true;
debug_log.enableCssLog  = false;
debug_log.uartLog.$name = "CONFIG_UART0";

const uart_v0_template  = scripting.addModule("/drivers/uart/v0/uart_v0_template", {}, false);
const uart_v0_template1 = uart_v0_template.addInstance({}, false);
uart_v0_template1.$name = "drivers_uart_v0_uart_v0_template0";
debug_log.uartLog.child = uart_v0_template1;

mpu_armv71.$name             = "CONFIG_MPU_REGION0";
mpu_armv71.size              = 31;
mpu_armv71.attributes        = "Device";
mpu_armv71.accessPermissions = "Supervisor RD+WR, User RD";
mpu_armv71.allowExecute      = false;

mpu_armv72.$name             = "CONFIG_MPU_REGION1";
mpu_armv72.size              = 15;
mpu_armv72.accessPermissions = "Supervisor RD+WR, User RD";

mpu_armv73.$name             = "CONFIG_MPU_REGION2";
mpu_armv73.baseAddr          = 0x41010000;
mpu_armv73.size              = 15;
mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";

mpu_armv74.$name             = "CONFIG_MPU_REGION3";
mpu_armv74.accessPermissions = "Supervisor RD+WR, User RD";
mpu_armv74.baseAddr          = 0x70000000;
mpu_armv74.size              = 23;

mpu_armv75.$name             = "CONFIG_MPU_REGION4";
mpu_armv75.accessPermissions = "Supervisor RD+WR, User RD";
mpu_armv75.baseAddr          = 0x80000000;
mpu_armv75.size              = 31;

mpu_armv76.$name             = "CONFIG_MPU_REGION5";
mpu_armv76.accessPermissions = "Supervisor RD+WR, User RD";
mpu_armv76.baseAddr          = 0xA5000000;
mpu_armv76.size              = 23;
mpu_armv76.attributes        = "NonCached";

mpu_armv77.$name    = "CONFIG_MPU_REGION6";
mpu_armv77.size     = 27;
mpu_armv77.baseAddr = 0x60000000;

default_linker1.$name = "memory_configurator_default_linker0";

general1.$name           = "CONFIG_GENERAL0";
general1.heap_size       = 300000;
general1.additional_data = "#include \"ti_enet_config.h\"";
general1.stack_size      = 8192;
general1.linker.$name    = "TIARMCLANG0";

region1.$name                               = "MEMORY_REGION_CONFIGURATION0";
region1.memory_region.create(9);
region1.memory_region[0].type               = "TCMA_R5F";
region1.memory_region[0].$name              = "R5F_VECS";
region1.memory_region[0].size               = 0x40;
region1.memory_region[0].auto               = false;
region1.memory_region[1].type               = "TCMA_R5F";
region1.memory_region[1].$name              = "R5F_TCMA";
region1.memory_region[1].size               = 0x7FC0;
region1.memory_region[2].type               = "TCMB_R5F";
region1.memory_region[2].$name              = "R5F_TCMB0";
region1.memory_region[2].size               = 0x8000;
region1.memory_region[3].$name              = "MSRAM";
region1.memory_region[3].auto               = false;
region1.memory_region[3].manualStartAddress = 0x70080000;
region1.memory_region[3].size               = 0x3000;
region1.memory_region[4].type               = "FLASH";
region1.memory_region[4].$name              = "FLASH";
region1.memory_region[4].auto               = false;
region1.memory_region[4].manualStartAddress = 0x60200000;
region1.memory_region[4].size               = 0x100000;
region1.memory_region[5].$name              = "USER_SHM_MEM";
region1.memory_region[5].auto               = false;
region1.memory_region[5].manualStartAddress = 0x701D0000;
region1.memory_region[5].size               = 0x4000;
region1.memory_region[6].auto               = false;
region1.memory_region[6].$name              = "LOG_SHM_MEM";
region1.memory_region[6].manualStartAddress = 0x701D4000;
region1.memory_region[6].size               = 0x4000;
region1.memory_region[7].auto               = false;
region1.memory_region[7].$name              = "RTOS_NORTOS_IPC_SHM_MEM";
region1.memory_region[7].manualStartAddress = 0x701D8000;
region1.memory_region[7].size               = 0x8000;
region1.memory_region[8].type               = "DDR_ALL";
region1.memory_region[8].$name              = "DDR";
region1.memory_region[8].auto               = false;
region1.memory_region[8].size               = 0xFFF0000;

section1.$name                        = "Vector Table";
section1.load_memory                  = "R5F_VECS";
section1.group                        = false;
section1.output_section.create(1);
section1.output_section[0].$name      = ".vectors";
section1.output_section[0].palignment = true;

section2.$name                        = "Text Segments";
section2.load_memory                  = "MSRAM";
section2.output_section.create(5);
section2.output_section[0].$name      = ".text.hwi";
section2.output_section[0].palignment = true;
section2.output_section[1].$name      = ".text.cache";
section2.output_section[1].palignment = true;
section2.output_section[2].$name      = ".text.mpu";
section2.output_section[2].palignment = true;
section2.output_section[3].$name      = ".text.boot";
section2.output_section[3].palignment = true;
section2.output_section[4].$name      = ".text:abort";
section2.output_section[4].palignment = true;

section3.$name                        = "Code and Read-Only Data";
section3.load_memory                  = "DDR";
section3.output_section.create(2);
section3.output_section[0].$name      = ".text";
section3.output_section[0].palignment = true;
section3.output_section[1].$name      = ".rodata";
section3.output_section[1].palignment = true;

section4.$name                        = "Data Segment";
section4.load_memory                  = "DDR";
section4.output_section.create(1);
section4.output_section[0].$name      = ".data";
section4.output_section[0].palignment = true;

section5.$name                        = "Memory Segments";
section5.load_memory                  = "DDR";
section5.output_section.create(2);
section5.output_section[0].$name      = ".sysmem";
section5.output_section[0].palignment = true;
section5.output_section[1].$name      = ".stack";
section5.output_section[1].palignment = true;

section6.$name                                   = "CONFIG_SECTION2";
section6.load_memory                             = "DDR";
section6.output_section.create(1);
section6.output_section[0].$name                 = ".bss";
section6.output_section[0].palignment            = true;
section6.output_section[0].output_sections_start = "__BSS_START";
section6.output_section[0].output_sections_end   = "__BSS_END";

section7.$name                                    = "Stack Segments";
section7.load_memory                              = "DDR";
section7.output_section.create(5);
section7.output_section[0].$name                  = ".irqstack";
section7.output_section[0].output_sections_start  = "__IRQ_STACK_START";
section7.output_section[0].output_sections_end    = "__IRQ_STACK_END";
section7.output_section[0].input_section.create(1);
section7.output_section[0].input_section[0].$name = ". = . + __IRQ_STACK_SIZE;";
section7.output_section[1].$name                  = ".fiqstack";
section7.output_section[1].output_sections_start  = "__FIQ_STACK_START";
section7.output_section[1].output_sections_end    = "__FIQ_STACK_END";
section7.output_section[1].input_section.create(1);
section7.output_section[1].input_section[0].$name = ". = . + __FIQ_STACK_SIZE;";
section7.output_section[2].$name                  = ".svcstack";
section7.output_section[2].output_sections_start  = "__SVC_STACK_START";
section7.output_section[2].output_sections_end    = "__SVC_STACK_END";
section7.output_section[2].input_section.create(1);
section7.output_section[2].input_section[0].$name = ". = . + __SVC_STACK_SIZE;";
section7.output_section[3].$name                  = ".abortstack";
section7.output_section[3].output_sections_start  = "__ABORT_STACK_START";
section7.output_section[3].output_sections_end    = "__ABORT_STACK_END";
section7.output_section[3].input_section.create(1);
section7.output_section[3].input_section[0].$name = ". = . + __ABORT_STACK_SIZE;";
section7.output_section[4].$name                  = ".undefinedstack";
section7.output_section[4].output_sections_start  = "__UNDEFINED_STACK_START";
section7.output_section[4].output_sections_end    = "__UNDEFINED_STACK_END";
section7.output_section[4].input_section.create(1);
section7.output_section[4].input_section[0].$name = ". = . + __UNDEFINED_STACK_SIZE;";

section8.$name                       = "User Shared Memory";
section8.type                        = "NOLOAD";
section8.load_memory                 = "USER_SHM_MEM";
section8.group                       = false;
section8.output_section.create(1);
section8.output_section[0].$name     = ".bss.user_shared_mem";
section8.output_section[0].alignment = 0;

section9.$name                       = "Log Shared Memory";
section9.load_memory                 = "LOG_SHM_MEM";
section9.type                        = "NOLOAD";
section9.group                       = false;
section9.output_section.create(1);
section9.output_section[0].$name     = ".bss.log_shared_mem";
section9.output_section[0].alignment = 0;

section10.$name                       = "IPC Shared Memory";
section10.type                        = "NOLOAD";
section10.load_memory                 = "RTOS_NORTOS_IPC_SHM_MEM";
section10.group                       = false;
section10.output_section.create(1);
section10.output_section[0].$name     = ".bss.ipc_vring_mem";
section10.output_section[0].alignment = 0;

section11.$name                                              = "CONFIG_SECTION0";
section11.load_memory                                        = "DDR";
section11.group                                              = false;
section11.type                                               = "NOLOAD";
section11.output_section.create(1);
section11.output_section[0].$name                            = ".enet_dma_mem ";
section11.output_section[0].alignment                        = 128;
section11.output_section[0].input_section.create(2);
section11.output_section[0].input_section[0].$name           = "*(*ENET_DMA_DESC_MEMPOOL)";
section11.output_section[0].input_section[1].$name           = "*(*ENET_DMA_RING_MEMPOOL)";
section11.output_section[0].input_section[1].additional_data = "#if (ENET_SYSCFG_PKT_POOL_ENABLE == 1)\n        *(*ENET_DMA_PKT_MEMPOOL)\n#endif";

section12.$name                       = "CONFIG_SECTION1";
section12.load_memory                 = "MSRAM";
section12.group                       = false;
section12.type                        = "NOLOAD";
section12.output_section.create(3);
section12.output_section[0].$name     = "bss:ENET_DMA_OBJ_MEM";
section12.output_section[0].alignment = 128;
section12.output_section[1].$name     = ".bss:ENET_DMA_PKT_INFO_MEMPOOL";
section12.output_section[1].alignment = 128;
section12.output_section[2].$name     = ".bss:ENET_ICSSG_OCMC_MEM";
section12.output_section[2].alignment = 128;

enet_cpsw1.$name                        = "CONFIG_ENET_CPSW0";
enet_cpsw1.PktInfoOnlyEnable            = true;
enet_cpsw1.mdioMode                     = "MDIO_MODE_MANUAL";
enet_cpsw1.LargePoolPktCount            = 40;
enet_cpsw1.macAddrConfig                = "Manual Entry";
enet_cpsw1.MDIO.MDC.$assign             = "PRG0_PRU1_GPO19";
enet_cpsw1.txDmaChannel[0].$name        = "ENET_DMA_TX_CH0";
enet_cpsw1.rxDmaChannel[0].$name        = "ENET_DMA_RX_CH0";
enet_cpsw1.rxDmaChannel[0].PacketsCount = 40;
enet_cpsw1.rxDmaChannel[0].macAddrCount = 2;
enet_cpsw1.netifInstance.create(1);
enet_cpsw1.netifInstance[0].$name       = "NETIF_INST_ID0";

const ethphy_cpsw_icssg  = scripting.addModule("/board/ethphy_cpsw_icssg/ethphy_cpsw_icssg", {}, false);
const ethphy_cpsw_icssg1 = ethphy_cpsw_icssg.addInstance({}, false);
ethphy_cpsw_icssg1.$name = "CONFIG_ENET_ETHPHY0";
enet_cpsw1.ethphy1       = ethphy_cpsw_icssg1;

const ethphy_cpsw_icssg2 = ethphy_cpsw_icssg.addInstance({}, false);
ethphy_cpsw_icssg2.$name = "CONFIG_ENET_ETHPHY1";
enet_cpsw1.ethphy2       = ethphy_cpsw_icssg2;

const udma         = scripting.addModule("/drivers/udma/udma", {}, false);
const udma1        = udma.addInstance({}, false);
enet_cpsw1.udmaDrv = udma1;

/**
 * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
 * version of the tool will not impact the pinmux you originally saw.  These lines can be completely deleted in order to
 * re-solve from scratch.
 */
debug_log.uartLog.UART.$suggestSolution         = "USART0";
debug_log.uartLog.UART.RXD.$suggestSolution     = "UART0_RXD";
debug_log.uartLog.UART.TXD.$suggestSolution     = "UART0_TXD";
enet_cpsw1.MDIO.$suggestSolution                = "MDIO0";
enet_cpsw1.MDIO.MDIO.$suggestSolution           = "PRG0_PRU1_GPO18";
enet_cpsw1.RGMII.$suggestSolution               = "CPSW";
enet_cpsw1.RGMII.RGMII1_RD0.$suggestSolution    = "PRG0_PRU1_GPO7";
enet_cpsw1.RGMII.RGMII1_RD1.$suggestSolution    = "PRG0_PRU1_GPO9";
enet_cpsw1.RGMII.RGMII1_RD2.$suggestSolution    = "PRG0_PRU1_GPO10";
enet_cpsw1.RGMII.RGMII1_RD3.$suggestSolution    = "PRG0_PRU1_GPO17";
enet_cpsw1.RGMII.RGMII1_RX_CTL.$suggestSolution = "PRG0_PRU0_GPO9";
enet_cpsw1.RGMII.RGMII1_RXC.$suggestSolution    = "PRG0_PRU0_GPO10";
enet_cpsw1.RGMII.RGMII1_TD0.$suggestSolution    = "PRG1_PRU1_GPO7";
enet_cpsw1.RGMII.RGMII1_TD1.$suggestSolution    = "PRG1_PRU1_GPO9";
enet_cpsw1.RGMII.RGMII1_TD2.$suggestSolution    = "PRG1_PRU1_GPO10";
enet_cpsw1.RGMII.RGMII1_TD3.$suggestSolution    = "PRG1_PRU1_GPO17";
enet_cpsw1.RGMII.RGMII1_TX_CTL.$suggestSolution = "PRG1_PRU0_GPO9";
enet_cpsw1.RGMII.RGMII1_TXC.$suggestSolution    = "PRG1_PRU0_GPO10";
enet_cpsw1.RGMII.RGMII2_RD0.$suggestSolution    = "PRG1_PRU1_GPO0";
enet_cpsw1.RGMII.RGMII2_RD1.$suggestSolution    = "PRG1_PRU1_GPO1";
enet_cpsw1.RGMII.RGMII2_RD2.$suggestSolution    = "PRG1_PRU1_GPO2";
enet_cpsw1.RGMII.RGMII2_RD3.$suggestSolution    = "PRG1_PRU1_GPO3";
enet_cpsw1.RGMII.RGMII2_RX_CTL.$suggestSolution = "PRG1_PRU1_GPO4";
enet_cpsw1.RGMII.RGMII2_RXC.$suggestSolution    = "PRG1_PRU1_GPO6";
enet_cpsw1.RGMII.RGMII2_TD0.$suggestSolution    = "PRG1_PRU1_GPO11";
enet_cpsw1.RGMII.RGMII2_TD1.$suggestSolution    = "PRG1_PRU1_GPO12";
enet_cpsw1.RGMII.RGMII2_TD2.$suggestSolution    = "PRG1_PRU1_GPO13";
enet_cpsw1.RGMII.RGMII2_TD3.$suggestSolution    = "PRG1_PRU1_GPO14";
enet_cpsw1.RGMII.RGMII2_TX_CTL.$suggestSolution = "PRG1_PRU1_GPO15";
enet_cpsw1.RGMII.RGMII2_TXC.$suggestSolution    = "PRG1_PRU1_GPO16";

Could someone explain what I'm missing to get completely rid of this EEPROM?

  • FYI, I'm using Sysconfig version 1.24.1

  • Hi Davide, I think I found a way to accomplish this.

    In the under TI Networking --> ENET configuration, there's a section called "Board Config".  In Sysconfig 1.24.1, there's a lonely option for just "Custom Board".
    if you click this, then SysConfig will not generate several functions and attempting to build will lead to unresolved symbols in the linker script.  

    EnetBoard_getId                   ./syscfg/ti_enet_open_close.o
    EnetBoard_getMacAddrList  ./syscfg/ti_enet_config.o
    EnetBoard_getMiiConfig       ./syscfg/ti_enet_open_close.o
    EnetBoard_getPhyCfg          ./syscfg/ti_enet_open_close.o
    EnetBoard_setupPorts         ./syscfg/ti_enet_open_close.o
    gEnetPhyDrvTbl                  C:/ti/mcu_plus_sdk_am243x_11_00_00_15/source/networking/enet/lib/enet-cpsw.am243x.r5f.ti-arm-clang.debug.lib<enetphy.obj>

    You need to supply these yourself, but "borrowing" these functions are obviously supplied by sysconfig without the "custom board" option, they are in the "ti_board_config.c" file

    EnetBoard_getMacAddrList is the ONLY function that has the I2C EEPROM calls:  (lines 327 and 334, at least on my sysconfig)

    status = EEPROM_read(gEepromHandle[CONFIG_EEPROM0],  I2C_EEPROM_MAC_CTRL_OFFSET, &numMacMax, sizeof(uint8_t));
    and
    status = EEPROM_read(gEepromHandle[CONFIG_EEPROM0], I2C_EEPROM_MAC_DATA_OFFSET, macAddrBuf, (macAddrCnt * ENET_MAC_ADDR_LEN));
    Really looks like there two calls to get at most 48 bytes, so replacing that with whatever should avoid dependency on I2C EEPROM.  I will try this with a const uint8_t array.  

  • Hi Davide,

    If disabling the on board EEPROM is the only change you would want to do, there is an option to disable the EEPROM access completely in the SDK, but it is not directly exposed in the sysconfig-GUI. You would need to navigate to the location <mcu_plus_sdk_am243x_11_00_00_15/source/networking/enet/core/sysconfig/networking/.meta/enet_cpsw/am64x_am243x/enet_cpsw_am64x_am243x.syscfg.js> and make the following update to it and save the changes:

            {
                name: "disableOnboardMAC",
                description: "Use User defined MAC address for CPSW",
                displayName: "Disable on-board MAC Addresses",
                default: false,
    -            hidden: true,
    +            hidden: false,
            },

    Now, launch the sysconfig-GUI again, and you will find the option to disable accessing EEPROM completely in the board config in the section: TI NETWORKING -> Enet (CPSW) -> Board Config -> Disable on-board MAC Addresses -> Check this option to disable EEPROM access.

    Regards,
    Teja.