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

How to write a separate rule for debugging nRF51822 in Makefile

I have been learning GCC+ Make work flow to build and debug nRF51822 S110-only applications based on the examples from NRF51 SDK v10.0.0. I started with ble_app_beacon example, and it could compile and download app to nRF51822. The default Makefile is pasted here.

Now I want to debug the program with JLink GDB server, and I need to first compile with symbol tables with GCC -g flag. I am wondering what the standard procedure is for this purpose. I am thinking of writing a separate rule so that invoking make debug will do. But I am not sure how to maintain two different CFLAGS for make and make debug and such.

Parents Reply Children
No Data
Related