Harald Welte | d8a003d | 2017-02-27 20:31:09 +0100 | [diff] [blame] | 1 | |
| 2 | == BOARDS |
| 3 | |
| 4 | A board defines a given circuit board, i.e. SIMtrace, OWHW, QMOD |
| 5 | |
| 6 | It defines the given hardware model for which the program is to be |
| 7 | compiled. |
| 8 | |
| 9 | Current 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 | |
| 17 | An application is a specific piece of software with given |
| 18 | functionality. |
| 19 | |
| 20 | == ENVIRONMENTS |
| 21 | |
| 22 | An environment is a runtime environment, typically defined by a linker |
| 23 | script. 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 | |
| 32 | A given software build is made for a specific combination of an APP |
| 33 | running in a certain ENVIRONMENT on a given BOARD. |
Harald Welte | 601e0d3 | 2017-03-08 15:33:33 +0100 | [diff] [blame] | 34 | |
| 35 | A Makefile is provided. It will create output files in the format |
| 36 | bin/$(BOARD)-$(APP)-$(ENV).{elf,bin} |
| 37 | |
| 38 | You can specify the APP and BOARD to build when calling make, like |
| 39 | e.g. |
| 40 | * make APP=cardem BOARD=qmod |
| 41 | * make APP=dfu BOARD=qmod |
| 42 | |
| 43 | The level of debug messages can be altered at compile time: |
| 44 | ``` |
| 45 | $ make TRACE_LEVEL=4 |
| 46 | ``` |
| 47 | Accepted values: 0 (NO_TRACE) to 5 (DEBUG) |
| 48 | |
| 49 | == Flashing |
| 50 | |
| 51 | For flashing the firmware, there are at least two options. |
| 52 | |
| 53 | === Using JTAG + OpenOCD to flash the DFU bootloader |
| 54 | |
| 55 | The first one is using openocd and a JTAG key. |
| 56 | For 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 | |
| 64 | The second option is using rumba for flashing. No further hardware has to be provided for this option. |
| 65 | |
| 66 | FIXME |
| 67 | |
| 68 | === Using DFU to flash application |
| 69 | |
| 70 | FIXME |