diff --git a/build/platform.device.mak b/build/platform.device.mak index c24a41a30..347ce4606 100644 --- a/build/platform.device.mak +++ b/build/platform.device.mak @@ -2,4 +2,7 @@ TOOLCHAIN ?= arm-gcc USE_LIBA = 1 EXE = elf +EPSILON_DEVICE_BENCH ?= 1 +SFLAGS += -DEPSILON_DEVICE_BENCH=$(EPSILON_DEVICE_BENCH) + python/port/port.o: CXXFLAGS += -DMP_PORT_USE_STACK_SYMBOLS=1 diff --git a/ion/src/device/device.cpp b/ion/src/device/device.cpp index 6bf85914b..475dec13a 100644 --- a/ion/src/device/device.cpp +++ b/ion/src/device/device.cpp @@ -130,13 +130,17 @@ void init() { GPIO(g).PUPDR()->set(0x00000000); // All to "None" } +#if EPSILON_DEVICE_BENCH bool consolePeerConnectedOnBoot = Ion::Console::Device::peerConnected(); +#endif initPeripherals(); +#if EPSILON_DEVICE_BENCH if (consolePeerConnectedOnBoot) { Ion::Device::Bench::run(); } +#endif } void shutdown() {