diff --git a/build/device/dfu.py b/build/device/dfu.py index 47358c53d..14f8ff030 100644 --- a/build/device/dfu.py +++ b/build/device/dfu.py @@ -148,7 +148,12 @@ def abort_request(): def unlock_request(): """Deactivate the protection""" - __dev.ctrl_transfer(0x21, __DFU_UNLOCK, 0, __DFU_INTERFACE, None, __TIMEOUT) + try: + __dev.ctrl_transfer(0x21, __DFU_UNLOCK, 0, __DFU_INTERFACE, None, + __TIMEOUT) + except usb.core.USBError: + print("Error when disabling protection, ignoring", file=sys.stderr) + def clr_status(): """Clears any error status (perhaps left over from a previous session).""" diff --git a/ion/src/device/n0110/flash.ld b/ion/src/device/n0110/flash.ld index 4bdf639f5..74e631b6e 100644 --- a/ion/src/device/n0110/flash.ld +++ b/ion/src/device/n0110/flash.ld @@ -244,6 +244,7 @@ SECTIONS { *(.rodata._ZL12KDColorWhite*) *(.rodata._ZL10KDColorRed*) *(.rodata._ZL12KDColorBlack*) + *(.rodata._ZN4CodeL15BackgroundColorEd*) *(.rodata._ZN3Ion6Device3SWD6ConfigL4PinsE) *(.rodata._ZN3Ion6Device7Display6ConfigL8FSMCPinsE) *(.rodata._ZZN3Ion6Device7Display9initPanelEvE11calibration) diff --git a/python/port/genhdr/qstrdefs.in.h b/python/port/genhdr/qstrdefs.in.h index 7b198582c..91c67f9e8 100644 --- a/python/port/genhdr/qstrdefs.in.h +++ b/python/port/genhdr/qstrdefs.in.h @@ -698,6 +698,8 @@ Q(from_uint16_buffer) Q(from_int32_buffer) Q(from_uint32_buffer) #endif + +#if MICROPY_PY_SYS // sys QSTRs Q(sys) Q(info) @@ -707,3 +709,4 @@ Q(exit) Q(modules) Q(print_exception) Q(version_info) +#endif \ No newline at end of file diff --git a/python/port/mod/ulab/numpy/numerical/numerical.c b/python/port/mod/ulab/numpy/numerical/numerical.c index af9ff1c02..7ee4edfa7 100644 --- a/python/port/mod/ulab/numpy/numerical/numerical.c +++ b/python/port/mod/ulab/numpy/numerical/numerical.c @@ -78,7 +78,8 @@ static mp_obj_t numerical_all_any(mp_obj_t oin, mp_obj_t axis, uint8_t optype) { } // always get a float, so that we don't have to resolve the dtype later mp_float_t (*func)(void *) = ndarray_get_float_function(ndarray->dtype); - ndarray_obj_t *results = NULL; + // We set results to true here because it crash if it is NULL + ndarray_obj_t *results = mp_const_true; uint8_t *rarray = NULL; shape_strides _shape_strides = tools_reduce_axes(ndarray, axis); if(axis != mp_const_none) {