Hi,
I'd like to start developing automated tests for my custom NRF52840 board.
Currently I use the CLI library (with RTT backend) for communicating with the board.
Any ideas for how I could communicate with my board via a python script?
Thanks
Tim
Hi,
I'd like to start developing automated tests for my custom NRF52840 board.
Currently I use the CLI library (with RTT backend) for communicating with the board.
Any ideas for how I could communicate with my board via a python script?
Thanks
Tim
Hi Tim,
If you want to continue using CLI over RTT for your communication with the board, you can look into our pynrfjprog library. This enables you to read and write RTT channels from a python script.
Best regards,
Jørgen
Thanks Jørgen, and apologies for the late response. I've been sidetracked by other tasks. Now I finally have time for this.
I currently use SDK 15.2.0. What peripheral example did you start with? (I'd like to have as close to your setup as possible to avoid nasty surprises).
I started out with the UART peripheral example. However, I do not think that any part of that example is used in the project I uploaded, so it should not really matter.
Looks like it's working. I just have one issue with the python environment (I use python 3.x). Did you test the scripts with python 2.x?
Yes, I tested with Python 2.7.15. I see from the release notes that pynrfjprog should support Python 3.6 at least, but you may have to modify the example to use it with Python 3.x.
Great! I igot it working with python 3.x. Need to tweak the script for my own tests, but the basic read and write from both ends works! I have enough to get me running. Thanks Jørgen!
Great! I igot it working with python 3.x. Need to tweak the script for my own tests, but the basic read and write from both ends works! I have enough to get me running. Thanks Jørgen!