This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Programming with pynrfjprog

Hi,

I have a python scipt that uses pynrfjprog to program some custom information into a board's flash to be used by my application (calibration parameters, serial number etc).

I'd like to customise this to also program the softdevice, application and bootloader. nrfjprog can do this using the command:

nrfjprog.exe --eraseall --programs softdevice.hex --program application.hex bootloader.hex --verify --reset

Is there a way to access this functionality from the Python API?

Parents
  • Yes there is. There is an examples folder when you install pynrfjprog here C:\Python27\Lib\site-packages\pynrfjprog\examples

    program_multiple_hex_file.py does this for you and should work out of the box. I attached it as well.program_multiple_hex_files.py

  • OK your nrfjprog is really old. That does make sense though. I'm really not sure but what I can tell you is this flag has been discontinued so I would suggest updating nrfjprog (we are v8.3 now) and just doing a quick search on dev zone to make sure memory protection wont interfere. But your call, I can't help you here.

Reply
  • OK your nrfjprog is really old. That does make sense though. I'm really not sure but what I can tell you is this flag has been discontinued so I would suggest updating nrfjprog (we are v8.3 now) and just doing a quick search on dev zone to make sure memory protection wont interfere. But your call, I can't help you here.

Children
No Data