[ion] Add EPSILON_DEVICE_BENCH

Change-Id: I58de053755305fc610c410a139572f2d0eee2a2d
This commit is contained in:
Léa Saviot
2018-04-06 18:16:49 +02:00
parent 1378c77907
commit b807938031
2 changed files with 7 additions and 0 deletions

View File

@@ -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

View File

@@ -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() {