diff --git a/Pipfile b/Pipfile new file mode 100644 index 0000000..92be46c --- /dev/null +++ b/Pipfile @@ -0,0 +1,16 @@ +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[packages] +pyserial = "*" +intelhex = "*" + +[dev-packages] + +[requires] +python_version = "3.9" + +[scripts] +flash = "./cc2538-bsl.py -evw" diff --git a/Pipfile.lock b/Pipfile.lock new file mode 100644 index 0000000..7cfab38 --- /dev/null +++ b/Pipfile.lock @@ -0,0 +1,37 @@ +{ + "_meta": { + "hash": { + "sha256": "2d25cf7eb1c68bca3de98ef0548b1e3b5bffa4f171bb44c12c41f19eed880ced" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3.9" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "intelhex": { + "hashes": [ + "sha256:87cc5225657524ec6361354be928adfd56bcf2a3dcc646c40f8f094c39c07db4", + "sha256:892b7361a719f4945237da8ccf754e9513db32f5628852785aea108dcd250093" + ], + "index": "pypi", + "version": "==2.3.0" + }, + "pyserial": { + "hashes": [ + "sha256:3c77e014170dfffbd816e6ffc205e9842efb10be9f58ec16d3e8675b4925cddb", + "sha256:c4451db6ba391ca6ca299fb3ec7bae67a5c55dde170964c7a14ceefec02f2cf0" + ], + "index": "pypi", + "version": "==3.5" + } + }, + "develop": {} +} diff --git a/README.md b/README.md index 9474d60..b8f86a2 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ To communicate with the uart port of the SoC you need a usb to serial converter: ### Dependencies -This script uses the pyserial package to communicate with the serial port and chip (https://pypi.org/project/pyserial/). You can install it by running `pip install pyserial`. +This script uses the pyserial package to communicate with the serial port and chip (https://pypi.org/project/pyserial/). You can install it by running `pip install pyserial`. Alternatively, if you use [Pipenv](https://pipenv.pypa.io/en/latest/), you can use `pipenv install`. If you want to be able to program your device from an Intel Hex file, you will need to install the IntelHex package: https://pypi.python.org/pypi/IntelHex (e.g. by running `pip install intelhex`). @@ -71,6 +71,16 @@ The script will automatically select the first serial looking port from a USB to Before uploading your image make sure you start the boot loader on the SoC (`select` + `reset` on CC2538DK). You can find more info on the different options by executing `python cc2538-bsl.py -h`. +#### Pipenv + +If you are using Pipenv, you an flash a device with the following command: + +```sh +pipenv run flash /path/to/CC2652RB_coordinator_20220219.hex +``` + +**NOTE:** You can pass `-p /dev/cu.usbserial-1120` if your device is not auto-detected. Your `.hex` file path/name may be different. + ### Remarks * Programming multiple SoCs at the same time is not yet supported.