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
  • Trying with the ant_broadcast_tx sample.

    Nikita's Makefile edits appear to have helped find the right headers, however they seem to be in

    $(SDK_PATH)Include/ant/softdevice

    not

    $(SDK_PATH)Include/s210

    Then the compiler croaks on all usage of the SVCALL macro in all of these headers, as gcc does not have a __svc keyword.

    "E:/Downloads/gcc-arm-none-eabi-4_8-2013q4-20131204-win32/bin/arm-none-eabi-gcc" -mcpu=cortex-m0 -mthumb -mabi=aapcs -DNRF51 -DBOARD_NRF6310 -DNRF51822_QFAA_C0 --std=gnu99 -Wall -Werror -mfloat-abi=soft -DNDEBUG -O3 -I../../../../../../Include/app_common -I../../../../../../Include/ant/softdevice -I"../" -I"../../../../../../Include" -I"../../../../../../Include/gcc" -I"../../../../../../Include/ext_sensors" -c -o _build/main_broadcast_tx.o ../main_broadcast_tx.c
    In file included from ../main_broadcast_tx.c:37:0:
    ../../../../../../Include/ant/softdevice/ant_interface.h: In function '__svc':
    ../../../../../../Include/ant/softdevice/ant_interface.h:144:37: error: expected declaration specifiers before 'sd_ant_stack_reset'
     uint32_t SVCALL(SVC_ANT_STACK_INIT) sd_ant_stack_reset (void);
    
    

    I found information on how to call software services using software interrupts from gcc (in order to enter protected mode) but these are not necessarily compatible with the calling convention used to build the softdevice binary already loaded into RAM.

    www.cnblogs.com/.../3052597.html stackoverflow.com/.../cortex-m3-svc-with-gcc-inline-assembly

    Besides, it looks like a Cortex-M0 uses the older SWI instruction for syscalls and not the svc semantics introduced with Cortex-M3 and M4.

    Any ideas? Or is using the Keil compiler required for using these header files.

Reply
  • Trying with the ant_broadcast_tx sample.

    Nikita's Makefile edits appear to have helped find the right headers, however they seem to be in

    $(SDK_PATH)Include/ant/softdevice

    not

    $(SDK_PATH)Include/s210

    Then the compiler croaks on all usage of the SVCALL macro in all of these headers, as gcc does not have a __svc keyword.

    "E:/Downloads/gcc-arm-none-eabi-4_8-2013q4-20131204-win32/bin/arm-none-eabi-gcc" -mcpu=cortex-m0 -mthumb -mabi=aapcs -DNRF51 -DBOARD_NRF6310 -DNRF51822_QFAA_C0 --std=gnu99 -Wall -Werror -mfloat-abi=soft -DNDEBUG -O3 -I../../../../../../Include/app_common -I../../../../../../Include/ant/softdevice -I"../" -I"../../../../../../Include" -I"../../../../../../Include/gcc" -I"../../../../../../Include/ext_sensors" -c -o _build/main_broadcast_tx.o ../main_broadcast_tx.c
    In file included from ../main_broadcast_tx.c:37:0:
    ../../../../../../Include/ant/softdevice/ant_interface.h: In function '__svc':
    ../../../../../../Include/ant/softdevice/ant_interface.h:144:37: error: expected declaration specifiers before 'sd_ant_stack_reset'
     uint32_t SVCALL(SVC_ANT_STACK_INIT) sd_ant_stack_reset (void);
    
    

    I found information on how to call software services using software interrupts from gcc (in order to enter protected mode) but these are not necessarily compatible with the calling convention used to build the softdevice binary already loaded into RAM.

    www.cnblogs.com/.../3052597.html stackoverflow.com/.../cortex-m3-svc-with-gcc-inline-assembly

    Besides, it looks like a Cortex-M0 uses the older SWI instruction for syscalls and not the svc semantics introduced with Cortex-M3 and M4.

    Any ideas? Or is using the Keil compiler required for using these header files.

Children
Related