-
1Step 1
To build and run the LCD demo, follow these steps.
Download the binary RetroBSD package for Duinomite from here: retrobsd-duinomite-2015-05-23.zip
Alternatively, you can build everything from sources. Follow instructions on page: install
-
2Step 2
Transfer the Unix kernel on to the Duinomite. Connect the board via microUSB cable to your computer. To enter a bootloader mode, press the BUT button first, hold it, then press the RST button. Green and yellow LEDs will now flash and your Duinomite board is ready to accept new code. Use pic32prog utility to program the flash code.
Use proper binary for your operating system (included into above retrobsd-duinomite-2015-05-23.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-duinomite-g228 directory and run command (say, for 64-bit Linux):
linux64/pic32prog unix.hex
For Windows, it should be like:
pic32prog unix.hex
On Mac OS X:
macosx/pic32prog unix.hex
You should see:
Programmer for Microchip PIC32 microcontrollers, Version 1.112 Copyright: (C) 2011-2014 Serge Vakulenko Adapter: HID Bootloader Program area: 1d003000-1d07ffff Processor: Bootloader Flash memory: 500 kbytes Data: 148744 bytes Erase: done Program flash: ##################################### done Verify flash: ##################################### done Rate: 16432 bytes per second
Perfect! You have installed RetroBSD on your Duinomite board.
Press RST button to restart the board. Green and yellow LEDs will stop flashing. Now the kernel is ready for console connection via USB.
-
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 Duinomite's SD slot. Your RetroBSD system is ready to run.
-
4Step 4
Disconnect USB cable. Plug LCD4884 shield into Duinomite board. Now connect USB cable and plug it into your computer. Duinomite console mode 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 G228 build 1: Compiled 2015-05-23 by vak@tundra.local: /Users/vak/retrobsd-github/sys/pic32/duinomite cpu: 795F512H 80 MHz, bus 80 MHz oscillator: HS crystal, PLL div 1:2 mult x20 console: ttyUSB0 (5,0) sd0: port SPI3, select pin D5 sd0: type II, size 1982464 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: 602 files, 7476 used, 94523 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 Duinomite board!
Now it's time to compile Tetris.
-
5Step 5
Go to C examples directory and build LED demo:
# cd /share/examples/c # make tetris cc -o tetris tetris.c
It will take a few seconds. Now start the demo:# ./tetris
Use joystick to play tetris on LCD display:
- Left -- move piece left
- Right -- move piece right
- Up -- rotate
- Down -- drop the piece
To stop the demo, press ^C.
You can modify the source file tetris.c with one of available editors: vi, med or re. Use "make tetris" to recompile. Full sources of the demo are available on GitHub: tetris.c
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.