Hardware and Software Integration - Ethernet/LCD Modules To Drivers To Usage In Programs

Can anyone offer any insight into how this works?

In general for all embedded dev you typically have hardware (for the sake of discussion lets say a Ethernet or LCD module), drivers for the specific hardware, a way to hook it into the OS if you are using one (or a graphics/windows library) and finally a way to call at a higher level methods to run the hardware.

I received a 4D systems display with my beagleboard and it magically works. If I plug it into the headers on the board and power it on then the display works. If I disconnect it and use the onboard HDMI connector then magically the video shows up on my monitor.

For Ethernet you can have a processor with an on-board MAC and external PHY or a module that uses SPI/Serial for example. Those are two very different methods of connecting Ethernet but magically in the demos for development boards it all works and you use libraries at a much higher level to create sockets, communicate, handle requests etc.

While I have been able to find a lot regarding TCP/IP stacks, graphics libraries, and wiring diagrams for modules I have not been able to find much that explains this “magic”

I did find that the board I have has a EEPROM on it that as part of the BeagleBoard firmware it will question what the cape is and wire up the driver to the display output (frame buffer?)

I don’t think this is necessarily specific to just the BeagleBone, since in development you are always trying to mix together hardware/modules/processors/Operating Systems/Bare Metal code.

My question is there any good books/documentation/web sites/tutorials that show in more detail how you take a piece of hardware, a processer and optionally an operating system and get them working together? But more on the details of the magic and not hey look here is a LCD, plug it in here and write this python script and bam you got a picture?

If I had a FPGA that implemented a MAC and had an external PHY and connected it to the Beaglebone Black or other processor running a TCP/IP stack how would I go about telling the OS or library this is the physical communication piece and here is the driver to run it? I know there has to be some “hooks” somewhere to connect the pieces it is just not clear where they are.

On a PIC32 dev board I worked with you had to tell it which MAC/PHY driver you wanted to use by using #defines. It would include the code but I believe it was all a standard interface that each driver implemented. So the stack would just call methods/functions at the lowest level and this driver would do the actual sending/receiving of bits.

There has to be a book(s) that explain the magic better. Correct me if I am wrong but the general concept is the same across all types of systems whether you are using Debian, a RTOS or a stack on bare metal. The higher level abstracts the hardware/functionality to an interface and you write the code for this interface so it communicates with whatever specific hardware/communication protocol you are using?

Can anyone offer any insight into how this works?

In general for all embedded dev you typically have hardware (for the sake of discussion lets say a Ethernet or LCD module), drivers for the specific hardware, a way to hook it into the OS if you are using one (or a graphics/windows library) and finally a way to call at a higher level methods to run the hardware.

I received a 4D systems display with my beagleboard and it magically works. If I plug it into the headers on the board and power it on then the display works. If I disconnect it and use the onboard HDMI connector then magically the video shows up on my monitor.

For Ethernet you can have a processor with an on-board MAC and external PHY or a module that uses SPI/Serial for example. Those are two very different methods of connecting Ethernet but magically in the demos for development boards it all works and you use libraries at a much higher level to create sockets, communicate, handle requests etc.

While I have been able to find a lot regarding TCP/IP stacks, graphics libraries, and wiring diagrams for modules I have not been able to find much that explains this “magic”

I did find that the board I have has a EEPROM on it that as part of the BeagleBoard firmware it will question what the cape is and wire up the driver to the display output (frame buffer?)

I don’t think this is necessarily specific to just the BeagleBone, since in development you are always trying to mix together hardware/modules/processors/Operating Systems/Bare Metal code.

My question is there any good books/documentation/web sites/tutorials that show in more detail how you take a piece of hardware, a processer and optionally an operating system and get them working together? But more on the details of the magic and not hey look here is a LCD, plug it in here and write this python script and bam you got a picture?

My two favorite references are:### Linux System Programming: Talking Directly to the Kernel and C Library by Robert Love### The Linux Programming Interface: A Linux and UNIX System Programming Handbook by Michael Kerrisk

Regards,
John