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

GCC/Eclipse unsolved resources

Like many others (read a lot of threads here about this and also beneath the tutorial to Eclipse many people write that they suffer for it) i have problems in Eclipse with unresolved resources.

However, none of the possible solutions seem to work.

My project is fine because i can compile, build, flash and debug with Ecplise, but the CDT still throws me errors, where are none.

The unresolved errors are linked to:

  • EVENTS_LFCLKSTARTED
  • LFCLKSRC
  • TASKS_LFCLKSTART
  • use_easy_dma
  • CLOCK_LFCLKSRC_SRC_Pos
  • CLOCK_LFCLKSRC_SRC_Xtal
  • NRF_CLOCK
  • APP_ERROR_CHECK(err_code)
  • uint32_t
  • SOFTDEVICE_HANDLER_INIT(...)

I checked everything twice and also tried a lot of suggestions that possibly could help but i do not manage to kill that errors. Im especially confused why uint32_t can`t be resolved, but uint8_t is resolved. They are in the same file, and opening the declaration of uint8_t with right click works. uint32_t is almost directly defined a few lines later. Somehow the behavior is unpredictable for me. Also the preprocessor includes appear under GNU C++ which is strange. The unresolved issues should be only related to the CDT Cross GCC Built-in Compiler Settings preferences, right? This is:

arm-none-eabi-gcc ${FLAGS} -E -P -v -dD "${INPUTS}"

Im using

  • Eclipse Mars 2
  • GNU ARM Eclipse Build Tools 2.8
  • GNU Tools ARM Embedded 6.3.1
  • SDK13
  • Project app_ble_uart, modified to work with EasyDMA
  • custom service

Any idea whats going wrong/?

Parents
  • I had the same issue after migrating to SDK13 which I narrowed down to Eclipse ignoring the defines in the makefile. For me right clicking on 'main.c -> properties -> C/C++ General -> Preprocessor Include Paths' showed only the include files below 'CDT GCC Build Output Parser' but no defines. This causes Eclipse to not include any of the board files in boards.h because it thinks no board is defined.

    To solve this issue I compared some files between SDK 12.2 and 13. I noticed this difference in Makefile.common (/components/toolchain/gcc/).

    Steps to solve this issue

    • Open components/toolchain/gcc/Makefile.common
    • Find the toolchain commands section
    • Change the double quotes to single quotes for each command
    • make clean
    • make all
    • Rebuild the index

    For me this fixed the unresolved resource warnings for LFCLKSRC and LED_1. I found this by just looking around and trying things. It's not like I actually know what I'm doing. It is possible that there are some unwanted consequences after these changes, although I haven't noticed any.

  • This resolved an issue in which Eclipse couldn't find boards.h on SDK 14.2 for the blinky example

Reply Children
No Data
Related