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

ble examples not working

Hi I am new to Nordic Development. I am developing a product that will use the Rigado BMD-300 module (nRF52832 but no need for FCC compliance testing). The evaluation board from Rigado is directly equivalent to the pca10040 except for the preloaded software I ran nrfjprog -f nrf52 --eraseall to erase it. It also uses the same firmware. I upgraded to version J-Link OB-SAM3U128-V2-NordicSemi 170724.bin. I am using gcc on macOS High Sierra. I put gcc-arm-none-eabi-6-2017-q2-update/bin and nRF5x-Command-Line-Tools_9_7_1_OSX/nrfjprog in my path and installed JLink_V620h I downloaded nRF5_SDK_14.1.0_1dda907 and changed components/toolchain/gcc/Makefile.posixto

GNU_INSTALL_ROOT := /usr/local/gcc-arm-none-eabi-6-2017-q2-update/bin/
GNU_VERSION := 6.3.1
GNU_PREFIX := arm-none-eabi

I then went to examples/peripheral/blinky/pca10040/s132/armgcc ran make to get

mkdir _build
cd _build && mkdir nrf52832_xxaa
Assembling file: gcc_startup_nrf52.S
Compiling file: system_nrf52.c
Compiling file: main.c
Compiling file: boards.c
Compiling file: app_error.c
Compiling file: app_error_weak.c
Compiling file: app_util_platform.c
Compiling file: nrf_assert.c
Compiling file: nrf_section_iter.c
Compiling file: nrf_strerror.c
Compiling file: nrf_sdh.c
Compiling file: nrf_sdh_soc.c
Linking target: _build/nrf52832_xxaa.out
   text	   data	    bss	    dec	    hex	filename
   2424	    112	     28	   2564	    a04	_build/nrf52832_xxaa.out
Preparing: _build/nrf52832_xxaa.hex
Preparing: _build/nrf52832_xxaa.bin
DONE nrf52832_xxaa

then I ran make flash_softdevice to get

Flashing: s132_nrf52_5.0.0_softdevice.hex
nrfjprog -f nrf52 --program ../../../../../../components/softdevice/s132/hex/s132_nrf52_5.0.0_softdevice.hex --sectorerase
Parsing hex file.
Erasing page at address 0x0.
.
.
.
Erasing page at address 0x22000.
Applying system reset.
Checking that the area to write is not protected.
Programing device.
nrfjprog -f nrf52 --reset
Applying system reset.
Run.

and then make flash to get

Flashing: _build/nrf52832_xxaa.hex
nrfjprog -f nrf52 --program _build/nrf52832_xxaa.hex --sectorerase
Parsing hex file.
Erasing page at address 0x23000.
Applying system reset.
Checking that the area to write is not protected.
Programing device.
nrfjprog -f nrf52 --reset
Applying system reset.
Run.

and the leds started blinking. I then go to examples/ble_peripheral/ble_app_uart/pca10040/s132/armgccrun make to get

mkdir _build
cd _build && mkdir nrf52832_xxaa
Compiling file: nrf_log_backend_rtt.c
Compiling file: nrf_log_backend_serial.c
Compiling file: nrf_log_default_backends.c
Compiling file: nrf_log_frontend.c
Compiling file: nrf_log_str_formatter.c
Compiling file: app_button.c
Compiling file: app_error.c
Compiling file: app_error_weak.c
Compiling file: app_fifo.c
Compiling file: app_scheduler.c
Compiling file: app_timer.c
Compiling file: app_uart_fifo.c
Compiling file: app_util_platform.c
Compiling file: hardfault_implementation.c
Compiling file: nrf_assert.c
Compiling file: nrf_atfifo.c
Compiling file: nrf_balloc.c
Compiling file: nrf_fprintf.c
Compiling file: nrf_fprintf_format.c
Compiling file: nrf_fstorage.c
Compiling file: nrf_fstorage_sd.c
Compiling file: nrf_memobj.c
Compiling file: nrf_pwr_mgmt.c
Compiling file: nrf_section_iter.c
Compiling file: nrf_strerror.c
Compiling file: retarget.c
Compiling file: sdk_mapped_flags.c
Compiling file: boards.c
Compiling file: nrf_drv_clock.c
Compiling file: nrf_drv_common.c
Compiling file: nrf_drv_gpiote.c
Compiling file: nrf_drv_uart.c
Compiling file: bsp.c
Compiling file: bsp_btn_ble.c
Compiling file: bsp_nfc.c
Compiling file: main.c
Compiling file: SEGGER_RTT.c
Compiling file: SEGGER_RTT_Syscalls_GCC.c
Compiling file: SEGGER_RTT_printf.c
Compiling file: ble_advdata.c
Compiling file: ble_advertising.c
Compiling file: ble_conn_params.c
Compiling file: ble_conn_state.c
Compiling file: ble_srv_common.c
Compiling file: nrf_ble_gatt.c
Assembling file: gcc_startup_nrf52.S
Compiling file: system_nrf52.c
Compiling file: ble_nus.c
Compiling file: nrf_sdh.c
Compiling file: nrf_sdh_ble.c
Compiling file: nrf_sdh_soc.c
Linking target: _build/nrf52832_xxaa.out
   text	   data	    bss	    dec	    hex	filename
  37260	    628	   4048	  41936	   a3d0	_build/nrf52832_xxaa.out
Preparing: _build/nrf52832_xxaa.hex
Preparing: _build/nrf52832_xxaa.bin
DONE nrf52832_xxaa

and make flash to get

Flashing: _build/nrf52832_xxaa.hex
nrfjprog -f nrf52 --program _build/nrf52832_xxaa.hex --sectorerase
Parsing hex file.
Erasing page at address 0x23000.
Erasing page at address 0x24000.
Erasing page at address 0x25000.
Erasing page at address 0x26000.
Erasing page at address 0x27000.
Erasing page at address 0x28000.
Erasing page at address 0x29000.
Erasing page at address 0x2A000.
Erasing page at address 0x2B000.
Erasing page at address 0x2C000.
Applying system reset.
Checking that the area to write is not protected.
Programing device.
nrfjprog -f nrf52 --reset
Applying system reset.
Run.	

and all of the leds turn off. I not quite sure what is supposed to happen at this point but I think a leds is supposed to blink to show it is in advertising mode. I can not see the device on nRF Connect nor nRF Toolbox. I also tried SDK 12.3 with the same results. What do you guys think the problem is?

Parents Reply Children
  • An led is supposed to blink right? I did that and I got the same result no blinking led. I was able to program the s132 softdevice and blinky(s132 version) separately and it worked without mergehex.

  • If you are sure that SD versions match the API you used in SDK during build and chip version and SD + pre-compiled binary delivered by Nordic with SDK work while your not then you need to go back to build process. E.g. is your GCC equal to the one mentioned by Nordic in SDK release notes? What about to try Keil MDK as well (there you should just open the project and press the button to build...) Finally I'm afraid Nordic compile HEX files with IAR so to reproduce 100% binary compatibility (to be sure that you really have all set as working example) you would need to try that (eval/tiral version should be available if you don't want to pay full license - which I totally understand;) But in my experience GCC work pretty well, haven't had much troubles with different GCC versions once Makefile and code base are stable (which should be this case).

  • Also the example .hex files don't work either do you think it is a hardware issue that only effects bluetooth?

Related