mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
stmhal: Initialise stack pointer correctly.
Stack is full descending and must be 8-byte aligned. It must start off pointing to just above the last byte of RAM. Previously, stack started pointed to last byte of RAM (eg 0x2001ffff) and so was not 8-byte aligned. This caused a bug in combination with alloca. This patch also updates some debug printing code. Addresses issue #872 (among many other undiscovered issues).
This commit is contained in:
@@ -183,7 +183,7 @@ STATIC void dump_args(const mp_obj_t *a, int sz) {
|
||||
STATIC mp_obj_t fun_bc_call(mp_obj_t self_in, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args) {
|
||||
MP_STACK_CHECK();
|
||||
|
||||
DEBUG_printf("Input n_args: %d, n_kw: %d\n", n_args, n_kw);
|
||||
DEBUG_printf("Input n_args: " UINT_FMT ", n_kw: " UINT_FMT "\n", n_args, n_kw);
|
||||
DEBUG_printf("Input pos args: ");
|
||||
dump_args(args, n_args);
|
||||
DEBUG_printf("Input kw args: ");
|
||||
|
||||
Reference in New Issue
Block a user