AM62Px MCU+ SDK  11.02.00
Ethernet Firmware

Introduction

This Ethernet Firmware example demonstrates ability to perform traffic steering from CPSW to multiple cores. This uses hardware capabilities of CPSW to direct unicast traffic, and a shared memory based layer to send multicast and broadcast traffic.

Ethernet Firmware server is the application which owns the CPSW peripheral, and controls the behaviour. Ethernet firmware clients are the applications which are running on different cores, which send requests to ethernet firmware server based on their requirements.

Note
This is in work-in-progress state currently, and complete feature list and functionality will be updates as functional validation progresses.
Attention
For more information, please refer to the link https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-j784s4/latest/exports/docs/ethfw/docs/user_guide/ethfw_c_ug_top.html

Supported Combinations

Ethernet Firmware Server

Parameter Value
CPU + OS wkup-r5fss0-0_freertos
Toolchain ti-arm-clang
Board am62px-sk
Example folder source/networking/ethfw/apps/app_remoteswitchcfg_server/sitara/

Ethernet Firmware Client

Parameter Value
CPU + OS mcu-r5fss0-0_freertos
Toolchain ti-arm-clang
Board am62px-sk
Example folder source/networking/ethfw/apps/app_remoteswitchcfg_client/sitara/

Other Clients supported

Client Env Supported Core + OS
MCAL Client mcu-r5fss0-0_freertos
Linux Client A53-linux

Steps to Run the Example

Prerequisites

  • EVM Board
  • CAT6 Ethernet cable

Build the example

  • When using CCS projects to build, import the CCS project for the required combination and build it using the CCS project menu (see Using SDK with CCS Projects).
  • When using makefiles to build, note the required combination and build using make command (see Using SDK with Makefiles)

HW Setup

  • Connect the One end of the CAT6 cable to the EVM and the other end of the CAT6 cable to network.

Run the example

Attention
If you need to reload and run again, a CPU power-cycle is MUST.
Note
CCS loading is not supported for any core. Applications are tested with OSPI boot mode
  • Load wkup-r5 Server binary to the evm via OSPI boot mode.
  • Load other binaries via SBL flow or U-boot flow.
  • You will see logs in the UART terminal as shown in the next section.
  • The prints will indicate the IP address acquired by clients against their corresponding MAC addresses

Sample output

WKUP-R5 Server Application logs

