I'm trying to build the ble_app_hrs example from Nordic's SDK on a Mac OSX 10.9.2 and have been following Nordic's nAN-29 Note v1.1 to install required tools, while looking for edits to make the system work on Mac.
I downloaded version 4.8 GNU tools from the following site: launchpad.net/gcc-arm-embedded
Here's what I've done:
Makefile.common had a commented out section that I uncommented to look like this:
ifeq ($(OS),Windows_NT)
include $(TEMPLATE_PATH)Makefile.windows
else
include $(TEMPLATE_PATH)Makefile.posix
endif
I made a Makefile.posix file and put the following into it:
GNU_INSTALL_ROOT := $(HOME)/Documents/workspace/gcc-arm-none-eabi-4_8-2014q1
GNU_VERSION := 4.8.3
GNU_PREFIX := arm-none-eabi
(I am using GNU version 4.8.3 and the paths are correct)
When using Nordic SDK version 4.4.2, I type the following:
make -C ./nrf51_sdk_v4.4.2/nrf51822/Board/nrf6310/ble/ble_app_hrs/gcc
and get this:
"/Users/acerruto/Documents/workspace/gcc-arm-none-eabi-4_8-2014q1/bin/arm-none-eabi-gcc" -DNRF51822_QFAA_CA -mcpu=cortex-m0 -mthumb -mabi=aapcs -DNRF51 -DBOARD_NRF6310 -DNRF51822_QFAA_CA --std=gnu99 -Wall -Werror -mfloat-abi=soft -DDEBUG -g3 -O0 -I"../../../../../Include/ble" -I"../../../../../Include/ble/softdevice" -I"../../../../../Include/app_common" -I"../../../../../Include/ble/ble_services" -I"../" -I"../../../../../Include" -I"../../../../../Include/gcc" -I"../../../../../Include/ext_sensors" -M ../../../../..//Source/app_common/app_timer.c -MF "_build/app_timer.d" -MT _build/app_timer.o
"/Users/acerruto/Documents/workspace/gcc-arm-none-eabi-4_8-2014q1/bin/arm-none-eabi-gcc" -DNRF51822_QFAA_CA -mcpu=cortex-m0 -mthumb -mabi=aapcs -DNRF51 -DBOARD_NRF6310 -DNRF51822_QFAA_CA --std=gnu99 -Wall -Werror -mfloat-abi=soft -DDEBUG -g3 -O0 -I"../../../../../Include/ble" -I"../../../../../Include/ble/softdevice" -I"../../../../../Include/app_common" -I"../../../../../Include/ble/ble_services" -I"../" -I"../../../../../Include" -I"../../../../../Include/gcc" -I"../../../../../Include/ext_sensors" -c -o _build/app_timer.o ../../../../..//Source/app_common/app_timer.c
In file included from ../../../../../Include/app_common/app_timer.h:48:0,
from ../../../../..//Source/app_common/app_timer.c:13:
../../../../..//Source/app_common/app_timer.c: In function 'user_id_get':
../../../../../Include/app_common/app_util.h:67:42: error: typedef 'static_assert_failed' locally defined but not used [-Werror=unused-local-typedefs]
#define STATIC_ASSERT(EXPR) typedef char static_assert_failed[(EXPR) ? 1 : -1]
^
../../../../..//Source/app_common/app_timer.c:1034:5: note: in expansion of macro 'STATIC_ASSERT'
STATIC_ASSERT(APP_TIMER_INT_LEVELS == 3);
^
cc1: all warnings being treated as errors
make: *** [_build/app_timer.o] Error 1
If I try to use Nordic SDK version 5.2 by copying the /ble/contents of version 4.4.2 into version 5.2 folders, and doing:
make -C ./nrf51_sdk_v5.2/nrf51822/Board/nrf6310/ble/ble_app_hrs/gcc
I get a different error:
"/Users/acerruto/Documents/workspace/gcc-arm-none-eabi-4_8-2014q1/bin/arm-none-eabi-gcc" -DNRF51822_QFAA_CA -mcpu=cortex-m0 -mthumb -mabi=aapcs -DNRF51 -DBOARD_NRF6310 -DNRF51822_QFAA_CA --std=gnu99 -Wall -Werror -mfloat-abi=soft -DDEBUG -g3 -O0 -I"../../../../../Include/ble" -I"../../../../../Include/ble/softdevice" -I"../../../../../Include/app_common" -I"../../../../../Include/ble/ble_services" -I"../" -I"../../../../../Include" -I"../../../../../Include/gcc" -I"../../../../../Include/ext_sensors" -M ../../../../..//Source/app_common/app_timer.c -MF "_build/app_timer.d" -MT _build/app_timer.o
In file included from ../../../../../Include/app_common/app_timer.h:47:0,
from ../../../../..//Source/app_common/app_timer.c:13:
../../../../../Include/app_common/app_error.h:27:23: fatal error: nrf_error.h: No such file or directory
#include "nrf_error.h"
^
compilation terminated.
make: *** [_build/app_timer.o] Error 1
Any ideas on what might be the problem and opinions on which SDK version to use?
Many thanks!