9

Soon I will be working on an Ethernet implementation for a bare metal (no OS) capability on an ARM-based processor. I am somewhat familiar with the Ethernet driver model in the Linux Device Drivers book, but I'm wondering if there is a reference for implementing an Ethernet driver for a SoC run with a custom software stack.

Are there any reference implementations for ARM architecture processors, or is there any guidance on how to implement an Ethernet driver on an ARM processor?

netskink
  • 321
  • 1
  • 7

2 Answers2

4

If you are sure about using ARM then you could have a look at Keil's Ethernet Drivers for ARM. It is quite promising.

RL-TCPnet includes several Ethernet Network drivers. These are located in the \Keil\ARM\RL\TCPnet\Drivers directory:

  • LAN91C111.C - for the SMSC LAN91C111 Ethernet Controller used on the Phytec phyCore LPC229x evaluation board.
  • EMAC_SAM7X.C - for the Atmel AT91SAM7X on-chip EMAC Ethernet Controller used on the Atmel AT91SAM7X-EK evaluation board.
  • STR9_ENET.C - for the ST STR912 on-chip ENET Ethernet Controller used on the Keil MCBSTR9 evaluation board.
  • LPC23_EMAC.c - for the NXP (founded by Philips) LPC2368 and LPC2378 on-chip EMAC Ethernet Controllers used on the Keil MCB2300 evaluation board.
  • LPC24_EMAC.c - for the NXP (founded by Philips) LPC2468 and LPC2478 on-chip EMAC Ethernet Controllers used on the Keil MCB2400 evaluation board.
  • LM3S_EMAC.c - for the Luminary Micro LM3S6962 and LM3S8962 on-chip EMAC Ethernet Controllers used on the Luminary Micro EK-LM3S6965 and EK-LM3S8962 evaluation boards.

As you can see there are Ethernet Drivers examples for various evaluation boards that have different chips from different manufacturers. Like Atmel, NXP or ST Microelectonics.

Bence Kaulics
  • 7,843
  • 8
  • 42
  • 90
3

It's a bit hard to tell what you're looking for when you ask for bare metal, particularly when you don't specify the architecture...

For an embedded application, using a lightweight OS (depending what you regard as an OS), look at the mbed source for a device similar to the one you're interested in (assuming an ARM Cortex-M microcontroller).

The latest mbed Network Sockets documentation is here although that doesn't describe the HAL implementations which are specific to the devices (these are likely contributed by the device manufacturers).

This may be close enough to bare metal to use directly. Failing that, the device vendor will almost certainly provide a low level example implementation within their own framework.

Sean Houlihane
  • 10,524
  • 2
  • 26
  • 62