Can you run UNIX on PIC32 with onlt 128KB of RAM? Yes absolutely! Serge Vakulenko proves this with his RetroBSD port for PIC32 (MIPS).
The project is hosted at http://retrobsd.org/
Serge did amazing job by porting the old days 2.11BSD Unix used to run on PDP-11 to PIC32 (MIPS). In just 128KB RAM footprint he manage to boot UNIX OS and you have 96KB left for applications.
RetroBSD is multi tasking and you have access to the PIC32 GPIO and ADCs via API, so you can write embedded applications on it!
To make your DuinoMite Unix machine you need:
1. To download RetroBSD compiled image from http://retrobsd.org/wiki/software-2/ the release I check is retrobsd-duinomite-r425.zip
the files inside are UNIX.HEX which contains PIC32 firmware, filesys.img which contains the SD card disk image with the different tools
2. Unpack on your local drive, there are few files you need: Bootloader is same as Olimex DuinoMite bootloader so you may not need it if you have already Olimex bootloader installed
the filesys.img this is the UNIX diskcontent you should write it to SD-card, for Windows users you need Win32 Image writer software, download from https://launchpad.net/win32-image-writer/+download you have to open the filesys.img with Win32DiskImager and to write it to SD card.
3. then you have to put the written SD card in DuinoMite and press reset+button to put DuinoMite in bootloader mode and launch USB Bootloader v2.90a to write Unix.HEX file (the Bootloader in the RetroBSD zip didn’t work for me for some reason)
4. when finished you press reset and Duinomite will boot RetroBSD, if you are under Linux there will be no need for USB CDC drivers as Linux will load them automatically, Ifyou are on Windows you have to point it to DuinoMite CDC Virtual com port drivers.
5. check which virtual com port is created (in linux you can do this in termianl mode by running dmesg | grep tty* command, in windows you can check in device manager which com port is created when you plug in DuinoMite) and run terminal program minicom for linux or hyperterminal for windows
you will see this welcome message on top of this post, login is logically root with empty password
you can see the tools by listing the bin folder:
As you see you got CC compiler, I immediately wrote hello world, but for some reason it fails to compile, I guess I have to RTFM :)))
Anyway I’m amazed how fast this RetroBSD works on PIC32, actually it works faster than the Linux on my 3Ghz machine. I guess because it’s very lightweight and have no so much features as real Linux.
It boots in 2 seconds, CC compiles in 1 second!