BBB Bare Metal Ethernet

Hi all. I sort-of finished the Ethernet driver port from Starterware. It employs the full FAT32 filesystem by Elm-Chan and lwIP by Adam Dunkels. The all the code, makefile stuff, bootloader etc… required to build an image with interrupts, MMC, TCP, UDP, DMA, Cache, MMU, IRQ, RTC, httpserver and other peripherals. Now you can use the BeagleBone to control IoT projects, your own tight server or whatever. Written under GNU/GCC, for the serious noob. Sink your teeth into ARM Bare Metal, FAT32 and Internet Protocol here. The Bone’ is very fast and economical when running without the burden of an insecure Operating System…dd

PS it runs but it needs more streamlining, and I need more help!

I am an old engineer/programmer that is very tired of running on dumbed-down blackbox and otherwise limiting operating systems. Linux is not the answer. It should be, but it is too big/complicated. It really has not improved in 15 years. It is much more intricate than the ARM hardware it is running on. Linus refuses to migrate to microKernel. So do not get old and obsolete like me, watching corporations fuddle with fickle tools, capitalizing Net Neutrality and restricting your freedom as a programmer. Learn the basics and build upward, on software that YOU know and own. The 'Bone has unchallenged speed and I/O. This is a worthwhile platform to invest your effort. The attached zipfile will give you a big head start. (2.04 MB)

Hi dd,

First I want to thank you for your contribution in efficient bare metal programming. I am programming the beaglebone black in bearmetal as well at the moment and I use Starterware as a basis. I tried executing the enetEcho example but I always run into an issue on initialization. I didn’t change anything and run the project with DHCP enabled. In function “cpswif_phylink_config” of “cpswif.c” from the LWIP Stack the issue occurs (No PHY found at address 0 for Port 0. MDIOSLAVE register value is “4”. Do you have any hints? Is perhaps my gel file already enabling the PHY? Problem is I found no way of disabling the GEL Files in Code Composer Studio. When I remove or comment the files, the IDE ignores that.

Code Snippet:

static err_t
cpswif_phylink_config(struct cpswportif * cpswif, u32_t slv_port_num) {
struct cpswinst *cpswinst = &cpsw_inst_data[cpswif->inst_num];
err_t err;

/* Check if ethernet PHY is present or not */
if(0 == (MDIOPhyAliveStatusGet(cpswinst->mdio_base)
& (1 << cpswinst->port[slv_port_num - 1].phy_addr))){
LWIP_PRINTF("\n\rNo PHY found at address %d for Port %d of Instance %d.",
cpswinst->port[slv_port_num - 1].phy_addr, slv_port_num,
return ERR_CONN;

With kind regards,


Hi dd,

I already found a solution for my problem. I just set the physical address to 2 that it fits the condition and I used static ip now instead of dhcp. Now I can ping to the beagle and get a response. Before “CPSW0_PORT_1_PHY_ADDR” was set to zero. It is not explained anywhere why I needed to set it to 2. I was just try and error by myself.

Snippet of “cpswif.h”:

#define CPSW0_PORT_1_PHY_ADDR 2



Can I encourage you to create a project entry via ?

Hi Jason. I tried several times to create a project and failed.

I do not know why you are hosted by the google monster,

or why they cannot rip a decent forum host application.

In any event, please create a project on my behalf,

just copy and paste my post of Feb 7.

thanks, hack on brothers…dd