summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/renesas-ra/extint.c2
-rw-r--r--ports/renesas-ra/machine_uart.c2
-rw-r--r--ports/renesas-ra/main.c2
-rw-r--r--ports/renesas-ra/mpconfigport.h17
-rw-r--r--ports/renesas-ra/mphalport.c2
-rw-r--r--ports/renesas-ra/timer.c2
-rw-r--r--ports/renesas-ra/usrsw.c2
7 files changed, 12 insertions, 17 deletions
diff --git a/ports/renesas-ra/extint.c b/ports/renesas-ra/extint.c
index 05e99eb65..19caa7a3b 100644
--- a/ports/renesas-ra/extint.c
+++ b/ports/renesas-ra/extint.c
@@ -399,3 +399,5 @@ void extint_init0(void) {
MP_STATE_PORT(pyb_extint_callback)[i] = mp_const_none;
}
}
+
+MP_REGISTER_ROOT_POINTER(mp_obj_t pyb_extint_callback[PYB_EXTI_NUM_VECTORS]);
diff --git a/ports/renesas-ra/machine_uart.c b/ports/renesas-ra/machine_uart.c
index d71562f20..4b4aa3396 100644
--- a/ports/renesas-ra/machine_uart.c
+++ b/ports/renesas-ra/machine_uart.c
@@ -581,3 +581,5 @@ const mp_obj_type_t machine_uart_type = {
.protocol = &uart_stream_p,
.locals_dict = (mp_obj_dict_t *)&machine_uart_locals_dict,
};
+
+MP_REGISTER_ROOT_POINTER(struct _machine_uart_obj_t *machine_uart_obj_all[MICROPY_HW_MAX_UART + MICROPY_HW_MAX_LPUART]);
diff --git a/ports/renesas-ra/main.c b/ports/renesas-ra/main.c
index 6f4584b68..78af1a963 100644
--- a/ports/renesas-ra/main.c
+++ b/ports/renesas-ra/main.c
@@ -397,3 +397,5 @@ soft_reset_exit:
goto soft_reset;
}
+
+MP_REGISTER_ROOT_POINTER(mp_obj_t pyb_config_main);
diff --git a/ports/renesas-ra/mpconfigport.h b/ports/renesas-ra/mpconfigport.h
index 9a8c02559..0f1d59303 100644
--- a/ports/renesas-ra/mpconfigport.h
+++ b/ports/renesas-ra/mpconfigport.h
@@ -168,23 +168,6 @@
#endif
#define MICROPY_PORT_ROOT_POINTERS \
- mp_obj_t pyb_config_main; \
- \
- mp_obj_t pyb_switch_callback; \
- \
- mp_obj_t pyb_extint_callback[PYB_EXTI_NUM_VECTORS]; \
- \
- /* pointers to all Timer objects (if they have been created) */ \
- struct _pyb_timer_obj_t *pyb_timer_obj_all[MICROPY_HW_MAX_TIMER]; \
- \
- /* stdio is repeated on this UART object if it's not null */ \
- struct _machine_uart_obj_t *pyb_stdio_uart; \
- \
- /* pointers to all UART objects (if they have been created) */ \
- struct _machine_uart_obj_t *machine_uart_obj_all[MICROPY_HW_MAX_UART + MICROPY_HW_MAX_LPUART]; \
- \
- /* root pointers for sub-systems */ \
- \
/* root pointers defined by a board */ \
MICROPY_BOARD_ROOT_POINTERS \
diff --git a/ports/renesas-ra/mphalport.c b/ports/renesas-ra/mphalport.c
index 6a416f431..6e6a83aa2 100644
--- a/ports/renesas-ra/mphalport.c
+++ b/ports/renesas-ra/mphalport.c
@@ -118,3 +118,5 @@ void mp_hal_get_mac_ascii(int idx, size_t chr_off, size_t chr_len, char *dest) {
*dest++ = hexchr[mac[chr_off >> 1] >> (4 * (1 - (chr_off & 1))) & 0xf];
}
}
+
+MP_REGISTER_ROOT_POINTER(struct _machine_uart_obj_t *pyb_stdio_uart);
diff --git a/ports/renesas-ra/timer.c b/ports/renesas-ra/timer.c
index 93b378ac3..1ae936525 100644
--- a/ports/renesas-ra/timer.c
+++ b/ports/renesas-ra/timer.c
@@ -567,3 +567,5 @@ void timer_irq_handler(void *param) {
// }
}
}
+
+MP_REGISTER_ROOT_POINTER(struct _pyb_timer_obj_t *pyb_timer_obj_all[MICROPY_HW_MAX_TIMER]);
diff --git a/ports/renesas-ra/usrsw.c b/ports/renesas-ra/usrsw.c
index b0e2396cd..5e11f48e6 100644
--- a/ports/renesas-ra/usrsw.c
+++ b/ports/renesas-ra/usrsw.c
@@ -144,4 +144,6 @@ const mp_obj_type_t pyb_switch_type = {
.locals_dict = (mp_obj_dict_t *)&pyb_switch_locals_dict,
};
+MP_REGISTER_ROOT_POINTER(mp_obj_t pyb_switch_callback);
+
#endif // MICROPY_HW_HAS_SWITCH