Menu

Tree [e154b1] master /
 History

HTTPS access


File Date Author Commit
 drivers 2018-05-31 dd dd [1d793e] Add files via upload
 drivers_C 2018-05-31 dd dd [1d793e] Add files via upload
 lwip 2018-05-31 dd dd [948352] Delete junk.txt
 mmc_lib 2018-05-31 dd dd [68f949] Add files via upload
 obj 2018-05-31 dd dd [07b833] Add files via upload
 MLO 2018-05-31 dd dd [c6c75b] Add files via upload
 MLO_MMC 2018-05-31 dd dd [c6c75b] Add files via upload
 MLO_UART 2018-05-31 dd dd [c6c75b] Add files via upload
 Makefile 2018-05-31 dd dd [c6c75b] Add files via upload
 README.md 2018-05-31 dd dd [e154b1] Update README.md
 README_MMCprep.txt 2018-05-31 dd dd [c6c75b] Add files via upload
 app 2018-05-31 dd dd [c6c75b] Add files via upload
 app_gpio 2018-05-31 dd dd [c6c75b] Add files via upload
 main.c 2018-05-31 dd dd [c6c75b] Add files via upload
 memmap.lds 2018-05-31 dd dd [c6c75b] Add files via upload
 my_app 2018-05-31 dd dd [c6c75b] Add files via upload
 noob_guide.pdf 2018-05-31 dd dd [c6c75b] Add files via upload
 tiimage 2018-05-31 dd dd [c6c75b] Add files via upload
 tiimage.exe 2018-05-31 dd dd [c6c75b] Add files via upload

Read Me

BeagleBone Black Bare Metal UDP/TCP/MMC

mixed C & assembly
demo Ethernet, MMC, MMU, DMA, Cache, IRQ, UART0, RTC and GPIO usage

This is a modded port [TI Starterware] and other contributors

The BBB will tell you it's MAC address and IP# then it will spew UDP packets out UART0 as they are received and log them.
It will also respond to ping and HTTP requests

Hit the boot button to flash a USR LED (interrupt function check) Enter ? to display console functions on UART0 console
USERLEDs will flash with IRQ activity for MMC and ethernet

lwIP is a Picasso! It is quite intricate so it is largely untouched. The raw TCP/IP interface and app run in the same thread. See rawapi.txt.
Data transfer is by DMA dedicated to PHY. Ethernet i/o is handled by ISR. lwIP middleware in lwiplib.c. ISRs, DMA and config logic in cpswif.c. Lower
code is in eth_hwif.c and eth.s There are many unused routines in lwiplib.c. Removing them will save much memory. Total image size is only 85k Bytes!
The ethernet drivers are pretty good and required very little tweaking to build. lwIP has very cool DEBUG features in opt.h. You can enable debug messages at
any level of the stack (ETH/IP/UDP/TCP/ARP/DHCP...) and follow [de]packetization and examine headers as it happens.

Chan at www.elm-chan.org wrote a great multi-platform micro-filesystem utility.
The MMC/FAT32 filesystem runs concurrently. Data transfer is by DMA. MMC i/o is handled by ISR. MMC drivers were also well written and are mostly
detangled. ff.c contains the FAT32 middleware. diskio.c the underlying drivers then mmc_api.c and mmc_hwif.c and mmc.s underneath that.

No IRQs within IRQs. The h/w itself queues IRQs. This is basic and fast but the app programmer must manage IRQ traffic.

Built with GNU/ARM tools :-) on platform Win32 :-(
Also builds with GNU tools on (Raspberry) Pi-Top laptop running Linux :-)

ps If the project does not build correctly, get the tested zipfile from www.baremetal.tech