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

nRF51822 over the air bootloader with gcc

For my current project, I need to compile the »over the air bootloader« with gcc (because our buildserver runs on linux, developers using Mac … no Windows and no Keil so far).

But unfortunaly, the bootloader example from the sdk (5.1) examples won't compile with gcc. It's missing gcc makefile and even there are at least 2 Keil specific files in the project (arm_startup_nrf51.s and bootloader_util_arm.c).

Could you provide support to help me on this topic?

I'd also checked:- devzone.nordicsemi.com/index.php/nrf51822-bootloader-with-gcc

Parents
  • I am having trouble in ble_stack_init while building the bootloader with gcc This same project builds/executes fine with keil but when I build with gcc I notice that the execution never returns from ble_stack_init (more specifically, the system call to sd_softdevice_enable).

    Any idea what might be the issue?

    Attaching the project file which can be built from the top directory typing 'make'

    drix-bldr.zip

  • those two enum settings WERE the culprits! The padding made it work. so apparently it does affect the softdevice init.

    I had tested earlier with trying to set two leds on the nrf51822 EK on. One before the the call to ble_stack_init and one after. The one after wouldnt light up. and then I also nested them inside, just before and after the sd_softdevice_enable in softdevice_handler.c, and got same results. Looking at the code, I had the same insight that the only loop where it could get stuck is the LFCLK but then it would be weird that keil makes the LFCLK works, just as you pointed out. So more likely that some corruption was going on.

Reply
  • those two enum settings WERE the culprits! The padding made it work. so apparently it does affect the softdevice init.

    I had tested earlier with trying to set two leds on the nrf51822 EK on. One before the the call to ble_stack_init and one after. The one after wouldnt light up. and then I also nested them inside, just before and after the sd_softdevice_enable in softdevice_handler.c, and got same results. Looking at the code, I had the same insight that the only loop where it could get stuck is the LFCLK but then it would be weird that keil makes the LFCLK works, just as you pointed out. So more likely that some corruption was going on.

Children
No Data
Related