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

  • So this means that you were able to set up your project in eclipse, then?

    If you have application specific questions, I think it is better that you start a new thread. This has nothing to do with the makefile based project, as the title of this issue suggests.

    To answer short:

    I don't know how you set up your service and characteristic, or what you do on your central when you receive the BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST event. That is not clear. It looks like you are trying to read a characteristic on the nRF from the central (a phone?). Write a detailed description in the new ticket how you set up the service and characteristics, and what you did to trigger the BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST event.

  • I will create a different ticket. But before that please see the codes that i have attached..

    Using the ble_app-uart example i have called the api calls to advertise the device.

    This example default has a nus service initialized.. So i also used the same.

    so there is an event handler attached to nus service which is nus_data_handler, so what i am asking is when data comes from nrf connect android app it should come to this handler. But it is not coming. 

    Is it correct ?

  • That is correct. But it depends on how you implemented the nordic uart service. Look at how it is handled in the ble_app_uart example.

    BR,

    Edvin

  • I think i have implemented correctly. Did you see the codes i have shared?

    Do you find any issue in those codes?

  • I don't see anything wrong, but it is hard to check code just by reading it. I need to run it in order to find issues.

Reply Children
Related