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

Compile blinky&ble_app_hrs from SDK_7.2 example in Eclipse

I try to compile SDK example following the tutorials (devzone.nordicsemi.com/.../) , but i got some problems.

1.I can't finish setp of " Setting up a project for debugging in Eclipse "

--in Blinky it show up "Program file does not exist
C:\nRF51_SDK_7.2\examples\peripheral\blinky\pca10031\blank\armgcc_build\nrf51422_xxac.out not found"

--in Ble_App_Hrs it show up "Error while launching command: gdb --version"

I have no ideal to fix it .

2.when i compile the "blinky" as i skip "Setting up a project for debugging in Eclipse" step, then its seems ok! so i downloaod Blinky(use the hex file in _build folder<nrf51422_xxac.h>) use nRFgo to board ,but it can not work!

3.when i compile the "Ble_App_Hrs" also skip "Setting up a project for debugging in Eclipse"step, first,it appear a lot problem with header(include<XXX.h>) can't be found, but i solve it (i add each header's path in properties->C/C++ General->Paths and Symbols->Includes ) , then it is compiled sussceful ,but i can't work after i download to board (use hex file in _build folder<nrf51422_xxac.h> by nRFgo )

4.how to set up the start address in eclipse

so how should i solve those problems, and eclipse can creat the hex file for download?

i need help PLZ

  • I'd recommend to start by using the examples attached to the tutorial to have a working reference project when creating new projects, in case you haven't already. This should make it easier to troubleshoot problems that may arise.

    "Error while launching command: gdb --version" can be caused by incorrect or missing path to arm-none-eabi-gdb. Make sure that you've set the toolchain path in preferences -> C/C++ -> Build -> Global tools path -> Toolchain folder. Also ensure that the path to JLinkGDBServerCL.exe is pointing to the latest version in preferences -> Run/Debug -> Segger J-link. If you still get the same error, try to change the GDB client setup as shown below.

    image description

    C:\nRF51_SDK_7.2\examples\peripheral\blinky\pca10031\blank\armgcc_build\nrf51422_xxac.out not found"

    Backslash is missing between armgcc and _build. "_build\nrf51422_xxac.out" should work. A trick is to click on the project in the project explorer window so it's highlighted before you enter the debug configurations. Correct path should then be added automatically.

    2.when i compile the "blinky" as i skip "Setting up a project for debugging in Eclipse" step, then its seems ok! so i downloaod Blinky(use the hex file in _build folder<nrf51422_xxac.h>) use nRFgo to board ,but it can not work!

    Are you using the nRF51 DK kit, or a custom board? Depending on the chip variant you may have to change the linker settings for it to work, see the .ld file located together with the Makefile. The DK kit is using xxAC variant with 256K/32K memory.

    4.how to set up the start address in eclipse

    Start address is set in the linker file located in the same directory as the makefile.

  • thx for ur detailed answers , as i skip the step ,the hex file in ''_build'' folder can still be usefull? if not, what is problem with?

    i try to compile some program and download to board using eclipse, but i don't have experience before so thx for ur helping

  • Instructions on how to download the .hex file is given in the beginning of the tutorial under "before we begin -> nRF-tools/J-link". Did you try this already?

  • yes, i have tried it before,first i use the nrf51422_xxac.hex in _build folder compiling by keil, and use CMD download to board , it can work,but when i use the nrf51422_xxac.hex compiling by eclipse ,it can not work, so i check 2 hex file ,find they are different(a lot) , so i think the problem is in hex file ,that means ,compiling environment may not correct, but i don't know which part i make mistake .

  • Please attach the build log from Eclipse to your question above. The .hex should be the same either you build it from Eclipse or from cmd as the same tools are being used. That is, want to see from the log if that's actually the case

Related