Just a question: How do i build the firmware for the RAK4631?
Following Building Meshtastic Firmware | Meshtastic worked well for the T-Beam for example. At the end of the build process, something like firmware.factory.bin is produced, which i can rename to say 2.0.12_TBeam.bin and flash that to my T-Beam. Fine.
However the RAK4631 (tutorial) asks for a .uf2 file.
I do not find that file. VSC generates a .zip file at the end of the build process which contains a file firmware.bin. Uploading this firmware to the 4631 does not work and also renaming to firmware.uf2 does not work.
Typically a ZIP file is flashed via āadafruit-nrfutilā such as done when updating the bootloader on NRF52 devices as covered here on RAK documentation
However the process of creating a UF2 file is derived from a HEX or BIN file and requires the use of a special command called uf2conv.py with specifc parameters
Copied onto the RAK FAT fs volume
BIN file
If using a .bin file with the conversion script you must specify application address with the -b switch, this address depend on the SoftDevice size/version e.g S140 v6 is 0x26000, v7 is 0x27000
While Iām sure the above method also works, I usually use the āUploadā button of the PlatformIO extension in VSCode (step 5 in your link). Just make sure the RAK is in bootloader mode by double-pressing the reset button after you connect it.
also worth noting @mark.birss is absolutely right. The uf2 file is generated from the hex file in our build process within gitlab. the right uf2conv.py is included in the firmware bin filder and you can have a peek in bin/build-nrf52.sh for the right parameter