diff options
| author | Jeff Epler <jepler@gmail.com> | 2021-01-12 09:23:07 -0600 |
|---|---|---|
| committer | Jeff Epler <jepler@gmail.com> | 2021-01-12 09:23:07 -0600 |
| commit | 1ca29ec47c9f51589faa151b659dfd1dd4a349ef (patch) | |
| tree | 0a2e35b45a52e85f258cc522615e37965b0453d3 /supervisor | |
| parent | e20c65d8f044cb9522cd1a7f4a3030efefa77cbb (diff) | |
| parent | 047708e36e67beee14771120296cdf758f00601d (diff) | |
Merge remote-tracking branch 'origin/main' into audioout-esp32
Diffstat (limited to 'supervisor')
| -rw-r--r-- | supervisor/shared/board.c | 2 | ||||
| -rw-r--r-- | supervisor/shared/filesystem.c | 2 | ||||
| -rw-r--r-- | supervisor/shared/translate.c | 7 |
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 |
