This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Eclipse GCC pure project for DFU Bootloader nRF51

Hi,

I have created Eclipse project to compile nRF51 DFU loader. This is a pure Eclipse project, no makfile. It has compile configurations for combination of Single/Dual bank and BLE/Serial. This project require installed nRF51 SDK 5.2 in the same work space under with sdk directory name nrf51_sdk. The project has file links to the source in the sdk hence the sdk directory need to be that name. This will allow you to update to new sdk easier.

Here are the prerequisite.

Eclipse Keplar CDT Eclipse ARM plus ins: Follow this blog gnuarmeclipse.livius.net/.../. this contains support for jlink as well GCC compiler : launchpad.net/gcc-arm-embedded

Here are the attached files common.zip contains common folder to be place in same workspace. dfu_nrf51.zip is the project folder. It contains precompiled & tested hex release version of 4 binations if you don't want to recompile.

Workspace directory should have

Workspace | Common | dfu_nrf51 | nrf51_sdk

I hope this helps anyone who wants to work with Eclipse & GCC.

Good luck

Update sep. 18, 2014

Updated projects with sdk 6.1 on blog site here embeddedsoftdev.blogspot.ca/.../ehal-nrf51.html

Parents
  • C99 or gnu99 ?

    Hi Nguyen, there in a strange behavior in your code, infact, if i compile with -std=gnu99 all goes ok but if I set -std=C99 (your preferred choice and , as you said, needed by SDK to be compiled) these errors was raised :

    
    /nrf51_sdk/nrf51822/Include/compiler_abstraction.h:73:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'asm'
    
    /nrf51_sdk/nrf51822/Include/compiler_abstraction.h:73:30: warning: implicit declaration of function 'asm' [-Wimplicit-function-declaration]
    
    /nrf51822/Include/compiler_abstraction.h:74:16: error: 'sp' undeclared (first use in this function)
    
    /nrf51822/Include/compiler_abstraction.h:74:16: error: 'sp' undeclared (first use in this function)
    
    
    

    More interesting is the fact you do not use the asm file gcc_startup_nrf51.S but a translation from asm to c file StartupnRF51.c .

    Can you tell me more about ? Is it possible to compile using using the original asm file or changes are needed ?

    Does this file be compatible with all SDK (old and news) or must be rewritten ad hoc for every SDK?

    If I would compile hrf example to be used with boot loader generated from you eclipse project I need to change specific address memory flashing with jlinkexe (os x version) or the firmware starts at the same address (0x014000) ?

    Thanks.

    -c

  • I forgot your question about using the gcc_startup_nrf51.S. Yes you can use it. You will need to use the linker script from the SDK too. I made few changes in the linker script for my startup code.

Reply Children
No Data
Related