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.

  • Ok. If you insist, then you can start looking into the bootloader example from the SDK. Everything you need is there, and you can follow this guide

    Make sure that you have a working app first, so that you know where to start looking if the device doesn't behave like you expect. 

    NB:

    When you have a bootloader, it will check the CRC of the application. This means that when the bootloader is programmed, you need to also program bootloader settings if you want to run your app. The alternative is to always update to your app using DFU directly. Whenever you do a tiny change in the application, you must re-generate the bootloader settings and flash them with the application. 

    Please note that most IDEs will not use the .hex file when debugging, but the .map or .elf file. Because of this, you need to attach the debugger without writing to the flash. I don't know whether Eclipse supports this. Logging is a useful tool, because you can monitor the log without entering a debug session from your IDE. 

    Best regards,

    Edvin

  • Hi Edvan,

    These are my linkerscript memory settings:

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

    I am getting this error when i add my application files.

    c:/program files (x86)/gnu tools arm embedded/7 2018-q2-update/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: region RAM overflowed with stack.

    I have already changed heap size from 2048 to 0 in startup file in nrfsdk/components/toolchain/gcc/gcc_startup_nrf51.S file.

    Can you please suggest me what to do?

    Thanks,

    Swetha.

  • What did you change that triggered this error?

    Is it a compiler error?

  • It was a compilation error..

    Initially i didnt get that error..  After adding few features in my code, the error started coming.

    I saw in some nordic forum about changing the heap size in startup file to 0. After making that change, the error is gone. But after adding some more application code the error is coming again.

  • Then it looks like your application requires too much RAM.

    Please see my colleague Petter's answer in this ticket.

    BR,

    Edvin

Related