UNIX ON PIC32 – meet RetroBSD for DuinoMite


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!

3 Comments (+add yours?)

  1. Trackback: BSD on a DUINOMITE « oracle fusion identity
  2. ProudDuinomiteOwner
    Apr 05, 2012 @ 17:06:09

    In r425 C compiler had an incorrect pathname inside. It’s reported that the issue is identified and already fixed. http://retrobsd.org/topic/bug-ette-in-cc-c/ Fetch newer filesys.img for your SD.


  3. Serge Vakulenko
    Apr 06, 2012 @ 09:35:40

    Thanks for so positive review. Actually, C compiler is not ready yet. But we already have an assembler and linker. Here is an example of /bin/echo program, rewritten in assembly: http://code.google.com/p/retrobsd/source/browse/trunk/share/example/echo.S

    To compile and run this example, start RetroBSD and run the following commands:
    # cd /share/example
    # cc -c echo.S
    # ld echo.o -o echo
    # ./echo Make love not war


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: