diff --git a/ports/cxd56/Makefile b/ports/cxd56/Makefile index c6203350d127..48fecbfacf5d 100644 --- a/ports/cxd56/Makefile +++ b/ports/cxd56/Makefile @@ -73,7 +73,6 @@ CFLAGS += \ -DCONFIG_WCHAR_BUILTIN \ -DCONFIG_HAVE_DOUBLE \ -DNDEBUG \ - -Dmain=spresense_main \ -D_estack=__stack \ -DCIRCUITPY_BOARD_ID="\"$(BOARD)\"" \ -c \ diff --git a/ports/cxd56/common-hal/camera/Camera.c b/ports/cxd56/common-hal/camera/Camera.c index 4f468a537b95..65ab3b89f674 100644 --- a/ports/cxd56/common-hal/camera/Camera.c +++ b/ports/cxd56/common-hal/camera/Camera.c @@ -169,7 +169,7 @@ void common_hal_camera_deinit(camera_obj_t *self) { return; } - video_uninitialize(); + video_uninitialize(camera_dev.devpath); close(camera_dev.fd); camera_dev.fd = -1; diff --git a/ports/cxd56/configs/circuitpython/defconfig b/ports/cxd56/configs/circuitpython/defconfig index 3655a5fdcdfb..deb83df91369 100644 --- a/ports/cxd56/configs/circuitpython/defconfig +++ b/ports/cxd56/configs/circuitpython/defconfig @@ -65,8 +65,6 @@ CONFIG_DRIVERS_VIDEO=y CONFIG_FS_FAT=y CONFIG_INIT_ENTRYPOINT="spresense_main" CONFIG_INIT_STACKSIZE=8192 -CONFIG_MMCSD=y -CONFIG_MMCSD_SDIO=y CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_SMART=y diff --git a/ports/cxd56/supervisor/port.c b/ports/cxd56/supervisor/port.c index ecb16d77da91..029ca314cac5 100644 --- a/ports/cxd56/supervisor/port.c +++ b/ports/cxd56/supervisor/port.c @@ -165,3 +165,11 @@ void port_interrupt_after_ticks(uint32_t ticks) { void port_idle_until_interrupt(void) { // TODO: Implement sleep. } + +// Wrap main in spresense_main +extern void main(void); +extern int spresense_main(int argc, FAR char *argv[]); +int spresense_main(int argc, FAR char *argv[]) { + main(); + return 0; +}