From 175bbfc64ae4e3789eb36c07b8b4399b0accbd57 Mon Sep 17 00:00:00 2001 From: Volodymyr Shymanskyy Date: Wed, 8 Jan 2020 14:39:15 +0200 Subject: [PATCH] Update examples --- platforms/arduino/src/main.cpp | 1 + platforms/hifive1/platformio.ini | 2 ++ platforms/hifive1/src/main.c | 3 ++- platforms/particle/src/main.ino | 1 + source/m3_config_platforms.h | 3 ++- 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/platforms/arduino/src/main.cpp b/platforms/arduino/src/main.cpp index 48cfa8f..8f370ce 100644 --- a/platforms/arduino/src/main.cpp +++ b/platforms/arduino/src/main.cpp @@ -63,6 +63,7 @@ void setup() delay(10); while (!Serial) {} + Serial.println(); Serial.println("Wasm3 v" M3_VERSION " on Arduino (" M3_ARCH "), build " __DATE__ " " __TIME__); digitalWrite(LED_BUILTIN, HIGH); diff --git a/platforms/hifive1/platformio.ini b/platforms/hifive1/platformio.ini index 102afc0..17b9db0 100644 --- a/platforms/hifive1/platformio.ini +++ b/platforms/hifive1/platformio.ini @@ -20,6 +20,7 @@ monitor_speed = 115200 board_build.f_cpu = 320000000L src_build_flags = + -Dd_m3FixedHeap=8192 -Os -Wfatal-errors -flto @@ -35,6 +36,7 @@ monitor_speed = 115200 board_build.f_cpu = 320000000L src_build_flags = + -Dd_m3FixedHeap=8192 -Os -Wfatal-errors -flto diff --git a/platforms/hifive1/src/main.c b/platforms/hifive1/src/main.c index 4b997a5..146c3b5 100644 --- a/platforms/hifive1/src/main.c +++ b/platforms/hifive1/src/main.c @@ -51,7 +51,8 @@ void run_wasm() } int main() { - printf("\nWasm3 v" M3_VERSION " on HiFive1, build " __DATE__ " " __TIME__ "\n"); + printf("\n"); + printf("Wasm3 v" M3_VERSION " on HiFive1 (" M3_ARCH "), build " __DATE__ " " __TIME__ "\n"); // TODO: fix clock (shows wrong time) clock_t start = clock(); run_wasm(); diff --git a/platforms/particle/src/main.ino b/platforms/particle/src/main.ino index 22d5b58..4461d01 100644 --- a/platforms/particle/src/main.ino +++ b/platforms/particle/src/main.ino @@ -63,6 +63,7 @@ void setup() Serial.begin(115200); delay(10); + Serial.println(); Serial.println("Wasm3 v" M3_VERSION " on Particle, build " __DATE__ " " __TIME__); u32 start = millis(); diff --git a/source/m3_config_platforms.h b/source/m3_config_platforms.h index ab245cd..7f56259 100644 --- a/source/m3_config_platforms.h +++ b/source/m3_config_platforms.h @@ -233,7 +233,8 @@ typedef int8_t i8; * Platform-specific defaults */ -# if defined(ARDUINO) || defined(PARTICLE) || defined(PLATFORMIO) || defined(__MBED__) || defined(ESP8266) || defined(ESP32) || defined(BLUE_PILL) || defined(WM_W600) || defined(FOMU) +# if defined(ARDUINO) || defined(PARTICLE) || defined(PLATFORMIO) || defined(__MBED__) || \ + defined(ESP8266) || defined(ESP32) || defined(BLUE_PILL) || defined(WM_W600) || defined(FOMU) # ifndef d_m3LogOutput # define d_m3LogOutput false # endif