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

Combining SD, DFU and Application .hex and Programming

Hi guys,

First issue: is that the mergehex.exe fails everytime when trying to Write the merged file. The Error is ERROR: An error occured while writing the file. this has occurred on every attempted combination of SD, DFU and Application.

Second issue: If I try and simply program all three .hex files with nrfjprog.exe I get several warnings. "WARNING: Since the option "--dfu" was not given, the SoftDevice will include UICR settings. Please be aware that Device Firmware Update of the SoftDevice will be possible with these settings." This does not occur if I program the two with nRFgo Studio and I can update the SD just fine.

Third issue: When trying to use nrfjprog.exe the DFU does not detect a valid application. I know this question has been address before, but all references to solutions were based on older code which I don't use. I am using bootloader_util_gcc which is coded differently that bootloader_util_arm. Therefore I don't know how to apply any of the solutions to have the DFU validation the application when programmed.

Parents
  • Third Issue: We also tried a lot of things taken from the devzone to get this working. The most promising thing was to patch bootloader_util_arm, but it didn't work properly with one of the later versions. So we were looking for another way of doing this. We think, that the patch to make a application valid shouldn't be in the bootloader code as most given answers suggest. If we only program the bootloader the existing behavior is just fine (enter bootmode automatically). So the patch has to be related to the programming of the chip. We have built a intel-hex file that contains the bootloader settings for a valid application. This hexfile can be merged in the hex-file to be programmed later with nrfjprog.exe.

    NOTE: The file works only if the location of the bootloader settings has not be changed (=> 0x3FC00)

    Hex-File to set valid application in bootloader settings: BootloaderSettingsValidApplication.hex

    First Issue: We are using mergehex.exe without any problem for the same thing as you do. Actually we merge SD, bootloader, application and the hex-file with the bootloader-settings to one hex-file. Can you maybe post the command line of your merge operation?

Reply
  • Third Issue: We also tried a lot of things taken from the devzone to get this working. The most promising thing was to patch bootloader_util_arm, but it didn't work properly with one of the later versions. So we were looking for another way of doing this. We think, that the patch to make a application valid shouldn't be in the bootloader code as most given answers suggest. If we only program the bootloader the existing behavior is just fine (enter bootmode automatically). So the patch has to be related to the programming of the chip. We have built a intel-hex file that contains the bootloader settings for a valid application. This hexfile can be merged in the hex-file to be programmed later with nrfjprog.exe.

    NOTE: The file works only if the location of the bootloader settings has not be changed (=> 0x3FC00)

    Hex-File to set valid application in bootloader settings: BootloaderSettingsValidApplication.hex

    First Issue: We are using mergehex.exe without any problem for the same thing as you do. Actually we merge SD, bootloader, application and the hex-file with the bootloader-settings to one hex-file. Can you maybe post the command line of your merge operation?

Children
Related