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?

  • 3
    What type of SoC do you have in mind? I suspect many will provide a reference implementation if they support networking.
    – Aurora0001
    Feb 1, 2017 at 15:04
  • 1
    Atmel, TI, etc. It will be ARM but not sure which vendor. Do you have any suggestions?
    – netskink
    Feb 1, 2017 at 15:40
  • It's hard to say without a bit more context about your use case. Have a look at the [hardware] tag wiki for guidance on how to ask a hardware selection question, or perhaps take a look at Selecting a microcontroller for a battery operated data collection project. If you want some guidance though, feel free to ask another question as long as you include your requirements!
    – Aurora0001
    Feb 1, 2017 at 15:43
  • 6
    As a general rule, it is better to explain why you are doing something as part of your question, rather than to ask only the question you reached at the end of your process. Someone might then be able to suggest a different approach (if you made an inaccurate assumption in your reasoning). Feb 1, 2017 at 15:53
  • Note that microcontroller-class "embedded" network solutions are not necessarily still cheaper than small "full operating system" ones running on commodity chips. Both tend to be painful - the tiny systems to get configured with the services you need, especially if there are midcourse changes from the original requirement or anything that doesn't behave as advertised, meanwhile the full operating system approach can take a long time to wrestle down to just the essentials you want, with no undesired components or services remaining. Feb 5, 2017 at 3:32

2 Answers 2


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.

  • 2
    Failing that, the device vendor will almost certainly provide a low level example implementation within their own framework. With a lot of Chinese-made SBCs, like those based on Allwinner chips, you're lucky if they provide you with a working Linux binary. Feb 1, 2017 at 16:10
  • @DepressedDaniel - The OP seems to be asking about a SoC which he plans to build into a device, rather than a pre-built SBC based on a phone CPU. He's also asking where to look before selecting his vendor.... Feb 1, 2017 at 16:14
  • 1
    Sean that looks like a good example implementation to use. I'll flag this response as the correct answer for that. Alternatively I was going to look at something like freeRTOS but I haven't started looking at code yet. I'm also interested in a wiki, online doc or book at this point. Something I could read before jumping into the code. Do you have a good suggestion for that as well?
    – netskink
    Feb 1, 2017 at 16:24
  • @netskink Sorry, the driver implementation is not my area. Added a link to the user documentation, I think it helps. Feb 1, 2017 at 16:34

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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.