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

Compiler Identifier Name in SDK

Hello,

I am using SDK 15.0.0 and GNU Tools for ARM Embedded Processors to compile the Application Program.

I faced a problem to understand compiler abbreviation, so i didn't identify the portion of instructions to be compiled based upon the compiler.

Please help me to identify correct compiler/tools for the following compiler abbreviation:

1) GNUC

2) ICCARM

3) CC_ARM

4) SES_ARM

5) LINT

Parents
  • Hi,

    Please see the site Nordic tools and downloads for information about what compiler and tools you need.

    I would recommend Segger Embedded Studio. Please see this SES getting started guide. We also have a SES getting started youtube series here.

    GNUC = GCC

    ICCARM = IAR

    CC_ARM= Keil

    SES_ARM = Segger Embedded Studio

    Lint = Lint

  • Thanks for your reply.

    I would like to ask few other questions regarding this topic.

    (1)

    I am using GNU Tools for ARM Embedded Processors to compile the Application Program.

    So for this tool, GNUC keyword used to compile particular portion of software code.

    But in whole SDK, I didn't found the place where GNUC keyword is defined.

    How does GNUC keyword for the compiler tool define? 

    (2) What is the importance of double underscore before and after the Keyword/Identifier Name?

  • Hi,


    1) These defines are used for identifying the compiler being used to build the code. The __GNUC__ is used several places in the SDK, but this is nothing that you need to think about when compiling/building examples in the SDK.
    2) I have only seen __GNUC__ used.

    To build an example with GCC, perform the following steps:

    1. Open Windows command line or Linux terminal.
    2. Navigate to the selected example folder, and then to the armgcc project directory, for example:  <SDK15_InstallFolder>/examples/ble_peripheral/ble_app_uart/pca10040/s132/armgcc
    3. Run the make command in this folder. If the environment was set up correctly, the build process will start.
    4. The build process produces the HEX file inside the _build folder: <SDK15_InstallFolder>/examples/ble_peripheral/ble_app_uart/pca10040/s132/armgcc/_build/nrf52832_xxaa.hex

    Remember to flash the SoftDevice when testing the BLE examples. The SoftDevice hex can be found in the folder: <SDK15_InstallFolder>\components\softdevice\s132\hex\s132_nrf52_6.0.0_softdevice.hex

    See this page on how to flash the hex files using nrfjprog. If you are having problems flashing the hex files using nrfjprog you could test nRF Connect for Desktop and use the programmer app instead.

Reply
  • Hi,


    1) These defines are used for identifying the compiler being used to build the code. The __GNUC__ is used several places in the SDK, but this is nothing that you need to think about when compiling/building examples in the SDK.
    2) I have only seen __GNUC__ used.

    To build an example with GCC, perform the following steps:

    1. Open Windows command line or Linux terminal.
    2. Navigate to the selected example folder, and then to the armgcc project directory, for example:  <SDK15_InstallFolder>/examples/ble_peripheral/ble_app_uart/pca10040/s132/armgcc
    3. Run the make command in this folder. If the environment was set up correctly, the build process will start.
    4. The build process produces the HEX file inside the _build folder: <SDK15_InstallFolder>/examples/ble_peripheral/ble_app_uart/pca10040/s132/armgcc/_build/nrf52832_xxaa.hex

    Remember to flash the SoftDevice when testing the BLE examples. The SoftDevice hex can be found in the folder: <SDK15_InstallFolder>\components\softdevice\s132\hex\s132_nrf52_6.0.0_softdevice.hex

    See this page on how to flash the hex files using nrfjprog. If you are having problems flashing the hex files using nrfjprog you could test nRF Connect for Desktop and use the programmer app instead.

Children
No Data
Related