=======================================================
CPSW Ethernet Firmware
=======================================================
EnetAppUtils_reduceCoreMacAllocation: Reduced Mac Address Allocation for CoreId:1 From 4 To 3
Open MAC port 1
EnetPhy_bindDriver:1942
Open MAC port 2
EnetPhy_bindDriver:1942
PHY 0 is alive
PHY 1 is alive
ETHFW: Shared multicasts:
ETHFW: 01:00:5e:00:00:01
ETHFW: 01:00:5e:00:00:fb
ETHFW: 01:00:5e:00:00:fc
ETHFW: 33:33:00:00:00:01
ETHFW: 33:33:ff:1d:92:c2
ETHFW: 01:80:c2:00:00:00
ETHFW: 01:80:c2:00:00:03
ETHFW: Reserved multicasts:
ETHFW: 01:80:c2:00:00:0e
ETHFW: 01:1b:19:00:00:00
ETHFW: VLAN 1024 member=0x7 virtMember=0xe000000 regMcastFlood=0x7 unregMcastFlood=0x7 untag=0x0
ETHFW: 1 VLAN entries added in ALE table
ETHFW: PPS via GenF is not supported for this SoC
ETHFW Version : 0.05.00
ETHFW Build Date: Dec 3, 2025
ETHFW Build Time: 11:20:04
ETHFW Commit SHA:
ETHFW: Virtual port configuration:
ETHFW: CpswProxyServer: initialization completed (core: mcu2_0)
unibase-1.1.4
Starting lwIP, local interface IP is dhcp-enabled
[LWIPIF_LWIP] NETIF INIT SUCCESS
Host MAC address-0 : 70:ff:76:1d:ec:f2
ETHFW: Enable gPTP on MAC port 1 (tilld1)
ETHFW: Enable gPTP on MAC port 2 (tilld2)
[LWIPIF_LWIP_IC] Interface started successfully
[LWIPIF_LWIP_IC] NETIF INIT SUCCESS
[LWIPIF_LWIP_IC] Interface started successfully
[LWIPIF_LWIP_IC] NETIF INIT SUCCESS
[LWIPIF_LWIP] Enet has been started successfully
Added interface 'br3', IP is 0.0.0.0
ETHFW: ATTACH | C2S | core=0 endpt=36 virtPort=26
ETHFW: TimeSync PTP enabled
ETHFW: ATTACH | S2C | token=2600 rxMtu=1522 features=3
ETHFW: ALLOC_TX | C2S | core=0 endpt=36 token=2600
ETHFW: ALLOC_TX | S2C | txPsil=0xc603 status=0
ETHFW: ALLOC_RX | C2S | core=0 endpt=36 token=2600
ETHFW: ALLOC_RX | S2C | flow=20,5 rxPsil=0x4600 status=0
ETHFW: ALLOC_MAC | C2S | core=0 endpt=36 token=2600
ETHFW: ALLOC_MAC | S2C | macAddr=70:ff:76:1d:ec:e7 status=0
ETHFW: REGISTER_MAC | C2S | core=0 endpt=36 token=2600 macAdd=70:ff:76:1d:ec:e7 flowIdx=20,5
Cpsw_internalIoctl_handler_ENET_IOCTL_REGISTER_DSTMAC_RX_FLOW:432
ETHFW: REGISTER_MAC | S2C | status=0
tilld1: has mac: 70:FF:76:1D:EC:F2
tilld2: has mac: 70:FF:76:1D:EC:F2
cb_lld_task_create: Uniconf Task stack_size=16384
cb_rawsock_open:combase-1.1.3
Is=1 dmaRxChId=-1 nTxPkts=0 nRxPkts=0 pktSize=0
cb_lld_task_create: gPTP Task stack_size=16384
cbl_query_response:tilld1 link DOWN !!!!
cbl_query_response:tilld2 limax_ports=2
cb_rawsock_open:combase-1.1.3
cb_rawsock_open:dmaTxChId=1 numRxChannels=1 dmaRxChId=2 nTxPkts=16 nRxPkts=16 pktSize=1536
rxChId 2 has owner dmaRxSharedv:tilld2 open success
gptpnet_init:supportRtNotice=0 tout_interval=125000000Ns
gptpnet_init:Open lldtsync OK!
IEEE1588-2019 performance monitoring disabled.
current-log-gptp-cap-interval=3 initial-log-gptp-cap-interval=3
pp_glb_init: use-mgt-log-gptp-cap-interval=0
current-log-gptp-cap-interval=3 initial-log-gptp-cap-intervalerval=0
current-log-gptp-cap-interval=3 initial-log-gptp-cap-interval=3
static_domains_init: instance=0, di=0, pi=1, currentToutIntervalNs=125000000
syncIntervalNs=1200000,gPtpCapableMessageInterval=0
static_domains_init: instance=0, di=0, pi=2, currentToutIntervalNs=125000000
syncIntervalNs=125000000, announceInterval=0,pdelayReqInterval=10enet_activate:tilld1 status=0, duplex=1, speed=0Mbps
onenet_activate:tilld2 status=0, duplex=1, speed=0Mbps
GPTP_MEDIUM_ALLOC: fragsize=16 fragused/fragnum=865/944 (91)
INF:ub=19/74 (25)
SM_DATA_INST: fragsize=8 fragused/fragnum=2032/2032 (100)
domainIndex=0, GM changed old=00:00:00:00:00:00:00:00, new=70:FF:76:FF:FE:1D:EC:F2
INF:gptpnIndex=0, gmstate=2
Cpsw_handleLinkUp:1423
MAC Port 1: link up
cbl_query_response:tilld1: link UP, speed=1000, duplex=1 !!!! (138us since link change event)
[0]Network Link UP Event
index=1 speed=1000, duplex=full
Added interface 'br3', IP is 10.24.72.242
ETHFW: REGISTER_IPv4 | C2S | core=0 endpt=36 token=2600 ipAddr=10.24.69.84 macAdd=70:ff:76:1d:ec:e7
ETHFW:
SNo. MAC Address VLAN IP Address
ETHFW: ------ ------------------- ------ -----------------
ETHFW: 1 70:ff:76:1d:ec:e7 0 10.24.69.84
ETHFW: REGISTER_IPv4 | S2C | status=0

