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

nRF52 DK with SDK14 Blinky Example (without BLE) Compile Error by Using IAR 8.20.1

Hi,

I am using IAR embedded workbench IDE - ARM 8.20.1 (full version) to compile the SDK 14.0 blinky_pca10040_s132 -nrf52832_xxaa example. However, I got some errors which is

  1. Fatal Error[Pe1696]: cannot open source file "nrf_log_ctrl_internal.h"

  2. Error while running C/C++ Compiler app_util_platform.c
    app_error.c
    nrf_assert.c
    main.c
    nrf_sdh_soc.c

  3. Fatal Error[Pe1696]: cannot open source file "nrf_section_iter.h"

  4. Error while running C/C++ Compiler nrf_sdh.c

  5. Fatal Error[Pe1696]: cannot open source file "nrf_section_iter.h"

  6. Error while running C/C++ Compiler system_nrf52.c
    nrf_strerror.c
    nrf_section_iter.c

Total number of errors: 3 (Display on IAR message box)

I already did the below step before I built the project,

  1. Open workspace -> "blinky.eww"
  2. Set active -> blinky_pca10040_s132_nf52832_xxaa
  3. Select project -> options -> Gerneral Options -> Target -> Device -> "NordicSemi nRF52832_xxAA"
  4. Select project -> options -> Debugger -> Drive -> "J-link/J-Trace"
  5. Select project -> options -> Debugger -> J-link/J-Trace -> Setup -> JTAG/SWD speed -> Fixed 4000kHz
  6. Use nrfjprog erase and reset the chip

I had no idea that why I will got these errors. Please help.

Thank you.

Regards,

sm

  • Hi,

    Have you done any changes in that folder structure of the SDK ? Note that IAR uses relative paths, and if you have moved any of the components and files in the SDK, or the IAR projects itself, IAR won’t be able to find the files.

    Try to download a clean copy of the SDK from here, and try again.


    Note that we have now released SDK 14.1, where we have added support for Segger Embedded Studio (SES) IDE. You can use Segger Embedded Studio for commercial and non-commercial purpose with Nordic Semiconductor devices free of charge.

  • I did not change the folder structure of the SDK 14.0. And I checked the below setting in IAR Embedded Workbench IDE, project > Option > C/C++ Compiler > Preprocessor > Additional include directories, I found that all of the needed libraries were included. For example, "nrf_sdh.c" was compiled fail as the source file "nrf_section_iter.h" could not open. This heading file was under the folder "\nRF5_SDK_14.0.0_3bcc1f7\components\libraries\experimental_log\src", but the directories "$PROJ_DIR$............\components\libraries\experimental_log\src" already existed in the C/C++ Compiler > Preprocessor > Additional include directories.

    It is did not make sense that the IAR still showed errors if the additional include directories settled. So, I am quite confuse about that.

    Thank you.

    Regards, SM

  • That is very strange. Did you try to download, unzip, and use a "clean/new" SDK 14?

    Note that we are currently using IAR Workbench 7.80.4 when doing release test of the SDK, so I would genereally recommend using that version if you are able to do that.

  • You can also try to download and install nRF5 MDK for IAR, and see if that helps.

    Latest version is 8.15.0, you can download it from here.

  • There is no error any more after I compiled the sample blinky example from the new released SDK 14.4 and installed nRF5 MDK latest version 8.15.0. However, when I download the program to the nRF52 DK, a message box was shown, "Warning: Stack pointer is setup incorrect alignment. Stack addr=0xFFFFFFFF". And the LEDs on the nRF52 DK board were not blink.

    Any idea for this case?

    Thank you.

    Regards, SM

Related