diff --git a/src/Makefile b/src/Makefile index 4564331e2..8eb230008 100755 --- a/src/Makefile +++ b/src/Makefile @@ -285,7 +285,7 @@ FIRM_OBJ += $(addprefix $(BUILD)/$(MICROPY_DIR)/,\ usbd_desc.o \ usbd_cdc_interface.o \ usbd_hid_interface.o \ - usbd_msc_storage.o \ + usbd_msc_interface.o \ pendsv.o \ bufhelper.o \ usb.o \ @@ -335,9 +335,12 @@ FIRM_OBJ += $(addprefix $(BUILD)/$(MICROPY_DIR)/,\ machine_i2c.o \ machine_spi.o \ machine_uart.o \ + machine_adc.o \ + machine_timer.o \ pybthread.o \ mpthreadport.o \ posix_helpers.o \ + softtimer.o \ mbedtls/mbedtls_port.o \ ) @@ -409,7 +412,6 @@ FIRM_OBJ += $(addprefix $(BUILD)/$(MICROPY_DIR)/usbdev/, \ class/src/usbd_cdc_msc_hid.o \ class/src/usbd_msc_bot.o \ class/src/usbd_msc_scsi.o \ - class/src/usbd_msc_data.o \ ) FIRM_OBJ += $(addprefix $(BUILD)/$(MICROPY_DIR)/extmod/,\ @@ -428,6 +430,7 @@ FIRM_OBJ += $(addprefix $(BUILD)/$(MICROPY_DIR)/extmod/,\ vfs_fat_file.o \ vfs_reader.o \ vfs_fat_diskio.o \ + vfs_blockdev.o \ virtpin.o \ machine_mem.o \ machine_i2c.o \ diff --git a/src/micropython b/src/micropython index 522f4852f..9483684d2 160000 --- a/src/micropython +++ b/src/micropython @@ -1 +1 @@ -Subproject commit 522f4852fcb109b73bbbb95d7a2a4d531d85c9a7 +Subproject commit 9483684d205bf2423e2fc7c327b4eccfa1b786d1 diff --git a/src/omv/main.c b/src/omv/main.c index 387c08cd6..237776ade 100644 --- a/src/omv/main.c +++ b/src/omv/main.c @@ -64,7 +64,6 @@ #include "usbd_desc.h" #include "usbd_cdc_msc_hid.h" #include "usbd_cdc_interface.h" -#include "usbd_msc_storage.h" #include "py_sensor.h" #include "py_image.h" @@ -484,9 +483,6 @@ soft_reset: pyb_usb_init0(); MP_STATE_PORT(pyb_stdio_uart) = NULL; - // Activate USB_VCP(0) on dupterm slot 1 for the REPL - MP_STATE_VM(dupterm_objs[1]) = MP_OBJ_FROM_PTR(&pyb_usb_vcp_obj); - usb_vcp_attach_to_repl(&pyb_usb_vcp_obj, true); // Initialize the sensor and check the result after // mounting the file-system to log errors (if any). @@ -502,7 +498,7 @@ soft_reset: // Initialize storage if (sdcard_is_present()) { // Init the vfs object - vfs_fat->flags = 0; + vfs_fat->blockdev.flags = 0; sdcard_init_vfs(vfs_fat, 1); // Try to mount the SD card @@ -520,7 +516,7 @@ soft_reset: storage_init(); // init the vfs object - vfs_fat->flags = 0; + vfs_fat->blockdev.flags = 0; pyb_flash_init_vfs(vfs_fat); // Try to mount the flash @@ -579,7 +575,7 @@ soft_reset: // Init USB device to default setting if it was not already configured if (!(pyb_usb_flags & PYB_USB_FLAG_USB_MODE_CALLED)) { - pyb_usb_dev_init(USBD_VID, USBD_PID_CDC_MSC, USBD_MODE_CDC_MSC, NULL); + pyb_usb_dev_init(pyb_usb_dev_detect(), USBD_VID, USBD_PID_CDC_MSC, USBD_MODE_CDC_MSC, 0, NULL, NULL); } // report if SDRAM failed diff --git a/src/omv/stm32fxxx.ld.S b/src/omv/stm32fxxx.ld.S index 9a8fdec09..d6d7dcc40 100755 --- a/src/omv/stm32fxxx.ld.S +++ b/src/omv/stm32fxxx.ld.S @@ -192,6 +192,7 @@ SECTIONS ._stack (NOLOAD) : { . = ALIGN(4); + _sstack = .; . = . + _stack_size; } >OMV_MAIN_MEMORY