I'm using nrfjprog to develop a production functional tester for an nRF52840 based system. Everything was going well in testing, but when I moved the hex file to be loaded into a read-only directory, nrfjprog returns the following:
"Parsing hex file. ERROR: the file specified could not be open for read." [sic]
The was true for the --program command using either --chiperase or --verify.
It works fine if the hex file to be loaded is in a writeable directory, but my question is why is this the case? I see no files being written to the same directory as my image, nor would I want my programmer to write anything to the directory that I'm pointing the image to. To be used in a production tester, i want to make sure the programmer doesn't have the ability to alter the controlled image directory in anyway which is why we set it up as read-only. Any log or temp files that the nrfjprog needs to write I would expect to be written in the root directory of where i invoked nrfjprog from which I can ensure could be writeable.
Can you advise if this is expected behavior, and if so is there a workaround where I can have my production hex files in non-writeable location, and point nrfjprog to them just for loading?
I confirmed mergehex can operate on files that are in read-only directories, as long as the output is pointing to a writeable directory which makes sense to me. A file move from the read-only to writeable directory isn't a great solution as I'm not longer getting the image from the version controlled location.
I'm using nrfjprog version 9.7.2 and JLinkARM.dll version 6.40