Skip to content

Commit

Permalink
Merge pull request arduino#95 from bcmi-labs/disable-nano-specs
Browse files Browse the repository at this point in the history
C33: disable nano.specs
Former-commit-id: 20cb100
  • Loading branch information
facchinm authored Jun 19, 2023
2 parents e31feec + 3a3e3c6 commit 39a4b13
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
6 changes: 3 additions & 3 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ minima.compiler.fsp.cxxflags=-mthumb "@{compiler.fsp.defines}"
minima.compiler.tinyusb.cflags=-DCFG_TUSB_MCU=OPT_MCU_RAXXX
minima.compiler.tinyusb.cxxflags=-DCFG_TUSB_MCU=OPT_MCU_RAXXX
minima.compiler.fsp.includes={build.variant.path}/includes.txt
minima.compiler.fsp.extra_ldflags=-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
minima.compiler.fsp.extra_ldflags=--specs=nano.specs -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
minima.compiler.fsp="{build.variant.path}/libs/libfsp.a"

minima.upload.tool=dfu-util
Expand Down Expand Up @@ -125,7 +125,7 @@ unor4wifi.compiler.fsp.cxxflags=-mthumb "@{compiler.fsp.defines}"
unor4wifi.compiler.tinyusb.cflags=-DCFG_TUSB_MCU=OPT_MCU_RAXXX
unor4wifi.compiler.tinyusb.cxxflags=-DCFG_TUSB_MCU=OPT_MCU_RAXXX
unor4wifi.compiler.fsp.includes={build.variant.path}/includes.txt
unor4wifi.compiler.fsp.extra_ldflags=-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
unor4wifi.compiler.fsp.extra_ldflags=--specs=nano.specs -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
unor4wifi.compiler.fsp="{build.variant.path}/libs/libfsp.a"

unor4wifi.upload.tool=bossac
Expand Down Expand Up @@ -171,7 +171,7 @@ muxto.compiler.fsp.cxxflags=-mthumb -D_RA_CORE=CM23 -D_RENESAS_RA_
muxto.compiler.tinyusb.cflags=-DCFG_TUSB_MCU=OPT_MCU_RAXXX
muxto.compiler.tinyusb.cxxflags=-DCFG_TUSB_MCU=OPT_MCU_RAXXX
muxto.compiler.fsp.includes={build.variant.path}/includes.txt
muxto.compiler.fsp.extra_ldflags=-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
muxto.compiler.fsp.extra_ldflags=--specs=nano.specs -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
muxto.compiler.fsp="{build.variant.path}/libs/libfsp.a"

muxto.upload.tool=dfu-util
Expand Down
9 changes: 9 additions & 0 deletions cores/arduino/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,12 @@ extern "C" {

//Declared weak in Arduino.h to allow user redefinitions.
int atexit(void (*func)()) { return 0; }

namespace __gnu_cxx {
void __verbose_terminate_handler() { }
}
extern "C" __attribute__((weak)) void __cxa_pure_virtual(void);
extern "C" __attribute__((weak)) void __cxa_pure_virtual(void)
{
exit(1);
}
6 changes: 3 additions & 3 deletions platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ compiler.warning_flags.all=-Wall -Wextra

compiler.path={build.compiler_path}
compiler.c.cmd={build.crossprefix}gcc
compiler.c.flags=-c {compiler.warning_flags} -Os -g3 --specs=nano.specs -nostdlib {build.defines} -MMD -std=gnu11 -mcpu={build.mcu} {build.float-abi} {build.fpu} -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fmessage-length=0 -fno-builtin
compiler.c.flags=-c {compiler.warning_flags} -Os -g3 -nostdlib {build.defines} -MMD -std=gnu11 -mcpu={build.mcu} {build.float-abi} {build.fpu} -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fmessage-length=0 -fno-builtin
compiler.c.elf.cmd={build.crossprefix}g++
compiler.c.elf.flags=-Wl,--gc-sections --specs=nano.specs --specs=nosys.specs {compiler.warning_flags} -mcpu={build.mcu} {build.float-abi} {build.fpu}
compiler.c.elf.flags=-Wl,--gc-sections --specs=nosys.specs {compiler.warning_flags} -mcpu={build.mcu} {build.float-abi} {build.fpu}
compiler.S.cmd={build.crossprefix}g++
compiler.S.flags=-c -g -x assembler-with-cpp -Os -mcpu={build.mcu} {build.float-abi} {build.fpu} -fsigned-char -ffunction-sections -fdata-sections
compiler.cpp.cmd={build.crossprefix}g++
compiler.cpp.flags=-c {compiler.warning_flags} -Os --specs=nano.specs -g3 -fno-use-cxa-atexit -fno-rtti -fno-exceptions -MMD -nostdlib {build.defines} -MMD -std=gnu++17 -mcpu={build.mcu} {build.float-abi} {build.fpu} -fsigned-char -ffunction-sections -fdata-sections -fmessage-length=0 -fno-builtin
compiler.cpp.flags=-c {compiler.warning_flags} -Os -g3 -fno-use-cxa-atexit -fno-rtti -fno-exceptions -MMD -nostdlib {build.defines} -MMD -std=gnu++17 -mcpu={build.mcu} {build.float-abi} {build.fpu} -fsigned-char -ffunction-sections -fdata-sections -fmessage-length=0 -fno-builtin
compiler.ar.cmd={build.crossprefix}ar
compiler.ar.flags=rcs
compiler.ar.extra_flags=
Expand Down

0 comments on commit 39a4b13

Please sign in to comment.