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

Error in Eclipse GCC when build project

I am encountering some problem in building eclipse project following the tutorial at devzone.nordicsemi.com/.../ .

Previously I succeeded in building with another simple example project. But when I move on to use my project, it is not able to build.

I am at the step 'Enable auto discovery of symbols, include paths and compiler settings', where I configured all the properties as stated. But when I try to build project, it returns 3 errors as follow: image description image description image description

I did edit the makefile.windows to change the path to point to where my GNU ARM Embedded Tool is at. I also changed to the new makefile.common file which is required for SDK 12 and above.

What are the errors? And how can I fix it? Thank you.

EDIT: I managed to solve some of the above errors. But this time i got new errors of the following:

undefined reference to 'function2'
undefined reference to 'evt_write'
undefined reference to 'xxxx'
undefined reference to 'xxxx'
undefined reference to 'xxxx'

How can I fix it? Do I need to specify or set somewhere the paths to include the file where the functions are from? (The makefile under 'SRC_FILES' and 'INC_FOLDERS' did not include certain files, probably because I made use of the ble_app_template to write my project and added more files. Do I need to include the paths to these newly #include header files here or somewhere else? Please advise.)

Parents
  • Where should I add the path at, under 'SRC_FILES' or 'INC_FOLDERS'? I opened the makefile in Eclipse and tried adding at 'SRC_FILES' and/or 'INC_FOLDERS' in this format: $(SDK_ROOT)/components/file1
    $(SDK_ROOT)/components/file2
    $(SDK_ROOT)/external/tiny-AES128 \

    Here are the 3 situations I tried:

    1. When I include these lines under 'SRC_FILES', it returns a fatal error 'main.c:86:42: fatal error: file1.h: No such file or directory' when I build project (after clean project).

    2. When I include these lines in 'INC_FOLDERS' instead, it returns the same errors of undefined reference as stated in the question.

    3. When I include these lines in both 'SRC_FILES' and 'INC_FOLDERS', it returns multiple errors such as 'arm-none-eabi-gcc: error: _build/nrf51422_xxac_file1.o: No such file or directory'

    Did I do it wrongly? Or is there other area that I need to include these paths?

Reply
  • Where should I add the path at, under 'SRC_FILES' or 'INC_FOLDERS'? I opened the makefile in Eclipse and tried adding at 'SRC_FILES' and/or 'INC_FOLDERS' in this format: $(SDK_ROOT)/components/file1
    $(SDK_ROOT)/components/file2
    $(SDK_ROOT)/external/tiny-AES128 \

    Here are the 3 situations I tried:

    1. When I include these lines under 'SRC_FILES', it returns a fatal error 'main.c:86:42: fatal error: file1.h: No such file or directory' when I build project (after clean project).

    2. When I include these lines in 'INC_FOLDERS' instead, it returns the same errors of undefined reference as stated in the question.

    3. When I include these lines in both 'SRC_FILES' and 'INC_FOLDERS', it returns multiple errors such as 'arm-none-eabi-gcc: error: _build/nrf51422_xxac_file1.o: No such file or directory'

    Did I do it wrongly? Or is there other area that I need to include these paths?

Children
No Data
Related