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,

    I'm flashing the combined binary file of bootloader+softdevice+application which is given in SDK (nrfSDK\examples\ble_peripheral\ble_app_uart\hex\ble_app_uart_pca10028_s130.hex) from nrfconnect application and i could see ble advertising.

    But not with the ble advertising application that i'm compiling from eclipse project.

    Can you please help?

    Thanks,

    Swetha.

  • Then you need to debug. What does advertising_start() return? If it is not reached, where does the application stop? Is the main() function reached at all?

  • Edvan,

    After flashing the existing  combined binary from SDK, if i reflashed the softdevice and application from my eclipse build target, then i could see device advertising..

    Used these addresses:

    FLASH (rx) : ORIGIN = 0X01B000, LENGTH = 0x25000
    RAM (rwx) : ORIGIN = 0x20001fe8, LENGTH = 0x2018

    But if i try to compile the bootloader and create my own combined file, then it is not working, not advertising again.

    So i have to change addresses in bootloader linker script as well?

  • I have created bootloader project with this makefile nRF5SDK\examples\dfu\bootloader_secure\pca10028\armgcc\Makefile 

  • I think you should skip the bootloader for now. On this stage, a bootloader may introduce more confusing elements. I would make sure that I have a working IDE setup before introducing a bootloader.

     

    Edvin said:
    What does advertising_start() return? If it is not reached, where does the application stop? Is the main() function reached at all?

     No bootloader this time.

Reply Children
Related