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

Make exceptions a configurable menu (#5434)

* Make exceptions a configurable menu

Add a menu, Exceptions, which allows exceptions to be disabled for ROM
sensitive scripts.  Default is enabled.

* Update to latest JSON builder
This commit is contained in:
Earle F. Philhower, III
2018-12-04 17:31:40 -08:00
committed by Develo
parent aacc6edf69
commit e44bcfe8e4
6 changed files with 293 additions and 95 deletions

View File

@ -880,6 +880,15 @@ macros = {
( '.menu.vt.iram.build.vtable_flags', '-DVTABLES_IN_IRAM'),
]),
'exception_menu': collections.OrderedDict([
( '.menu.exception.enabled', 'Enabled' ),
( '.menu.exception.enabled.build.exception_flags', '-fexceptions' ),
( '.menu.exception.enabled.build.stdcpp_lib', '-lstdc++' ),
( '.menu.exception.disabled', 'Disabled' ),
( '.menu.exception.disabled.build.exception_flags', '-fno-exceptions' ),
( '.menu.exception.disabled.build.stdcpp_lib', '-lstdc++-nox' ),
]),
'crystalfreq_menu': collections.OrderedDict([
( '.menu.CrystalFreq.26', '26 MHz' ),
( '.menu.CrystalFreq.40', '40 MHz' ),
@ -1346,6 +1355,7 @@ def all_boards ():
print('menu.lvl=Debug Level')
print('menu.ip=lwIP Variant')
print('menu.vt=VTables')
print('menu.exception=Exceptions')
print('menu.led=Builtin Led')
print('menu.wipe=Erase Flash')
print('')
@ -1361,7 +1371,7 @@ def all_boards ():
print(id + optname + '=' + board['opts'][optname])
# macros
macrolist = [ 'defaults', 'cpufreq_menu', 'vtable_menu' ]
macrolist = [ 'defaults', 'cpufreq_menu', 'vtable_menu', 'exception_menu' ]
if 'macro' in board:
macrolist += board['macro']
if lwip == 2: