Hi there,
So , It sounds like you’re running into a common pain point when using mergehex
together with sysbuild and Fast Pair configs on the nRF platform. They definitely could improve the FMD integration but G & co. is NOT real keen to change there stuff. ANy way
A few things to consider:
- Sysbuild Output Format: Sysbuild by default can generate multiple artifacts (like
.hex
,.bin
,.uf2
). When usingmergehex
, you’re typically combining multiple.hex
files (e.g., application + config). But the final merged hex may not always be fully UF2-compatible without an extra conversion step.mergehex
doesn’t “rebuild” the metadata needed for UF2 properly, it just merges the memory contents. - UF2 Bootloader Expectations: If you’re flashing via drag-and-drop onto a device mass storage (like a DK board or dongle), the UF2 loader expects certain address alignments and metadata. If your merged UF2 isn’t working (e.g., flashing never completes/unmounts), it could be because the merged HEX isn’t producing a correct UF2 file afterward — it’s likely missing essential vector table addresses or metadata.
- Not Using MCUboot: Without MCUboot, your app needs to be positioned and built in a way that the bootloader (or ROM bootloader) expects. If mergehex changes the memory map (even slightly), but the device expects a clean app image, it might hang at boot.
- Tips:
- After merging, rebuild the UF2 properly (don’t just hex2uf2 blindly) — maybe re-parse the hex into a bin + generate UF2.
- Check your linker script or sysbuild config to make sure the memory layout remains consistent even after merging.
- Double-check whether your Fast Pair config blob needs to be linked differently (e.g., as a section inside your main app instead of merged externally).
- If possible, try merging at build time using sysbuild config instead of post-build
mergehex
, so the build system knows everything that will be included.
You might want to dig into how sysbuild sets the partition layouts too — sometimes merged.hex
isn’t just app+config but includes other parts like settings.hex
or bootloader.hex
that need to be properly accounted for. I would also post it on the NRF Forum too. I have seen a few FMD issues there in different scenarios.
HTH
GL PJ
Stay at it , your almost there.