README.md 1.25 KB
Newer Older
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
## How to have fun with the GAPuino on Linux

In general, follow this README: https://github.com/GreenWaves-Technologies/gap_sdk/blob/master/README.md

PLUS

### Fix the -Werror flag to make openocd compile
Comment this line in gap_sdk/tools/gap8-openocd

`GCC_WARNINGS="${GCC_WARNINGS} -Werror"`

### Fix libmpfr version bug
`sudo ln -s /usr/lib/libmpfr.so.6 /usr/lib/libmpfr.so.4`

### Fix bug in load_jtag_hyper function
* Grep for `load_jtag_hyper` in the source directory of the SDK
* Make sure all function definitions have the signature `load_jtag_hyper(self)`

### Enable hyperflash boot
* This is supposed to be a one-time operation
* Run the following commands
`source ~/gap_sdk/configs/gapuino_v2.sh`
`openocd -f interface/ftdi/gapuino_ftdi.cfg -f target/gap8revb.tcl -f ./tcl/jtag_boot.tcl -f ./tcl/fuser.tcl`
* Open a second terminal and continue with
`source ~/gap_sdk/configs/gapuino_v2.sh`
`telnet localhost 4444`
* In the openocd terminal run (adapt path to directory if necessary)
`fuse_hyperflash_boot /home/$USER/gap_sdk/tools/gap8-openocd-tools`
* Unplug the gapuino, it SHOULD now boot from hyperflash
* Add `PLPBRIDGE_FLAGS +=  -f -hyper` to your Makefile
* I could only boot from flash, when I hit `make` and the `openocd` command after every flash