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

SES Build and Run

Hi all,

Not being a developer, but having a fair general understanding in IT and computing science, if I wanted to have a first approach but clear idea of all the processes being executed by (for instance the Segger SES Studio IDE) when it runs a  "Build and Run" command on a source file, in order to first obtain and then flash all the final binary hex files in the proper memory addresses of the target device, what documentation would you suggest me to review? (from Nordic Semicon, from Segger or from any other source reliable source). I would like to know what for instance assembling (¿?), linking,  driving the physical memory itself, programming (¿?) and any other processes I may not know yet, mean to this.

Thanks in advance.

  • Hi.

    Perhaps you can find the information you are looking for in the Segger Embedded Studio documentation? It is quite detailed, you can find it here.

    Best regards,

    Andreas

  • Hi Andreas.

    I 've been last weeks reviewing Nordic Infocenter and Documentation Library,  Segger Embedded Studio for ARM, Wikipedia getting familiarised with your developing tools and even bought C for Dummies book and I will hopefully keep reading these sources till I have a clear idea on all the functionalities nRF52 SoCs have and how to customize them at my wish.

    But meanwhile, I would like to crosscheck if some of the very basic ideas I am building up in my head are on the good track, and I hope you won't mind to help me.

    1/ First of all, I understand that when you program one example using BLE from your SDK and an SES IDE, this program takes care of the building, linking and loading on the target device not only the Application firmware, but also the SoftDevice and the MBR. Is that right?

    2/ In this understanding, when I look at the SES Suite docked window on the left side of the screen, the Project Explorer shows up to 24 folders in case you are trying to load the Central&Peripheral  ble_app_interactive_s140_pca10056 example. May I understand that the folder named "Application" is "the only" containing the different C source files from which the Application firmware hex file is going to be built after issuing a Built and Run command?

    3/ My I understand that the folder named"nRF Softdevice" is "the only" containing the different C source files from which the SoftDevicen firmware hex file is going to be built after issuing a Built and Run command?  

    4/ Wich folder is then taking care of building the MBR hex file to be programmed on the target device?

    5/ My I understand that the rest of the folders (except the one named "Output", do not directly contribute to build the Application, Softdevice nor MBR final firmware hex files, but only providing data to produce the source files contained in the "Application" and "nRF Softdevice" already referred folders?

    6/ My I understand that the hex file ble_app_interactive_s140_pca10056.hex you find inside the "Output Files" folder appearing after you issue the Build and Run  SES command, is the one containing the Application, SoftDevice and MBR firmware files to be programmed in the target device? What are then the rest of the files you find in this folder for?

    7/ And finally. Later on, when I decide to program a Bootloader into the target device, may I also use an SES IDE, or I will also be forced to do it using a nRF52 Keil IDE, as described in your "Getting started with Nordic's Secure DFU bootloader, a step by step guide" blog?

    Waiting for your answer,

    Thanks very much for your help, Andreas.

  • Hi again and happy new year.

    1)
    Segger Embedded Studio compiles the Application source code into a .hex file. The SoftDevice or/and the MBR are already compiled by us and is found in the SDK you download.

    2)
    No, not correct. All the files added in the different folders are used to compile the Application, the name of the folders could have been anything.

    3)
    No, not correct. The SoftDevice comes precompiled, we do not share this code. The folder named nRF_SoftDevice contains the SoftDevice handler, which is used by the precompiled SoftDevice.

    4)
    The MBR is already precompiled, it can either be compiled together with the SoftDevice code, or as a standalone .hex file. You can find it in the nRF5_SDK_15.2.0\components\softdevice\mbr folder.

    5)
    Which folders are you talking about?

    6)
    Correct, the .hex file is created after you have compiled. But, it only has the Application, not the SoftDevice or MBR. When you wish to flash your device in Segger Embedded Studio, Segger will flash the .hex file created by the project you work in. But you can "load" additional files to be flashed in the Options menu, and by default all our SDK projects which require a SoftDevice have this option already added to the project. This is how Segger is able to program both the Application and the SoftDevice at the same time.
    The rest of the files in the folder is also a result of the build.

    7)
    You can of course use SES IDE, could you provide a link to the Getting started page you are looking at?

    Best regards,
    Andreas

  • Hi Andreas, and happy new year too.

    5/I was referring to all the folders showing in the SES Project Explorer,  excluding the folders named Application and Output Files. But forget it, because I understand now what are they for.

    6/ You said "The rest of the files in the folder is also a result of the build" but, may I have an idea of what are those files used for? (.elf, .ind,  .id, and .map).

    7/ This is the Getting started page I am looking at: https://devzone.nordicsemi.com/b/blog/posts/getting-started-with-nordics-secure-dfu-bootloader

    Thanks again for your clarifying answer.

    Best regards

  • Hi.

    5/I) Ok

    6/

    .elf: It a symbol file for debugging, which is created as a result of the build.

    .ind: Contains a list of the object files that the compiler have produced.

    .ld: Is a linkerscript (for gcc), it specifies things such as RAM and Flash size, which sections are where and so on, it is a input file for the linker.

    .map: This file tells where all sections (code and data) is placed in RAM and ROM after the build.

    7/ ) That tutorial is based on a old SDK, where Segger was not supported, you can use Segger for SDK 15 and so on.

    Best regards,

    Andreas

Related