Nordic nRF51822 ARM Cortex-M0 Development using emIDE

Nordic nRF51822 ARM Cortex-M0 Development using emIDE

To avoid the hefty charges with commercial compilers I tried emIDE with some success; here are the settings I used for the EV Kit

Official emIDE website:

Ev Kit:

Exception Vectors

Any code compiled with a resident Soft Device has a vector table at the link address (eg, Soft Device 110 v7 requires user code to be at 0x16000, so the vector table will be at that address). The reset vector at 0x16004 will be the start address of the user code, but to debug the code must start at the reset vector in code location 0x00004, which is the Soft Device reset address. Ensure this happens by performing a device Reset before running code.

GDB Debugger

Breakpoints can be set and code single-stepped through the application startup assembler code, but currently 4.7.4 and 4.8.3 GDB crashes if setting a breakpoint in main.c. Note memory display works for both s100 Soft Device and application code and memory.

Link Files

Use the default gcc link files (eg gcc_nrf51_s110_xxaa.ld) located here: blahblah\nrf51822\Source\templates\gcc\

emIDE Default Version

gcc version 4.7.4 20130913 (release) [ARM/embedded-4_7-branch revision 202601] (GNU Tools for ARM Embedded Processors)

**Global Compiler Settings gcc - 4.7.4**
Settings->Compiler->Toolchain Executables:
C:\Program Files (x86)\emIDE\emIDE V2.20\arm
Settings->Compiler->Search Directories->Compiler:
C:\Program Files (x86)\emIDE\emIDE V2.20\arm\arm-none-eabi\include

**Global Compiler Settings - gcc 4.8.3**
Settings->Compiler->Toolchain Executables:
C:\Program Files (x86)\GNU Tools ARM Embedded\4.8 2013q4

**Project-Specific Settings - Debug**
Project->Build Options->Debug->Policy:
Append target options to project options
Project->Build Options->Debug->Compiler Settings->Compiler Flags:
Produce debugging symbols [-g]
Project->Build Options->Debug->Compiler Settings->Other Options:
Project->Build Options->Debug->Compiler Settings->#defines:

Project->Build Options->Debug->Linker Settings->Linker script:

Project->Build Options->Debug->Linker Settings->Other linker options:

Project->Build Options->Debug->Search Directories->Compiler:
C:\Program Files (x86)\emIDE\emIDE V2.20\arm\arm-none-eabi\include

Project->Build Options->Debug->Search Directories->Linker:

Project->Properties->Debugger->GDB->GDB commands after connection:
Monitor reset
monitor flash device nRF51822_xxAA

Project->Properties->Debugger->J-Link GDB Server->Target Device:
(Uncheck) Automatically close GDB Server after debugging

Project->Properties->Debugger->J-Link GDB Server->Interface Speed:


  • I work for the master's dissertation writing help, and recently I was going through some of my orders and this topic relates one of my orders. thankfully I found the solution from this blog. But there is a lot to research on the GDB Debugger.

  • You mean that any code that is attached to the Soft Device contains the address of the vector table. However, when we want to debug the code so the code should begin from the reset vector code i.e 0x0004 which is the reset address of Soft Device and that can drive top resumes as well. This compile example is very clear to any individual who wants to compile any sort of code as per the requirements.

  • Such a piece of good information. I'm a student and of course, I want to have money and I decided to work as a freelance writer affordable paper. Our exclusive paper service has been rated the best in completing diverse writing tasks given to students at their educational institutions, such as colleges, high schools, and universities.

  • Development of the land court is done for the comfort of the participants. The art of the discussion is ensured whether it is paying someone to write an essay illegal? Or not for the future times. The tip of the success is structured in safe items for the citizens.

  • I think you need to use -std=gnu99 (3rd section) to make the compilation of "system_nrf51.c" to work, because one of its dependencies (compiler_abstraction.h) uses asm keyword, which is not defined in c99.

    I tried to make the blinky example to compile in emIDE and changing it to gnu99 fixed the compilation error I had.