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

Working Workspace for nAN-29 v1.1

I am trying to use Eclipse+GCC for my projects. I found a similar issue as stated in the following post:

devzone.nordicsemi.com/.../nan-29-nrf51-sdk-no-project-files

I have downloaded the blinky_example, but my workspace did not have the common makefiles included in the last line of the blinky_example makefiles in the folder:

include $(SDK_PATH)Source/templates/gcc/Makefile.common

Then I found this files in an old release backup and copied them but at the time of building I found the following error


17:18:23 **** Incremental Build of configuration Default for project blinkyEclipse ****
make all 
"C:/Program Files (x86)\GNU Tools ARM Embedded\4.7 2013q3/bin/arm-none-eabi-gcc" -L"C:/Program Files (x86)\GNU Tools ARM Embedded\4.7 2013q3/arm-none-eabi/lib/armv6-m" -L"C:/Program Files (x86)\GNU Tools ARM Embedded\4.7 2013q3/lib/gcc/arm-none-eabi/4.7.4/armv6-m" -Xlinker -Map=_build/blinky_gcc.map -mcpu=cortex-m0 -mthumb -mabi=aapcs -L ../../../../Source//templates/gcc/ -Tgcc_nrf51_blank.ld _build/main.o _build/nrf_delay.o _build/system_nrf51.o _build/gcc_startup_nrf51.o -o _build/blinky_gcc.out
c:/program files (x86)/gnu tools arm embedded/4.7 2013q3/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld.exe: cannot find -lcs3
c:/program files (x86)/gnu tools arm embedded/4.7 2013q3/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld.exe: cannot find -lcs3unhosted
collect2.exe: error: ld returned 1 exit status
make: *** [_build/blinky_gcc.out] Error 1

17:18:24 Build Finished (took 947ms)

lcs3unhosted and lcs3 libraries are missing. I suppose this is because these common makfiles are using Sourcery CodeBench package(nAN-29 v1.0) and not GNU Tools for ARM Embedded Processors package(nAN-29 v1.1). I have not found in the last SDKs or in the Nordic website a workspace to work with the nAN-29 v1.1 or at least the common makefiles. It would be great if someone from Nordic can shed some light into this issue and upload the right workspace/files.

Thanks.

Parents
  • Great Ole. Thanks again. Almost there. I've got everything (compiling, debugging, flashing, embSys,...) working fine with your project. Now I am trying to port my own project and I found the following error:

    17:42:09 **** Build of configuration Default for project ble_app_hids_mouse ****
    make all 
    rm -rf _build
    mkdir _build
    "C:/Program Files (x86)/GNU Tools ARM Embedded/4.7 2013q3//bin/arm-none-eabi-gcc" -mcpu=cortex-m0 -mthumb -mabi=aapcs -DNRF51 -DBOARD_NRF6310 -DNRF51822_QFAA_CA --std=gnu99 -Wall -Werror -mfloat-abi=soft -DDEBUG -g3 -O0 -I"../" -I"../../../../../Include" -I"../../../../../Include/gcc" -I"../../../../../Include/ext_sensors" -M ../main.c -MF "_build/main.d" -MT _build/main.o
    ../main.c:37:26: fatal error: app_captouch.h: No such file or directory
    compilation terminated.
    make: *** [_build/main.o] Error 1
    
    17:42:09 Build Finished (took 407ms)
    
    
    

    I have followed your advice from a previous post:

    • In tab C/C++ Build the build directory should point to gcc folder, if the project name is blinkyEclipse the build directory should be: ${workspace_loc:/blinkyEclipse}/gcc
    • in tab C/C++ General -> Path and Symbols -> GNU C : include directories should be added.

    My headers seems to be in the includes menu of the project. You can see it in the attached image. What do you think it may be going on?

    GCC_Includes.jpg

Reply
  • Great Ole. Thanks again. Almost there. I've got everything (compiling, debugging, flashing, embSys,...) working fine with your project. Now I am trying to port my own project and I found the following error:

    17:42:09 **** Build of configuration Default for project ble_app_hids_mouse ****
    make all 
    rm -rf _build
    mkdir _build
    "C:/Program Files (x86)/GNU Tools ARM Embedded/4.7 2013q3//bin/arm-none-eabi-gcc" -mcpu=cortex-m0 -mthumb -mabi=aapcs -DNRF51 -DBOARD_NRF6310 -DNRF51822_QFAA_CA --std=gnu99 -Wall -Werror -mfloat-abi=soft -DDEBUG -g3 -O0 -I"../" -I"../../../../../Include" -I"../../../../../Include/gcc" -I"../../../../../Include/ext_sensors" -M ../main.c -MF "_build/main.d" -MT _build/main.o
    ../main.c:37:26: fatal error: app_captouch.h: No such file or directory
    compilation terminated.
    make: *** [_build/main.o] Error 1
    
    17:42:09 Build Finished (took 407ms)
    
    
    

    I have followed your advice from a previous post:

    • In tab C/C++ Build the build directory should point to gcc folder, if the project name is blinkyEclipse the build directory should be: ${workspace_loc:/blinkyEclipse}/gcc
    • in tab C/C++ General -> Path and Symbols -> GNU C : include directories should be added.

    My headers seems to be in the includes menu of the project. You can see it in the attached image. What do you think it may be going on?

    GCC_Includes.jpg

Children
  • Remember that with Eclipse/GCC and the nRF51 SDK, there is no direct connection between the IDE and the build system. To add new header files or paths, you therefore should add them both Eclipse (so that code completion and jumping to definitions and similar work) and to the Makefile itself (so that building works).

    Based on your description, you seem to have done the first, but not the latter. You should therefore add the necessary paths also to your Makefile. It seems that you should be able to set them in C_SOURCE_PATHS and INCLUDEPATHS to make things work.

    Personally, I always tend to check that builds are working from the command line before integrating anything into Eclipse.

Related