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

How to get a stand-alone "snapshot" of a bootloader source code

I have now used days trying to create a working clone of "dfu_dual_bank_ble_s110_pca100028" so that the source would compile and result would work correctly, independently of the sdk (nRF51_SDK_8.1.0_b6ed55f). I am building with Keil uVision 5.14.0.0.

After copying all the c-files and referenced h-files (I think) into my own project folders, the source compiles fine and I can flash the bootloader. Even the first time DFU (flashing) over-the-air works.

However, when I try to re-flash, my application enters into the bootloader, but the flashing does not start. I need to re-start the nRFTools' DFU, only after that it succeeds (connecting to DfuTarg).

THE POINT is that the very original bootloader at the "....\nRF51_SDK_8.1.0_b6ed55f\examples\dfu\bootloader" works perfectly, NOT NEEDING to start DFU twice.

After double-checking all the files (c- and h-files) I cannot find the difference - they are just identical. However, the produced binary (HEX) is different and as said, my own "clone" of bootloader does not work correctly.

THE QUESTION: Is there a simple way to rip away a stand-alone "snapshot" of a project from the SDK source folders? This is needed for safe version-management, to be sure our source does not have unknown dependencies that might change by accident. It is also needed if we want to compile without having to install complete sdk first.

Thank you all for great development forum!

Parents Reply Children
  • Thanks, I tried that, but the result is actually using lots of files from the Keil installation folder. The compiler command seems to have e.g. following includes (and more):

        -I C:\Keil\ARM\PACK\ARM\CMSIS\4.2.0\CMSIS\Include 
        -I C:\Keil\ARM\PACK\NordicSemiconductor\nRF_BLE\2.0.0\ble_services\ble_dfu 
        -I C:\Keil\ARM\PACK\NordicSemiconductor\nRF_BLE\2.0.0\common 
        -I C:\Keil\ARM\PACK\NordicSemiconductor\nRF_DeviceFamilyPack\7.2.1\Device\Include 
        -I C:\Keil\ARM\PACK\NordicSemiconductor\nRF_Drivers\2.0.0\hal 
        -I C:\Keil\ARM\PACK\NordicSemiconductor\nRF_Drivers\2.0.0\pstorage 
        -I C:\Keil\ARM\PACK\NordicSemiconductor\nRF_Examples\8.0.0\bsp 
        -I C:\Keil\ARM\PACK\NordicSemiconductor\nRF_Libraries\2.0.0\bootloader_dfu 
    ...(the list continues)
    

    So the project is not really "stand alone" :(

  • It is not "stand alone", but files that are included from there are not meant to be modified. These are only libraries, that (mostly) won't need changes. Files that ou can modify are in RTE in your project folder.

  • Yes, I know. But to be able to deliver working software package for our customer, and to be able to manage versions with a single git repository, I would need a different approach. Last week we just hit a problem that our customer had different packs installed and our source did not compile.

Related