1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-27 18:02:17 +03:00

Add flash for vtable destination, make it default, and add build menu to control options (#4582)

* Add flash for vtable destination, make it default

Add an option for placing vtables in flash to complement the existing
iram and heap options.  "make flash"

Now that there is a way to change it, move to vtables in flash as default
as only users with interrupts which use vtables require the vtable to
be in RAM.  For those users, if the tables are small enough they can put
them in IRAM and save heap space for their app.  If not, then the vtables
can be placed in HEAP which supports much larger tables.

* 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.
This commit is contained in:
Earle F. Philhower, III
2018-04-02 15:32:35 -07:00
committed by david gauchard
parent 8ae553d99e
commit f2c7256539
6 changed files with 172 additions and 45 deletions

View File

@ -757,6 +757,15 @@ macros = {
( '.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: