[SOLVED] Setting up Command line based build environment

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Setting up Command line based build environment

    Hi,
    Our product is based on nrf52 chips by Nordic semiconductor and we use their mesh sdk. We are using segger embedded studio for our development. We have been using segger embedded studio IDE to build our firmware. But now we are planning to shift to the command line build process.

    My final aim is that I want to set up a build environment on a linux system, such that multiple developers can independently work on different modules of the same project on their own system. And whenever any developer wants to test his module, he should be able to send cmd to the central linux system to build and generate the executable taking files from the branch(github) of his module to which he made changes to. And files of other modules on which other developers are working on, it should take whatever is latest available from them.

    To start with I made makefile for our project and built it. But the hex generated is not the same as it is generated by segger embedded studio. After talking to Nordic I understood that because segger uses different additional compile-time defaults options and its own standard c libraries compared to what is available with arm-none-eabi-gcc compiler collection.


    Because of this reason I want to use emBuild fro cmd line without project file option as mentioned here: studio.segger.com/index.htm?ht…ithout_a_project_file.htm

    and using cmd: similar to:

    emBuild -config … -type "Library" -project myproject -file main.c

    I wanted to build my entire project but by using emBuild. Which has lot of source files and included header files. In above example it shows only how to build one main file. I want to know how to go about doing this.

    The post was edited 1 time, last by Aniket Shet ().

  • Hello,

    Thank you for your inquiry.

    Aniket Shet wrote:

    I wanted to build my entire project but by using emBuild. Which has lot of source files and included header files. In above example it shows only how to build one main file. I want to know how to go about doing this.
    We recommend to do it with the project file for exactly this reason. Otherwise you have to generate the whole command line on your own.
    Instead we recommend to setup your build environment in the GUI version in Embedded Studio and create the project there.
    Once everything via the GUI works as expected, simply call emBuild with the same .emProject file and tell it which build configuration to build. That is it.

    You can of course call everything directly and work without the emProject file, but then you are on your own.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.