This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problems flashing the DFU on the Eval Kit

I am using the GCC DFU project provided by Nordic on GitHub (devzone.nordicsemi.com/.../)

I altered the main.c to trigger to DFU mode based on the contents of the GPREGRET register rather than Button 7. However when I try and Flash the .hex file (bootloader_gcc_xxaa.hex) of the project on nRFgo Studio I get the follow error. The hex file has data in SoftDevice region. Try programming using "Program SoftDevice", or erase all before programming.

Can I (,how can i) alter this project to not reside in the SoftDevice region or do I have to fully integrate it with the SoftDevice (7.0.0) .hex?

Thank you for your help.

P.S. I am using rRFgo Studio 1.17.1 to flash

nrf51_bootloader_gcc-master.zip

Parents
  • I compiled your project and was able to successfully flash it to nRF51822. I had to clean the project first.

    I was also able to reproduce the error you got. It happened when the "Makefile.common" and "gcc_nrf51_s110_bootloader_xxaa.ld" was not copied to the folder nrf51822\Source\templates\gcc. (These files are included in the GCC DFU project you found on GitHub)

    The .hex file should be called "bootloader_gcc_s110_bootloader_xxaa.hex" when the right linker script is chosen.

Reply
  • I compiled your project and was able to successfully flash it to nRF51822. I had to clean the project first.

    I was also able to reproduce the error you got. It happened when the "Makefile.common" and "gcc_nrf51_s110_bootloader_xxaa.ld" was not copied to the folder nrf51822\Source\templates\gcc. (These files are included in the GCC DFU project you found on GitHub)

    The .hex file should be called "bootloader_gcc_s110_bootloader_xxaa.hex" when the right linker script is chosen.

Children
  • Thanks for your help. I had copied those files to the template/gcc folder. However I still had the same issue. I found another version of the DFU GCC project on the Nordic Github page (github.com/.../bootloader - gcc - BLE) When using this project, everything will compile and seems to flash. However when I try and Flash my application on top of the SoftDevice and the Bootloader, the Application verification fails. This is not the case when there is no bootloader. I did notice as you mentioned, that my bootloader hex file is incorrectly named bootloader.hex. So its not linking properly. I can't seem to fix this issue!

  • Just to double check: I have the SoftDevice, My Application Project, and my DFU Application Project (bootloader - gcc - BLE). I first Erase-All, then flash the SoftDevice (88kB), then flash the .hex output of the DFU project (54kB), then My Application Project .hex code (112kB). Total memory usage is therefore 254kB. I don't think there is sufficient Flash memory to complete any OTA upgrade?

  • Could you try to copy your DFU project in to a fresh install of the SDK under the "device_firmware_updates" folder , and copy in the linker files to the template/gcc folder? Then in eclipse, import you project as a Makefile project and add /gcc to the build directory. This is what I did at least.

    There is also a .map file in the Build folder, could you send me this file for both the DFU and the Application, so I can check and see what went wrong during the linking?

    Just to check, the application has to be flashed through the bootloader, if you are using a bootloader, not in nRFgo Studio.

    Could you send me you app .hex file so I can test it?

  • I cannot get the project to compile if I remove the linker script gcc_nrf51_bootloader_xxaa.ld from the /gcc folder in the project and paste it in the template/gcc folder.

    Thanks for the assistance, but i cannot share .hex or .map files on a public forum. I'll move this to the customer portal.

  • Yes, I think the support portal is a more suited place for this case. Is it okay that I close the thread then?

Related