Add arc32, adjust platform defaults
# define M3_ARCH "mips"
# elif defined(__xtensa__)
# define M3_ARCH "xtensa"
+# elif defined(__arc__)
+# define M3_ARCH "arc32"
# elif defined(__riscv)
# if defined(__riscv_32e)
# define _M3_ARCH_RV "rv32e"
@@ -211,23 +213,47 @@ typedef int8_t i8;
*/
# if defined (M3_COMPILER_MSVC)
-# define vectorcall
+# define vectorcall // For MSVC, better not to specify any call convention
# elif defined(WIN32)
# define vectorcall __vectorcall
# elif defined (ESP8266)
# include <c_types.h>
-# define vectorcall //ICACHE_FLASH_ATTR
+# define op_section //ICACHE_FLASH_ATTR
# elif defined (ESP32)
# include "esp_system.h"
-# define vectorcall IRAM_ATTR
+# define op_section IRAM_ATTR
# elif defined (FOMU)
-# define vectorcall __attribute__((section(".ramtext")))
-# elif defined(HIFIVE1)
-# define vectorcall
-# else
+# define op_section __attribute__((section(".ramtext")))
+# endif
+
+#ifndef vectorcall
#define vectorcall
#endif
+#ifndef op_section
+#define op_section
+#endif
+
+
+/*
+ * Device-specific defaults
+ */
+
+# ifndef d_m3MaxFunctionStackHeight
+# if defined(ESP32) || defined(ARDUINO_AMEBA)
+# define d_m3MaxFunctionStackHeight 128
+# endif
+# endif
+
+# ifndef d_m3FixedHeap
+# if defined(ARDUINO_AMEBA)
+# define d_m3FixedHeap (128*1024)
+# elif defined(ESP8266) || defined(BLUE_PILL) || defined(FOMU)
+# define d_m3FixedHeap (12*1024)
+# elif defined(ARDUINO_ARCH_ARC32) // Arduino 101
+# define d_m3FixedHeap (10*1024)
+# endif
+# endif
/*
* Platform-specific defaults
@@ -249,10 +275,4 @@ typedef int8_t i8;
# endif
# endif
-# if defined(ESP8266) || defined(BLUE_PILL) || defined(FOMU)
-# ifndef d_m3FixedHeap
-# define d_m3FixedHeap (12*1024)
-# endif
-# endif
-
#endif // m3_config_platforms_h
