1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

Stripping unused functions and data from compiled sketches (.hex files) using -ffunctions-sections, -fdata-sections, and -Wl,--gc-sections.

This commit is contained in:
David A. Mellis
2008-10-26 14:02:15 +00:00
parent c00bd47bef
commit 3b8db8909b
2 changed files with 18 additions and 8 deletions

View File

@ -335,6 +335,8 @@ public class Library implements MessageConsumer{
"-g",
"-Os",
"-Wall",
"-ffunction-sections", // place each function in its own section
"-fdata-sections",
"-mmcu=" + Preferences.get("boards." + Preferences.get("board") + ".build.mcu"),
"-DF_CPU=" + Preferences.get("boards." + Preferences.get("board") + ".build.f_cpu"),
"-I" + libManager.getTarget().getPath(),
@ -348,6 +350,8 @@ public class Library implements MessageConsumer{
"-Os",
"-Wall",
"-fno-exceptions",
"-ffunction-sections", // place each function in its own section
"-fdata-sections",
"-mmcu=" + Preferences.get("boards." + Preferences.get("board") + ".build.mcu"),
"-DF_CPU=" + Preferences.get("boards." + Preferences.get("board") + ".build.f_cpu"),
"-I" + libManager.getTarget().getPath(),