Other Parts Discussed in Thread: SYSCONFIG
Tool/software:
Product: MCU+ SDK AM243x (Version 10.00.00.20)
Tool: SysConfig (Version 1.20.0+3587)
Issue Description:
When configuring both CPSW and ICSSG Ethernet peripherals in SysConfig, the tool generates duplicate macro definitions in the configuration files, causing compiler warnings and potential runtime issues. This is a critical issue as the AM243x EVM has both Ethernet peripherals physically present and they should be usable simultaneously.
Hardware Context:
- AM243x EVM with both CPSW and ICSSG Ethernet ports
Steps to Reproduce:
1. Open a project in SysConfig
2. Add both CPSW and ICSSG Ethernet peripherals
3. Configure each peripheral with appropriate settings
4. Generate the configuration files
5. Build the project
Expected Behavior:
- SysConfig should generate properly namespaced or conditionally compiled configurations for each peripheral
- No macro redefinition warnings should occur
- Both peripherals should be able to operate simultaneously
- This is a valid use case that should be supported by the tool
Actual Behavior:
- The tool generates duplicate macro definitions in ti_enet_config.h and ti_enet_config.c
- Compiler warnings about macro redefinitions occur
- Example redefinitions:
- ENET_SYSCFG_MAX_MAC_PORTS (2U vs 1U)
- ENET_SYSCFG_ENABLE_MDIO_MANUALMODE (1U vs 0U)
- ENET_SYSCFG_NETIF_COUNT (1U vs 0U)
- ENET_SYSCFG_DEFAULT_NETIF_IDX
Impact:
- Compiler warnings that need to be suppressed
- Potential runtime issues due to conflicting configurations
- No viable workaround exists as the files are auto-generated
- Users cannot use both Ethernet peripherals simultaneously as intended
Additional Information:
- The issue appears to be in the code generation logic of SysConfig
- The tool should either:
1. Generate separate configuration files for each peripheral type
2. Use different macro namespaces for each peripheral
3. Use conditional compilation to separate the configurations