MCU-R5 Client Application logs

CpswProxy: Local cmd endpt 36, notify endpt 30
CpswProxy: ETHFW services found at core 1 endpts 34 (ti.ethfw.ethdevice) and 24 (ti.ethfw.notifyservice)
Starting lwIP, local interface IP is dhcp-enabled
[LWIPIF_LWIP] NETIF INIT SUCCESS
CpswProxy: ATTACH | C2S | virtPort=26
CpswProxy: ATTACH | S2C | token=2600 rxMtu=1522 features=3 numTxCh=1 numRxFlow=1 status=0
CpswProxy: ALLOC_TX | C2S | token=2600 chRelPri=0
CpswProxy: ALLOC_TX | S2C | token=2600 txPsil=0xc603 chRelPri=0 status=0
CpswProxy: ALLOC_RX | C2S | token=2600
CpswProxy: ALLOC_RX | S2C | token=2600 flow=20,5 rxPsil=0x4600 status=0
CpswProxy: ALLOC_MAC | C2S | token=2600
CpswProxy: ALLOC_MAC | S2C | token=2600 macAddr=70:ff:76:1d:ec:e7 status=0
CpswProxy: REGISTER_MAC | C2S | token=2600 flowIdx=20,5
CpswProxy: REGISTER_MAC | S2C | token=2600 status=0
Host MAC address : 70:ff:76:1d:ec:e7
[LWIPIF_LWIP] Enet has been started successfully
Added interface 'ti0', IP is 0.0.0.0
[0]Network Link UP Event
Added interface 'ti0', IP is 10.24.69.84
CpswProxy: REGISTER_IPv4 | C2S | token=2600 ipAddr=10.24.69.84 macAdd=70:ff:76:1d:ec:e7
CpswProxy: REGISTER_IPv4 | S2C | token=2600 status=0

MAC-only port

Ethernet Firmware enables MAC-only mode on MAC port 2 for AM62Dx, this allows all incoming traffic from MAC port 2 to be transferred only to the host port. This effectively excludes the MAC port from rest of packet switching in the CPSW switch.
The key concepts of a system with MAC-only mode enabled are as follows:

  • Logical switch ports - Defined based on packet header match criteria, typically created based on destination MAC address, VLAN IDs, etc. Two possible types:
    • Local Switch port - owned exclusively by Ethernet Firmware.
    • Virtual Switch port - owned by remote clients.
  • Logical MAC-only ports - Defined with 1-to-1 correspondence to physical ports (port configured in MAC-only mode), owned by remote clients.
    • Virtual MAC port - owned by remote clients.

The default port configuration for AM62Dx is shown below:

Enable MAC-only mode on MAC port 2

  1. Add -DENABLE_MAC_ONLY_PORTS flag to DEFINES_common in the client app, server app and ethfw library makefiles
    • Client app makefile in <SDK_INSTALL_PATH>/source/networking/ethfw/apps/app_remoteswitchcfg_client/sitara/<device>/<core_os_combo>/ti-arm-clang/makefile
    • Server app makefile in <SDK_INSTALL_PATH>/source/networking/ethfw/apps/app_remoteswitchcfg_server/sitara/<device>/<core_os_combo>/ti-arm-clang/makefile
    • Ethfw device specific lib makefiles in <SDK_INSTALL_PATH>/source/networking/ethfw/makefile.cpsw.<device>.<core>.ti-arm-clang
  2. Set numMacAddress = 2 for MCU-R5 in the structure defined in enet_cpsw_top.syscfg.js:
  3. Make the following changes to the server app example.syscfg
    • Add an additional MAC address for the Virtual MAC port in System Integration > MAC Address List
    • Increase the large pool packet count to 80 in Packet Pool Config > Large Pool Packet Count
    • Enable No learning and MAC-only mode for MAC port 2 as below in ALE Config > ALE Port Config
    • Next, the ALE Config > ALE Port Config > Port default VLAN config for MAC ports and Host port needs to be modified as below (highlighted sections have been modified):
  4. Make the following changes to the client app example.syscfg
    • Add an additional netif and increase the number of MAC addresses for the Rx DMA channel as below
  5. Rebuild the libraries first, then the apps before loading the binaries.

See Also

Ethernet And Networking