BSD UNIX on PIC32Recently I noticed this project from Serge Vakulenko and with help of my friend Igor Mokos I brought it to life.
is port of 2.11 BSD Unix for Microchip PIC32 family. Usable members of
family are only those with 128kB RAM on chip, which allows to run this
OS with 96kB of user space.
In fact there is nothing much left to say. Sources are available as SVN repository. For experienced user (unlike me) compilation should be quite painless under Linux, especially thanks to this guide. I needed to install libusb-dev package on both Ubuntu 10.10 and Lubuntu 11.04 distros. Current revision (r209)
needed quick and dirty fix in sd.c file, because in this revision it
seems to fail initialize some SD cards brands. If anyone is interested,
I may send this fix, but Serge seems to work really fast, new fixed
revision may be released very soon.
In order to load image on board, I flashed UBW32 bootloader on this board. I changed PLL settings in order to match my 4MHz crystal - original code assumes 8MHz crystal.
relevant hardware definitions are in \src\sys\pic32\compile\makefile,
so you must change it to fit your hardware, you don't need to touch any
Hardware is based on a simple breakout board
forPIC24/PIC32 I designed. This board is on piece of universal PCB,
where LEDs, voltage regulator and SD card resides. Nothing special
here, just a bit of soldering. There are reset (MCLR) and bootloader
(RE7, pull-up) buttons to work with UBW bootloader, SD card is
connected to SPI2, with RE5 as CS.
Relevant part of makefile looks like this:
# Console on UART1
DEFS += -DCONSOLE_PORT=U1MODE
DEFS += -DCONSOLE_ER_IRQ=26
DEFS += -DCONSOLE_RX_IRQ=27
DEFS += -DCONSOLE_TX_IRQ=28
# SD/MMC card driver at SPI2
# /CS0 at E5
# /CS1 at A10
DEFS += -DSD_PORT=SPI2CON
DEFS += -DSD_CS0_PORT=TRISE -DSD_CS0_PIN=5
#DEFS += -DSD_CS1_PORT=TRISA -DSD_CS1_PIN=10
And link to album on picassa.
Back to topics