From e6184b11a816dfb2e2f4e3515414051d7a2b7ab2 Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Sun, 1 Apr 2018 20:13:09 -0700 Subject: [PATCH] Add VTable menu, FLASH as default, remove Makefile Convert from manual "make" operated app.ld creation to runtime creation whose options are selected from the build menu. Use a prelink recipe to create the output app.ld file each run, without need for any special tools. Update the boards.txt.py script to generate this new config. --- boards.txt | 151 ++++++++++++++++++++++++++++ platform.txt | 5 + tools/boards.txt.py | 12 ++- tools/sdk/ld/Makefile | 22 ---- tools/sdk/ld/eagle.app.v6.common.ld | 28 ------ 5 files changed, 167 insertions(+), 51 deletions(-) delete mode 100644 tools/sdk/ld/Makefile diff --git a/boards.txt b/boards.txt index 00968cf520..aaffef0b1a 100644 --- a/boards.txt +++ b/boards.txt @@ -14,6 +14,7 @@ menu.ESPModule=Module menu.Debug=Debug port menu.DebugLevel=Debug Level menu.LwIPVariant=lwIP Variant +menu.VTable=VTables menu.led=Builtin Led menu.FlashErase=Erase Flash @@ -36,6 +37,12 @@ generic.menu.CpuFrequency.80=80 MHz generic.menu.CpuFrequency.80.build.f_cpu=80000000L generic.menu.CpuFrequency.160=160 MHz generic.menu.CpuFrequency.160.build.f_cpu=160000000L +generic.menu.VTable.flash=Flash +generic.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +generic.menu.VTable.heap=Heap +generic.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +generic.menu.VTable.iram=IRAM +generic.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM generic.menu.ResetMethod.ck=ck generic.menu.ResetMethod.ck.upload.resetmethod=ck generic.menu.ResetMethod.nodemcu=nodemcu @@ -370,6 +377,12 @@ esp8285.menu.CpuFrequency.80=80 MHz esp8285.menu.CpuFrequency.80.build.f_cpu=80000000L esp8285.menu.CpuFrequency.160=160 MHz esp8285.menu.CpuFrequency.160.build.f_cpu=160000000L +esp8285.menu.VTable.flash=Flash +esp8285.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +esp8285.menu.VTable.heap=Heap +esp8285.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +esp8285.menu.VTable.iram=IRAM +esp8285.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM esp8285.menu.ResetMethod.ck=ck esp8285.menu.ResetMethod.ck.upload.resetmethod=ck esp8285.menu.ResetMethod.nodemcu=nodemcu @@ -616,6 +629,12 @@ espduino.menu.CpuFrequency.80=80 MHz espduino.menu.CpuFrequency.80.build.f_cpu=80000000L espduino.menu.CpuFrequency.160=160 MHz espduino.menu.CpuFrequency.160.build.f_cpu=160000000L +espduino.menu.VTable.flash=Flash +espduino.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +espduino.menu.VTable.heap=Heap +espduino.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +espduino.menu.VTable.iram=IRAM +espduino.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM espduino.build.flash_mode=dio espduino.build.flash_freq=40 espduino.menu.FlashSize.4M1M=4M (1M SPIFFS) @@ -763,6 +782,12 @@ huzzah.menu.CpuFrequency.80=80 MHz huzzah.menu.CpuFrequency.80.build.f_cpu=80000000L huzzah.menu.CpuFrequency.160=160 MHz huzzah.menu.CpuFrequency.160.build.f_cpu=160000000L +huzzah.menu.VTable.flash=Flash +huzzah.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +huzzah.menu.VTable.heap=Heap +huzzah.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +huzzah.menu.VTable.iram=IRAM +huzzah.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM huzzah.upload.resetmethod=nodemcu huzzah.build.flash_mode=qio huzzah.build.flash_freq=40 @@ -911,6 +936,12 @@ espresso_lite_v1.menu.CpuFrequency.80=80 MHz espresso_lite_v1.menu.CpuFrequency.80.build.f_cpu=80000000L espresso_lite_v1.menu.CpuFrequency.160=160 MHz espresso_lite_v1.menu.CpuFrequency.160.build.f_cpu=160000000L +espresso_lite_v1.menu.VTable.flash=Flash +espresso_lite_v1.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +espresso_lite_v1.menu.VTable.heap=Heap +espresso_lite_v1.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +espresso_lite_v1.menu.VTable.iram=IRAM +espresso_lite_v1.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM espresso_lite_v1.build.flash_mode=dio espresso_lite_v1.build.flash_freq=40 espresso_lite_v1.menu.FlashSize.4M1M=4M (1M SPIFFS) @@ -1062,6 +1093,12 @@ espresso_lite_v2.menu.CpuFrequency.80=80 MHz espresso_lite_v2.menu.CpuFrequency.80.build.f_cpu=80000000L espresso_lite_v2.menu.CpuFrequency.160=160 MHz espresso_lite_v2.menu.CpuFrequency.160.build.f_cpu=160000000L +espresso_lite_v2.menu.VTable.flash=Flash +espresso_lite_v2.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +espresso_lite_v2.menu.VTable.heap=Heap +espresso_lite_v2.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +espresso_lite_v2.menu.VTable.iram=IRAM +espresso_lite_v2.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM espresso_lite_v2.build.flash_mode=dio espresso_lite_v2.build.flash_freq=40 espresso_lite_v2.menu.FlashSize.4M1M=4M (1M SPIFFS) @@ -1213,6 +1250,12 @@ phoenix_v1.menu.CpuFrequency.80=80 MHz phoenix_v1.menu.CpuFrequency.80.build.f_cpu=80000000L phoenix_v1.menu.CpuFrequency.160=160 MHz phoenix_v1.menu.CpuFrequency.160.build.f_cpu=160000000L +phoenix_v1.menu.VTable.flash=Flash +phoenix_v1.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +phoenix_v1.menu.VTable.heap=Heap +phoenix_v1.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +phoenix_v1.menu.VTable.iram=IRAM +phoenix_v1.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM phoenix_v1.build.flash_mode=dio phoenix_v1.build.flash_freq=40 phoenix_v1.menu.FlashSize.4M1M=4M (1M SPIFFS) @@ -1364,6 +1407,12 @@ phoenix_v2.menu.CpuFrequency.80=80 MHz phoenix_v2.menu.CpuFrequency.80.build.f_cpu=80000000L phoenix_v2.menu.CpuFrequency.160=160 MHz phoenix_v2.menu.CpuFrequency.160.build.f_cpu=160000000L +phoenix_v2.menu.VTable.flash=Flash +phoenix_v2.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +phoenix_v2.menu.VTable.heap=Heap +phoenix_v2.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +phoenix_v2.menu.VTable.iram=IRAM +phoenix_v2.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM phoenix_v2.build.flash_mode=dio phoenix_v2.build.flash_freq=40 phoenix_v2.menu.FlashSize.4M1M=4M (1M SPIFFS) @@ -1515,6 +1564,12 @@ nodemcu.menu.CpuFrequency.80=80 MHz nodemcu.menu.CpuFrequency.80.build.f_cpu=80000000L nodemcu.menu.CpuFrequency.160=160 MHz nodemcu.menu.CpuFrequency.160.build.f_cpu=160000000L +nodemcu.menu.VTable.flash=Flash +nodemcu.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +nodemcu.menu.VTable.heap=Heap +nodemcu.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +nodemcu.menu.VTable.iram=IRAM +nodemcu.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM nodemcu.upload.resetmethod=nodemcu nodemcu.build.flash_mode=qio nodemcu.build.flash_freq=40 @@ -1663,6 +1718,12 @@ nodemcuv2.menu.CpuFrequency.80=80 MHz nodemcuv2.menu.CpuFrequency.80.build.f_cpu=80000000L nodemcuv2.menu.CpuFrequency.160=160 MHz nodemcuv2.menu.CpuFrequency.160.build.f_cpu=160000000L +nodemcuv2.menu.VTable.flash=Flash +nodemcuv2.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +nodemcuv2.menu.VTable.heap=Heap +nodemcuv2.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +nodemcuv2.menu.VTable.iram=IRAM +nodemcuv2.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM nodemcuv2.upload.resetmethod=nodemcu nodemcuv2.build.flash_mode=dio nodemcuv2.build.flash_freq=40 @@ -1811,6 +1872,12 @@ modwifi.menu.CpuFrequency.80=80 MHz modwifi.menu.CpuFrequency.80.build.f_cpu=80000000L modwifi.menu.CpuFrequency.160=160 MHz modwifi.menu.CpuFrequency.160.build.f_cpu=160000000L +modwifi.menu.VTable.flash=Flash +modwifi.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +modwifi.menu.VTable.heap=Heap +modwifi.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +modwifi.menu.VTable.iram=IRAM +modwifi.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM modwifi.upload.resetmethod=ck modwifi.build.flash_mode=qio modwifi.build.flash_freq=40 @@ -1939,6 +2006,12 @@ thing.menu.CpuFrequency.80=80 MHz thing.menu.CpuFrequency.80.build.f_cpu=80000000L thing.menu.CpuFrequency.160=160 MHz thing.menu.CpuFrequency.160.build.f_cpu=160000000L +thing.menu.VTable.flash=Flash +thing.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +thing.menu.VTable.heap=Heap +thing.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +thing.menu.VTable.iram=IRAM +thing.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM thing.upload.resetmethod=ck thing.build.flash_mode=qio thing.build.flash_freq=40 @@ -2084,6 +2157,12 @@ thingdev.menu.CpuFrequency.80=80 MHz thingdev.menu.CpuFrequency.80.build.f_cpu=80000000L thingdev.menu.CpuFrequency.160=160 MHz thingdev.menu.CpuFrequency.160.build.f_cpu=160000000L +thingdev.menu.VTable.flash=Flash +thingdev.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +thingdev.menu.VTable.heap=Heap +thingdev.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +thingdev.menu.VTable.iram=IRAM +thingdev.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM thingdev.upload.resetmethod=nodemcu thingdev.build.flash_mode=dio thingdev.build.flash_freq=40 @@ -2229,6 +2308,12 @@ esp210.menu.CpuFrequency.80=80 MHz esp210.menu.CpuFrequency.80.build.f_cpu=80000000L esp210.menu.CpuFrequency.160=160 MHz esp210.menu.CpuFrequency.160.build.f_cpu=160000000L +esp210.menu.VTable.flash=Flash +esp210.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +esp210.menu.VTable.heap=Heap +esp210.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +esp210.menu.VTable.iram=IRAM +esp210.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM esp210.upload.resetmethod=ck esp210.build.flash_mode=qio esp210.build.flash_freq=40 @@ -2377,6 +2462,12 @@ d1_mini.menu.CpuFrequency.80=80 MHz d1_mini.menu.CpuFrequency.80.build.f_cpu=80000000L d1_mini.menu.CpuFrequency.160=160 MHz d1_mini.menu.CpuFrequency.160.build.f_cpu=160000000L +d1_mini.menu.VTable.flash=Flash +d1_mini.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +d1_mini.menu.VTable.heap=Heap +d1_mini.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +d1_mini.menu.VTable.iram=IRAM +d1_mini.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM d1_mini.upload.resetmethod=nodemcu d1_mini.build.flash_mode=dio d1_mini.build.flash_freq=40 @@ -2525,6 +2616,12 @@ d1_mini_pro.menu.CpuFrequency.80=80 MHz d1_mini_pro.menu.CpuFrequency.80.build.f_cpu=80000000L d1_mini_pro.menu.CpuFrequency.160=160 MHz d1_mini_pro.menu.CpuFrequency.160.build.f_cpu=160000000L +d1_mini_pro.menu.VTable.flash=Flash +d1_mini_pro.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +d1_mini_pro.menu.VTable.heap=Heap +d1_mini_pro.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +d1_mini_pro.menu.VTable.iram=IRAM +d1_mini_pro.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM d1_mini_pro.upload.resetmethod=nodemcu d1_mini_pro.build.flash_mode=dio d1_mini_pro.build.flash_freq=40 @@ -2653,6 +2750,12 @@ d1_mini_lite.menu.CpuFrequency.80=80 MHz d1_mini_lite.menu.CpuFrequency.80.build.f_cpu=80000000L d1_mini_lite.menu.CpuFrequency.160=160 MHz d1_mini_lite.menu.CpuFrequency.160.build.f_cpu=160000000L +d1_mini_lite.menu.VTable.flash=Flash +d1_mini_lite.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +d1_mini_lite.menu.VTable.heap=Heap +d1_mini_lite.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +d1_mini_lite.menu.VTable.iram=IRAM +d1_mini_lite.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM d1_mini_lite.upload.resetmethod=nodemcu d1_mini_lite.build.flash_mode=dout d1_mini_lite.build.flash_freq=40 @@ -2848,6 +2951,12 @@ d1.menu.CpuFrequency.80=80 MHz d1.menu.CpuFrequency.80.build.f_cpu=80000000L d1.menu.CpuFrequency.160=160 MHz d1.menu.CpuFrequency.160.build.f_cpu=160000000L +d1.menu.VTable.flash=Flash +d1.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +d1.menu.VTable.heap=Heap +d1.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +d1.menu.VTable.iram=IRAM +d1.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM d1.upload.resetmethod=nodemcu d1.build.flash_mode=dio d1.build.flash_freq=40 @@ -2996,6 +3105,12 @@ espino.menu.CpuFrequency.80=80 MHz espino.menu.CpuFrequency.80.build.f_cpu=80000000L espino.menu.CpuFrequency.160=160 MHz espino.menu.CpuFrequency.160.build.f_cpu=160000000L +espino.menu.VTable.flash=Flash +espino.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +espino.menu.VTable.heap=Heap +espino.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +espino.menu.VTable.iram=IRAM +espino.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM espino.menu.ResetMethod.ck=ck espino.menu.ResetMethod.ck.upload.resetmethod=ck espino.menu.ResetMethod.nodemcu=nodemcu @@ -3147,6 +3262,12 @@ espinotee.menu.CpuFrequency.80=80 MHz espinotee.menu.CpuFrequency.80.build.f_cpu=80000000L espinotee.menu.CpuFrequency.160=160 MHz espinotee.menu.CpuFrequency.160.build.f_cpu=160000000L +espinotee.menu.VTable.flash=Flash +espinotee.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +espinotee.menu.VTable.heap=Heap +espinotee.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +espinotee.menu.VTable.iram=IRAM +espinotee.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM espinotee.upload.resetmethod=nodemcu espinotee.build.flash_mode=qio espinotee.build.flash_freq=40 @@ -3312,6 +3433,12 @@ wifinfo.menu.CpuFrequency.80=80 MHz wifinfo.menu.CpuFrequency.80.build.f_cpu=80000000L wifinfo.menu.CpuFrequency.160=160 MHz wifinfo.menu.CpuFrequency.160.build.f_cpu=160000000L +wifinfo.menu.VTable.flash=Flash +wifinfo.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +wifinfo.menu.VTable.heap=Heap +wifinfo.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +wifinfo.menu.VTable.iram=IRAM +wifinfo.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM wifinfo.upload.resetmethod=nodemcu wifinfo.build.flash_mode=qio wifinfo.menu.FlashFreq.40=40MHz @@ -3522,6 +3649,12 @@ arduino-esp8266.menu.CpuFrequency.80=80 MHz arduino-esp8266.menu.CpuFrequency.80.build.f_cpu=80000000L arduino-esp8266.menu.CpuFrequency.160=160 MHz arduino-esp8266.menu.CpuFrequency.160.build.f_cpu=160000000L +arduino-esp8266.menu.VTable.flash=Flash +arduino-esp8266.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +arduino-esp8266.menu.VTable.heap=Heap +arduino-esp8266.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +arduino-esp8266.menu.VTable.iram=IRAM +arduino-esp8266.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM arduino-esp8266.upload.resetmethod=ck arduino-esp8266.build.flash_mode=qio arduino-esp8266.build.flash_freq=40 @@ -3671,6 +3804,12 @@ gen4iod.menu.CpuFrequency.80=80 MHz gen4iod.menu.CpuFrequency.80.build.f_cpu=80000000L gen4iod.menu.CpuFrequency.160=160 MHz gen4iod.menu.CpuFrequency.160.build.f_cpu=160000000L +gen4iod.menu.VTable.flash=Flash +gen4iod.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +gen4iod.menu.VTable.heap=Heap +gen4iod.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +gen4iod.menu.VTable.iram=IRAM +gen4iod.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM gen4iod.upload.resetmethod=nodemcu gen4iod.build.flash_mode=qio gen4iod.build.flash_freq=80 @@ -3817,6 +3956,12 @@ oak.menu.CpuFrequency.80=80 MHz oak.menu.CpuFrequency.80.build.f_cpu=80000000L oak.menu.CpuFrequency.160=160 MHz oak.menu.CpuFrequency.160.build.f_cpu=160000000L +oak.menu.VTable.flash=Flash +oak.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +oak.menu.VTable.heap=Heap +oak.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +oak.menu.VTable.iram=IRAM +oak.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM oak.upload.resetmethod=none oak.build.flash_mode=dio oak.build.flash_freq=40 @@ -3965,6 +4110,12 @@ wifiduino.menu.CpuFrequency.80=80 MHz wifiduino.menu.CpuFrequency.80.build.f_cpu=80000000L wifiduino.menu.CpuFrequency.160=160 MHz wifiduino.menu.CpuFrequency.160.build.f_cpu=160000000L +wifiduino.menu.VTable.flash=Flash +wifiduino.menu.VTable.flash.build.vtable_flags=-DVTABLES_IN_FLASH +wifiduino.menu.VTable.heap=Heap +wifiduino.menu.VTable.heap.build.vtable_flags=-DVTABLES_IN_DRAM +wifiduino.menu.VTable.iram=IRAM +wifiduino.menu.VTable.iram.build.vtable_flags=-DVTABLES_IN_IRAM wifiduino.upload.resetmethod=nodemcu wifiduino.build.flash_mode=dio wifiduino.build.flash_freq=40 diff --git a/platform.txt b/platform.txt index c18b388f13..2b2c587447 100644 --- a/platform.txt +++ b/platform.txt @@ -21,6 +21,8 @@ build.lwip_lib=-llwip_gcc build.lwip_include=lwip/include build.lwip_flags=-DLWIP_OPEN_SRC +build.vtable_flags=-DVTABLES_IN_FLASH + build.float=-u _printf_float -u _scanf_float build.led= @@ -76,6 +78,9 @@ recipe.hooks.core.prebuild.2.pattern=bash -c "mkdir -p {build.path}/core && echo recipe.hooks.core.prebuild.1.pattern.windows=cmd.exe /c mkdir {build.path}\core & (echo #define ARDUINO_ESP8266_GIT_VER 0x00000000 & echo #define ARDUINO_ESP8266_GIT_DESC win-{version} ) > {build.path}\core\core_version.h recipe.hooks.core.prebuild.2.pattern.windows= +## Build the app.ld linker file +recipe.hooks.linking.prelink.1.pattern="{compiler.path}{compiler.c.cmd}" -CC -E -P {build.vtable_flags} "{runtime.platform.path}/tools/sdk/ld/eagle.app.v6.common.ld.h" -o "{runtime.platform.path}/tools/sdk/ld/eagle.app.v6.common.ld" + ## Compile c files recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.c.flags} -DF_CPU={build.f_cpu} {build.lwip_flags} {build.debug_port} {build.debug_level} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" {build.led} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}" diff --git a/tools/boards.txt.py b/tools/boards.txt.py index 1f55d2e568..a99114cf4d 100755 --- a/tools/boards.txt.py +++ b/tools/boards.txt.py @@ -757,6 +757,15 @@ ( '.menu.CpuFrequency.160.build.f_cpu', '160000000L' ), ]), + 'vtable_menu': collections.OrderedDict([ + ( '.menu.VTable.flash', 'Flash'), + ( '.menu.VTable.flash.build.vtable_flags', '-DVTABLES_IN_FLASH'), + ( '.menu.VTable.heap', 'Heap'), + ( '.menu.VTable.heap.build.vtable_flags', '-DVTABLES_IN_DRAM'), + ( '.menu.VTable.iram', 'IRAM'), + ( '.menu.VTable.iram.build.vtable_flags', '-DVTABLES_IN_IRAM'), + ]), + 'crystalfreq_menu': collections.OrderedDict([ ( '.menu.CrystalFreq.26', '26 MHz' ), ( '.menu.CrystalFreq.40', '40 MHz' ), @@ -1147,6 +1156,7 @@ def all_boards (): print 'menu.Debug=Debug port' print 'menu.DebugLevel=Debug Level' print 'menu.LwIPVariant=lwIP Variant' + print 'menu.VTable=VTables' print 'menu.led=Builtin Led' print 'menu.FlashErase=Erase Flash' print '' @@ -1162,7 +1172,7 @@ def all_boards (): print id + optname + '=' + board['opts'][optname] # macros - macrolist = [ 'defaults', 'cpufreq_menu', ] + macrolist = [ 'defaults', 'cpufreq_menu', 'vtable_menu' ] if 'macro' in board: macrolist += board['macro'] if lwip == 2: diff --git a/tools/sdk/ld/Makefile b/tools/sdk/ld/Makefile deleted file mode 100644 index 230baedc84..0000000000 --- a/tools/sdk/ld/Makefile +++ /dev/null @@ -1,22 +0,0 @@ - -CPP = ../../../tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-cpp -COMMON = eagle.app.v6.common.ld -WARN = "\/\* warning: AUTOGENERATED from $(COMMON)\*.h \*\/" - -all: - @echo "available rules:" - @echo " flash: move c++ vtables to flash (= default in git master repository)" - @echo " iram: move c++ vtables to iram" - @echo " heap: move c++ vtables to heap" - -heap: - @(echo "$(WARN)"; $(CPP) -CC -E -DVTABLES_IN_DRAM $(COMMON).h | grep -v '^#') > $(COMMON) - @echo "c++ vtables moved to heap" - -iram: - @(echo "$(WARN)"; $(CPP) -CC -E -DVTABLES_IN_IRAM $(COMMON).h | grep -v '^#') > $(COMMON) - @echo "c++ vtables moved to iram" - -flash: - @(echo "$(WARN)"; $(CPP) -CC -E -DVTABLES_IN_FLASH $(COMMON).h | grep -v '^#') > $(COMMON) - @echo "c++ vtables moved to flash" diff --git a/tools/sdk/ld/eagle.app.v6.common.ld b/tools/sdk/ld/eagle.app.v6.common.ld index a0d8b97479..ad1d10364c 100644 --- a/tools/sdk/ld/eagle.app.v6.common.ld +++ b/tools/sdk/ld/eagle.app.v6.common.ld @@ -1,7 +1,5 @@ -/* warning: AUTOGENERATED from eagle.app.v6.common.ld*.h */ /* This linker script generated from xt-genldscripts.tpp for LSP . */ /* Linker Script for ld -N */ - PHDRS { dport0_0_phdr PT_LOAD; @@ -10,8 +8,6 @@ PHDRS iram1_0_phdr PT_LOAD; irom0_0_phdr PT_LOAD; } - - /* Default entry point: */ ENTRY(call_user_start) EXTERN(_DebugExceptionVector) @@ -38,10 +34,8 @@ _memmap_cacheattr_wb_allvalid = 0x22222112; _memmap_cacheattr_wt_allvalid = 0x22222112; _memmap_cacheattr_bp_allvalid = 0x22222222; PROVIDE(_memmap_cacheattr_reset = _memmap_cacheattr_wb_trapnull); - SECTIONS { - .dport0.rodata : ALIGN(4) { _dport0_rodata_start = ABSOLUTE(.); @@ -49,7 +43,6 @@ SECTIONS *(.dport.rodata) _dport0_rodata_end = ABSOLUTE(.); } >dport0_0_seg :dport0_0_phdr - .dport0.literal : ALIGN(4) { _dport0_literal_start = ABSOLUTE(.); @@ -57,7 +50,6 @@ SECTIONS *(.dport.literal) _dport0_literal_end = ABSOLUTE(.); } >dport0_0_seg :dport0_0_phdr - .dport0.data : ALIGN(4) { _dport0_data_start = ABSOLUTE(.); @@ -65,7 +57,6 @@ SECTIONS *(.dport.data) _dport0_data_end = ABSOLUTE(.); } >dport0_0_seg :dport0_0_phdr - .data : ALIGN(4) { _data_start = ABSOLUTE(.); @@ -84,20 +75,13 @@ SECTIONS _Pri_3_HandlerAddress = ABSOLUTE(.); _data_end = ABSOLUTE(.); } >dram0_0_seg :dram0_0_phdr - - - - - .irom0.text : ALIGN(4) { _irom0_text_start = ABSOLUTE(.); *(.ver_number) *.c.o( EXCLUDE_FILE (umm_malloc.c.o) .literal*, EXCLUDE_FILE (umm_malloc.c.o) .text* ) *.cpp.o(.literal*, .text*) - *(.rodata._ZTV*) /* C++ vtables */ - *libc.a:(.literal .text .literal.* .text.*) *libm.a:(.literal .text .literal.* .text.*) *libgcc.a:_umoddi3.o(.literal .text) @@ -126,7 +110,6 @@ SECTIONS _irom0_text_end = ABSOLUTE(.); _flash_code_end = ABSOLUTE(.); } >irom0_0_seg :irom0_0_phdr - .text : ALIGN(4) { _stext = .; @@ -161,17 +144,12 @@ SECTIONS *(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*) *.cpp.o(.iram.text) *.c.o(.iram.text) - - - *(.fini.literal) *(.fini) *(.gnu.version) _text_end = ABSOLUTE(.); _etext = .; } >iram1_0_seg :iram1_0_phdr - - .rodata : ALIGN(4) { _rodata_start = ABSOLUTE(.); @@ -213,7 +191,6 @@ SECTIONS _bss_table_end = ABSOLUTE(.); _rodata_end = ABSOLUTE(.); } >dram0_0_seg :dram0_0_phdr - .bss ALIGN(8) (NOLOAD) : ALIGN(4) { . = ALIGN (8); @@ -237,8 +214,6 @@ SECTIONS /* _stack_sentry = ALIGN(0x8); */ } >dram0_0_seg :dram0_0_bss_phdr /* __stack = 0x3ffc8000; */ - - .lit4 : ALIGN(4) { _lit4_start = ABSOLUTE(.); @@ -247,9 +222,6 @@ SECTIONS *(.gnu.linkonce.lit4.*) _lit4_end = ABSOLUTE(.); } >iram1_0_seg :iram1_0_phdr - - } - /* get ROM code address */ INCLUDE "../ld/eagle.rom.addr.v6.ld"