blob: 9e8255712dd449f8b5133d3ceb2dbbbe31ab86d8 [file] [log] [blame]
Harald Welted8a003d2017-02-27 20:31:09 +01001
2== BOARDS
3
4A board defines a given circuit board, i.e. SIMtrace, OWHW, QMOD
5
6It defines the given hardware model for which the program is to be
7compiled.
8
9Current boards supported are:
10* simtrace: The good old Osmocom SIMtrace PCB with SAM3 instead of
11 SAM7, open hardware.
12* qmod: A sysmocom-proprietary quad mPCIe carrier board, publicly available
13* owhw: An undisclosed sysmocom-internal board, not publicly available
14
15== APPLICATIONS
16
17An application is a specific piece of software with given
18functionality.
19
20== ENVIRONMENTS
21
22An environment is a runtime environment, typically defined by a linker
23script. The current runtime environments include
24* flash: Run natively from start of flash memory
25* dfu: Run after a DFU bootloader from an offset after the first 16k
26 of flash (the first 16k are reserved for the bootloader)
27* ram: Run from within the RAM of the chip, downloaded via JTAG/SWD
28
29
30== Building
31
32A given software build is made for a specific combination of an APP
33running in a certain ENVIRONMENT on a given BOARD.
Harald Welte601e0d32017-03-08 15:33:33 +010034
35A Makefile is provided. It will create output files in the format
36bin/$(BOARD)-$(APP)-$(ENV).{elf,bin}
37
38You can specify the APP and BOARD to build when calling make, like
39e.g.
40* make APP=cardem BOARD=qmod
41* make APP=dfu BOARD=qmod
42
43The level of debug messages can be altered at compile time:
44```
45$ make TRACE_LEVEL=4
46```
47Accepted values: 0 (NO_TRACE) to 5 (DEBUG)
48
49== Flashing
50
51For flashing the firmware, there are at least two options.
52
53=== Using JTAG + OpenOCD to flash the DFU bootloader
54
55The first one is using openocd and a JTAG key.
56For this option, a JTAG connector has to be soldered onto the board, which is not attached per default.
57
58```
59$ openocd -f openocd/openocd.cfg -c "init" -c "halt" -c "flash write_bank 0 ./bin/$(BOARD)-dfu-flash.bin 0" -c "reset" -c "shutdown"
60```
61
62=== Using bossac to flash the DFU bootloader
63
64The second option is using rumba for flashing. No further hardware has to be provided for this option.
65
66FIXME
67
68=== Using DFU to flash application
69
70FIXME