-
1Step 1
To build and run the LCD demo, follow these steps.
Download the binary RetroBSD package for Fubarino from here: retrobsd-fubarino-2015-05-19.zip
Alternatively, you can build everything from sources. Follow instructions on page: install-fubarino
-
2Step 2
Transfer the Unix kernel on to the Fubarino. Connect the board via microUSB cable to your computer. To enter a bootloader mode, press the PRG key first, hold it, then press the RESET key. The LED will now flash and your Fubarino is ready to accept new code. Use pic32prog utility to program the flash code. Fubarino in bootloader mode will appear as a virtual COM port on your computer. You will need to know the exact device name to specify for pic32prog (typically /dev/ACM0 on Linux, something like COM12 on Windows, /dev/tty.usbmodemfa131 on Mac OS X).
Use proper binary for your operating system (included into above retrobsd-fubarino-2015-05-19.zip package):
- pic32prog.exe - for Windows
- linux32/pic32prog - for 32-bit Linux
- linux64/pic32prog - for 64-bit Linux
- macos/pic32prog - for Mac OS X.
Unpack the package, go to retrobsd-fubarino-g226 directory and run command (say, for 64-bit Linux):
linux64/pic32prog -d /dev/ttyACM0 unix.hex
For Windows, it should be like:
pic32prog -d COM12 unix.hex
On Mac OS X:
macosx/pic32prog -d /dev/tty.usbmodemfa131 unix.hex
You should see:
Programmer for Microchip PIC32 microcontrollers, Version 1.112
Copyright: (C) 2011-2014 Serge Vakulenko Adapter: STK500v2 Bootloader Program area: 1d000000-1d07ffff Processor: Bootloader Flash memory: 512 kbytes Data: 153384 bytes Erase: done Program flash: ###################################### done Verify flash: ###################################### done Rate: 9307 bytes per secondPerfect! You have installed RetroBSD on your Fubarino board.
-
3Step 3
Now transfer the filesystem image sdcard.img on to a SD card using a USB-to-SD reader. On Windows, use Win32DiskImager utility. On Linux or Mac OS X, run:
sudo dd bs=32k if=sdcard.img of=/dev/XYZ
where XYZ is a name of SD card on your computer (use lsblk or "diskutil list" to obtain).
Once that is done remove the SD card from card reader and plug it into your Fubarino's SD slot. Your RetroBSD system is ready to run.
-
4Step 4
Insert Fubarino board into breadboard, centered. Use 5-wire cable to connect the LCD module to appropriate signals of Fubarino board, according to the following table and picture:
LCD module Fubarino CS 16 WR 17 Data 18 Gnd GND Vcc 3.3V -
5Step 5
Connect USB cable to Fubarino and to your computer. Fubarino console will appear as a virtual COM port on your computer. Use any terminal emulation program (like putty on Windows or minicom on Linux) to connect to this virtual COM port at baud rate 115200. Press <Enter> to start RetroBSD. On Login prompt, enter "root". Password is empty:
2.11 BSD Unix for PIC32, revision G226 build 1: Compiled 2015-05-19 by vak@tundra.local: /Users/vak/retrobsd-github/sys/pic32/fubarino cpu: 795F512H 80 MHz, bus 80 MHz oscillator: HS crystal, PLL div 1:2 mult x20 console: ttyUSB0 (5,0) sd0: port SPI2, select pin G9 sd0: type SDHC, size 3914752 kbytes, speed 13 Mbit/sec phys mem = 128 kbytes user mem = 96 kbytes root dev = rd0a (0,1) root size = 102400 kbytes swap dev = rd0b (0,2) swap size = 2048 kbytes /dev/rd0a: 690 files, 10880 used, 91119 free Starting daemons: update cron 2.11 BSD UNIX (pic32) (console) login: root Password: Welcome to RetroBSD! erase, kill ^U, intr ^C # _
Congratulations! You just started Unix on your breadboard! -
6Step 6
Go to C examples directory and build LED demo:
# cd /share/examples/c # make lcd6 cc -o lcd6 lcd6.c
It will take a few seconds. Now start the demo:# ./lcd6
You should see something like this:To stop the demo, press ^C. -
7Step 7
You can modify the source file lcd6.c with one of available editors: vi, med or re. Use "make lcd6" to recompile. Full sources of the demo are available on GitHub: lcd6.c
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.