I have been doing some un-bricking of Argons and your route makes me wonder how hard is it to actually load nordic example nrf52840 code onto particle mesh devices? I don’t have a j-link but have been working with the nrf52840 usb dongles, which must be reasonably similar to the particle mesh devices. Any suggestions for getting Nordic software onto Particle.
I have a gitpod (Browser based docker) that loads the entire Openthread (and ARM files) and generates output for a nrf52840 board.
@rocksetta very doable. As long as you have an nRF52x development board you should be able to easily program the onboard nRF52840. (Using nrfjprog) If you’re utilizing an Argon, you’ll likely have to implement or utilize NCP software to get Wifi to work. (if you’re going that far)
I haven’t played with the nRF52 SDK w/ OpenThread for probably two years. I’m sure it’s come a long way since then. I have no doubt though that it will not be as user friendly as Particle Development environment is.
Hey @jaredwolff if nrfjprog can do the softdevice and the bootloader why not use it to load the system and tinker? If you know the starting address can you do everything with nrfjprog ? I noticed you put 0xf4000 for the bootloader
You could definitely do it a more manual way. That bash script is a wrapper for JlinkExe before they even came out with nrfjprog for OSX. (Those were the days!) The script is not set up to program at a specific address for the system part. This script is more for getting people back to the Particle environment ASAP. It’s not too hard to tweak if you’re looking to do that.
Additionally, there’s a likely chance that you can use the standard nrfjprog command line tool if you have a hex version of the files. That has the address built in so none of this funny business has to happen.
It’s a level shifter for JTAG that I designed a while back. It allows me to use a 3.3V programmer and program anything from 1.7V to 5V without added complications. As long as you’re 2.4V to 3.3V a standard programmer should work.
Another advantage is that I shorted SB32 on the NRF52DK. This supplies the Debug Out connector to supply 3.3V. It also forces the on board J-Link to use the Debug Out connection at all times. This board isolates the DK 3.3V and the Particle’s 3.3V.
Thank you very much @jaredwolff. Very useful information.
I was trying to hook the nRF52 DK and the particle board directly using the 10 pin cable, then powering the particle using USB but for some reason it just did not work. That’s why I got onto this thread.
Can you send a pic of your setup? Generally speaking, “does not work” isn’t helpful in debugging.
One suggestion though is to make sure you’re plugging into the correct port on the NRFSDK. Reference my picture above. It’s tempting to use the other one on the board but that’s for the J-Link processor.
If your DK is unmodified, it won’t use the Debug Out port unless it sees 3.3V on the input. So you need to power both the programmer and the Particle board via USB.
Thanks @jaredwolff. After I lost my mind you instructions and code made my Xenon working. I had the use a j-link and an adapter board. Is there some way we can put all the instruction and the GitHub in one place for the next guy. It really took some digging to find all the links.
What is the difference between j-link and particle debugger, i planned update xenon to custom firmware by debugger or need j-link for that ?
there is cheap st-link v2, it is possible to upgrade it to j-link if necessary.
There’s a big difference actually. Particle’s debugger uses an open source debugger firmware developed by ARM. Whereas Jlink’s is completely closed source. If you’re looking to debug your application, I highly recommend going with the Particle debugger or debuggers that are CMSIS-DAP capable.