This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Getting started with Eclipse Luna

I just starting out trying to get an Eclipse dev environment up and running. I've tried following nAN-29 but it seems out of date. The issues I run into are:

  1. CDT Main Features - I've downloaded this but it does not appear under Eclipse > Debug Configuration

  2. I don't know where to download the GDB Hardware Debugging?

  3. The does not seem to be an active repository link on the eclipse site for Luna, so I don't know what link to use. According to the nAN-29 the old link was "download.eclipse.org/.../juno"

Thanks for the help guys.

  • Hi,

    nAN-29 is a bit out-dated, as you've noticed. We have an updated blog post, which a colleague of mine posted a while back: devzone.nordicsemi.com/.../

    Try this out and see if that works better.

    Cheers, Håkon

  • Hi,

    Maybe this document can help you. It come from this post and explain how to set up an eclipse project from scratch. Tested successfully last week...

    ===============================================

    Check this: nAN-29 It shows example makefile-project. If you want to create a project from scratch, you will need to do this:

    1. Install Eclipse Kepler (C C++ developer) and GNU ARM Eclipse Plug-in ( help -> install new software....) .

    2. Do what was written in nAN-29 in 1 Required tools and 1.1 Setting up Eclipse.

    3. Create new empty C project -> Executable -> Cross ARM GCC press next -> next -> select toolchain name "GNU Tools for ARM Embedded Processors (arm-none-eabi-gcc)" and path to toolchain for example "C:\Program Files\GNU Tools ARM Embedded\4.8 2013q4\bin"

    4. Add all files from the example project folder to your eclipse project folder i.e. for ble_app_proximity copy files : nRF51 SDK_v5.1.0.36092\Nordic\nrf51822\Board\pca10001\s110\ble_app_proximity\ble_bondmngr_cfg.h nRF51 SDK_v5.1.0.36092\Nordic\nrf51822\Board\pca10001\s110\ble_app_proximity\main.c nRF51 SDK_v5.1.0.36092\Nordic\nrf51822\Board\pca10001\s110\ble_app_proximity\pstorage_platform.h

    5. Create new folder in the eclipse project folder with "startup" name and put in there files: nRF51 SDK_v5.1.0.36092\Nordic\nrf51822\Source\templates\system_nrf51.c nRF51 SDK_v5.1.0.36092\Nordic\nrf51822\Source\templates\gcc\gcc_startup_nrf51.S change file extension from small .s to big .S

    6. Create new folder in the eclipse project folder with "linker" name and put in there files: nRF51 SDK_v5.1.0.36092\Nordic\nrf51822\Source\templates\gcc\gcc_nrf51_common.ld and one more linker file with the name according to your needs gcc_nrf51_{1}_{2}.ld: where {1}: blank - for projects without softdevice s110 - for projects with s110 softdevice s120 - for projects with s210 softdevice and {2}: xxaa - for chips with xxAA at the end (i.e. NRF51822-QFAA-GC) xxab - for chips with xxAB at the end

    7. Add new linked folder to project with Source and Include folders from SDK.

    7.1Go to the linked Include folder and do Resource Configurations -> Exclude from build for either s110 or s120 folder depending on what softdevice you are planning to use. For ble_app_proximity exclude s120 folder.

    7.2Go to the Source folder and do Resource Configurations -> Exclude from build for all the files in there that are not needed for the project. For ble_app_proximity check out what files are needed from existing keil example project: nRF51 SDK_v5.1.0.36092\Nordic\nrf51822\Board\pca10001\s110\ble_app_proximity\arm\ble_app_proximity.uvproj

    8.Go to the project properties -> C/C++ Builder -> Settings:

    8.1. In target processor select ARM family: cortex-m0

    8.2. In Optimization uncheck all flags and set optimization level to none (-O0). Later you can change this settings.

    8.3. In Cross ARM C Compiller -> Preprocessor add defined symbols: NRF51 DEBUG NRF51822_QFAA_GC DEBUG_NRF_USER BLE_STACK_SUPPORT_REQD BOARD_PCA10001 Change them according to your board.

    8.4. In Cross ARM C Compiller -> Includes add all required include paths. For ble_app_proximity it will be: "${workspace_loc:/${ProjName}}" "${workspace_loc:/${ProjName}/Nordic/Include}" "${workspace_loc:/${ProjName}/Nordic/Include/app_common}" "${workspace_loc:/${ProjName}/Nordic/Include/ble}" "${workspace_loc:/${ProjName}/Nordic/Include/ble/ble_services}" "${workspace_loc:/${ProjName}/Nordic/Include/boards}" "${workspace_loc:/${ProjName}/Nordic/Include/ext_sensors}" "${workspace_loc:/${ProjName}/Nordic/Include/gcc}" "${workspace_loc:/${ProjName}/Nordic/Include/s110}" "${workspace_loc:/${ProjName}/Nordic/Include/sd_common}"

    8.5. In Cross ARM C Compiller -> Optimization select Language standard to GNU ISO C99 (-std=gnu99).

    8.6. In Cross ARM C Compiller -> Miscellaneous add to the Other compiler flags -Wno-unused-local-typedefs -mabi=aapcs -mfloat-abi=soft. 8.7. In Cross ARM C Linker -> General add main linker file. For ble_app_proximity it will be: "${workspace_loc:/${ProjName}/linker/gcc_nrf51_s110_xxaa.ld}" And uncheck all flags.

    8.8. In Cross ARM C Linker -> Libraries add Library search path to the gcc_nrf51_common.ld file. "${workspace_loc:/${ProjName}/linker}" Uncheck all flags and add to the Other linker flags -mabi=aapcs --specs=nano.specs . UPD: I fogot a few things in 8.7 and 8.8 and added them now. UPD2:I added sample eclipse project: Eclipse_workspace.rar

  • Thanks for help guys, unfortunately I've made very little progress on this today. I can't seem to complete the steps in nAN-29.

    What does "Add the make utility to your system path" mean under the MAKE UTILITY section?

    I cannot seem to complete step 7 in section 1.1. Though all 3 parts are install, there is no org.eclipse.cdt.embsysregview_x.x.x folder under eclipse plugins. I tried uninstalling eclipse and re-installing and adding the tools 7 times, but this folder still does not appear. Please advise?

    Though it says that the GDB Hardware Debugging is installed in eclipse, it does not appear under Debug Configurations?

    Sorry guys, I'm a Hardware guy so I'm no whiz with software. Without completing these steps I can't move on to a test project in the instructions. Thanks

  • Make for windows can be found here: gnuwin32.sourceforge.net/.../make.htm

    By adding "make" to your system path, you are able to call "make" from any location. There are many tutorials on howto add locations to your PATH in windows, here's one: geekswithblogs.net/.../how-to-set-the-windows-path-in-windows-7.aspx

Related