summaryrefslogtreecommitdiff
path: root/supervisor/shared
diff options
context:
space:
mode:
Diffstat (limited to 'supervisor/shared')
-rw-r--r--supervisor/shared/background_callback.c4
-rw-r--r--supervisor/shared/filesystem.c2
-rw-r--r--supervisor/shared/translate.c7
3 files changed, 11 insertions, 2 deletions
diff --git a/supervisor/shared/background_callback.c b/supervisor/shared/background_callback.c
index ef686cbab..288c9a4df 100644
--- a/supervisor/shared/background_callback.c
+++ b/supervisor/shared/background_callback.c
@@ -38,6 +38,8 @@ STATIC volatile background_callback_t *callback_head, *callback_tail;
#define CALLBACK_CRITICAL_BEGIN (common_hal_mcu_disable_interrupts())
#define CALLBACK_CRITICAL_END (common_hal_mcu_enable_interrupts())
+MP_WEAK void port_wake_main_task(void) {}
+
void background_callback_add_core(background_callback_t *cb) {
CALLBACK_CRITICAL_BEGIN;
if (cb->prev || callback_head == cb) {
@@ -55,6 +57,8 @@ void background_callback_add_core(background_callback_t *cb) {
}
callback_tail = cb;
CALLBACK_CRITICAL_END;
+
+ port_wake_main_task();
}
void background_callback_add(background_callback_t *cb, background_callback_fun fun, void *data) {
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