mwaylabs / fruitymesh-devenv

Development Environment for FruityMesh - saves you some trouble
8 stars 6 forks source link

Flashing binary fails #8

Closed Bardo91 closed 7 years ago

Bardo91 commented 7 years ago

Hi, I had some problems setting up the environment in windows for eclipse as mentioned in issue https://github.com/mwaylabs/fruitymesh-devenv/issues/6#issuecomment-297461255. So I started digging in other options. I saw that it is possible to compile the project in ubuntu too using the arm-gcc compiler. I intalled it by calling sudo apt-get install gcc-arm-none-eabi and I got it compiled calling "make" in the project/fruitymesh folder. When the compiler finished it said:

 --------------------------------------------------------------
  Board:      NRF51_BOARD
  Platform:   NRF51
  Build type: debug

   text    data     bss     dec     hex filename
  76607     296    5028   81931   1400b _build/debug/NRF51_BOARD/FruityMesh.out
 --------------------------------------------------------------

I assumed that the FruityMesh.out is the binary. Then I read that just dropping the hex in the JLINK device that appears when I plug the device automatically flashed it. I tried this method before with a binary I compiled using https://developer.mbed.org and it worked. but now when I do it with the binary I have just generated it creates a file called FAIL that says Error during flash operation

I am using the nRF51 DONGLE so the first thing I though was that I need to set somewhere that I am using this device istead of the NRF51_BOARD (that I assume that is the development kit). I found that it is specified in the beggining of the Makefile:

PROJECT_NAME ?= FruityMesh
BUILD_TYPE   ?= debug
BOARD        ?= NRF51_BOARD <<<---------------------------
VERBOSE      ?= 0

I am not sure what else to do now, I cant find a list of possible BOARDS and I am not sure if that is really the problem.

Thanks in advance

Bardo91 commented 7 years ago

I am sorry. I didn't see that it was also generated an .hex file. If I put the "FryityMesh.HEX" file in the device it flashes it. No it's time to play with it!