4 ‐ Programmer guide 🚧 - arribada/CLS-Argos-Linkit-CORE GitHub Wiki
This page is under development 🚧
Update firmware with J-Link probe
The following steps need only be carried out once for each board. You will need to install the nRF Command Line Tools on your computer.
- Apply power by either attaching USB cable from J2 to your PC or powering with a 4.2V battery directly using J1.
- Insert J-Link tag-connect header into the J3 using the three locating holes in the PCB and firmly push down
- Run the following commands to flash the combined bootloader & soft device image
nrfjprog -f nrf52 --eraseall
:warning: This will erase the calibration of the board !!! and you will need to do Argos calibration
nrfjprog -f nrf52 --program LinkIt_XXXXXXX_merged-vX.Y.Z.hex --sectoranduicrerase
nrfjprog -f nrf52 --reset
The bootloader and application firmware is now successfully programmed.
General tips: How to make your own firmware ?
Compiling and Testing
There is two way :
using docker 🐳
using Jenkins :
- Fork the arribada/CLS-Argos-Linkit-CORE github
- start a Jenkins server on your machine related to the Jenkins file on your github
- now you should be able to generate build.
- Open your favorite IDE and add/change your want to do
- Push the change on your git hub.
- clic on "Build Now" on your jenkins server
- If you have pass at least all the stage from "Declarative: Checkout SCM" to "Compile Firmware" you should be able to download firmware and bootloader files. if you want to have a good apprehension of the stability of your firmware version you want to have also stages "Compile Unit Tests" and "Run Unit Tests"
Deploying
go to Firmware Update but instead of using LinkIt_XXXX_dfu-vX.Y.Z.zip
use LinkIt_XXXX_dfu-your_version.zip
You can also perform this by OTA in this case go to OTA update but instead of using LinkIt_horizon_board-vX.Y.Z.img
use LinkIt_horizon_board-your_version.img
Adding sensors
all sensor code are located in ports\nrf52840\core\hardware\
Sensors already add
- ADS1015 - 12 bit ADC I2C - https://cdn-shop.adafruit.com/datasheets/ads1015.pdf
- PT 1000 + EZO RTD - temperature sensor - https://atlas-scientific.com/kits/sma-temperature-kit/
- oem Ph - PH sensor - https://atlas-scientific.com/embedded-solutions/ph-oem-circuit/ (good link ?)
- BMX160 - accelerometer - https://www.mouser.fr/datasheet/2/783/BST_BMX160_DS000-1509610.pdf (old release)
- BMA400 - accelerometer - https://www.mouser.com/datasheet/2/783/BST_BMA400_DS000-1509606.pdf
- LTR-303 - light sensor - https://www.mouser.com/datasheet/2/239/Lite-On_LTR-303ALS-01_DS_ver%201.1-1175269.pdf
- ...
Adding sensors check list
- add sensor source files
- add sensor service file
- define bsp value
- change main.cpp
- ...
- ...
I2C Bus on LinkIt
There are 2 I2C bus on the LinkIt. One call "external I2C bus" : SDA = EXT1_GPIO1, SCL = EXT1_GPIO2;