NordicPlayground / nRF51-ble-bcast-mesh

Other
323 stars 121 forks source link

Error running BLE_Gateway example #129

Closed jmfrancolin-gatech closed 7 years ago

jmfrancolin-gatech commented 7 years ago

When running the project _rbc_mesh_BLEGateway I get the following error:

Error: Flash Download failed - Could not load file 'C:\Users\joao.francolin\Downloads\nRF51-ble-bcast-mesh-master\nRF51\examples\BLE_Gateway\arm_build\rbc_gateway_example.axf'

So I checked the _bin directory, and there is indeed a *_rbc_gatewayexample.axf* missing. Does anyone has a repository with this file? Is there any other way to make this BLE_Gateway example project?

I saw some literature about compiling via gcc; so if anyone is familiar with it, I would really appreciate some further instructions

trond-snekvik commented 7 years ago

Hi there, The .axf-files are the binary output files generated by Keil µVision, in the same way .elf-files are the binary output-files generated by arm-gcc. If you're using Keil to build the examples, your .axf-files should show up in nRF51/examples//arm/_build/, along with a .hex-file you can flash to your board.

arm-gcc is supported with GNUMake, and all examples contain a makefile under nRF51/examples//gcc/. Enter that directory, and you should be able to build the project with Make. Note that those makefiles include the SDK-makefiles, which must be set up correctly. Vidar's nice tutorial on setting up Eclipse has a section to describe the process:


To build an example in the SDK you first need to set the toolchain path in makefile.windows or makefile.posix depending on platform you are using. That is, the .posix should be edited if your are working on either Linux or OS X. These files are located in

<SDK>/components/toolchain/gcc

Open the file in a text editor, and make sure that the GNU_INSTALL_ROOT variable is pointing to your Gnu tools for ARM embedded Processors install directory.

Correct values for my current setup:

GNU_INSTALL_ROOT := $(PROGFILES)/GNU Tools ARM Embedded/4.9 2015q3   // Toolchain path
GNU_VERSION := 4.9.3  
GNU_PREFIX := arm-none-eabi

Now you can try to build one of the example projects.