diff --git a/workspace_tools/export/gcc_arm_lpc1768.tmpl b/workspace_tools/export/gcc_arm_lpc1768.tmpl index 8d83c36c4a..df057ae3c5 100644 --- a/workspace_tools/export/gcc_arm_lpc1768.tmpl +++ b/workspace_tools/export/gcc_arm_lpc1768.tmpl @@ -19,7 +19,7 @@ OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy CPU = -mcpu=cortex-m3 -mthumb CC_FLAGS = $(CPU) -c -Os -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -CC_SYMBOLS = -DTARGET_LPC1768 -DTOOLCHAIN_GCC_ARM -DNDEBUG -D__CORTEX_M3 +CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys diff --git a/workspace_tools/export/gccarm.py b/workspace_tools/export/gccarm.py index 9aaee3383a..8718e3a45c 100644 --- a/workspace_tools/export/gccarm.py +++ b/workspace_tools/export/gccarm.py @@ -49,5 +49,6 @@ class GccArm(Exporter): 'library_paths': self.resources.lib_dirs, 'linker_script': self.resources.linker_script, 'libraries': libraries, + 'symbols': self.toolchain.get_symbols() } self.gen_file('gcc_arm_%s.tmpl' % self.target.lower(), ctx, 'Makefile')