I'm sorry. Ignore my prior message if you like. I just upgraded the
compiler and there are no problems.
Thanks, Warren
On Thu, Jul 13, 2017 at 9:40 PM, Warren Gay <ve3...@gmail.com> wrote:
> When I build the current github release of libopencm3, I obtain the
> following build error:
>
> ...
> CC usart_common_v2.c
> CC i2c_common_v2.c
> ../common/i2c_common_v2.c: In function 'i2c_transfer7':
> ../common/i2c_common_v2.c:431:3: error: 'for' loop initial declarations
> are only allowed in C99 or C11 mode
> for (size_t i = 0; i < rn; i++) {
> ^
> ../common/i2c_common_v2.c:431:3: note: use option -std=c99, -std=gnu99,
> -std=c11 or -std=gnu11 to compile your code
> gmake[2]: *** [../../Makefile.include:45: i2c_common_v2.o] Error 1
>
> *Or more verbosely:*
>
> *arm-none-eabi-gcc* -Os -Wall -Wextra -Wimplicit-function-declaration
> -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wundef -Wshadow
> -I../../../include -fno-common -mcpu=cortex-m0 -mthumb -Wstrict-prototypes
> -ffunction-sections -fdata-sections -MD -DSTM32F0 -ggdb3 -o
> i2c_common_v2.o -c ../common/i2c_common_v2.c
> ../common/i2c_common_v2.c: In function 'i2c_transfer7':
> ../common/i2c_common_v2.c:431:3: error: 'for' loop initial declarations
> are only allowed in C99 or C11 mode
> for (size_t i = 0; i < rn; i++) {
> ^
> ../common/i2c_common_v2.c:431:3: note: use option -std=c99, -std=gnu99,
> -std=c11 or -std=gnu11 to compile your code
> gmake[1]: *** [../../Makefile.include:45: i2c_common_v2.o] Error 1
>
>
> I am using the following compiler:
>
> $ arm-none-eabi-gcc --version
> arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20150529
> (release) [ARM/embedded-4_9-branch revision 224288]
>
> I am able to fix this locally but it would be convenient if this was done
> in the repo.
>
> Thanks, Warren
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
libopencm3-devel mailing list
libopencm3-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libopencm3-devel