summaryrefslogtreecommitdiff
path: root/supervisor
diff options
context:
space:
mode:
Diffstat (limited to 'supervisor')
-rw-r--r--supervisor/shared/board.c2
-rw-r--r--supervisor/shared/filesystem.c2
-rw-r--r--supervisor/shared/translate.c7
3 files changed, 8 insertions, 3 deletions
diff --git a/supervisor/shared/board.c b/supervisor/shared/board.c
index 30603aa66..6d648510e 100644
--- a/supervisor/shared/board.c
+++ b/supervisor/shared/board.c
@@ -36,7 +36,7 @@
void board_reset_user_neopixels(const mcu_pin_obj_t* pin, size_t count) {
// Turn off on-board NeoPixel string
uint8_t empty[count * 3];
- memset(empty, 0, count);
+ memset(empty, 0, count * 3);
digitalio_digitalinout_obj_t neopixel_pin;
common_hal_digitalio_digitalinout_construct(&neopixel_pin, pin);
common_hal_digitalio_digitalinout_switch_to_output(&neopixel_pin, false,
diff --git a/supervisor/shared/filesystem.c b/supervisor/shared/filesystem.c
index 88603be0c..618dc796b 100644
--- a/supervisor/shared/filesystem.c
+++ b/supervisor/shared/filesystem.c
@@ -74,7 +74,7 @@ static void make_sample_code_file(FATFS *fatfs) {
#if CIRCUITPY_FULL_BUILD
FIL fs;
UINT char_written = 0;
- const byte buffer[] = "print('Hello World!')\n";
+ const byte buffer[] = "print(\"Hello World!\")\n";
//Create or modify existing code.py file
f_open(fatfs, &fs, "/code.py", FA_WRITE | FA_CREATE_ALWAYS);
f_write(&fs, buffer, sizeof(buffer) - 1, &char_written);
diff --git a/supervisor/shared/translate.c b/supervisor/shared/translate.c
index 44544c98d..8bd3c5acd 100644
--- a/supervisor/shared/translate.c
+++ b/supervisor/shared/translate.c
@@ -122,7 +122,12 @@ char* decompress(const compressed_string_t* compressed, char* decompressed) {
return decompressed;
}
-inline __attribute__((always_inline)) const compressed_string_t* translate(const char* original) {
+inline
+// gcc10 -flto has issues with this being always_inline for debug builds.
+#if CIRCUITPY_DEBUG < 1
+ __attribute__((always_inline))
+#endif
+const compressed_string_t* translate(const char* original) {
#ifndef NO_QSTR
#define QDEF(id, str)
#define TRANSLATION(id, firstbyte, ...) if (strcmp(original, id) == 0) { static const compressed_string_t v = { .data = firstbyte, .tail = { __VA_ARGS__ } }; return &v; } else