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

Why are GCC makefiles not provided for ANT samples?

I am starting development on the nRF51422. I noticed that for the non-ANT sample code (blinky and UART), a gcc makefile and windows batch files are provided for compilation and flashing. But for all the ANT sample code, only Keil project files are provided. I tried reinstalling the SDK and double checking to see if their were gcc options I missed.

Is there a reason I should be concerned with gcc / eclipse development for Ant? I don't mind paying for Keil if necessary but I prefer the flexibility of gcc + makefile for cross platform build hosts and for build servers to do daily builds.

Can anyone point me to a sample makefile for the one of the ANT demos? Thanks, David

Edit: On further research, it appears that it is a soft device issue. I looked through my downloads and it all the nRF51422 SDK's I have access to state explicitly that they only support soft device "QFAADA" but my chip is QFAAC0. Can someone please point me to the correct SDK for this chip?

Thank you, David Smoot.

Parents
  • You can easily modify makefile from blinky project to any ant project. For example this is makefile for blinky project:

    TARGET_CHIP := NRF51822_QFAA_CA
    BOARD := BOARD_NRF6310
    
    C_SOURCE_FILES += main.c
    C_SOURCE_FILES += nrf_delay.c
    
    
    SDK_PATH = ../../../../
    OUTPUT_FILENAME := blinky_gcc
    
    DEVICE_VARIANT := xxaa
    #DEVICE_VARIANT := xxab
    
    #USE_SOFTDEVICE := S110
    #USE_SOFTDEVICE := S210
    
    include $(SDK_PATH)Source/templates/gcc/Makefile.common
    
    

    And you want to change it for \s210\ant_bicycle_comb_spd_cad\sensor\ project. I think TARGET_CHIP has no use for compiler but just fix it to your chip. Change SDK path. You need to uncomment USE_SOFTDEVICE := S210 option. Change outpit filename OUTPUT_FILENAME := ant_combined_bicycle_speed_and_cadence_sensor_gcc And lastly you need to open example keil project: \nRF51 SDK_v5.1.0.36092\Nordic\nrf51422\Board\nrf6310\s210\ant_bicycle_comb_spd_cad\sensor\arm\ant_combined_bicycle_speed_and_cadence_sensor.uvproj and you need to take out all the necessary source files for the project and also include paths from keil project properties needed for this project. Final makefile will be like this:

    TARGET_CHIP := NRF51422_QFAA_DA
    BOARD := BOARD_NRF6310
    
    C_SOURCE_FILES += main.c
    C_SOURCE_FILES += main_cbsc_tx.c
    C_SOURCE_FILES += cbsc_tx.c
    C_SOURCE_FILES += retarget.c
    C_SOURCE_FILES += ../../../../../../Source/app_common/app_timer.c
    C_SOURCE_FILES += ../../../../../../Source/app_common/app_uart_fifo.c
    C_SOURCE_FILES += ../../../../../../Source/app_common/app_fifo.c
    C_SOURCE_FILES += ../../../../../../Source/app_common/app_gpiote.c
    
    INCLUDEPATHS += -I"../include"
    INCLUDEPATHS += -I"../../../../../../Include/s210"
    INCLUDEPATHS += -I"../../../../../../Include/app_common"
    
    SDK_PATH = ../../../../../../
    OUTPUT_FILENAME := ant_combined_bicycle_speed_and_cadence_sensor_gcc
    
    DEVICE_VARIANT := xxaa
    #DEVICE_VARIANT := xxab
    
    #USE_SOFTDEVICE := S110
    USE_SOFTDEVICE := S210
    
    include $(SDK_PATH)Source/templates/gcc/Makefile.common
    
    

    state explicitly that they only support soft device "QFAADA" but my chip is QFAAC0

    Where did you find this?

Reply
  • You can easily modify makefile from blinky project to any ant project. For example this is makefile for blinky project:

    TARGET_CHIP := NRF51822_QFAA_CA
    BOARD := BOARD_NRF6310
    
    C_SOURCE_FILES += main.c
    C_SOURCE_FILES += nrf_delay.c
    
    
    SDK_PATH = ../../../../
    OUTPUT_FILENAME := blinky_gcc
    
    DEVICE_VARIANT := xxaa
    #DEVICE_VARIANT := xxab
    
    #USE_SOFTDEVICE := S110
    #USE_SOFTDEVICE := S210
    
    include $(SDK_PATH)Source/templates/gcc/Makefile.common
    
    

    And you want to change it for \s210\ant_bicycle_comb_spd_cad\sensor\ project. I think TARGET_CHIP has no use for compiler but just fix it to your chip. Change SDK path. You need to uncomment USE_SOFTDEVICE := S210 option. Change outpit filename OUTPUT_FILENAME := ant_combined_bicycle_speed_and_cadence_sensor_gcc And lastly you need to open example keil project: \nRF51 SDK_v5.1.0.36092\Nordic\nrf51422\Board\nrf6310\s210\ant_bicycle_comb_spd_cad\sensor\arm\ant_combined_bicycle_speed_and_cadence_sensor.uvproj and you need to take out all the necessary source files for the project and also include paths from keil project properties needed for this project. Final makefile will be like this:

    TARGET_CHIP := NRF51422_QFAA_DA
    BOARD := BOARD_NRF6310
    
    C_SOURCE_FILES += main.c
    C_SOURCE_FILES += main_cbsc_tx.c
    C_SOURCE_FILES += cbsc_tx.c
    C_SOURCE_FILES += retarget.c
    C_SOURCE_FILES += ../../../../../../Source/app_common/app_timer.c
    C_SOURCE_FILES += ../../../../../../Source/app_common/app_uart_fifo.c
    C_SOURCE_FILES += ../../../../../../Source/app_common/app_fifo.c
    C_SOURCE_FILES += ../../../../../../Source/app_common/app_gpiote.c
    
    INCLUDEPATHS += -I"../include"
    INCLUDEPATHS += -I"../../../../../../Include/s210"
    INCLUDEPATHS += -I"../../../../../../Include/app_common"
    
    SDK_PATH = ../../../../../../
    OUTPUT_FILENAME := ant_combined_bicycle_speed_and_cadence_sensor_gcc
    
    DEVICE_VARIANT := xxaa
    #DEVICE_VARIANT := xxab
    
    #USE_SOFTDEVICE := S110
    USE_SOFTDEVICE := S210
    
    include $(SDK_PATH)Source/templates/gcc/Makefile.common
    
    

    state explicitly that they only support soft device "QFAADA" but my chip is QFAAC0

    Where did you find this?

Children