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

How to create a Makefile based project?

Hi,

I am new to creating project from scratch.

I want to use nRF51802 module. From few support tickets i have come to know that  SDK version 12.3 and SoftDevice S130 version 2.0.x  are the compatible versions for nRF51802 module. Are these the latest combination for nRF51802? What should i use?

And i want to create a project which is IDE independent project, a Makefile project.

Can anyone please guide me how to create a makefile project for nRF51802 module?

Thanks,

Swetha.

Parents
  • Hi Edvan,

    I have used the makefile from "\examples\peripheral\blinky\pca10028\s130\armgcc" this path and in. ld file we have changed to the memory sizes as you mentioned.

    RAM (rwx) :  ORIGIN = 0x20001fe8, LENGTH = 0x2018.

    But device is not booting after flashing. we have also flashed softdevice at the beginning.

    But If i am directly flash the hex file from this path "\nRF5SDK1230\nRF5_SDK_12.3.0_d7731ad\examples\peripheral\blinky\hex\blinky._pca10028.hex", device is booting and blinking.

    So, we are assuming that either the memory addresses that are mentioned in .ld file have some issue or the defines and cflags that are set in makefile have some issue.

    The compiled hex file is of size 10kb and the actual hex file in this "\nRF5SDK1230\nRF5_SDK_12.3.0_d7731ad\examples\peripheral\blinky\hex\blinky._pca10028.hex" path is 7.25kb. These 2 file sizes should actually be same, but we could see the difference. 

    Can you please help in setting up?

    Thanks,

    Swetha.

  • Hello Swetha,

    Have you flashed the softdevice separately?

    swetha Paladugu said:

    I have used the makefile from "\examples\peripheral\blinky\pca10028\s130\armgcc" this path and in. ld file we have changed to the memory sizes as you mentioned.

    RAM (rwx) :  ORIGIN = 0x20001fe8, LENGTH = 0x2018.

    But device is not booting after flashing. we have also flashed softdevice at the beginning.

     Did you compile this using an armgcc compiler, or is this after you ported it to SES?

    What SDK are you using? Where did you find the RAM settings? And what are your flash settings? In SDK12.3.0, the settings are:

      FLASH (rx) : ORIGIN = 0x1b000, LENGTH = 0x25000
      RAM (rwx) :  ORIGIN = 0x200013c8, LENGTH = 0x6c38

    Perhaps you can try these settings.

    Does the LEDs blink if you test the pca10028\blank\armgcc makefile? This file doesn't require a softdevice. 

    BR,

    Edvin

  • Hi Edvan,

    Please see the screenshot that i shared you with my last post. It doesn't return from sd_softdevice_enable() function, it gets stuck in SVC_Handler as what we can see from the call stack.

    The hardware that i am using is NRF51802.

    We have tried the blinky example. My module doesn't have led's but had a motor connected to it.

    When i flashed the blinky example, my motor is getting rotated. The gpio pins might have matched. So in this way we confirmed the blinky is working. In the same blinky example, i have removed the blinky code and drived the gpio pins to make my motor rotate.. And it worked i could successfully able to rotate my motor. All this i have been doing with eclipse. Then we went on a task to make the ble advertise.

    Thanks,

    Swetha.

  • If it doesn't have an LFXTAL, you need to modify the pca10028.h file:

    #define NRF_CLOCK_LFCLKSRC      {.source        = NRF_CLOCK_LF_SRC_XTAL,            \
                                     .rc_ctiv       = 0,                                \
                                     .rc_temp_ctiv  = 0,                                \
                                     .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}

  • How to find out if this nrf51802 module has LFXTAL or not?

  • Hi Edvan,

    Please see the above image... These 2 crystals are there..

Reply Children
Related