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

Can't find suitable tools to make a project with nRF51822

I have to develop a project for nRF51822 but I can't find tools that work. I tried SES and Eclipse and none can compile the examples of SDK12 (the last one that supports my development board - nRF51 DK. It's frustrating.

I develop FW for microcontrollers since more than 20 years so it is not lack of experience...

I need someone to help setup the suitable development tools... please!

Parents
  • Hi,

    SDK 12 was released before we added SES support to the SDK. You can follow this blog tutorial to import a Keil project in SES.

    Eclipse has never been a supported IDE. You can have a look at this tutorial to setup the environment.

    Best regards,
    Jørgen

  • Please do not mark your answer as verified answer when you are asking questions. This should only be done when you have received the answer you are looking for and is equivalent to closing the case.

    Segger Embedded Studio down to v3.10f can be downloaded from Segger's webpage, by clicking "older version". This version should have the same menus and choices that the 3.10e version had. 

    You can also compile any project using free GCC.

  • The reset handler is defined in the assembly file ses_nrf51_startup.s and, in my view, it is defined. However, no matter what SDK example I load, all give the same error. The point is how to remove this error, as I have no clue how to do it.

    This is a part of the file where I believe it is defined:

    .section .vectors, "ax"
    .code 16
    .global _vectors

    _vectors:
    .word __stack_end__
    .word reset_handler
    ISR_HANDLER NMI_Handler

    So, in my opinion the error is in the ses_nrf51_startup.s file.

    It is also strange that compiling gives only a warning, not an error, but doesn't build, although the setting "treat warnings as errors" is set to No!

    Note that the file ses_nrf51_startup.s is original, so I made no change.

  • This is the complete ses_nrf51_startup.s file:

    /*****************************************************************************
    * Copyright (c) 2013 Rowley Associates Limited. *
    * *
    * This file may be distributed under the terms of the License Agreement *
    * provided with this software. *
    * *
    * THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING THE *
    * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
    *****************************************************************************/
    .macro ISR_HANDLER name=
    .section .vectors, "ax"
    .word \name
    .section .init, "ax"
    .thumb_func
    .weak \name
    \name:
    1: b 1b /* endless loop */
    .endm

    .macro ISR_RESERVED
    .section .vectors, "ax"
    .word 0
    .endm

    .syntax unified
    .global reset_handler

    .section .vectors, "ax"
    .code 16
    .global _vectors

    _vectors:
    .word __stack_end__
    .word reset_handler
    ISR_HANDLER NMI_Handler
    ISR_HANDLER HardFault_Handler
    ISR_RESERVED /*Reserved */
    ISR_RESERVED /*Reserved */
    ISR_RESERVED /*Reserved */
    ISR_RESERVED /*Reserved */
    ISR_RESERVED /*Reserved */
    ISR_RESERVED /*Reserved */
    ISR_RESERVED /*Reserved */
    ISR_HANDLER SVC_Handler
    ISR_RESERVED /*Reserved */
    ISR_RESERVED /*Reserved */
    ISR_HANDLER PendSV_Handler
    ISR_HANDLER SysTick_Handler
    /* External Interrupts */
    ISR_HANDLER POWER_CLOCK_IRQHandler
    ISR_HANDLER RADIO_IRQHandler
    ISR_HANDLER UART0_IRQHandler
    ISR_HANDLER SPI0_TWI0_IRQHandler
    ISR_HANDLER SPI1_TWI1_IRQHandler
    ISR_RESERVED /*Reserved */
    ISR_HANDLER GPIOTE_IRQHandler
    ISR_HANDLER ADC_IRQHandler
    ISR_HANDLER TIMER0_IRQHandler
    ISR_HANDLER TIMER1_IRQHandler
    ISR_HANDLER TIMER2_IRQHandler
    ISR_HANDLER RTC0_IRQHandler
    ISR_HANDLER TEMP_IRQHandler
    ISR_HANDLER RNG_IRQHandler
    ISR_HANDLER ECB_IRQHandler
    ISR_HANDLER CCM_AAR_IRQHandler
    ISR_HANDLER WDT_IRQHandler
    ISR_HANDLER RTC1_IRQHandler
    ISR_HANDLER QDEC_IRQHandler
    ISR_HANDLER LPCOMP_IRQHandler
    ISR_HANDLER SWI0_IRQHandler
    ISR_HANDLER SWI1_IRQHandler
    ISR_HANDLER SWI2_IRQHandler
    ISR_HANDLER SWI3_IRQHandler
    ISR_HANDLER SWI4_IRQHandler
    ISR_HANDLER SWI5_IRQHandler
    ISR_RESERVED /*Reserved */
    ISR_RESERVED /*Reserved */
    ISR_RESERVED /*Reserved */
    ISR_RESERVED /*Reserved */
    ISR_RESERVED /*Reserved */
    ISR_RESERVED /*Reserved */

    .section .init, "ax"
    .thumb_func

    reset_handler:

    // turn on RAM blocks
    .equ NRF_POWER_RAMON_ADDRESS, 0x40000524
    .equ NRF_POWER_RAMONB_ADDRESS, 0x40000554
    .equ NRF_POWER_RAMONx_RAMxON_ONMODE_Msk, 0x3

    /* Make sure ALL RAM banks are powered on */
    MOVS R1, #NRF_POWER_RAMONx_RAMxON_ONMODE_Msk

    LDR R0, =NRF_POWER_RAMON_ADDRESS
    LDR R2, [R0]
    ORRS R2, R1
    STR R2, [R0]

    LDR R0, =NRF_POWER_RAMONB_ADDRESS
    LDR R2, [R0]
    ORRS R2, R1
    STR R2, [R0]


    #ifndef __NO_SYSTEM_INIT
    ldr r0, =__SRAM_segment_end__
    mov sp, r0
    bl SystemInit
    #endif

    b _start

    #ifndef __NO_SYSTEM_INIT
    .thumb_func
    .weak SystemInit
    SystemInit:
    bx lr
    #endif

  • Can you upload your entire project? That way I can check if I see any issues with the configuration.

  • The project I am trying to compile is the SDK12 example ble_app_template_pca10028_s130 wihout any changes.

    How can I upload the project? Sorry but I'm new in Nordic....

  • ZIP the directory and upload it to your reply like this:

Reply Children
  • There is only one problem now: the example project doesn't compile:

    (...)
    Generating linker script ‘ble_app_template_pca10028_s130.ld’
    Linking ble_app_template_pca10028_s130.elf
    Output/nrf51422_xxac/Exe/ble_app_template_pca10028_s130.elf section `.fs_data' will not fit in region `UNPLACED_SECTIONS'
    region `UNPLACED_SECTIONS' overflowed by 16 bytes
    Output/ble_app_template_pca10028_s130 nrf51422_xxac/Obj/fstorage.o: In function `check_config':
    undefined reference to `__start_fs_data'
    undefined reference to `__stop_fs_data'
    Output/ble_app_template_pca10028_s130 nrf51422_xxac/Obj/fstorage.o: In function `fs_init':
    undefined reference to `__stop_fs_data'
    undefined reference to `__start_fs_data'
    Build failed

  • My project is the SDK12 example, so it makes no sense to zip because it would mean you would get the SDK12!

Related