Unverified Commit b7d76bd5 authored by Earle F. Philhower, III's avatar Earle F. Philhower, III Committed by GitHub

Add RTTI menu to support apps which need RTTI (#338)

By default RTTI (Run-Time Type Information) is disabled because most apps
don't need run time type info enabled.  However, certain libraries expect
to be able to query types of objects at runtime, so add a menu to enable it.
parent c0411eef
This diff is collapsed.
...@@ -52,7 +52,7 @@ compiler.c.elf.flags={compiler.warning_flags} {compiler.defines} {compiler.flags ...@@ -52,7 +52,7 @@ compiler.c.elf.flags={compiler.warning_flags} {compiler.defines} {compiler.flags
compiler.S.cmd=arm-none-eabi-gcc compiler.S.cmd=arm-none-eabi-gcc
compiler.S.flags=-c {compiler.warning_flags} -g -x assembler-with-cpp -MMD {compiler.includes} -g compiler.S.flags=-c {compiler.warning_flags} -g -x assembler-with-cpp -MMD {compiler.includes} -g
compiler.cpp.cmd=arm-none-eabi-g++ compiler.cpp.cmd=arm-none-eabi-g++
compiler.cpp.flags=-c {compiler.warning_flags} {compiler.defines} {compiler.flags} {compiler.includes} -fno-rtti -std=gnu++17 -g compiler.cpp.flags=-c {compiler.warning_flags} {compiler.defines} {compiler.flags} {compiler.includes} {build.flags.rtti} -std=gnu++17 -g
compiler.ar.cmd=arm-none-eabi-ar compiler.ar.cmd=arm-none-eabi-ar
compiler.ar.flags=rcs compiler.ar.flags=rcs
...@@ -80,7 +80,8 @@ compiler.elf2hex.extra_flags= ...@@ -80,7 +80,8 @@ compiler.elf2hex.extra_flags=
# Board configuration, set in boards.txt. Present here to ensure substitution works # Board configuration, set in boards.txt. Present here to ensure substitution works
build.flash_length= build.flash_length=
build.eeprom_start= build.eeprom_start=
build.flags.optimize= build.flags.optimize=-Os
build.flags.rtti=-fno-rtti
build.fs_start= build.fs_start=
build.fs_end= build.fs_end=
build.usbstack_flags= build.usbstack_flags=
......
...@@ -42,6 +42,12 @@ def BuildOptimize(name): ...@@ -42,6 +42,12 @@ def BuildOptimize(name):
print("%s.menu.opt.%s=%s (%s) %s" % (name, l[0], l[1], l[2], l[3])) print("%s.menu.opt.%s=%s (%s) %s" % (name, l[0], l[1], l[2], l[3]))
print("%s.menu.opt.%s.build.flags.optimize=%s" % (name, l[0], l[2])) print("%s.menu.opt.%s.build.flags.optimize=%s" % (name, l[0], l[2]))
def BuildRTTI(name):
print("%s.menu.rtti.Disabled=Disabled" % (name))
print("%s.menu.rtti.Disabled.build.flags.rtti=-fno-rtti" % (name))
print("%s.menu.rtti.Enabled=Enabled" % (name))
print("%s.menu.rtti.Enabled.build.flags.rtti=" % (name))
def BuildBoot(name): def BuildBoot(name):
for l in [ ("Generic SPI /2", "boot2_generic_03h_2_padded_checksum"), ("Generic SPI /4", "boot2_generic_03h_4_padded_checksum"), for l in [ ("Generic SPI /2", "boot2_generic_03h_2_padded_checksum"), ("Generic SPI /4", "boot2_generic_03h_4_padded_checksum"),
("IS25LP080 QSPI /2", "boot2_is25lp080_2_padded_checksum"), ("IS25LP080 QSPI /4", "boot2_is25lp080_4_padded_checksum"), ("IS25LP080 QSPI /2", "boot2_is25lp080_2_padded_checksum"), ("IS25LP080 QSPI /4", "boot2_is25lp080_4_padded_checksum"),
...@@ -97,6 +103,7 @@ def BuildGlobalMenuList(): ...@@ -97,6 +103,7 @@ def BuildGlobalMenuList():
print("menu.flash=Flash Size") print("menu.flash=Flash Size")
print("menu.freq=CPU Speed") print("menu.freq=CPU Speed")
print("menu.opt=Optimize") print("menu.opt=Optimize")
print("menu.rtti=RTTI")
print("menu.dbgport=Debug Port") print("menu.dbgport=Debug Port")
print("menu.dbglvl=Debug Level") print("menu.dbglvl=Debug Level")
print("menu.boot2=Boot Stage 2") print("menu.boot2=Boot Stage 2")
...@@ -130,6 +137,7 @@ def MakeBoard(name, vendor_name, product_name, vid, pid, boarddefine, flashsizem ...@@ -130,6 +137,7 @@ def MakeBoard(name, vendor_name, product_name, vid, pid, boarddefine, flashsizem
BuildFlashMenu(n, flashsizemb * 1024 * 1024, fssizelist) BuildFlashMenu(n, flashsizemb * 1024 * 1024, fssizelist)
BuildFreq(n) BuildFreq(n)
BuildOptimize(n) BuildOptimize(n)
BuildRTTI(n)
BuildDebugPort(n) BuildDebugPort(n)
BuildDebugLevel(n) BuildDebugLevel(n)
if a == "picodebug": if a == "picodebug":
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment