Merge branch 'develop' into readonly
This commit is contained in:
10
deploy.py
10
deploy.py
@@ -270,7 +270,7 @@ class OpenSKInstaller:
|
|||||||
jlink_speed=1200,
|
jlink_speed=1200,
|
||||||
openocd=self.args.programmer == "openocd",
|
openocd=self.args.programmer == "openocd",
|
||||||
openocd_board=board.openocd_board,
|
openocd_board=board.openocd_board,
|
||||||
openocd_cmd="openocd",
|
openocd_cmd=self.args.openocd_cmd,
|
||||||
openocd_commands=copy.copy(board.openocd_commands),
|
openocd_commands=copy.copy(board.openocd_commands),
|
||||||
openocd_options=copy.copy(board.openocd_options),
|
openocd_options=copy.copy(board.openocd_options),
|
||||||
jtag=False,
|
jtag=False,
|
||||||
@@ -1005,6 +1005,14 @@ if __name__ == "__main__":
|
|||||||
help=("Sets the method to be used to flash Tock OS or the application "
|
help=("Sets the method to be used to flash Tock OS or the application "
|
||||||
"on the target board."),
|
"on the target board."),
|
||||||
)
|
)
|
||||||
|
main_parser.add_argument(
|
||||||
|
"--openocd_cmd",
|
||||||
|
dest="openocd_cmd",
|
||||||
|
metavar="CMD",
|
||||||
|
default="openocd",
|
||||||
|
help=("Specifies a custom command to use when calling openocd. Can be "
|
||||||
|
"used to pass arguments i.e. 'openocd -s /tmp/openocd_scripts'."),
|
||||||
|
)
|
||||||
|
|
||||||
main_parser.add_argument(
|
main_parser.add_argument(
|
||||||
"--no-tockos",
|
"--no-tockos",
|
||||||
|
|||||||
@@ -59,14 +59,48 @@ Follow these steps:
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
1. Depending on the programmer you're using, you may have to adapt the next
|
#### JLink
|
||||||
command line. Run our script for compiling/flashing Tock OS on your device:
|
|
||||||
|
|
||||||
|
Run our script for compiling/flashing Tock OS on your device:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ ./deploy.py --board=nrf52840_dongle --programmer=jlink
|
||||||
|
```
|
||||||
|
|
||||||
|
#### OpenOCD
|
||||||
|
|
||||||
|
1. Create your openocd config, named `nordic_nrf52840_dongle.cfg` in the
|
||||||
|
appropriate location:
|
||||||
```shell
|
```shell
|
||||||
$ ./deploy.py --board=nrf52840_dongle_opensk --programmer=jlink
|
mkdir -p ${HOME}/.openocd/board
|
||||||
|
touch ${HOME}/.openocd/board/nordic_nrf52840_dongle.cfg
|
||||||
|
```
|
||||||
|
|
||||||
|
Paste the following st-link example and edit the specific setup to your needs:
|
||||||
|
```
|
||||||
|
# Specific setup
|
||||||
|
source [find interface/stlink-dap.cfg]
|
||||||
|
transport select dapdirect_swd
|
||||||
|
|
||||||
|
# The rest should be kept the same
|
||||||
|
set CHIPNAME nrf52840
|
||||||
|
source [find target/nrf52.cfg]
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Remove the programming cable and the USB-A extension cable.
|
1. Test your config:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
openocd -f board/nordic_nrf52840_dongle.cfg
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Run the deploy script with the appropriate options, i.e.:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
./deploy.py --board=nrf52840_dongle --opensk --programmer=openocd
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Finally, remove the programming cable and the USB-A extension cable.
|
||||||
|
|
||||||
### Buttons and LEDs
|
### Buttons and LEDs
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user