-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME
129 lines (94 loc) · 4.1 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
This is the RetroBSD source directory.
Source Roadmap
~~~~~~~~~~~~~~
bin User commands.
etc Template files for /etc.
include System include files.
lib System libraries.
libexec System binaries.
sbin System administration commands.
share Shared resources.
sys Kernel sources.
tools Build tools and simulators.
Supported hardware
~~~~~~~~~~~~~~~~~~
* chipKIT Max32 board.
* Sparkfun UBW32 board.
* Maximite computer.
* Microchip Explorer 16 board, with PIC32 CAN-USB plug-in module and SD & MMC pictail.
* Microchip PIC32 USB or Ethernet Starter Kit, with I/O Expansion board and SD & MMC pictail.
* Olimex Duinomite, Duinomite-Mini and Duinomite-Mega boards.
* Olimex Pinguino-Micro board with PIC32MX795F512H microcontroller.
* eflightworks DIP board.
Build
~~~~~
By default, the system is configured for the Max32 board.
To select another target board, edit a top-level Makefile
and change a TARGET value under section "Select target board":
TARGET = $(UBW32) # for the UBW32 board with USB console
TARGET = $(UBW32UART) # for the UBW32 board with UART console
TARGET = $(MAXIMITE) # for the Maximite board
TARGET = $(EXPLORER16) # for the Explorer 16 board
TARGET = $(STARTERKIT) # for the PIC32 USB or Ethernet Starter Kit
TARGET = $(MAX32) # default
TARGET = $(DUINOMITE) # for the Duinomite board
TARGET = $(PINGUINO) # for the Pinguino-Micro board
TARGET = $(DIP) # for the DIP board
You can also change a desired filesystem size and swap area size,
as required. Default is:
FS_KBYTES = 16384
SWAP_KBYTES = 2048
To compile the kernel and build a filesystem image, run:
make
A resulting root filesystem image is in file `filesys.img`.
A kernel is in file `unix.hex` in your target board subdirectory.
Filesystem image
~~~~~~~~~~~~~~~~
You need to put a filesystem image on a SD card. On Windows, use
Win32DiskImager utility (https://launchpad.net/win32-image-writer/+download).
On Linux, run:
sudo dd if=filesys.img of=/dev/XYZ
Here `XYZ` is a device name of SD card, as recognized by Linux (sdb in my case).
Install kernel
~~~~~~~~~~~~~~
Kernel image should be written to PIC32 flash memory. The procedure depends
on a board used.
Max32 board:
cd sys/pic32/ubw32
AVRTOOLS=/Applications/Mpide.app/Contents/Resources/Java/hardware/tools
$AVRTOOLS/bin/avrdude -C$AVRTOOLS/etc/avrdude.conf -c stk500v2 -p pic32 \
-P /dev/tty.usbserial-* -b 115200 -v -U flash:w:unix.hex:i
Here you need to change AVRTOOLS path and tty name according to your system.
UBW32 board:
Use a pic32prog utility (http://code.google.com/p/pic32prog/)
and a USB cable to install a kernel:
pic32prog sys/pic32/ubw32/unix.hex
Maximite:
Use the bootload program for Windows, available for download by link:
http://geoffg.net/Downloads/Maximite/Maximite_Update_V2.7B.zip
Explorer 16 board:
There is an auxiliary PIC18 chip on the Explorer 16 board, which can be
used as a built-in programmer device. You will need a PICkit 2 adapter
to install a needed firmware, as described in article:
http://www.paintyourdragon.com/?p=51
(section "Hack #2: Lose the PICkit 2, Save $35").
This should be done only once.
Then, you can use a pic32prog utility (http://code.google.com/p/pic32prog/)
and a USB cable to install a kernel:
pic32prog sys/pic32/explorer16/unix.hex
PIC32 Starter Kit:
Use PICkit 2 adapter and software to install a boot loader from
file `sys/pic32/starter-kit/boot.hex`. This should be done only once.
Then, you can use a pic32prog utility (http://code.google.com/p/pic32prog/)
and a USB cable to install a kernel:
pic32prog sys/pic32/starter-kit/unix.hex
Simulator
~~~~~~~~~
You can use a MIPS32 simulator to develop a debug a RetroBSD software,
without a need for hardware board. By default, a simulator is configured
to imitate a Max32 board. To build it:
cd tools/virtualmips
make
Run it:
./pic32
Configuration of simulated board is stored in file `pic32_max32.conf`.