Page 1 of 1
Flash NRF51822
Posted: Mon Jul 27, 2015 12:59 pm
by Slaxx
Hi
I'm currently trying to flash the NRF Chip on my slightly adapted board with your software. For this reason I opened the source code, changed the pinout a bit and try to make the project. However it does not work. I think I have to install more stuff in order to make it work. What else do I have to install? I'm currently using my own Linux. Is everything already installed in your Virtual Box? So the making works out of the box?
Re: Flash NRF51822
Posted: Mon Jul 27, 2015 1:06 pm
by tobias
Re: Flash NRF51822
Posted: Tue Jul 28, 2015 2:37 pm
by Slaxx
Ok I got them and apparently they work.
I can Build everything but if I want to flash I receive the following message:
16:36:35 **** Build of configuration Default for project crazyflie2-nrf-firmware ****
make flash
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -DNRF51 -I Include -I Include/gcc -Iinterface -g3 -O0 -Wall -fsingle-precision-constant -ffast-math -DS110=1 -DBLE=1 -DBLE_STACK_SUPPORT_REQD -DNRF51 -Inrf51_sdk/nrf51822/Include/gcc -Inrf51_sdk/nrf51822/Include/ -Inrf51_sdk/nrf51822/Include/ble/ -Inrf51_sdk/nrf51822/Include/ble/ble_services/ -Is110/s110_nrf51822_7.0.0_API/include -Inrf51_sdk/nrf51822/Include/app_common/ -Inrf51_sdk/nrf51822/Include/sd_common/ -c -o src/ble/ble.o src/ble/ble.c
In file included from src/ble/ble.c:21:0:
nrf51_sdk/nrf51822/Include/app_common/app_error.h:27:23: fatal error: nrf_error.h: No such file or directory
#include "nrf_error.h"
^
compilation terminated.
<builtin>: recipe for target 'src/ble/ble.o' failed
make: *** [src/ble/ble.o] Error 1
16:36:35 Build Finished (took 334ms)
Re: Flash NRF51822
Posted: Wed Jul 29, 2015 10:15 am
by Slaxx
I tried flashing the generated Hexfile when clicking all(no BLE) in eclipse directly with openoc with the following command:
openocd -f interface/stlink-v2.cfg -f target/nrf51_stlink.tcl -c "program cf2_nrf.bin reset"
This seemed to work and I received the following result.
link-v2.cfg -f target/nrf51_stlink.tcl -c "program cf2_nrf.bin reset"
Open On-Chip Debugger 0.8.0 (2014-05-10-23:21)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : This adapter doesn't support configurable speed
Info : STLINK v2 JTAG v21 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.927749
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0xfffffffe msp: 0xfffffffc
** Programming Started **
auto erase enabled
Warn : Unknown device (HWID 0x00000057)
wrote 25600 bytes from file cf2_nrf.bin in 103.818573s (0.241 KiB/s)
** Programming Finished **
** Resetting Target **
shutdown command invoked
However the NRF seems not to run properly. Do I have to flash something else? I read somewhere in the internet that the softdevice stuff is sometimes flashed separately. Is this already combined in eclipse or do I have to do that as well?