Skip to content
Browse files

Set c compile flags correctly

To support projects with C files.

Based on settings previous to commit 1452193 with extra -mthumb
setting to match C++ compile flags.

With this change to platform.txt file replacing the version at
projects containg C files can once again be linked and downloaded successfully to the target device.
  • Loading branch information
dwalkes committed Nov 5, 2017
1 parent 053ccd2 commit 78d96cfcea16f28fd67bb8d5520bad11679a8ab6
Showing with 1 addition and 1 deletion.
  1. +1 −1 arduino/platform.txt
@@ -19,7 +19,7 @@ recipe.s.o.pattern = "{tools.arm_none_eabi_gcc.path}{tools.arm
###### Compile c files
tools.arm_none_eabi_gcc.c.defines =
tools.arm_none_eabi_gcc.c.includes =
tools.arm_none_eabi_gcc.c.cflags =
tools.arm_none_eabi_gcc.c.cflags = -c -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -w -std=gnu99 -fno-common -fmessage-length=0 -Wall -fno-exceptions -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -ffunction-sections -fdata-sections -fomit-frame-pointer -nostdlib --param max-inline-insns-single=500 -fno-exceptions -fno-rtti
tools.arm_none_eabi_gcc.c.conlyflags =
recipe.c.o.pattern = "{tools.arm_none_eabi_gcc.path}{tools.arm_none_eabi_gcc.gcc}" -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} {tools.arm_none_eabi_gcc.c.defines} {includes} {tools.arm_none_eabi_gcc.c.includes} {tools.arm_none_eabi_gcc.c.cflags} {tools.arm_none_eabi_gcc.c.conlyflags} -c -o "{object_file}" "{source_file}"

0 comments on commit 78d96cf

Please sign in to comment.