I've needed to port a project to run with Eclipse with its own Makefile. I have modified its makefile, and i guess the error is connected to it or a compiler flag.
Host: Virtualbox Win 8,x64, target device: nrf51822 which is arm cortex-m0. I use gnu arm cross compiler 4.8.4 (GNU Tools ARM Embedded)
Compile shows the following error/warning message:
src/main.c:173:4: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' [-Werror=format=]
I don't understand it. uint32_t is unsigned int in this case. I've included stdint.h.
I compile sources with the following flags:
CFLAGS += -mcpu=cortex-m0 -mthumb -mabi=aapcs --std=gnu11 -funsigned-char -DNRF51 -DDEBUG_NRF_USER -DBLE_STACK_SUPPORT_REQD -DBOARD_PCA10000 -DNRF51822_QFAA_CA
CFLAGS += -Wall -Werror
CFLAGS += -mfloat-abi=soft
Does not -mcpu=cortex-m0 specifies the size of the integer? stdint.h pre-processor macros should generate "typedef unsigned int __uint32_t;". Eclipse shows it that this line is compiled, but i do not know wether to trust it because external makefile is used with its own compiler.