diff --git a/src/Makefile b/src/Makefile index 64733ff3c..020961140 100755 --- a/src/Makefile +++ b/src/Makefile @@ -102,7 +102,7 @@ CFLAGS += -D$(MCU) -D$(CFLAGS_MCU) -D$(ARM_MATH) -DARM_NN_TRUNCATE\ -fsingle-precision-constant -Wdouble-promotion -mcpu=$(CPU) -mtune=$(CPU) -mfpu=$(FPU) -mfloat-abi=hard CFLAGS += -D__FPU_PRESENT=1 -D__VFP_FP__ -DUSE_USB_FS -DUSE_DEVICE_MODE -DUSE_USB_OTG_ID=0 -DHSE_VALUE=$(OMV_HSE_VALUE)\ -D$(TARGET) -DSTM32_HAL_H=$(HAL_INC) -DVECT_TAB_OFFSET=$(VECT_TAB_OFFSET) -DMAIN_APP_ADDR=$(MAIN_APP_ADDR) -CFLAGS += $(OMV_BOARD_EXTRA_CFLAGS) -DOPENMV +CFLAGS += $(OMV_BOARD_EXTRA_CFLAGS) ST_CFLAGS += -I. -Iinclude ST_CFLAGS += -I$(TOP_DIR)/$(CMSIS_DIR)/include/ @@ -415,6 +415,7 @@ FIRM_OBJ += $(addprefix $(BUILD)/$(MICROPY_DIR)/lib/,\ utils/interrupt_char.o \ utils/sys_stdio_mphal.o \ utils/gchelper_m3.o \ + utils/gchelper_native.o \ libc/string0.o \ netutils/*.o \ timeutils/timeutils.o \ @@ -459,6 +460,7 @@ FIRM_OBJ += $(addprefix $(BUILD)/$(MICROPY_DIR)/lib/mp-readline/,\ #------------- mbedtls -------------------# FIRM_OBJ += $(wildcard $(BUILD)/$(MICROPY_DIR)/lib/mbedtls/library/*.o) +FIRM_OBJ += $(wildcard $(BUILD)/$(MICROPY_DIR)/lib/mbedtls_errors/*.o) FIRM_OBJ += $(addprefix $(BUILD)/$(MICROPY_DIR)/usbdev/, \ core/src/usbd_core.o \ @@ -500,6 +502,7 @@ FIRM_OBJ += $(addprefix $(BUILD)/$(MICROPY_DIR)/extmod/,\ modbtree.o \ moducryptolib.o \ modussl_mbedtls.o \ + moduasyncio.o \ ) ifeq ($(MICROPY_PY_ULAB), 1) diff --git a/src/micropython b/src/micropython index aa839707b..1ab09a8d8 160000 --- a/src/micropython +++ b/src/micropython @@ -1 +1 @@ -Subproject commit aa839707bd67ed3a445466b79c13071c5b1dcdbd +Subproject commit 1ab09a8d8d66d6016ed9e1da1f8c40ca2f0cf9ad diff --git a/src/omv/ini.c b/src/omv/ini.c index 275e1c121..d7a4a5faf 100644 --- a/src/omv/ini.c +++ b/src/omv/ini.c @@ -142,60 +142,6 @@ bool ini_is_true(const char *value) return true; } -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Chris Torek. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* - * Copy src to dst, truncating or null-padding to always copy n bytes. - * Return dst. - */ -char * -strncpy(char *dst, const char *src, size_t n) -{ - if (n != 0) { - char *d = dst; - const char *s = src; - do { - if ((*d++ = *s++) == 0) { - /* NUL pad the remaining n-1 bytes */ - while (--n != 0) - *d++ = 0; - break; - } - } while (--n != 0); - } - return (dst); -} - /* * Copyright (c) 2000-2002 Opsycon AB (www.opsycon.se) * diff --git a/src/omv/py/py_image.c b/src/omv/py/py_image.c index cda39d251..d64bbd4ba 100644 --- a/src/omv/py/py_image.c +++ b/src/omv/py/py_image.c @@ -7302,7 +7302,7 @@ mp_obj_t py_image_save_descriptor(uint n_args, const mp_obj_t *args, mp_map_t *k if ((res = f_open_helper(&fp, path, FA_WRITE|FA_CREATE_ALWAYS)) == FR_OK) { // Find descriptor type - mp_obj_type_t *desc_obj_type = mp_obj_get_type(args[0]); + const mp_obj_type_t *desc_obj_type = mp_obj_get_type(args[0]); if (desc_obj_type == &py_lbp_type) { desc_type = DESC_LBP; } else if (desc_obj_type == &py_kp_type) { @@ -7345,8 +7345,8 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_save_descriptor_obj, 2, py_image_save static mp_obj_t py_image_match_descriptor(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { mp_obj_t match_obj = mp_const_none; - mp_obj_type_t *desc1_type = mp_obj_get_type(args[0]); - mp_obj_type_t *desc2_type = mp_obj_get_type(args[1]); + const mp_obj_type_t *desc1_type = mp_obj_get_type(args[0]); + const mp_obj_type_t *desc2_type = mp_obj_get_type(args[1]); PY_ASSERT_TRUE_MSG((desc1_type == desc2_type), "Descriptors have different types!"); if (desc1_type == &py_lbp_type) {