diff options
author | Damien George <damien.p.george@gmail.com> | 2014-09-23 10:59:05 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-09-23 10:59:05 +0100 |
commit | eaaebf3291a12ff65ca5c7f16e0d486fbde10efa (patch) | |
tree | cbfa01bb3b66abb38f367d09754724f19cc64137 /py/objfun.c | |
parent | 2c180f7ccc456e1768fd1cb9a86399808672a237 (diff) |
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).
Diffstat (limited to 'py/objfun.c')
-rw-r--r-- | py/objfun.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objfun.c b/py/objfun.c index 8c08ce78c..eb89a78a0 100644 --- a/py/objfun.c +++ b/py/objfun.c @@ -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: "); |