Skip to content

Commit 239a2f9

Browse files
committed
Define all the required symbols in the generated Makefile
1 parent ed2f350 commit 239a2f9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

workspace_tools/export/gcc_arm_lpc1768.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy
1919

2020
CPU = -mcpu=cortex-m3 -mthumb
2121
CC_FLAGS = $(CPU) -c -Os -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections
22-
CC_SYMBOLS = -DTARGET_LPC1768 -DTOOLCHAIN_GCC_ARM -DNDEBUG -D__CORTEX_M3
22+
CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %}
2323

2424
LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float
2525
LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys

workspace_tools/export/gccarm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,6 @@ def generate(self):
4949
'library_paths': self.resources.lib_dirs,
5050
'linker_script': self.resources.linker_script,
5151
'libraries': libraries,
52+
'symbols': self.toolchain.get_symbols()
5253
}
5354
self.gen_file('gcc_arm_%s.tmpl' % self.target.lower(), ctx, 'Makefile')

0 commit comments

Comments
 (0)