Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/famicom-dumper-writer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Cluster <cluster@cluster.wtf>2024-01-06 14:55:04 +0300
committerAlexey Cluster <cluster@cluster.wtf>2024-01-06 14:55:04 +0300
commitdd6204f4e4b8e3f4823a1bede5967492b594fa1d (patch)
tree2a6f600c2f771d06eef5616709f34ddd77f7e902
parentfee510cffdc74fbfb2c02a4ce587f1298bb09c81 (diff)
Update, refactoringHEADmain
-rw-r--r--FamicomDumper/.cproject (renamed from STM32/.cproject)6
-rw-r--r--FamicomDumper/.project (renamed from STM32/.project)0
-rw-r--r--FamicomDumper/Core/Inc/comm.h (renamed from STM32/Core/Inc/comm.h)0
-rw-r--r--FamicomDumper/Core/Inc/crc.h (renamed from STM32/Core/Inc/crc.h)0
-rw-r--r--FamicomDumper/Core/Inc/dumper.h (renamed from STM32/Core/Inc/dumper.h)0
-rw-r--r--FamicomDumper/Core/Inc/fds.h (renamed from STM32/Core/Inc/fds.h)0
-rw-r--r--FamicomDumper/Core/Inc/flash.h (renamed from STM32/Core/Inc/flash.h)0
-rw-r--r--FamicomDumper/Core/Inc/led.h (renamed from STM32/Core/Inc/led.h)0
-rw-r--r--FamicomDumper/Core/Inc/main.h (renamed from STM32/Core/Inc/main.h)1
-rw-r--r--FamicomDumper/Core/Inc/stm32f1xx_hal_conf.h (renamed from STM32/Core/Inc/stm32f1xx_hal_conf.h)0
-rw-r--r--FamicomDumper/Core/Inc/stm32f1xx_it.h (renamed from STM32/Core/Inc/stm32f1xx_it.h)0
-rw-r--r--FamicomDumper/Core/Inc/unrom512.h (renamed from STM32/Core/Inc/unrom512.h)0
-rw-r--r--FamicomDumper/Core/Src/comm.c (renamed from STM32/Core/Src/comm.c)0
-rw-r--r--FamicomDumper/Core/Src/crc.c (renamed from STM32/Core/Src/crc.c)0
-rw-r--r--FamicomDumper/Core/Src/dumper.c (renamed from STM32/Core/Src/dumper.c)0
-rw-r--r--FamicomDumper/Core/Src/fds.c (renamed from STM32/Core/Src/fds.c)0
-rw-r--r--FamicomDumper/Core/Src/flash.c (renamed from STM32/Core/Src/flash.c)0
-rw-r--r--FamicomDumper/Core/Src/led.c (renamed from STM32/Core/Src/led.c)0
-rw-r--r--FamicomDumper/Core/Src/main.c (renamed from STM32/Core/Src/main.c)4
-rw-r--r--FamicomDumper/Core/Src/stm32f1xx_hal_msp.c (renamed from STM32/Core/Src/stm32f1xx_hal_msp.c)1
-rw-r--r--FamicomDumper/Core/Src/stm32f1xx_it.c (renamed from STM32/Core/Src/stm32f1xx_it.c)0
-rw-r--r--FamicomDumper/Core/Src/syscalls.c (renamed from STM32/Core/Src/syscalls.c)0
-rw-r--r--FamicomDumper/Core/Src/sysmem.c (renamed from STM32/Core/Src/sysmem.c)0
-rw-r--r--FamicomDumper/Core/Src/system_stm32f1xx.c (renamed from STM32/Core/Src/system_stm32f1xx.c)0
-rw-r--r--FamicomDumper/Core/Src/unrom512.c (renamed from STM32/Core/Src/unrom512.c)0
-rw-r--r--FamicomDumper/Core/Startup/startup_stm32f103zetx.s (renamed from STM32/Core/Startup/startup_stm32f103zetx.s)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h (renamed from STM32/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h (renamed from STM32/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h (renamed from STM32/Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Device/ST/STM32F1xx/License.md (renamed from STM32/Drivers/CMSIS/Device/ST/STM32F1xx/License.md)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Include/cmsis_armcc.h (renamed from STM32/Drivers/CMSIS/Include/cmsis_armcc.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Include/cmsis_armclang.h (renamed from STM32/Drivers/CMSIS/Include/cmsis_armclang.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Include/cmsis_compiler.h (renamed from STM32/Drivers/CMSIS/Include/cmsis_compiler.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Include/cmsis_gcc.h (renamed from STM32/Drivers/CMSIS/Include/cmsis_gcc.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Include/cmsis_iccarm.h (renamed from STM32/Drivers/CMSIS/Include/cmsis_iccarm.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Include/cmsis_version.h (renamed from STM32/Drivers/CMSIS/Include/cmsis_version.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Include/core_armv8mbl.h (renamed from STM32/Drivers/CMSIS/Include/core_armv8mbl.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Include/core_armv8mml.h (renamed from STM32/Drivers/CMSIS/Include/core_armv8mml.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Include/core_cm0.h (renamed from STM32/Drivers/CMSIS/Include/core_cm0.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Include/core_cm0plus.h (renamed from STM32/Drivers/CMSIS/Include/core_cm0plus.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Include/core_cm1.h (renamed from STM32/Drivers/CMSIS/Include/core_cm1.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Include/core_cm23.h (renamed from STM32/Drivers/CMSIS/Include/core_cm23.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Include/core_cm3.h (renamed from STM32/Drivers/CMSIS/Include/core_cm3.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Include/core_cm33.h (renamed from STM32/Drivers/CMSIS/Include/core_cm33.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Include/core_cm4.h (renamed from STM32/Drivers/CMSIS/Include/core_cm4.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Include/core_cm7.h (renamed from STM32/Drivers/CMSIS/Include/core_cm7.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Include/core_sc000.h (renamed from STM32/Drivers/CMSIS/Include/core_sc000.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Include/core_sc300.h (renamed from STM32/Drivers/CMSIS/Include/core_sc300.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Include/mpu_armv7.h (renamed from STM32/Drivers/CMSIS/Include/mpu_armv7.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Include/mpu_armv8.h (renamed from STM32/Drivers/CMSIS/Include/mpu_armv8.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/Include/tz_context.h (renamed from STM32/Drivers/CMSIS/Include/tz_context.h)0
-rw-r--r--FamicomDumper/Drivers/CMSIS/LICENSE.txt (renamed from STM32/Drivers/CMSIS/LICENSE.txt)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd_ex.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd_ex.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_bus.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_bus.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_cortex.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_cortex.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_dma.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_dma.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_exti.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_exti.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_gpio.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_gpio.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_pwr.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_pwr.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_rcc.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_rcc.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_system.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_system.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_tim.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_tim.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_usb.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_usb.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_utils.h (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_utils.h)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/License.md (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/License.md)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.c (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.c)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sram.c (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sram.c)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_fsmc.c (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_fsmc.c)0
-rw-r--r--FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.c (renamed from STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.c)0
-rw-r--r--FamicomDumper/FamicomDumper.ioc (renamed from STM32/FamicomDumper.ioc)12
-rw-r--r--FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc/usbd_cdc.h (renamed from STM32/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc/usbd_cdc.h)0
-rw-r--r--FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c (renamed from STM32/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c)0
-rw-r--r--FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h (renamed from STM32/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h)0
-rw-r--r--FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h (renamed from STM32/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h)0
-rw-r--r--FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h (renamed from STM32/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h)0
-rw-r--r--FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h (renamed from STM32/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h)0
-rw-r--r--FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c (renamed from STM32/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c)0
-rw-r--r--FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c (renamed from STM32/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c)0
-rw-r--r--FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c (renamed from STM32/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c)0
-rw-r--r--FamicomDumper/STM32F103ZETX_FLASH.ld (renamed from STM32/STM32F103ZETX_FLASH.ld)4
-rw-r--r--FamicomDumper/STM32F103ZETX_FLASH_debug.ld (renamed from STM32/STM32F103ZETX_FLASH_debug.ld)4
-rw-r--r--FamicomDumper/USB_DEVICE/App/usb_device.c (renamed from STM32/USB_DEVICE/App/usb_device.c)0
-rw-r--r--FamicomDumper/USB_DEVICE/App/usb_device.h (renamed from STM32/USB_DEVICE/App/usb_device.h)0
-rw-r--r--FamicomDumper/USB_DEVICE/App/usbd_cdc_if.c (renamed from STM32/USB_DEVICE/App/usbd_cdc_if.c)0
-rw-r--r--FamicomDumper/USB_DEVICE/App/usbd_cdc_if.h (renamed from STM32/USB_DEVICE/App/usbd_cdc_if.h)4
-rw-r--r--FamicomDumper/USB_DEVICE/App/usbd_desc.c (renamed from STM32/USB_DEVICE/App/usbd_desc.c)4
-rw-r--r--FamicomDumper/USB_DEVICE/App/usbd_desc.h (renamed from STM32/USB_DEVICE/App/usbd_desc.h)0
-rw-r--r--FamicomDumper/USB_DEVICE/Target/usbd_conf.c (renamed from STM32/USB_DEVICE/Target/usbd_conf.c)0
-rw-r--r--FamicomDumper/USB_DEVICE/Target/usbd_conf.h (renamed from STM32/USB_DEVICE/Target/usbd_conf.h)0
-rw-r--r--FamicomDumperBootloader/.cproject (renamed from STM32_bootloader/.cproject)8
-rw-r--r--FamicomDumperBootloader/.project (renamed from STM32_bootloader/.project)0
-rw-r--r--FamicomDumperBootloader/Core/Inc/bootloader.h (renamed from STM32_bootloader/Core/Inc/bootloader.h)0
-rw-r--r--FamicomDumperBootloader/Core/Inc/cpldwriter.h (renamed from STM32_bootloader/Core/Inc/cpldwriter.h)0
-rw-r--r--FamicomDumperBootloader/Core/Inc/firmwriter.h (renamed from STM32_bootloader/Core/Inc/firmwriter.h)0
-rw-r--r--FamicomDumperBootloader/Core/Inc/led.h (renamed from STM32_bootloader/Core/Inc/led.h)0
-rw-r--r--FamicomDumperBootloader/Core/Inc/libxsvf.h (renamed from STM32_bootloader/Core/Inc/libxsvf.h)0
-rw-r--r--FamicomDumperBootloader/Core/Inc/main.h (renamed from STM32_bootloader/Core/Inc/main.h)1
-rw-r--r--FamicomDumperBootloader/Core/Inc/stm32f1xx_hal_conf.h (renamed from STM32_bootloader/Core/Inc/stm32f1xx_hal_conf.h)0
-rw-r--r--FamicomDumperBootloader/Core/Inc/stm32f1xx_it.h (renamed from STM32_bootloader/Core/Inc/stm32f1xx_it.h)138
-rw-r--r--FamicomDumperBootloader/Core/Src/cpldwriter.c (renamed from STM32_bootloader/Core/Src/cpldwriter.c)0
-rw-r--r--FamicomDumperBootloader/Core/Src/firmwriter.c (renamed from STM32_bootloader/Core/Src/firmwriter.c)0
-rw-r--r--FamicomDumperBootloader/Core/Src/led.c (renamed from STM32_bootloader/Core/Src/led.c)0
-rw-r--r--FamicomDumperBootloader/Core/Src/libxsvf/memname.c (renamed from STM32_bootloader/Core/Src/libxsvf/memname.c)0
-rw-r--r--FamicomDumperBootloader/Core/Src/libxsvf/play.c (renamed from STM32_bootloader/Core/Src/libxsvf/play.c)0
-rw-r--r--FamicomDumperBootloader/Core/Src/libxsvf/scan.c (renamed from STM32_bootloader/Core/Src/libxsvf/scan.c)0
-rw-r--r--FamicomDumperBootloader/Core/Src/libxsvf/statename.c (renamed from STM32_bootloader/Core/Src/libxsvf/statename.c)0
-rw-r--r--FamicomDumperBootloader/Core/Src/libxsvf/svf.c (renamed from STM32_bootloader/Core/Src/libxsvf/svf.c)0
-rw-r--r--FamicomDumperBootloader/Core/Src/libxsvf/tap.c (renamed from STM32_bootloader/Core/Src/libxsvf/tap.c)0
-rw-r--r--FamicomDumperBootloader/Core/Src/libxsvf/xsvf.c (renamed from STM32_bootloader/Core/Src/libxsvf/xsvf.c)0
-rw-r--r--FamicomDumperBootloader/Core/Src/main.c (renamed from STM32_bootloader/Core/Src/main.c)6
-rw-r--r--FamicomDumperBootloader/Core/Src/stm32f1xx_hal_msp.c (renamed from STM32_bootloader/Core/Src/stm32f1xx_hal_msp.c)1
-rw-r--r--FamicomDumperBootloader/Core/Src/stm32f1xx_it.c (renamed from STM32_bootloader/Core/Src/stm32f1xx_it.c)466
-rw-r--r--FamicomDumperBootloader/Core/Src/syscalls.c (renamed from STM32_bootloader/Core/Src/syscalls.c)0
-rw-r--r--FamicomDumperBootloader/Core/Src/sysmem.c (renamed from STM32_bootloader/Core/Src/sysmem.c)0
-rw-r--r--FamicomDumperBootloader/Core/Src/system_stm32f1xx.c (renamed from STM32_bootloader/Core/Src/system_stm32f1xx.c)0
-rw-r--r--FamicomDumperBootloader/Core/Startup/startup_stm32f103zetx.s (renamed from STM32_bootloader/Core/Startup/startup_stm32f103zetx.s)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h (renamed from STM32_bootloader/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h (renamed from STM32_bootloader/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h (renamed from STM32_bootloader/Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Device/ST/STM32F1xx/License.md (renamed from STM32_bootloader/Drivers/CMSIS/Device/ST/STM32F1xx/License.md)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Include/cmsis_armcc.h (renamed from STM32_bootloader/Drivers/CMSIS/Include/cmsis_armcc.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Include/cmsis_armclang.h (renamed from STM32_bootloader/Drivers/CMSIS/Include/cmsis_armclang.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Include/cmsis_compiler.h (renamed from STM32_bootloader/Drivers/CMSIS/Include/cmsis_compiler.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Include/cmsis_gcc.h (renamed from STM32_bootloader/Drivers/CMSIS/Include/cmsis_gcc.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Include/cmsis_iccarm.h (renamed from STM32_bootloader/Drivers/CMSIS/Include/cmsis_iccarm.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Include/cmsis_version.h (renamed from STM32_bootloader/Drivers/CMSIS/Include/cmsis_version.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Include/core_armv8mbl.h (renamed from STM32_bootloader/Drivers/CMSIS/Include/core_armv8mbl.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Include/core_armv8mml.h (renamed from STM32_bootloader/Drivers/CMSIS/Include/core_armv8mml.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm0.h (renamed from STM32_bootloader/Drivers/CMSIS/Include/core_cm0.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm0plus.h (renamed from STM32_bootloader/Drivers/CMSIS/Include/core_cm0plus.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm1.h (renamed from STM32_bootloader/Drivers/CMSIS/Include/core_cm1.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm23.h (renamed from STM32_bootloader/Drivers/CMSIS/Include/core_cm23.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm3.h (renamed from STM32_bootloader/Drivers/CMSIS/Include/core_cm3.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm33.h (renamed from STM32_bootloader/Drivers/CMSIS/Include/core_cm33.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm4.h (renamed from STM32_bootloader/Drivers/CMSIS/Include/core_cm4.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm7.h (renamed from STM32_bootloader/Drivers/CMSIS/Include/core_cm7.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Include/core_sc000.h (renamed from STM32_bootloader/Drivers/CMSIS/Include/core_sc000.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Include/core_sc300.h (renamed from STM32_bootloader/Drivers/CMSIS/Include/core_sc300.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Include/mpu_armv7.h (renamed from STM32_bootloader/Drivers/CMSIS/Include/mpu_armv7.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Include/mpu_armv8.h (renamed from STM32_bootloader/Drivers/CMSIS/Include/mpu_armv8.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/Include/tz_context.h (renamed from STM32_bootloader/Drivers/CMSIS/Include/tz_context.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/CMSIS/LICENSE.txt (renamed from STM32_bootloader/Drivers/CMSIS/LICENSE.txt)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd_ex.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd_ex.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_bus.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_bus.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_cortex.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_cortex.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_dma.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_dma.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_exti.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_exti.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_gpio.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_gpio.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_pwr.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_pwr.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_rcc.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_rcc.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_system.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_system.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_tim.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_tim.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_usb.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_usb.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_utils.h (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_utils.h)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/License.md (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/License.md)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.c (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.c)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c)0
-rw-r--r--FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.c (renamed from STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.c)0
-rw-r--r--FamicomDumperBootloader/FATFS/App/fatfs.c (renamed from STM32_bootloader/FATFS/App/fatfs.c)108
-rw-r--r--FamicomDumperBootloader/FATFS/App/fatfs.h (renamed from STM32_bootloader/FATFS/App/fatfs.h)94
-rw-r--r--FamicomDumperBootloader/FATFS/Target/ffconf.h (renamed from STM32_bootloader/FATFS/Target/ffconf.h)550
-rw-r--r--FamicomDumperBootloader/FATFS/Target/user_diskio.c (renamed from STM32_bootloader/FATFS/Target/user_diskio.c)420
-rw-r--r--FamicomDumperBootloader/FATFS/Target/user_diskio.h (renamed from STM32_bootloader/FATFS/Target/user_diskio.h)88
-rw-r--r--FamicomDumperBootloader/FamicomDumperBootloader.ioc (renamed from STM32_bootloader/FamicomDumperBootloader.ioc)14
-rw-r--r--FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc.h (renamed from STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc.h)0
-rw-r--r--FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_bot.h (renamed from STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_bot.h)0
-rw-r--r--FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_data.h (renamed from STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_data.h)0
-rw-r--r--FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_scsi.h (renamed from STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_scsi.h)0
-rw-r--r--FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc.c (renamed from STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc.c)0
-rw-r--r--FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_bot.c (renamed from STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_bot.c)0
-rw-r--r--FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_data.c (renamed from STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_data.c)0
-rw-r--r--FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_scsi.c (renamed from STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_scsi.c)0
-rw-r--r--FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h (renamed from STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h)0
-rw-r--r--FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h (renamed from STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h)0
-rw-r--r--FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h (renamed from STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h)0
-rw-r--r--FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h (renamed from STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h)0
-rw-r--r--FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c (renamed from STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c)0
-rw-r--r--FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c (renamed from STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c)0
-rw-r--r--FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c (renamed from STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c)0
-rw-r--r--FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/diskio.c (renamed from STM32_bootloader/Middlewares/Third_Party/FatFs/src/diskio.c)0
-rw-r--r--FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/diskio.h (renamed from STM32_bootloader/Middlewares/Third_Party/FatFs/src/diskio.h)0
-rw-r--r--FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/ff.c (renamed from STM32_bootloader/Middlewares/Third_Party/FatFs/src/ff.c)0
-rw-r--r--FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/ff.h (renamed from STM32_bootloader/Middlewares/Third_Party/FatFs/src/ff.h)0
-rw-r--r--FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/ff_gen_drv.c (renamed from STM32_bootloader/Middlewares/Third_Party/FatFs/src/ff_gen_drv.c)0
-rw-r--r--FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/ff_gen_drv.h (renamed from STM32_bootloader/Middlewares/Third_Party/FatFs/src/ff_gen_drv.h)0
-rw-r--r--FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/integer.h (renamed from STM32_bootloader/Middlewares/Third_Party/FatFs/src/integer.h)0
-rw-r--r--FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/option/syscall.c (renamed from STM32_bootloader/Middlewares/Third_Party/FatFs/src/option/syscall.c)0
-rw-r--r--FamicomDumperBootloader/STM32F103ZETX_FLASH.ld (renamed from STM32_bootloader/STM32F103ZETX_FLASH.ld)4
-rw-r--r--FamicomDumperBootloader/STM32F103ZETX_FLASH_debug.ld (renamed from STM32_bootloader/STM32F103ZETX_FLASH_debug.ld)4
-rw-r--r--FamicomDumperBootloader/USB_DEVICE/App/usb_device.c (renamed from STM32_bootloader/USB_DEVICE/App/usb_device.c)202
-rw-r--r--FamicomDumperBootloader/USB_DEVICE/App/usb_device.h (renamed from STM32_bootloader/USB_DEVICE/App/usb_device.h)206
-rw-r--r--FamicomDumperBootloader/USB_DEVICE/App/usbd_desc.c (renamed from STM32_bootloader/USB_DEVICE/App/usbd_desc.c)788
-rw-r--r--FamicomDumperBootloader/USB_DEVICE/App/usbd_desc.h (renamed from STM32_bootloader/USB_DEVICE/App/usbd_desc.h)288
-rw-r--r--FamicomDumperBootloader/USB_DEVICE/App/usbd_storage_if.c (renamed from STM32_bootloader/USB_DEVICE/App/usbd_storage_if.c)634
-rw-r--r--FamicomDumperBootloader/USB_DEVICE/App/usbd_storage_if.h (renamed from STM32_bootloader/USB_DEVICE/App/usbd_storage_if.h)256
-rw-r--r--FamicomDumperBootloader/USB_DEVICE/Target/usbd_conf.c (renamed from STM32_bootloader/USB_DEVICE/Target/usbd_conf.c)1324
-rw-r--r--FamicomDumperBootloader/USB_DEVICE/Target/usbd_conf.h (renamed from STM32_bootloader/USB_DEVICE/Target/usbd_conf.h)352
-rw-r--r--STM32_bootloader/USB_DEVICE/.project11
261 files changed, 3012 insertions, 2991 deletions
diff --git a/STM32/.cproject b/FamicomDumper/.cproject
index 752f4ea..b8c31d8 100644
--- a/STM32/.cproject
+++ b/FamicomDumper/.cproject
@@ -23,7 +23,8 @@
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.802816544" name="CPU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" useByScannerDiscovery="false" value="0" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.323299941" name="Core" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.1540624207" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="genericBoard" valueType="string"/>
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.348107410" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.5 || Debug || true || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.base.gnu-tools-for-stm32 || STM32F103ZETx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../USB_DEVICE/Target | ../Drivers/CMSIS/Device/ST/STM32F1xx/Include | ../Drivers/CMSIS/Include | ../Core/Inc | ../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc | ../USB_DEVICE/App | ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy | ../Drivers/STM32F1xx_HAL_Driver/Inc | ../Middlewares/ST/STM32_USB_Device_Library/Core/Inc || || || STM32F103xE | USE_HAL_DRIVER || || Drivers | Core/Startup | Middlewares | Core | USB_DEVICE || || || ${workspace_loc:/${ProjName}/STM32F103ZETX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || " valueType="string"/>
+ <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.348107410" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.6 || Debug || true || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.base.gnu-tools-for-stm32 || STM32F103ZETx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../USB_DEVICE/Target | ../Drivers/CMSIS/Device/ST/STM32F1xx/Include | ../Drivers/CMSIS/Include | ../Core/Inc | ../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc | ../USB_DEVICE/App | ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy | ../Drivers/STM32F1xx_HAL_Driver/Inc | ../Middlewares/ST/STM32_USB_Device_Library/Core/Inc || || || STM32F103xE | USE_HAL_DRIVER || || Drivers | Core/Startup | Middlewares | Core | USB_DEVICE || || || ${workspace_loc:/${ProjName}/STM32F103ZETX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || " valueType="string"/>
+ <option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.133307158" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" useByScannerDiscovery="false" value="72" valueType="string"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.1956864674" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
<builder buildPath="${workspace_loc:/STM32}/Debug" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.1575865607" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.633583979" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
@@ -108,8 +109,9 @@
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.1878493876" name="CPU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" useByScannerDiscovery="false" value="0" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.892728556" name="Core" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.1847660064" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="genericBoard" valueType="string"/>
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.1207545234" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.5 || Release || false || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.base.gnu-tools-for-stm32 || STM32F103ZETx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../USB_DEVICE/Target | ../Drivers/CMSIS/Device/ST/STM32F1xx/Include | ../Drivers/CMSIS/Include | ../Core/Inc | ../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc | ../USB_DEVICE/App | ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy | ../Drivers/STM32F1xx_HAL_Driver/Inc | ../Middlewares/ST/STM32_USB_Device_Library/Core/Inc || || || STM32F103xE | USE_HAL_DRIVER || || Drivers | Core/Startup | Middlewares | Core | USB_DEVICE || || || ${workspace_loc:/${ProjName}/STM32F103ZETX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || " valueType="string"/>
+ <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.1207545234" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.6 || Release || false || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.base.gnu-tools-for-stm32 || STM32F103ZETx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../USB_DEVICE/Target | ../Drivers/CMSIS/Device/ST/STM32F1xx/Include | ../Drivers/CMSIS/Include | ../Core/Inc | ../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc | ../USB_DEVICE/App | ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy | ../Drivers/STM32F1xx_HAL_Driver/Inc | ../Middlewares/ST/STM32_USB_Device_Library/Core/Inc || || || STM32F103xE | USE_HAL_DRIVER || || Drivers | Core/Startup | Middlewares | Core | USB_DEVICE || || || ${workspace_loc:/${ProjName}/STM32F103ZETX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || " valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.convertbinary.643704967" name="Convert to binary file (-O binary)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.convertbinary" useByScannerDiscovery="false" value="true" valueType="boolean"/>
+ <option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.503367339" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" value="72" valueType="string"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.743968727" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
<builder buildPath="${workspace_loc:/STM32}/Release" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.1569906200" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.1472380938" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
diff --git a/STM32/.project b/FamicomDumper/.project
index 157311c..157311c 100644
--- a/STM32/.project
+++ b/FamicomDumper/.project
diff --git a/STM32/Core/Inc/comm.h b/FamicomDumper/Core/Inc/comm.h
index e929655..e929655 100644
--- a/STM32/Core/Inc/comm.h
+++ b/FamicomDumper/Core/Inc/comm.h
diff --git a/STM32/Core/Inc/crc.h b/FamicomDumper/Core/Inc/crc.h
index c786e85..c786e85 100644
--- a/STM32/Core/Inc/crc.h
+++ b/FamicomDumper/Core/Inc/crc.h
diff --git a/STM32/Core/Inc/dumper.h b/FamicomDumper/Core/Inc/dumper.h
index 779e810..779e810 100644
--- a/STM32/Core/Inc/dumper.h
+++ b/FamicomDumper/Core/Inc/dumper.h
diff --git a/STM32/Core/Inc/fds.h b/FamicomDumper/Core/Inc/fds.h
index 43b61d7..43b61d7 100644
--- a/STM32/Core/Inc/fds.h
+++ b/FamicomDumper/Core/Inc/fds.h
diff --git a/STM32/Core/Inc/flash.h b/FamicomDumper/Core/Inc/flash.h
index fb58a51..fb58a51 100644
--- a/STM32/Core/Inc/flash.h
+++ b/FamicomDumper/Core/Inc/flash.h
diff --git a/STM32/Core/Inc/led.h b/FamicomDumper/Core/Inc/led.h
index 8231c17..8231c17 100644
--- a/STM32/Core/Inc/led.h
+++ b/FamicomDumper/Core/Inc/led.h
diff --git a/STM32/Core/Inc/main.h b/FamicomDumper/Core/Inc/main.h
index 9df5ab2..9c3507e 100644
--- a/STM32/Core/Inc/main.h
+++ b/FamicomDumper/Core/Inc/main.h
@@ -82,6 +82,7 @@ void Error_Handler(void);
#define IRQ_GPIO_Port GPIOB
#define SHIFTERS_OE_Pin GPIO_PIN_0
#define SHIFTERS_OE_GPIO_Port GPIOE
+
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
diff --git a/STM32/Core/Inc/stm32f1xx_hal_conf.h b/FamicomDumper/Core/Inc/stm32f1xx_hal_conf.h
index 53fab81..53fab81 100644
--- a/STM32/Core/Inc/stm32f1xx_hal_conf.h
+++ b/FamicomDumper/Core/Inc/stm32f1xx_hal_conf.h
diff --git a/STM32/Core/Inc/stm32f1xx_it.h b/FamicomDumper/Core/Inc/stm32f1xx_it.h
index 5dcdcda..5dcdcda 100644
--- a/STM32/Core/Inc/stm32f1xx_it.h
+++ b/FamicomDumper/Core/Inc/stm32f1xx_it.h
diff --git a/STM32/Core/Inc/unrom512.h b/FamicomDumper/Core/Inc/unrom512.h
index 7ebbe05..7ebbe05 100644
--- a/STM32/Core/Inc/unrom512.h
+++ b/FamicomDumper/Core/Inc/unrom512.h
diff --git a/STM32/Core/Src/comm.c b/FamicomDumper/Core/Src/comm.c
index aaf6698..aaf6698 100644
--- a/STM32/Core/Src/comm.c
+++ b/FamicomDumper/Core/Src/comm.c
diff --git a/STM32/Core/Src/crc.c b/FamicomDumper/Core/Src/crc.c
index 1588e41..1588e41 100644
--- a/STM32/Core/Src/crc.c
+++ b/FamicomDumper/Core/Src/crc.c
diff --git a/STM32/Core/Src/dumper.c b/FamicomDumper/Core/Src/dumper.c
index c4f0c4e..c4f0c4e 100644
--- a/STM32/Core/Src/dumper.c
+++ b/FamicomDumper/Core/Src/dumper.c
diff --git a/STM32/Core/Src/fds.c b/FamicomDumper/Core/Src/fds.c
index 07303f0..07303f0 100644
--- a/STM32/Core/Src/fds.c
+++ b/FamicomDumper/Core/Src/fds.c
diff --git a/STM32/Core/Src/flash.c b/FamicomDumper/Core/Src/flash.c
index 8c35eee..8c35eee 100644
--- a/STM32/Core/Src/flash.c
+++ b/FamicomDumper/Core/Src/flash.c
diff --git a/STM32/Core/Src/led.c b/FamicomDumper/Core/Src/led.c
index 719b5a0..719b5a0 100644
--- a/STM32/Core/Src/led.c
+++ b/FamicomDumper/Core/Src/led.c
diff --git a/STM32/Core/Src/main.c b/FamicomDumper/Core/Src/main.c
index 00df330..6d8cd5d 100644
--- a/STM32/Core/Src/main.c
+++ b/FamicomDumper/Core/Src/main.c
@@ -604,6 +604,8 @@ static void MX_DMA_Init(void)
static void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
+/* USER CODE BEGIN MX_GPIO_Init_1 */
+/* USER CODE END MX_GPIO_Init_1 */
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOF_CLK_ENABLE();
@@ -658,6 +660,8 @@ static void MX_GPIO_Init(void)
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(SHIFTERS_OE_GPIO_Port, &GPIO_InitStruct);
+/* USER CODE BEGIN MX_GPIO_Init_2 */
+/* USER CODE END MX_GPIO_Init_2 */
}
/* FSMC initialization function */
diff --git a/STM32/Core/Src/stm32f1xx_hal_msp.c b/FamicomDumper/Core/Src/stm32f1xx_hal_msp.c
index 4cda7c4..0d611df 100644
--- a/STM32/Core/Src/stm32f1xx_hal_msp.c
+++ b/FamicomDumper/Core/Src/stm32f1xx_hal_msp.c
@@ -21,6 +21,7 @@
/* Includes ------------------------------------------------------------------*/
#include "main.h"
+
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
diff --git a/STM32/Core/Src/stm32f1xx_it.c b/FamicomDumper/Core/Src/stm32f1xx_it.c
index 9897b86..9897b86 100644
--- a/STM32/Core/Src/stm32f1xx_it.c
+++ b/FamicomDumper/Core/Src/stm32f1xx_it.c
diff --git a/STM32/Core/Src/syscalls.c b/FamicomDumper/Core/Src/syscalls.c
index 4ec9584..4ec9584 100644
--- a/STM32/Core/Src/syscalls.c
+++ b/FamicomDumper/Core/Src/syscalls.c
diff --git a/STM32/Core/Src/sysmem.c b/FamicomDumper/Core/Src/sysmem.c
index 23180b6..23180b6 100644
--- a/STM32/Core/Src/sysmem.c
+++ b/FamicomDumper/Core/Src/sysmem.c
diff --git a/STM32/Core/Src/system_stm32f1xx.c b/FamicomDumper/Core/Src/system_stm32f1xx.c
index 052bec6..052bec6 100644
--- a/STM32/Core/Src/system_stm32f1xx.c
+++ b/FamicomDumper/Core/Src/system_stm32f1xx.c
diff --git a/STM32/Core/Src/unrom512.c b/FamicomDumper/Core/Src/unrom512.c
index 161ac0e..161ac0e 100644
--- a/STM32/Core/Src/unrom512.c
+++ b/FamicomDumper/Core/Src/unrom512.c
diff --git a/STM32/Core/Startup/startup_stm32f103zetx.s b/FamicomDumper/Core/Startup/startup_stm32f103zetx.s
index 72079e7..72079e7 100644
--- a/STM32/Core/Startup/startup_stm32f103zetx.s
+++ b/FamicomDumper/Core/Startup/startup_stm32f103zetx.s
diff --git a/STM32/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h b/FamicomDumper/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h
index cb5e86f..cb5e86f 100644
--- a/STM32/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h
+++ b/FamicomDumper/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h
diff --git a/STM32/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h b/FamicomDumper/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
index 61ff830..61ff830 100644
--- a/STM32/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
+++ b/FamicomDumper/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
diff --git a/STM32/Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h b/FamicomDumper/Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
index 8e33366..8e33366 100644
--- a/STM32/Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
+++ b/FamicomDumper/Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
diff --git a/STM32/Drivers/CMSIS/Device/ST/STM32F1xx/License.md b/FamicomDumper/Drivers/CMSIS/Device/ST/STM32F1xx/License.md
index ae1421a..ae1421a 100644
--- a/STM32/Drivers/CMSIS/Device/ST/STM32F1xx/License.md
+++ b/FamicomDumper/Drivers/CMSIS/Device/ST/STM32F1xx/License.md
diff --git a/STM32/Drivers/CMSIS/Include/cmsis_armcc.h b/FamicomDumper/Drivers/CMSIS/Include/cmsis_armcc.h
index 7d751fb..7d751fb 100644
--- a/STM32/Drivers/CMSIS/Include/cmsis_armcc.h
+++ b/FamicomDumper/Drivers/CMSIS/Include/cmsis_armcc.h
diff --git a/STM32/Drivers/CMSIS/Include/cmsis_armclang.h b/FamicomDumper/Drivers/CMSIS/Include/cmsis_armclang.h
index d8031b0..d8031b0 100644
--- a/STM32/Drivers/CMSIS/Include/cmsis_armclang.h
+++ b/FamicomDumper/Drivers/CMSIS/Include/cmsis_armclang.h
diff --git a/STM32/Drivers/CMSIS/Include/cmsis_compiler.h b/FamicomDumper/Drivers/CMSIS/Include/cmsis_compiler.h
index 79a2cac..79a2cac 100644
--- a/STM32/Drivers/CMSIS/Include/cmsis_compiler.h
+++ b/FamicomDumper/Drivers/CMSIS/Include/cmsis_compiler.h
diff --git a/STM32/Drivers/CMSIS/Include/cmsis_gcc.h b/FamicomDumper/Drivers/CMSIS/Include/cmsis_gcc.h
index 1bd41a4..1bd41a4 100644
--- a/STM32/Drivers/CMSIS/Include/cmsis_gcc.h
+++ b/FamicomDumper/Drivers/CMSIS/Include/cmsis_gcc.h
diff --git a/STM32/Drivers/CMSIS/Include/cmsis_iccarm.h b/FamicomDumper/Drivers/CMSIS/Include/cmsis_iccarm.h
index 3c90a2c..3c90a2c 100644
--- a/STM32/Drivers/CMSIS/Include/cmsis_iccarm.h
+++ b/FamicomDumper/Drivers/CMSIS/Include/cmsis_iccarm.h
diff --git a/STM32/Drivers/CMSIS/Include/cmsis_version.h b/FamicomDumper/Drivers/CMSIS/Include/cmsis_version.h
index ae3f2e3..ae3f2e3 100644
--- a/STM32/Drivers/CMSIS/Include/cmsis_version.h
+++ b/FamicomDumper/Drivers/CMSIS/Include/cmsis_version.h
diff --git a/STM32/Drivers/CMSIS/Include/core_armv8mbl.h b/FamicomDumper/Drivers/CMSIS/Include/core_armv8mbl.h
index ec76ab2..ec76ab2 100644
--- a/STM32/Drivers/CMSIS/Include/core_armv8mbl.h
+++ b/FamicomDumper/Drivers/CMSIS/Include/core_armv8mbl.h
diff --git a/STM32/Drivers/CMSIS/Include/core_armv8mml.h b/FamicomDumper/Drivers/CMSIS/Include/core_armv8mml.h
index 2d0f106..2d0f106 100644
--- a/STM32/Drivers/CMSIS/Include/core_armv8mml.h
+++ b/FamicomDumper/Drivers/CMSIS/Include/core_armv8mml.h
diff --git a/STM32/Drivers/CMSIS/Include/core_cm0.h b/FamicomDumper/Drivers/CMSIS/Include/core_cm0.h
index 6f82227..6f82227 100644
--- a/STM32/Drivers/CMSIS/Include/core_cm0.h
+++ b/FamicomDumper/Drivers/CMSIS/Include/core_cm0.h
diff --git a/STM32/Drivers/CMSIS/Include/core_cm0plus.h b/FamicomDumper/Drivers/CMSIS/Include/core_cm0plus.h
index b9377e8..b9377e8 100644
--- a/STM32/Drivers/CMSIS/Include/core_cm0plus.h
+++ b/FamicomDumper/Drivers/CMSIS/Include/core_cm0plus.h
diff --git a/STM32/Drivers/CMSIS/Include/core_cm1.h b/FamicomDumper/Drivers/CMSIS/Include/core_cm1.h
index fd1c407..fd1c407 100644
--- a/STM32/Drivers/CMSIS/Include/core_cm1.h
+++ b/FamicomDumper/Drivers/CMSIS/Include/core_cm1.h
diff --git a/STM32/Drivers/CMSIS/Include/core_cm23.h b/FamicomDumper/Drivers/CMSIS/Include/core_cm23.h
index 8202a8d..8202a8d 100644
--- a/STM32/Drivers/CMSIS/Include/core_cm23.h
+++ b/FamicomDumper/Drivers/CMSIS/Include/core_cm23.h
diff --git a/STM32/Drivers/CMSIS/Include/core_cm3.h b/FamicomDumper/Drivers/CMSIS/Include/core_cm3.h
index b0dfbd3..b0dfbd3 100644
--- a/STM32/Drivers/CMSIS/Include/core_cm3.h
+++ b/FamicomDumper/Drivers/CMSIS/Include/core_cm3.h
diff --git a/STM32/Drivers/CMSIS/Include/core_cm33.h b/FamicomDumper/Drivers/CMSIS/Include/core_cm33.h
index 02f82e2..02f82e2 100644
--- a/STM32/Drivers/CMSIS/Include/core_cm33.h
+++ b/FamicomDumper/Drivers/CMSIS/Include/core_cm33.h
diff --git a/STM32/Drivers/CMSIS/Include/core_cm4.h b/FamicomDumper/Drivers/CMSIS/Include/core_cm4.h
index 308b868..308b868 100644
--- a/STM32/Drivers/CMSIS/Include/core_cm4.h
+++ b/FamicomDumper/Drivers/CMSIS/Include/core_cm4.h
diff --git a/STM32/Drivers/CMSIS/Include/core_cm7.h b/FamicomDumper/Drivers/CMSIS/Include/core_cm7.h
index ada6c2a..ada6c2a 100644
--- a/STM32/Drivers/CMSIS/Include/core_cm7.h
+++ b/FamicomDumper/Drivers/CMSIS/Include/core_cm7.h
diff --git a/STM32/Drivers/CMSIS/Include/core_sc000.h b/FamicomDumper/Drivers/CMSIS/Include/core_sc000.h
index 9086c64..9086c64 100644
--- a/STM32/Drivers/CMSIS/Include/core_sc000.h
+++ b/FamicomDumper/Drivers/CMSIS/Include/core_sc000.h
diff --git a/STM32/Drivers/CMSIS/Include/core_sc300.h b/FamicomDumper/Drivers/CMSIS/Include/core_sc300.h
index 665822d..665822d 100644
--- a/STM32/Drivers/CMSIS/Include/core_sc300.h
+++ b/FamicomDumper/Drivers/CMSIS/Include/core_sc300.h
diff --git a/STM32/Drivers/CMSIS/Include/mpu_armv7.h b/FamicomDumper/Drivers/CMSIS/Include/mpu_armv7.h
index 7d4b600..7d4b600 100644
--- a/STM32/Drivers/CMSIS/Include/mpu_armv7.h
+++ b/FamicomDumper/Drivers/CMSIS/Include/mpu_armv7.h
diff --git a/STM32/Drivers/CMSIS/Include/mpu_armv8.h b/FamicomDumper/Drivers/CMSIS/Include/mpu_armv8.h
index 99ee9f9..99ee9f9 100644
--- a/STM32/Drivers/CMSIS/Include/mpu_armv8.h
+++ b/FamicomDumper/Drivers/CMSIS/Include/mpu_armv8.h
diff --git a/STM32/Drivers/CMSIS/Include/tz_context.h b/FamicomDumper/Drivers/CMSIS/Include/tz_context.h
index d4c1474..d4c1474 100644
--- a/STM32/Drivers/CMSIS/Include/tz_context.h
+++ b/FamicomDumper/Drivers/CMSIS/Include/tz_context.h
diff --git a/STM32/Drivers/CMSIS/LICENSE.txt b/FamicomDumper/Drivers/CMSIS/LICENSE.txt
index c0ee812..c0ee812 100644
--- a/STM32/Drivers/CMSIS/LICENSE.txt
+++ b/FamicomDumper/Drivers/CMSIS/LICENSE.txt
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
index 412525a..412525a 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
index 6228edb..6228edb 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h
index ce96197..ce96197 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h
index 6ff1109..6ff1109 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h
index 7b2304d..7b2304d 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h
index d861f50..d861f50 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h
index e42e8c0..e42e8c0 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h
index 8cd21b1..8cd21b1 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h
index 1dcaeed..1dcaeed 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
index 2973944..2973944 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h
index 56bcb85..56bcb85 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd.h
index 5798449..5798449 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd_ex.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd_ex.h
index ed14bc2..ed14bc2 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd_ex.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd_ex.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h
index 2b1b4ed..2b1b4ed 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h
index f0097cb..f0097cb 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
index d0d0830..d0d0830 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h
index 3b0d4ee..3b0d4ee 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h
index 999f62e..999f62e 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
index 6f1b5e5..6f1b5e5 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_bus.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_bus.h
index e17f1af..e17f1af 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_bus.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_bus.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_cortex.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_cortex.h
index 7baf2ac..7baf2ac 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_cortex.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_cortex.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_dma.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_dma.h
index 9ebff4e..9ebff4e 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_dma.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_dma.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_exti.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_exti.h
index 612e005..612e005 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_exti.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_exti.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h
index 3197b80..3197b80 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_gpio.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_gpio.h
index 8cc7832..8cc7832 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_gpio.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_gpio.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_pwr.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_pwr.h
index cd75914..cd75914 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_pwr.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_pwr.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_rcc.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_rcc.h
index 3ca73fe..3ca73fe 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_rcc.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_rcc.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_system.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_system.h
index b22f8df..b22f8df 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_system.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_system.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_tim.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_tim.h
index 1f8fe35..1f8fe35 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_tim.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_tim.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_usb.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_usb.h
index 3d75775..3d75775 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_usb.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_usb.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_utils.h b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_utils.h
index edb17d7..edb17d7 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_utils.h
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_utils.h
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/License.md b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/License.md
index 74a956d..74a956d 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/License.md
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/License.md
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c
index f4824ab..f4824ab 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c
index a89150a..a89150a 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c
index c9bc061..c9bc061 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c
index 60030e8..60030e8 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c
index 50abf92..50abf92 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c
index ebd6f8b..ebd6f8b 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c
index cd3563a..cd3563a 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c
index c2d810c..c2d810c 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c
index d019fad..d019fad 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.c b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.c
index 234b52c..234b52c 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.c
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.c
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c
index c757976..c757976 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c
index 95b5568..95b5568 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c
index e6e1b4d..e6e1b4d 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sram.c b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sram.c
index 8f22029..8f22029 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sram.c
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sram.c
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c
index b32c0bd..b32c0bd 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c
index f15cbbb..f15cbbb 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_fsmc.c b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_fsmc.c
index dc1cf50..dc1cf50 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_fsmc.c
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_fsmc.c
diff --git a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.c b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.c
index 1de2d5c..1de2d5c 100644
--- a/STM32/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.c
+++ b/FamicomDumper/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.c
diff --git a/STM32/FamicomDumper.ioc b/FamicomDumper/FamicomDumper.ioc
index 0c5c910..ccf6be9 100644
--- a/STM32/FamicomDumper.ioc
+++ b/FamicomDumper/FamicomDumper.ioc
@@ -1,4 +1,7 @@
#MicroXplorer Configuration settings - do not modify
+CAD.formats=
+CAD.pinconfig=
+CAD.provider=
Dma.Request0=TIM5_CH3/UP
Dma.RequestsNb=1
Dma.TIM5_CH3/UP.0.Direction=DMA_MEMORY_TO_PERIPH
@@ -103,8 +106,8 @@ Mcu.PinsNb=57
Mcu.ThirdPartyNb=0
Mcu.UserConstants=
Mcu.UserName=STM32F103ZETx
-MxCube.Version=6.6.1
-MxDb.Version=DB.6.0.60
+MxCube.Version=6.10.0
+MxDb.Version=DB.6.0.100
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.DMA2_Channel2_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
@@ -215,7 +218,7 @@ ProjectManager.FreePins=false
ProjectManager.HalAssertFull=false
ProjectManager.HeapSize=0x200
ProjectManager.KeepUserCode=true
-ProjectManager.LastFirmware=true
+ProjectManager.LastFirmware=false
ProjectManager.LibraryCopy=1
ProjectManager.MainLocation=Core/Src
ProjectManager.NoMain=false
@@ -223,10 +226,13 @@ ProjectManager.PreviousToolchain=STM32CubeIDE
ProjectManager.ProjectBuild=false
ProjectManager.ProjectFileName=FamicomDumper.ioc
ProjectManager.ProjectName=FamicomDumper
+ProjectManager.ProjectStructure=
ProjectManager.RegisterCallBack=
ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=STM32CubeIDE
ProjectManager.ToolChainLocation=
+ProjectManager.UAScriptAfterPath=
+ProjectManager.UAScriptBeforePath=
ProjectManager.UnderRoot=true
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-MX_DMA_Init-DMA-false-HAL-true,3-SystemClock_Config-RCC-false-HAL-false,4-MX_FSMC_Init-FSMC-false-HAL-true,5-MX_USB_DEVICE_Init-USB_DEVICE-false-HAL-false,6-MX_TIM2_Init-TIM2-false-HAL-true,7-MX_TIM5_Init-TIM5-false-HAL-true,8-MX_TIM1_Init-TIM1-false-HAL-true,9-MX_TIM3_Init-TIM3-false-HAL-true,10-MX_TIM4_Init-TIM4-false-HAL-true
RCC.ADCFreqValue=36000000
diff --git a/STM32/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc/usbd_cdc.h b/FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc/usbd_cdc.h
index 6702b54..6702b54 100644
--- a/STM32/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc/usbd_cdc.h
+++ b/FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc/usbd_cdc.h
diff --git a/STM32/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c b/FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c
index b27fb55..b27fb55 100644
--- a/STM32/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c
+++ b/FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c
diff --git a/STM32/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h b/FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h
index 030927b..030927b 100644
--- a/STM32/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h
+++ b/FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h
diff --git a/STM32/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h b/FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h
index 25a4758..25a4758 100644
--- a/STM32/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h
+++ b/FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h
diff --git a/STM32/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h b/FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h
index 8d7502f..8d7502f 100644
--- a/STM32/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h
+++ b/FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h
diff --git a/STM32/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h b/FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h
index 8a6dd5f..8a6dd5f 100644
--- a/STM32/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h
+++ b/FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h
diff --git a/STM32/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c b/FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c
index b1a60ae..b1a60ae 100644
--- a/STM32/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c
+++ b/FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c
diff --git a/STM32/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c b/FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c
index e57c1bc..e57c1bc 100644
--- a/STM32/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c
+++ b/FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c
diff --git a/STM32/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c b/FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c
index 3351972..3351972 100644
--- a/STM32/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c
+++ b/FamicomDumper/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c
diff --git a/STM32/STM32F103ZETX_FLASH.ld b/FamicomDumper/STM32F103ZETX_FLASH.ld
index ba58a03..61b5fc8 100644
--- a/STM32/STM32F103ZETX_FLASH.ld
+++ b/FamicomDumper/STM32F103ZETX_FLASH.ld
@@ -30,8 +30,8 @@ ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
-_Min_Heap_Size = 0x200 ; /* required amount of heap */
-_Min_Stack_Size = 0x400 ; /* required amount of stack */
+_Min_Heap_Size = 0x200; /* required amount of heap */
+_Min_Stack_Size = 0x400; /* required amount of stack */
/* Memories definition */
MEMORY
diff --git a/STM32/STM32F103ZETX_FLASH_debug.ld b/FamicomDumper/STM32F103ZETX_FLASH_debug.ld
index 0baefba..9c37da4 100644
--- a/STM32/STM32F103ZETX_FLASH_debug.ld
+++ b/FamicomDumper/STM32F103ZETX_FLASH_debug.ld
@@ -30,8 +30,8 @@ ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
-_Min_Heap_Size = 0x200 ; /* required amount of heap */
-_Min_Stack_Size = 0x400 ; /* required amount of stack */
+_Min_Heap_Size = 0x200; /* required amount of heap */
+_Min_Stack_Size = 0x400; /* required amount of stack */
/* Memories definition */
MEMORY
diff --git a/STM32/USB_DEVICE/App/usb_device.c b/FamicomDumper/USB_DEVICE/App/usb_device.c
index 9019f80..9019f80 100644
--- a/STM32/USB_DEVICE/App/usb_device.c
+++ b/FamicomDumper/USB_DEVICE/App/usb_device.c
diff --git a/STM32/USB_DEVICE/App/usb_device.h b/FamicomDumper/USB_DEVICE/App/usb_device.h
index 23db570..23db570 100644
--- a/STM32/USB_DEVICE/App/usb_device.h
+++ b/FamicomDumper/USB_DEVICE/App/usb_device.h
diff --git a/STM32/USB_DEVICE/App/usbd_cdc_if.c b/FamicomDumper/USB_DEVICE/App/usbd_cdc_if.c
index 0da9612..0da9612 100644
--- a/STM32/USB_DEVICE/App/usbd_cdc_if.c
+++ b/FamicomDumper/USB_DEVICE/App/usbd_cdc_if.c
diff --git a/STM32/USB_DEVICE/App/usbd_cdc_if.h b/FamicomDumper/USB_DEVICE/App/usbd_cdc_if.h
index d579cf2..cbafd8e 100644
--- a/STM32/USB_DEVICE/App/usbd_cdc_if.h
+++ b/FamicomDumper/USB_DEVICE/App/usbd_cdc_if.h
@@ -49,8 +49,8 @@
* @{
*/
/* Define size for the receive and transmit buffer over CDC */
-#define APP_RX_DATA_SIZE 1000
-#define APP_TX_DATA_SIZE 1000
+#define APP_RX_DATA_SIZE 1024
+#define APP_TX_DATA_SIZE 1024
/* USER CODE BEGIN EXPORTED_DEFINES */
/* Define size for the receive and transmit buffer over CDC */
/* It's up to user to redefine and/or remove those define */
diff --git a/STM32/USB_DEVICE/App/usbd_desc.c b/FamicomDumper/USB_DEVICE/App/usbd_desc.c
index e6cfcbb..68be242 100644
--- a/STM32/USB_DEVICE/App/usbd_desc.c
+++ b/FamicomDumper/USB_DEVICE/App/usbd_desc.c
@@ -337,7 +337,9 @@ uint8_t * USBD_FS_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *leng
*/
static void Get_SerialNum(void)
{
- uint32_t deviceserial0, deviceserial1, deviceserial2;
+ uint32_t deviceserial0;
+ uint32_t deviceserial1;
+ uint32_t deviceserial2;
deviceserial0 = *(uint32_t *) DEVICE_ID1;
deviceserial1 = *(uint32_t *) DEVICE_ID2;
diff --git a/STM32/USB_DEVICE/App/usbd_desc.h b/FamicomDumper/USB_DEVICE/App/usbd_desc.h
index 5b09f2f..5b09f2f 100644
--- a/STM32/USB_DEVICE/App/usbd_desc.h
+++ b/FamicomDumper/USB_DEVICE/App/usbd_desc.h
diff --git a/STM32/USB_DEVICE/Target/usbd_conf.c b/FamicomDumper/USB_DEVICE/Target/usbd_conf.c
index 4491a49..4491a49 100644
--- a/STM32/USB_DEVICE/Target/usbd_conf.c
+++ b/FamicomDumper/USB_DEVICE/Target/usbd_conf.c
diff --git a/STM32/USB_DEVICE/Target/usbd_conf.h b/FamicomDumper/USB_DEVICE/Target/usbd_conf.h
index 9a00be2..9a00be2 100644
--- a/STM32/USB_DEVICE/Target/usbd_conf.h
+++ b/FamicomDumper/USB_DEVICE/Target/usbd_conf.h
diff --git a/STM32_bootloader/.cproject b/FamicomDumperBootloader/.cproject
index 8d962dd..6d224ea 100644
--- a/STM32_bootloader/.cproject
+++ b/FamicomDumperBootloader/.cproject
@@ -21,7 +21,8 @@
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.59509730" name="CPU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" useByScannerDiscovery="false" value="0" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.678759149" name="Core" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.357467857" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="genericBoard" valueType="string"/>
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.1742201968" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.5 || Debug || true || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32F103ZETx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../FATFS/App | ../USB_DEVICE/Target | ../Drivers/CMSIS/Device/ST/STM32F1xx/Include | ../Drivers/CMSIS/Include | ../Core/Inc | ../USB_DEVICE/App | ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy | ../Drivers/STM32F1xx_HAL_Driver/Inc | ../Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc | ../FATFS/Target | ../Middlewares/ST/STM32_USB_Device_Library/Core/Inc | ../Middlewares/Third_Party/FatFs/src || || || STM32F103xE | USE_HAL_DRIVER || || Drivers | Core/Startup | Middlewares | Core | FATFS | USB_DEVICE || || || ${workspace_loc:/${ProjName}/STM32F103ZETX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || " valueType="string"/>
+ <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.1742201968" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.6 || Debug || true || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32F103ZETx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../FATFS/App | ../USB_DEVICE/Target | ../Drivers/CMSIS/Device/ST/STM32F1xx/Include | ../Drivers/CMSIS/Include | ../Core/Inc | ../USB_DEVICE/App | ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy | ../Drivers/STM32F1xx_HAL_Driver/Inc | ../Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc | ../FATFS/Target | ../Middlewares/ST/STM32_USB_Device_Library/Core/Inc | ../Middlewares/Third_Party/FatFs/src || || || STM32F103xE | USE_HAL_DRIVER || || Drivers | Core/Startup | Middlewares | Core | FATFS | USB_DEVICE || || || ${workspace_loc:/${ProjName}/STM32F103ZETX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || " valueType="string"/>
+ <option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.879875289" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" value="72" valueType="string"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.560015905" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
<builder buildPath="${workspace_loc:/FamicomDumperBootloader}/Debug" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.675700974" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.1014904741" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
@@ -108,8 +109,9 @@
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.1272101663" name="CPU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" useByScannerDiscovery="false" value="0" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.1611901550" name="Core" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.216387807" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="genericBoard" valueType="string"/>
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.1500792999" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.5 || Release || false || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32F103ZETx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../FATFS/App | ../USB_DEVICE/Target | ../Drivers/CMSIS/Device/ST/STM32F1xx/Include | ../Drivers/CMSIS/Include | ../Core/Inc | ../USB_DEVICE/App | ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy | ../Drivers/STM32F1xx_HAL_Driver/Inc | ../Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc | ../FATFS/Target | ../Middlewares/ST/STM32_USB_Device_Library/Core/Inc | ../Middlewares/Third_Party/FatFs/src || || || STM32F103xE | USE_HAL_DRIVER || || Drivers | Core/Startup | Middlewares | Core | FATFS | USB_DEVICE || || || ${workspace_loc:/${ProjName}/STM32F103ZETX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || " valueType="string"/>
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.convertbinary.1840373438" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.convertbinary" value="true" valueType="boolean"/>
+ <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.1500792999" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.6 || Release || false || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32F103ZETx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../FATFS/App | ../USB_DEVICE/Target | ../Drivers/CMSIS/Device/ST/STM32F1xx/Include | ../Drivers/CMSIS/Include | ../Core/Inc | ../USB_DEVICE/App | ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy | ../Drivers/STM32F1xx_HAL_Driver/Inc | ../Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc | ../FATFS/Target | ../Middlewares/ST/STM32_USB_Device_Library/Core/Inc | ../Middlewares/Third_Party/FatFs/src || || || STM32F103xE | USE_HAL_DRIVER || || Drivers | Core/Startup | Middlewares | Core | FATFS | USB_DEVICE || || || ${workspace_loc:/${ProjName}/STM32F103ZETX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || " valueType="string"/>
+ <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.convertbinary.1840373438" name="Convert to binary file (-O binary)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.convertbinary" useByScannerDiscovery="false" value="true" valueType="boolean"/>
+ <option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.332644386" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" useByScannerDiscovery="false" value="72" valueType="string"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.668397026" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
<builder buildPath="${workspace_loc:/FamicomDumperBootloader}/Release" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.1511456956" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.1694103336" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
diff --git a/STM32_bootloader/.project b/FamicomDumperBootloader/.project
index 89552a4..89552a4 100644
--- a/STM32_bootloader/.project
+++ b/FamicomDumperBootloader/.project
diff --git a/STM32_bootloader/Core/Inc/bootloader.h b/FamicomDumperBootloader/Core/Inc/bootloader.h
index 7206cc3..7206cc3 100644
--- a/STM32_bootloader/Core/Inc/bootloader.h
+++ b/FamicomDumperBootloader/Core/Inc/bootloader.h
diff --git a/STM32_bootloader/Core/Inc/cpldwriter.h b/FamicomDumperBootloader/Core/Inc/cpldwriter.h
index 439946a..439946a 100644
--- a/STM32_bootloader/Core/Inc/cpldwriter.h
+++ b/FamicomDumperBootloader/Core/Inc/cpldwriter.h
diff --git a/STM32_bootloader/Core/Inc/firmwriter.h b/FamicomDumperBootloader/Core/Inc/firmwriter.h
index 6b59bb7..6b59bb7 100644
--- a/STM32_bootloader/Core/Inc/firmwriter.h
+++ b/FamicomDumperBootloader/Core/Inc/firmwriter.h
diff --git a/STM32_bootloader/Core/Inc/led.h b/FamicomDumperBootloader/Core/Inc/led.h
index 7c109e8..7c109e8 100644
--- a/STM32_bootloader/Core/Inc/led.h
+++ b/FamicomDumperBootloader/Core/Inc/led.h
diff --git a/STM32_bootloader/Core/Inc/libxsvf.h b/FamicomDumperBootloader/Core/Inc/libxsvf.h
index 88d1b66..88d1b66 100644
--- a/STM32_bootloader/Core/Inc/libxsvf.h
+++ b/FamicomDumperBootloader/Core/Inc/libxsvf.h
diff --git a/STM32_bootloader/Core/Inc/main.h b/FamicomDumperBootloader/Core/Inc/main.h
index 7a518a0..cc8dfc1 100644
--- a/STM32_bootloader/Core/Inc/main.h
+++ b/FamicomDumperBootloader/Core/Inc/main.h
@@ -83,6 +83,7 @@ void error(void);
#define IRQ_GPIO_Port GPIOB
#define SHIFTERS_OE_Pin GPIO_PIN_0
#define SHIFTERS_OE_GPIO_Port GPIOE
+
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
diff --git a/STM32_bootloader/Core/Inc/stm32f1xx_hal_conf.h b/FamicomDumperBootloader/Core/Inc/stm32f1xx_hal_conf.h
index a429a4f..a429a4f 100644
--- a/STM32_bootloader/Core/Inc/stm32f1xx_hal_conf.h
+++ b/FamicomDumperBootloader/Core/Inc/stm32f1xx_hal_conf.h
diff --git a/STM32_bootloader/Core/Inc/stm32f1xx_it.h b/FamicomDumperBootloader/Core/Inc/stm32f1xx_it.h
index 43c7dc6..820233a 100644
--- a/STM32_bootloader/Core/Inc/stm32f1xx_it.h
+++ b/FamicomDumperBootloader/Core/Inc/stm32f1xx_it.h
@@ -1,69 +1,69 @@
-/* USER CODE BEGIN Header */
-/**
- ******************************************************************************
- * @file stm32f1xx_it.h
- * @brief This file contains the headers of the interrupt handlers.
- ******************************************************************************
- * @attention
- *
- * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
- * All rights reserved.</center></h2>
- *
- * This software component is licensed by ST under BSD 3-Clause license,
- * the "License"; You may not use this file except in compliance with the
- * License. You may obtain a copy of the License at:
- * opensource.org/licenses/BSD-3-Clause
- *
- ******************************************************************************
- */
-/* USER CODE END Header */
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __STM32F1xx_IT_H
-#define __STM32F1xx_IT_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Private includes ----------------------------------------------------------*/
-/* USER CODE BEGIN Includes */
-
-/* USER CODE END Includes */
-
-/* Exported types ------------------------------------------------------------*/
-/* USER CODE BEGIN ET */
-
-/* USER CODE END ET */
-
-/* Exported constants --------------------------------------------------------*/
-/* USER CODE BEGIN EC */
-
-/* USER CODE END EC */
-
-/* Exported macro ------------------------------------------------------------*/
-/* USER CODE BEGIN EM */
-
-/* USER CODE END EM */
-
-/* Exported functions prototypes ---------------------------------------------*/
-void NMI_Handler(void);
-void HardFault_Handler(void);
-void MemManage_Handler(void);
-void BusFault_Handler(void);
-void UsageFault_Handler(void);
-void SVC_Handler(void);
-void DebugMon_Handler(void);
-void PendSV_Handler(void);
-void SysTick_Handler(void);
-void USB_LP_CAN1_RX0_IRQHandler(void);
-void DMA2_Channel2_IRQHandler(void);
-/* USER CODE BEGIN EFP */
-
-/* USER CODE END EFP */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32F1xx_IT_H */
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file stm32f1xx_it.h
+ * @brief This file contains the headers of the interrupt handlers.
+ ******************************************************************************
+ * @attention
+ *
+ * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
+ * All rights reserved.</center></h2>
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __STM32F1xx_IT_H
+#define __STM32F1xx_IT_H
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* Private includes ----------------------------------------------------------*/
+/* USER CODE BEGIN Includes */
+
+/* USER CODE END Includes */
+
+/* Exported types ------------------------------------------------------------*/
+/* USER CODE BEGIN ET */
+
+/* USER CODE END ET */
+
+/* Exported constants --------------------------------------------------------*/
+/* USER CODE BEGIN EC */
+
+/* USER CODE END EC */
+
+/* Exported macro ------------------------------------------------------------*/
+/* USER CODE BEGIN EM */
+
+/* USER CODE END EM */
+
+/* Exported functions prototypes ---------------------------------------------*/
+void NMI_Handler(void);
+void HardFault_Handler(void);
+void MemManage_Handler(void);
+void BusFault_Handler(void);
+void UsageFault_Handler(void);
+void SVC_Handler(void);
+void DebugMon_Handler(void);
+void PendSV_Handler(void);
+void SysTick_Handler(void);
+void USB_LP_CAN1_RX0_IRQHandler(void);
+void DMA2_Channel2_IRQHandler(void);
+/* USER CODE BEGIN EFP */
+
+/* USER CODE END EFP */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __STM32F1xx_IT_H */
diff --git a/STM32_bootloader/Core/Src/cpldwriter.c b/FamicomDumperBootloader/Core/Src/cpldwriter.c
index 3613931..3613931 100644
--- a/STM32_bootloader/Core/Src/cpldwriter.c
+++ b/FamicomDumperBootloader/Core/Src/cpldwriter.c
diff --git a/STM32_bootloader/Core/Src/firmwriter.c b/FamicomDumperBootloader/Core/Src/firmwriter.c
index 48f30fc..48f30fc 100644
--- a/STM32_bootloader/Core/Src/firmwriter.c
+++ b/FamicomDumperBootloader/Core/Src/firmwriter.c
diff --git a/STM32_bootloader/Core/Src/led.c b/FamicomDumperBootloader/Core/Src/led.c
index a753cd5..a753cd5 100644
--- a/STM32_bootloader/Core/Src/led.c
+++ b/FamicomDumperBootloader/Core/Src/led.c
diff --git a/STM32_bootloader/Core/Src/libxsvf/memname.c b/FamicomDumperBootloader/Core/Src/libxsvf/memname.c
index 0cc3f31..0cc3f31 100644
--- a/STM32_bootloader/Core/Src/libxsvf/memname.c
+++ b/FamicomDumperBootloader/Core/Src/libxsvf/memname.c
diff --git a/STM32_bootloader/Core/Src/libxsvf/play.c b/FamicomDumperBootloader/Core/Src/libxsvf/play.c
index e57c01e..e57c01e 100644
--- a/STM32_bootloader/Core/Src/libxsvf/play.c
+++ b/FamicomDumperBootloader/Core/Src/libxsvf/play.c
diff --git a/STM32_bootloader/Core/Src/libxsvf/scan.c b/FamicomDumperBootloader/Core/Src/libxsvf/scan.c
index cb24e56..cb24e56 100644
--- a/STM32_bootloader/Core/Src/libxsvf/scan.c
+++ b/FamicomDumperBootloader/Core/Src/libxsvf/scan.c
diff --git a/STM32_bootloader/Core/Src/libxsvf/statename.c b/FamicomDumperBootloader/Core/Src/libxsvf/statename.c
index 128fb7f..128fb7f 100644
--- a/STM32_bootloader/Core/Src/libxsvf/statename.c
+++ b/FamicomDumperBootloader/Core/Src/libxsvf/statename.c
diff --git a/STM32_bootloader/Core/Src/libxsvf/svf.c b/FamicomDumperBootloader/Core/Src/libxsvf/svf.c
index 4e2f4b0..4e2f4b0 100644
--- a/STM32_bootloader/Core/Src/libxsvf/svf.c
+++ b/FamicomDumperBootloader/Core/Src/libxsvf/svf.c
diff --git a/STM32_bootloader/Core/Src/libxsvf/tap.c b/FamicomDumperBootloader/Core/Src/libxsvf/tap.c
index c258fde..c258fde 100644
--- a/STM32_bootloader/Core/Src/libxsvf/tap.c
+++ b/FamicomDumperBootloader/Core/Src/libxsvf/tap.c
diff --git a/STM32_bootloader/Core/Src/libxsvf/xsvf.c b/FamicomDumperBootloader/Core/Src/libxsvf/xsvf.c
index e6823f6..e6823f6 100644
--- a/STM32_bootloader/Core/Src/libxsvf/xsvf.c
+++ b/FamicomDumperBootloader/Core/Src/libxsvf/xsvf.c
diff --git a/STM32_bootloader/Core/Src/main.c b/FamicomDumperBootloader/Core/Src/main.c
index 02c3432..adac80e 100644
--- a/STM32_bootloader/Core/Src/main.c
+++ b/FamicomDumperBootloader/Core/Src/main.c
@@ -153,8 +153,8 @@ int main(void)
/* Initialize all configured peripherals */
MX_GPIO_Init();
- MX_USB_DEVICE_Init();
MX_DMA_Init();
+ MX_USB_DEVICE_Init();
MX_TIM5_Init();
MX_FATFS_Init();
MX_TIM2_Init();
@@ -444,6 +444,8 @@ static void MX_DMA_Init(void)
static void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
+/* USER CODE BEGIN MX_GPIO_Init_1 */
+/* USER CODE END MX_GPIO_Init_1 */
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOC_CLK_ENABLE();
@@ -501,6 +503,8 @@ static void MX_GPIO_Init(void)
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(SHIFTERS_OE_GPIO_Port, &GPIO_InitStruct);
+/* USER CODE BEGIN MX_GPIO_Init_2 */
+/* USER CODE END MX_GPIO_Init_2 */
}
/* USER CODE BEGIN 4 */
diff --git a/STM32_bootloader/Core/Src/stm32f1xx_hal_msp.c b/FamicomDumperBootloader/Core/Src/stm32f1xx_hal_msp.c
index 8c775a7..d32a39d 100644
--- a/STM32_bootloader/Core/Src/stm32f1xx_hal_msp.c
+++ b/FamicomDumperBootloader/Core/Src/stm32f1xx_hal_msp.c
@@ -21,6 +21,7 @@
/* Includes ------------------------------------------------------------------*/
#include "main.h"
+
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
diff --git a/STM32_bootloader/Core/Src/stm32f1xx_it.c b/FamicomDumperBootloader/Core/Src/stm32f1xx_it.c
index 294cee0..2d89f32 100644
--- a/STM32_bootloader/Core/Src/stm32f1xx_it.c
+++ b/FamicomDumperBootloader/Core/Src/stm32f1xx_it.c
@@ -1,233 +1,233 @@
-/* USER CODE BEGIN Header */
-/**
- ******************************************************************************
- * @file stm32f1xx_it.c
- * @brief Interrupt Service Routines.
- ******************************************************************************
- * @attention
- *
- * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
- * All rights reserved.</center></h2>
- *
- * This software component is licensed by ST under BSD 3-Clause license,
- * the "License"; You may not use this file except in compliance with the
- * License. You may obtain a copy of the License at:
- * opensource.org/licenses/BSD-3-Clause
- *
- ******************************************************************************
- */
-/* USER CODE END Header */
-
-/* Includes ------------------------------------------------------------------*/
-#include "main.h"
-#include "stm32f1xx_it.h"
-/* Private includes ----------------------------------------------------------*/
-/* USER CODE BEGIN Includes */
-/* USER CODE END Includes */
-
-/* Private typedef -----------------------------------------------------------*/
-/* USER CODE BEGIN TD */
-
-/* USER CODE END TD */
-
-/* Private define ------------------------------------------------------------*/
-/* USER CODE BEGIN PD */
-
-/* USER CODE END PD */
-
-/* Private macro -------------------------------------------------------------*/
-/* USER CODE BEGIN PM */
-
-/* USER CODE END PM */
-
-/* Private variables ---------------------------------------------------------*/
-/* USER CODE BEGIN PV */
-
-/* USER CODE END PV */
-
-/* Private function prototypes -----------------------------------------------*/
-/* USER CODE BEGIN PFP */
-
-/* USER CODE END PFP */
-
-/* Private user code ---------------------------------------------------------*/
-/* USER CODE BEGIN 0 */
-
-/* USER CODE END 0 */
-
-/* External variables --------------------------------------------------------*/
-extern PCD_HandleTypeDef hpcd_USB_FS;
-extern DMA_HandleTypeDef hdma_tim5_ch3_up;
-/* USER CODE BEGIN EV */
-
-/* USER CODE END EV */
-
-/******************************************************************************/
-/* Cortex-M3 Processor Interruption and Exception Handlers */
-/******************************************************************************/
-/**
- * @brief This function handles Non maskable interrupt.
- */
-void NMI_Handler(void)
-{
- /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
-
- /* USER CODE END NonMaskableInt_IRQn 0 */
- /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
- while (1)
- {
- }
- /* USER CODE END NonMaskableInt_IRQn 1 */
-}
-
-/**
- * @brief This function handles Hard fault interrupt.
- */
-void HardFault_Handler(void)
-{
- /* USER CODE BEGIN HardFault_IRQn 0 */
-
- /* USER CODE END HardFault_IRQn 0 */
- while (1)
- {
- /* USER CODE BEGIN W1_HardFault_IRQn 0 */
- /* USER CODE END W1_HardFault_IRQn 0 */
- }
-}
-
-/**
- * @brief This function handles Memory management fault.
- */
-void MemManage_Handler(void)
-{
- /* USER CODE BEGIN MemoryManagement_IRQn 0 */
-
- /* USER CODE END MemoryManagement_IRQn 0 */
- while (1)
- {
- /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */
- /* USER CODE END W1_MemoryManagement_IRQn 0 */
- }
-}
-
-/**
- * @brief This function handles Prefetch fault, memory access fault.
- */
-void BusFault_Handler(void)
-{
- /* USER CODE BEGIN BusFault_IRQn 0 */
-
- /* USER CODE END BusFault_IRQn 0 */
- while (1)
- {
- /* USER CODE BEGIN W1_BusFault_IRQn 0 */
- /* USER CODE END W1_BusFault_IRQn 0 */
- }
-}
-
-/**
- * @brief This function handles Undefined instruction or illegal state.
- */
-void UsageFault_Handler(void)
-{
- /* USER CODE BEGIN UsageFault_IRQn 0 */
-
- /* USER CODE END UsageFault_IRQn 0 */
- while (1)
- {
- /* USER CODE BEGIN W1_UsageFault_IRQn 0 */
- /* USER CODE END W1_UsageFault_IRQn 0 */
- }
-}
-
-/**
- * @brief This function handles System service call via SWI instruction.
- */
-void SVC_Handler(void)
-{
- /* USER CODE BEGIN SVCall_IRQn 0 */
-
- /* USER CODE END SVCall_IRQn 0 */
- /* USER CODE BEGIN SVCall_IRQn 1 */
-
- /* USER CODE END SVCall_IRQn 1 */
-}
-
-/**
- * @brief This function handles Debug monitor.
- */
-void DebugMon_Handler(void)
-{
- /* USER CODE BEGIN DebugMonitor_IRQn 0 */
-
- /* USER CODE END DebugMonitor_IRQn 0 */
- /* USER CODE BEGIN DebugMonitor_IRQn 1 */
-
- /* USER CODE END DebugMonitor_IRQn 1 */
-}
-
-/**
- * @brief This function handles Pendable request for system service.
- */
-void PendSV_Handler(void)
-{
- /* USER CODE BEGIN PendSV_IRQn 0 */
-
- /* USER CODE END PendSV_IRQn 0 */
- /* USER CODE BEGIN PendSV_IRQn 1 */
-
- /* USER CODE END PendSV_IRQn 1 */
-}
-
-/**
- * @brief This function handles System tick timer.
- */
-void SysTick_Handler(void)
-{
- /* USER CODE BEGIN SysTick_IRQn 0 */
-
- /* USER CODE END SysTick_IRQn 0 */
- HAL_IncTick();
- /* USER CODE BEGIN SysTick_IRQn 1 */
-
- /* USER CODE END SysTick_IRQn 1 */
-}
-
-/******************************************************************************/
-/* STM32F1xx Peripheral Interrupt Handlers */
-/* Add here the Interrupt Handlers for the used peripherals. */
-/* For the available peripheral interrupt handler names, */
-/* please refer to the startup file (startup_stm32f1xx.s). */
-/******************************************************************************/
-
-/**
- * @brief This function handles USB low priority or CAN RX0 interrupts.
- */
-void USB_LP_CAN1_RX0_IRQHandler(void)
-{
- /* USER CODE BEGIN USB_LP_CAN1_RX0_IRQn 0 */
-
- /* USER CODE END USB_LP_CAN1_RX0_IRQn 0 */
- HAL_PCD_IRQHandler(&hpcd_USB_FS);
- /* USER CODE BEGIN USB_LP_CAN1_RX0_IRQn 1 */
-
- /* USER CODE END USB_LP_CAN1_RX0_IRQn 1 */
-}
-
-/**
- * @brief This function handles DMA2 channel2 global interrupt.
- */
-void DMA2_Channel2_IRQHandler(void)
-{
- /* USER CODE BEGIN DMA2_Channel2_IRQn 0 */
-
- /* USER CODE END DMA2_Channel2_IRQn 0 */
- HAL_DMA_IRQHandler(&hdma_tim5_ch3_up);
- /* USER CODE BEGIN DMA2_Channel2_IRQn 1 */
-
- /* USER CODE END DMA2_Channel2_IRQn 1 */
-}
-
-/* USER CODE BEGIN 1 */
-
-/* USER CODE END 1 */
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file stm32f1xx_it.c
+ * @brief Interrupt Service Routines.
+ ******************************************************************************
+ * @attention
+ *
+ * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
+ * All rights reserved.</center></h2>
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Includes ------------------------------------------------------------------*/
+#include "main.h"
+#include "stm32f1xx_it.h"
+/* Private includes ----------------------------------------------------------*/
+/* USER CODE BEGIN Includes */
+/* USER CODE END Includes */
+
+/* Private typedef -----------------------------------------------------------*/
+/* USER CODE BEGIN TD */
+
+/* USER CODE END TD */
+
+/* Private define ------------------------------------------------------------*/
+/* USER CODE BEGIN PD */
+
+/* USER CODE END PD */
+
+/* Private macro -------------------------------------------------------------*/
+/* USER CODE BEGIN PM */
+
+/* USER CODE END PM */
+
+/* Private variables ---------------------------------------------------------*/
+/* USER CODE BEGIN PV */
+
+/* USER CODE END PV */
+
+/* Private function prototypes -----------------------------------------------*/
+/* USER CODE BEGIN PFP */
+
+/* USER CODE END PFP */
+
+/* Private user code ---------------------------------------------------------*/
+/* USER CODE BEGIN 0 */
+
+/* USER CODE END 0 */
+
+/* External variables --------------------------------------------------------*/
+extern PCD_HandleTypeDef hpcd_USB_FS;
+extern DMA_HandleTypeDef hdma_tim5_ch3_up;
+/* USER CODE BEGIN EV */
+
+/* USER CODE END EV */
+
+/******************************************************************************/
+/* Cortex-M3 Processor Interruption and Exception Handlers */
+/******************************************************************************/
+/**
+ * @brief This function handles Non maskable interrupt.
+ */
+void NMI_Handler(void)
+{
+ /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
+
+ /* USER CODE END NonMaskableInt_IRQn 0 */
+ /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
+ while (1)
+ {
+ }
+ /* USER CODE END NonMaskableInt_IRQn 1 */
+}
+
+/**
+ * @brief This function handles Hard fault interrupt.
+ */
+void HardFault_Handler(void)
+{
+ /* USER CODE BEGIN HardFault_IRQn 0 */
+
+ /* USER CODE END HardFault_IRQn 0 */
+ while (1)
+ {
+ /* USER CODE BEGIN W1_HardFault_IRQn 0 */
+ /* USER CODE END W1_HardFault_IRQn 0 */
+ }
+}
+
+/**
+ * @brief This function handles Memory management fault.
+ */
+void MemManage_Handler(void)
+{
+ /* USER CODE BEGIN MemoryManagement_IRQn 0 */
+
+ /* USER CODE END MemoryManagement_IRQn 0 */
+ while (1)
+ {
+ /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */
+ /* USER CODE END W1_MemoryManagement_IRQn 0 */
+ }
+}
+
+/**
+ * @brief This function handles Prefetch fault, memory access fault.
+ */
+void BusFault_Handler(void)
+{
+ /* USER CODE BEGIN BusFault_IRQn 0 */
+
+ /* USER CODE END BusFault_IRQn 0 */
+ while (1)
+ {
+ /* USER CODE BEGIN W1_BusFault_IRQn 0 */
+ /* USER CODE END W1_BusFault_IRQn 0 */
+ }
+}
+
+/**
+ * @brief This function handles Undefined instruction or illegal state.
+ */
+void UsageFault_Handler(void)
+{
+ /* USER CODE BEGIN UsageFault_IRQn 0 */
+
+ /* USER CODE END UsageFault_IRQn 0 */
+ while (1)
+ {
+ /* USER CODE BEGIN W1_UsageFault_IRQn 0 */
+ /* USER CODE END W1_UsageFault_IRQn 0 */
+ }
+}
+
+/**
+ * @brief This function handles System service call via SWI instruction.
+ */
+void SVC_Handler(void)
+{
+ /* USER CODE BEGIN SVCall_IRQn 0 */
+
+ /* USER CODE END SVCall_IRQn 0 */
+ /* USER CODE BEGIN SVCall_IRQn 1 */
+
+ /* USER CODE END SVCall_IRQn 1 */
+}
+
+/**
+ * @brief This function handles Debug monitor.
+ */
+void DebugMon_Handler(void)
+{
+ /* USER CODE BEGIN DebugMonitor_IRQn 0 */
+
+ /* USER CODE END DebugMonitor_IRQn 0 */
+ /* USER CODE BEGIN DebugMonitor_IRQn 1 */
+
+ /* USER CODE END DebugMonitor_IRQn 1 */
+}
+
+/**
+ * @brief This function handles Pendable request for system service.
+ */
+void PendSV_Handler(void)
+{
+ /* USER CODE BEGIN PendSV_IRQn 0 */
+
+ /* USER CODE END PendSV_IRQn 0 */
+ /* USER CODE BEGIN PendSV_IRQn 1 */
+
+ /* USER CODE END PendSV_IRQn 1 */
+}
+
+/**
+ * @brief This function handles System tick timer.
+ */
+void SysTick_Handler(void)
+{
+ /* USER CODE BEGIN SysTick_IRQn 0 */
+
+ /* USER CODE END SysTick_IRQn 0 */
+ HAL_IncTick();
+ /* USER CODE BEGIN SysTick_IRQn 1 */
+
+ /* USER CODE END SysTick_IRQn 1 */
+}
+
+/******************************************************************************/
+/* STM32F1xx Peripheral Interrupt Handlers */
+/* Add here the Interrupt Handlers for the used peripherals. */
+/* For the available peripheral interrupt handler names, */
+/* please refer to the startup file (startup_stm32f1xx.s). */
+/******************************************************************************/
+
+/**
+ * @brief This function handles USB low priority or CAN RX0 interrupts.
+ */
+void USB_LP_CAN1_RX0_IRQHandler(void)
+{
+ /* USER CODE BEGIN USB_LP_CAN1_RX0_IRQn 0 */
+
+ /* USER CODE END USB_LP_CAN1_RX0_IRQn 0 */
+ HAL_PCD_IRQHandler(&hpcd_USB_FS);
+ /* USER CODE BEGIN USB_LP_CAN1_RX0_IRQn 1 */
+
+ /* USER CODE END USB_LP_CAN1_RX0_IRQn 1 */
+}
+
+/**
+ * @brief This function handles DMA2 channel2 global interrupt.
+ */
+void DMA2_Channel2_IRQHandler(void)
+{
+ /* USER CODE BEGIN DMA2_Channel2_IRQn 0 */
+
+ /* USER CODE END DMA2_Channel2_IRQn 0 */
+ HAL_DMA_IRQHandler(&hdma_tim5_ch3_up);
+ /* USER CODE BEGIN DMA2_Channel2_IRQn 1 */
+
+ /* USER CODE END DMA2_Channel2_IRQn 1 */
+}
+
+/* USER CODE BEGIN 1 */
+
+/* USER CODE END 1 */
diff --git a/STM32_bootloader/Core/Src/syscalls.c b/FamicomDumperBootloader/Core/Src/syscalls.c
index bc0dd6c..bc0dd6c 100644
--- a/STM32_bootloader/Core/Src/syscalls.c
+++ b/FamicomDumperBootloader/Core/Src/syscalls.c
diff --git a/STM32_bootloader/Core/Src/sysmem.c b/FamicomDumperBootloader/Core/Src/sysmem.c
index 305263f..305263f 100644
--- a/STM32_bootloader/Core/Src/sysmem.c
+++ b/FamicomDumperBootloader/Core/Src/sysmem.c
diff --git a/STM32_bootloader/Core/Src/system_stm32f1xx.c b/FamicomDumperBootloader/Core/Src/system_stm32f1xx.c
index bc96aae..bc96aae 100644
--- a/STM32_bootloader/Core/Src/system_stm32f1xx.c
+++ b/FamicomDumperBootloader/Core/Src/system_stm32f1xx.c
diff --git a/STM32_bootloader/Core/Startup/startup_stm32f103zetx.s b/FamicomDumperBootloader/Core/Startup/startup_stm32f103zetx.s
index ef23cee..ef23cee 100644
--- a/STM32_bootloader/Core/Startup/startup_stm32f103zetx.s
+++ b/FamicomDumperBootloader/Core/Startup/startup_stm32f103zetx.s
diff --git a/STM32_bootloader/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h b/FamicomDumperBootloader/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h
index cb5e86f..cb5e86f 100644
--- a/STM32_bootloader/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h b/FamicomDumperBootloader/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
index 61ff830..61ff830 100644
--- a/STM32_bootloader/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h b/FamicomDumperBootloader/Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
index 8e33366..8e33366 100644
--- a/STM32_bootloader/Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Device/ST/STM32F1xx/License.md b/FamicomDumperBootloader/Drivers/CMSIS/Device/ST/STM32F1xx/License.md
index ae1421a..ae1421a 100644
--- a/STM32_bootloader/Drivers/CMSIS/Device/ST/STM32F1xx/License.md
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Device/ST/STM32F1xx/License.md
diff --git a/STM32_bootloader/Drivers/CMSIS/Include/cmsis_armcc.h b/FamicomDumperBootloader/Drivers/CMSIS/Include/cmsis_armcc.h
index 7d751fb..7d751fb 100644
--- a/STM32_bootloader/Drivers/CMSIS/Include/cmsis_armcc.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Include/cmsis_armcc.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Include/cmsis_armclang.h b/FamicomDumperBootloader/Drivers/CMSIS/Include/cmsis_armclang.h
index d8031b0..d8031b0 100644
--- a/STM32_bootloader/Drivers/CMSIS/Include/cmsis_armclang.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Include/cmsis_armclang.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Include/cmsis_compiler.h b/FamicomDumperBootloader/Drivers/CMSIS/Include/cmsis_compiler.h
index 79a2cac..79a2cac 100644
--- a/STM32_bootloader/Drivers/CMSIS/Include/cmsis_compiler.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Include/cmsis_compiler.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Include/cmsis_gcc.h b/FamicomDumperBootloader/Drivers/CMSIS/Include/cmsis_gcc.h
index 1bd41a4..1bd41a4 100644
--- a/STM32_bootloader/Drivers/CMSIS/Include/cmsis_gcc.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Include/cmsis_gcc.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Include/cmsis_iccarm.h b/FamicomDumperBootloader/Drivers/CMSIS/Include/cmsis_iccarm.h
index 3c90a2c..3c90a2c 100644
--- a/STM32_bootloader/Drivers/CMSIS/Include/cmsis_iccarm.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Include/cmsis_iccarm.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Include/cmsis_version.h b/FamicomDumperBootloader/Drivers/CMSIS/Include/cmsis_version.h
index ae3f2e3..ae3f2e3 100644
--- a/STM32_bootloader/Drivers/CMSIS/Include/cmsis_version.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Include/cmsis_version.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Include/core_armv8mbl.h b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_armv8mbl.h
index ec76ab2..ec76ab2 100644
--- a/STM32_bootloader/Drivers/CMSIS/Include/core_armv8mbl.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_armv8mbl.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Include/core_armv8mml.h b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_armv8mml.h
index 2d0f106..2d0f106 100644
--- a/STM32_bootloader/Drivers/CMSIS/Include/core_armv8mml.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_armv8mml.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Include/core_cm0.h b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm0.h
index 6f82227..6f82227 100644
--- a/STM32_bootloader/Drivers/CMSIS/Include/core_cm0.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm0.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Include/core_cm0plus.h b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm0plus.h
index b9377e8..b9377e8 100644
--- a/STM32_bootloader/Drivers/CMSIS/Include/core_cm0plus.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm0plus.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Include/core_cm1.h b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm1.h
index fd1c407..fd1c407 100644
--- a/STM32_bootloader/Drivers/CMSIS/Include/core_cm1.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm1.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Include/core_cm23.h b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm23.h
index 8202a8d..8202a8d 100644
--- a/STM32_bootloader/Drivers/CMSIS/Include/core_cm23.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm23.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Include/core_cm3.h b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm3.h
index b0dfbd3..b0dfbd3 100644
--- a/STM32_bootloader/Drivers/CMSIS/Include/core_cm3.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm3.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Include/core_cm33.h b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm33.h
index 02f82e2..02f82e2 100644
--- a/STM32_bootloader/Drivers/CMSIS/Include/core_cm33.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm33.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Include/core_cm4.h b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm4.h
index 308b868..308b868 100644
--- a/STM32_bootloader/Drivers/CMSIS/Include/core_cm4.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm4.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Include/core_cm7.h b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm7.h
index ada6c2a..ada6c2a 100644
--- a/STM32_bootloader/Drivers/CMSIS/Include/core_cm7.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_cm7.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Include/core_sc000.h b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_sc000.h
index 9086c64..9086c64 100644
--- a/STM32_bootloader/Drivers/CMSIS/Include/core_sc000.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_sc000.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Include/core_sc300.h b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_sc300.h
index 665822d..665822d 100644
--- a/STM32_bootloader/Drivers/CMSIS/Include/core_sc300.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Include/core_sc300.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Include/mpu_armv7.h b/FamicomDumperBootloader/Drivers/CMSIS/Include/mpu_armv7.h
index 7d4b600..7d4b600 100644
--- a/STM32_bootloader/Drivers/CMSIS/Include/mpu_armv7.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Include/mpu_armv7.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Include/mpu_armv8.h b/FamicomDumperBootloader/Drivers/CMSIS/Include/mpu_armv8.h
index 99ee9f9..99ee9f9 100644
--- a/STM32_bootloader/Drivers/CMSIS/Include/mpu_armv8.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Include/mpu_armv8.h
diff --git a/STM32_bootloader/Drivers/CMSIS/Include/tz_context.h b/FamicomDumperBootloader/Drivers/CMSIS/Include/tz_context.h
index d4c1474..d4c1474 100644
--- a/STM32_bootloader/Drivers/CMSIS/Include/tz_context.h
+++ b/FamicomDumperBootloader/Drivers/CMSIS/Include/tz_context.h
diff --git a/STM32_bootloader/Drivers/CMSIS/LICENSE.txt b/FamicomDumperBootloader/Drivers/CMSIS/LICENSE.txt
index c0ee812..c0ee812 100644
--- a/STM32_bootloader/Drivers/CMSIS/LICENSE.txt
+++ b/FamicomDumperBootloader/Drivers/CMSIS/LICENSE.txt
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
index 412525a..412525a 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
index 6228edb..6228edb 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h
index ce96197..ce96197 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h
index 6ff1109..6ff1109 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h
index 7b2304d..7b2304d 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h
index d861f50..d861f50 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h
index e42e8c0..e42e8c0 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h
index 8cd21b1..8cd21b1 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h
index 1dcaeed..1dcaeed 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
index 2973944..2973944 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h
index 56bcb85..56bcb85 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd.h
index 5798449..5798449 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd_ex.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd_ex.h
index ed14bc2..ed14bc2 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd_ex.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd_ex.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h
index 2b1b4ed..2b1b4ed 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h
index f0097cb..f0097cb 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
index d0d0830..d0d0830 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h
index 999f62e..999f62e 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
index 6f1b5e5..6f1b5e5 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_bus.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_bus.h
index e17f1af..e17f1af 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_bus.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_bus.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_cortex.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_cortex.h
index 7baf2ac..7baf2ac 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_cortex.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_cortex.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_dma.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_dma.h
index 9ebff4e..9ebff4e 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_dma.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_dma.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_exti.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_exti.h
index 612e005..612e005 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_exti.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_exti.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_gpio.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_gpio.h
index 8cc7832..8cc7832 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_gpio.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_gpio.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_pwr.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_pwr.h
index cd75914..cd75914 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_pwr.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_pwr.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_rcc.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_rcc.h
index 3ca73fe..3ca73fe 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_rcc.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_rcc.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_system.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_system.h
index b22f8df..b22f8df 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_system.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_system.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_tim.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_tim.h
index 1f8fe35..1f8fe35 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_tim.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_tim.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_usb.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_usb.h
index 3d75775..3d75775 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_usb.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_usb.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_utils.h b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_utils.h
index edb17d7..edb17d7 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_utils.h
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_utils.h
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/License.md b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/License.md
index 74a956d..74a956d 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/License.md
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/License.md
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c
index f4824ab..f4824ab 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c
index a89150a..a89150a 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c
index c9bc061..c9bc061 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c
index 60030e8..60030e8 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c
index 50abf92..50abf92 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c
index ebd6f8b..ebd6f8b 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c
index cd3563a..cd3563a 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c
index c2d810c..c2d810c 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c
index d019fad..d019fad 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.c b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.c
index 234b52c..234b52c 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.c
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.c
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c
index c757976..c757976 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c
index 95b5568..95b5568 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c
index e6e1b4d..e6e1b4d 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c
index b32c0bd..b32c0bd 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c
index f15cbbb..f15cbbb 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c
diff --git a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.c b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.c
index 1de2d5c..1de2d5c 100644
--- a/STM32_bootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.c
+++ b/FamicomDumperBootloader/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.c
diff --git a/STM32_bootloader/FATFS/App/fatfs.c b/FamicomDumperBootloader/FATFS/App/fatfs.c
index ec3947e..5ec8f5c 100644
--- a/STM32_bootloader/FATFS/App/fatfs.c
+++ b/FamicomDumperBootloader/FATFS/App/fatfs.c
@@ -1,54 +1,54 @@
-/* USER CODE BEGIN Header */
-/**
- ******************************************************************************
- * @file fatfs.c
- * @brief Code for fatfs applications
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2022 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-/* USER CODE END Header */
-#include "fatfs.h"
-
-uint8_t retUSER; /* Return value for USER */
-char USERPath[4]; /* USER logical drive path */
-FATFS USERFatFS; /* File system object for USER logical drive */
-FIL USERFile; /* File object for USER */
-
-/* USER CODE BEGIN Variables */
-
-/* USER CODE END Variables */
-
-void MX_FATFS_Init(void)
-{
- /*## FatFS: Link the USER driver ###########################*/
- retUSER = FATFS_LinkDriver(&USER_Driver, USERPath);
-
- /* USER CODE BEGIN Init */
- /* additional user code for init */
- /* USER CODE END Init */
-}
-
-/**
- * @brief Gets Time from RTC
- * @param None
- * @retval Time in DWORD
- */
-DWORD get_fattime(void)
-{
- /* USER CODE BEGIN get_fattime */
- return 0;
- /* USER CODE END get_fattime */
-}
-
-/* USER CODE BEGIN Application */
-
-/* USER CODE END Application */
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file fatfs.c
+ * @brief Code for fatfs applications
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2022 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+#include "fatfs.h"
+
+uint8_t retUSER; /* Return value for USER */
+char USERPath[4]; /* USER logical drive path */
+FATFS USERFatFS; /* File system object for USER logical drive */
+FIL USERFile; /* File object for USER */
+
+/* USER CODE BEGIN Variables */
+
+/* USER CODE END Variables */
+
+void MX_FATFS_Init(void)
+{
+ /*## FatFS: Link the USER driver ###########################*/
+ retUSER = FATFS_LinkDriver(&USER_Driver, USERPath);
+
+ /* USER CODE BEGIN Init */
+ /* additional user code for init */
+ /* USER CODE END Init */
+}
+
+/**
+ * @brief Gets Time from RTC
+ * @param None
+ * @retval Time in DWORD
+ */
+DWORD get_fattime(void)
+{
+ /* USER CODE BEGIN get_fattime */
+ return 0;
+ /* USER CODE END get_fattime */
+}
+
+/* USER CODE BEGIN Application */
+
+/* USER CODE END Application */
diff --git a/STM32_bootloader/FATFS/App/fatfs.h b/FamicomDumperBootloader/FATFS/App/fatfs.h
index f9a4f49..0748083 100644
--- a/STM32_bootloader/FATFS/App/fatfs.h
+++ b/FamicomDumperBootloader/FATFS/App/fatfs.h
@@ -1,47 +1,47 @@
-/* USER CODE BEGIN Header */
-/**
- ******************************************************************************
- * @file fatfs.h
- * @brief Header for fatfs applications
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2022 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-/* USER CODE END Header */
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __fatfs_H
-#define __fatfs_H
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-#include "ff.h"
-#include "ff_gen_drv.h"
-#include "user_diskio.h" /* defines USER_Driver as external */
-
-/* USER CODE BEGIN Includes */
-
-/* USER CODE END Includes */
-
-extern uint8_t retUSER; /* Return value for USER */
-extern char USERPath[4]; /* USER logical drive path */
-extern FATFS USERFatFS; /* File system object for USER logical drive */
-extern FIL USERFile; /* File object for USER */
-
-void MX_FATFS_Init(void);
-
-/* USER CODE BEGIN Prototypes */
-
-/* USER CODE END Prototypes */
-#ifdef __cplusplus
-}
-#endif
-#endif /*__fatfs_H */
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file fatfs.h
+ * @brief Header for fatfs applications
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2022 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __fatfs_H
+#define __fatfs_H
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+#include "ff.h"
+#include "ff_gen_drv.h"
+#include "user_diskio.h" /* defines USER_Driver as external */
+
+/* USER CODE BEGIN Includes */
+
+/* USER CODE END Includes */
+
+extern uint8_t retUSER; /* Return value for USER */
+extern char USERPath[4]; /* USER logical drive path */
+extern FATFS USERFatFS; /* File system object for USER logical drive */
+extern FIL USERFile; /* File object for USER */
+
+void MX_FATFS_Init(void);
+
+/* USER CODE BEGIN Prototypes */
+
+/* USER CODE END Prototypes */
+#ifdef __cplusplus
+}
+#endif
+#endif /*__fatfs_H */
diff --git a/STM32_bootloader/FATFS/Target/ffconf.h b/FamicomDumperBootloader/FATFS/Target/ffconf.h
index 3614c80..208d7b1 100644
--- a/STM32_bootloader/FATFS/Target/ffconf.h
+++ b/FamicomDumperBootloader/FATFS/Target/ffconf.h
@@ -1,275 +1,275 @@
-/* USER CODE BEGIN Header */
-/**
- ******************************************************************************
- * FatFs - FAT file system module configuration file R0.11 (C)ChaN, 2015
- ******************************************************************************
- * @attention
- *
- * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
- * All rights reserved.</center></h2>
- *
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
- *
- ******************************************************************************
- */
-/* USER CODE END Header */
-
-#ifndef _FFCONF
-#define _FFCONF 32020 /* Revision ID */
-
-/*-----------------------------------------------------------------------------/
-/ Additional user header to be used
-/-----------------------------------------------------------------------------*/
-#include "main.h"
-#include "stm32f1xx_hal.h"
-
-/*-----------------------------------------------------------------------------/
-/ Functions and Buffer Configurations
-/-----------------------------------------------------------------------------*/
-
-#define _FS_TINY 0 /* 0:Normal or 1:Tiny */
-/* This option switches tiny buffer configuration. (0:Normal or 1:Tiny)
-/ At the tiny configuration, size of the file object (FIL) is reduced _MAX_SS
-/ bytes. Instead of private sector buffer eliminated from the file object,
-/ common sector buffer in the file system object (FATFS) is used for the file
-/ data transfer. */
-
-#define _FS_READONLY 0 /* 0:Read/Write or 1:Read only */
-/* This option switches read-only configuration. (0:Read/Write or 1:Read-only)
-/ Read-only configuration removes writing API functions, f_write(), f_sync(),
-/ f_unlink(), f_mkdir(), f_chmod(), f_rename(), f_truncate(), f_getfree()
-/ and optional writing functions as well. */
-
-#define _FS_MINIMIZE 0 /* 0 to 3 */
-/* This option defines minimization level to remove some basic API functions.
-/
-/ 0: All basic functions are enabled.
-/ 1: f_stat(), f_getfree(), f_unlink(), f_mkdir(), f_chmod(), f_utime(),
-/ f_truncate() and f_rename() function are removed.
-/ 2: f_opendir(), f_readdir() and f_closedir() are removed in addition to 1.
-/ 3: f_lseek() function is removed in addition to 2. */
-
-#define _USE_STRFUNC 2 /* 0:Disable or 1-2:Enable */
-/* This option switches string functions, f_gets(), f_putc(), f_puts() and
-/ f_printf().
-/
-/ 0: Disable string functions.
-/ 1: Enable without LF-CRLF conversion.
-/ 2: Enable with LF-CRLF conversion. */
-
-#define _USE_FIND 0
-/* This option switches filtered directory read feature and related functions,
-/ f_findfirst() and f_findnext(). (0:Disable or 1:Enable) */
-
-#define _USE_MKFS 0
-/* This option switches f_mkfs() function. (0:Disable or 1:Enable) */
-
-#define _USE_FASTSEEK 0
-/* This option switches fast seek feature. (0:Disable or 1:Enable) */
-
-#define _USE_LABEL 0
-/* This option switches volume label functions, f_getlabel() and f_setlabel().
-/ (0:Disable or 1:Enable) */
-
-#define _USE_FORWARD 0
-/* This option switches f_forward() function. (0:Disable or 1:Enable)
-/ To enable it, also _FS_TINY need to be set to 1. */
-
-/*-----------------------------------------------------------------------------/
-/ Locale and Namespace Configurations
-/-----------------------------------------------------------------------------*/
-
-#define _CODE_PAGE 850
-/* This option specifies the OEM code page to be used on the target system.
-/ Incorrect setting of the code page can cause a file open failure.
-/
-/ 932 - Japanese Shift_JIS (DBCS, OEM, Windows)
-/ 936 - Simplified Chinese GBK (DBCS, OEM, Windows)
-/ 949 - Korean (DBCS, OEM, Windows)
-/ 950 - Traditional Chinese Big5 (DBCS, OEM, Windows)
-/ 1250 - Central Europe (Windows)
-/ 1251 - Cyrillic (Windows)
-/ 1252 - Latin 1 (Windows)
-/ 1253 - Greek (Windows)
-/ 1254 - Turkish (Windows)
-/ 1255 - Hebrew (Windows)
-/ 1256 - Arabic (Windows)
-/ 1257 - Baltic (Windows)
-/ 1258 - Vietnam (OEM, Windows)
-/ 437 - U.S. (OEM)
-/ 720 - Arabic (OEM)
-/ 737 - Greek (OEM)
-/ 775 - Baltic (OEM)
-/ 850 - Multilingual Latin 1 (OEM)
-/ 858 - Multilingual Latin 1 + Euro (OEM)
-/ 852 - Latin 2 (OEM)
-/ 855 - Cyrillic (OEM)
-/ 866 - Russian (OEM)
-/ 857 - Turkish (OEM)
-/ 862 - Hebrew (OEM)
-/ 874 - Thai (OEM, Windows)
-/ 1 - ASCII (No extended character. Valid for only non-LFN configuration.) */
-
-#define _USE_LFN 0 /* 0 to 3 */
-#define _MAX_LFN 255 /* Maximum LFN length to handle (12 to 255) */
-/* The _USE_LFN option switches the LFN feature.
-/
-/ 0: Disable LFN feature. _MAX_LFN has no effect.
-/ 1: Enable LFN with static working buffer on the BSS. Always NOT thread-safe.
-/ 2: Enable LFN with dynamic working buffer on the STACK.
-/ 3: Enable LFN with dynamic working buffer on the HEAP.
-/
-/ When enable the LFN feature, Unicode handling functions (option/unicode.c) must
-/ be added to the project. The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes.
-/ When use stack for the working buffer, take care on stack overflow. When use heap
-/ memory for the working buffer, memory management functions, ff_memalloc() and
-/ ff_memfree(), must be added to the project. */
-
-#define _LFN_UNICODE 0 /* 0:ANSI/OEM or 1:Unicode */
-/* This option switches character encoding on the API. (0:ANSI/OEM or 1:Unicode)
-/ To use Unicode string for the path name, enable LFN feature and set _LFN_UNICODE
-/ to 1. This option also affects behavior of string I/O functions. */
-
-#define _STRF_ENCODE 0
-/* When _LFN_UNICODE is 1, this option selects the character encoding on the file to
-/ be read/written via string I/O functions, f_gets(), f_putc(), f_puts and f_printf().
-/
-/ 0: ANSI/OEM
-/ 1: UTF-16LE
-/ 2: UTF-16BE
-/ 3: UTF-8
-/
-/ When _LFN_UNICODE is 0, this option has no effect. */
-
-#define _FS_RPATH 0 /* 0 to 2 */
-/* This option configures relative path feature.
-/
-/ 0: Disable relative path feature and remove related functions.
-/ 1: Enable relative path feature. f_chdir() and f_chdrive() are available.
-/ 2: f_getcwd() function is available in addition to 1.
-/
-/ Note that directory items read via f_readdir() are affected by this option. */
-
-/*---------------------------------------------------------------------------/
-/ Drive/Volume Configurations
-/----------------------------------------------------------------------------*/
-
-#define _VOLUMES 1
-/* Number of volumes (logical drives) to be used. */
-
-/* USER CODE BEGIN Volumes */
-#define _STR_VOLUME_ID 0 /* 0:Use only 0-9 for drive ID, 1:Use strings for drive ID */
-#define _VOLUME_STRS "RAM","NAND","CF","SD1","SD2","USB1","USB2","USB3"
-/* _STR_VOLUME_ID option switches string volume ID feature.
-/ When _STR_VOLUME_ID is set to 1, also pre-defined strings can be used as drive
-/ number in the path name. _VOLUME_STRS defines the drive ID strings for each
-/ logical drives. Number of items must be equal to _VOLUMES. Valid characters for
-/ the drive ID strings are: A-Z and 0-9. */
-/* USER CODE END Volumes */
-
-#define _MULTI_PARTITION 0 /* 0:Single partition, 1:Multiple partition */
-/* This option switches multi-partition feature. By default (0), each logical drive
-/ number is bound to the same physical drive number and only an FAT volume found on
-/ the physical drive will be mounted. When multi-partition feature is enabled (1),
-/ each logical drive number is bound to arbitrary physical drive and partition
-/ listed in the VolToPart[]. Also f_fdisk() function will be available. */
-
-#define _MIN_SS 2048 /* 512, 1024, 2048 or 4096 */
-#define _MAX_SS 2048 /* 512, 1024, 2048 or 4096 */
-/* These options configure the range of sector size to be supported. (512, 1024,
-/ 2048 or 4096) Always set both 512 for most systems, all type of memory cards and
-/ harddisk. But a larger value may be required for on-board flash memory and some
-/ type of optical media. When _MAX_SS is larger than _MIN_SS, FatFs is configured
-/ to variable sector size and GET_SECTOR_SIZE command must be implemented to the
-/ disk_ioctl() function. */
-
-#define _USE_TRIM 0
-/* This option switches ATA-TRIM feature. (0:Disable or 1:Enable)
-/ To enable Trim feature, also CTRL_TRIM command should be implemented to the
-/ disk_ioctl() function. */
-
-#define _FS_NOFSINFO 0 /* 0,1,2 or 3 */
-/* If you need to know correct free space on the FAT32 volume, set bit 0 of this
-/ option, and f_getfree() function at first time after volume mount will force
-/ a full FAT scan. Bit 1 controls the use of last allocated cluster number.
-/
-/ bit0=0: Use free cluster count in the FSINFO if available.
-/ bit0=1: Do not trust free cluster count in the FSINFO.
-/ bit1=0: Use last allocated cluster number in the FSINFO if available.
-/ bit1=1: Do not trust last allocated cluster number in the FSINFO.
-*/
-
-/*---------------------------------------------------------------------------/
-/ System Configurations
-/----------------------------------------------------------------------------*/
-
-#define _FS_NORTC 0
-#define _NORTC_MON 6
-#define _NORTC_MDAY 4
-#define _NORTC_YEAR 2015
-/* The _FS_NORTC option switches timestamp feature. If the system does not have
-/ an RTC function or valid timestamp is not needed, set _FS_NORTC to 1 to disable
-/ the timestamp feature. All objects modified by FatFs will have a fixed timestamp
-/ defined by _NORTC_MON, _NORTC_MDAY and _NORTC_YEAR.
-/ When timestamp feature is enabled (_FS_NORTC == 0), get_fattime() function need
-/ to be added to the project to read current time form RTC. _NORTC_MON,
-/ _NORTC_MDAY and _NORTC_YEAR have no effect.
-/ These options have no effect at read-only configuration (_FS_READONLY == 1). */
-
-#define _FS_LOCK 2 /* 0:Disable or >=1:Enable */
-/* The _FS_LOCK option switches file lock feature to control duplicated file open
-/ and illegal operation to open objects. This option must be 0 when _FS_READONLY
-/ is 1.
-/
-/ 0: Disable file lock feature. To avoid volume corruption, application program
-/ should avoid illegal open, remove and rename to the open objects.
-/ >0: Enable file lock feature. The value defines how many files/sub-directories
-/ can be opened simultaneously under file lock control. Note that the file
-/ lock feature is independent of re-entrancy. */
-
-#define _FS_REENTRANT 0 /* 0:Disable or 1:Enable */
-#define _FS_TIMEOUT 1000 /* Timeout period in unit of time ticks */
-#define _SYNC_t NULL
-/* The _FS_REENTRANT option switches the re-entrancy (thread safe) of the FatFs
-/ module itself. Note that regardless of this option, file access to different
-/ volume is always re-entrant and volume control functions, f_mount(), f_mkfs()
-/ and f_fdisk() function, are always not re-entrant. Only file/directory access
-/ to the same volume is under control of this feature.
-/
-/ 0: Disable re-entrancy. _FS_TIMEOUT and _SYNC_t have no effect.
-/ 1: Enable re-entrancy. Also user provided synchronization handlers,
-/ ff_req_grant(), ff_rel_grant(), ff_del_syncobj() and ff_cre_syncobj()
-/ function, must be added to the project. Samples are available in
-/ option/syscall.c.
-/
-/ The _FS_TIMEOUT defines timeout period in unit of time tick.
-/ The _SYNC_t defines O/S dependent sync object type. e.g. HANDLE, ID, OS_EVENT*,
-/ SemaphoreHandle_t and etc.. */
-
-#define _WORD_ACCESS 1 /* 0 or 1 */
-/* The _WORD_ACCESS option is an only platform dependent option. It defines
-/ which access method is used to the word data on the FAT volume.
-/
-/ 0: Byte-by-byte access. Always compatible with all platforms.
-/ 1: Word access. Do not choose this unless under both the following conditions.
-/
-/ * Address misaligned memory access is always allowed to ALL instructions.
-/ * Byte order on the memory is little-endian.
-/
-/ If it is the case, _WORD_ACCESS can also be set to 1 to reduce code size.
-/ Following table shows allowable settings of some processor types.
-/
-/ ARM7TDMI 0 ColdFire 0 V850E 0
-/ Cortex-M3 0 Z80 0/1 V850ES 0/1
-/ Cortex-M0 0 x86 0/1 TLCS-870 0/1
-/ AVR 0/1 RX600(LE) 0/1 TLCS-900 0/1
-/ AVR32 0 RL78 0 R32C 0
-/ PIC18 0/1 SH-2 0 M16C 0/1
-/ PIC24 0 H8S 0 MSP430 0
-/ PIC32 0 H8/300H 0 8051 0/1
-*/
-
-#endif /* _FFCONF */
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * FatFs - FAT file system module configuration file R0.11 (C)ChaN, 2015
+ ******************************************************************************
+ * @attention
+ *
+ * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
+ * All rights reserved.</center></h2>
+ *
+ * This software component is licensed by ST under Ultimate Liberty license
+ * SLA0044, the "License"; You may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at:
+ * www.st.com/SLA0044
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+#ifndef _FFCONF
+#define _FFCONF 32020 /* Revision ID */
+
+/*-----------------------------------------------------------------------------/
+/ Additional user header to be used
+/-----------------------------------------------------------------------------*/
+#include "main.h"
+#include "stm32f1xx_hal.h"
+
+/*-----------------------------------------------------------------------------/
+/ Functions and Buffer Configurations
+/-----------------------------------------------------------------------------*/
+
+#define _FS_TINY 0 /* 0:Normal or 1:Tiny */
+/* This option switches tiny buffer configuration. (0:Normal or 1:Tiny)
+/ At the tiny configuration, size of the file object (FIL) is reduced _MAX_SS
+/ bytes. Instead of private sector buffer eliminated from the file object,
+/ common sector buffer in the file system object (FATFS) is used for the file
+/ data transfer. */
+
+#define _FS_READONLY 0 /* 0:Read/Write or 1:Read only */
+/* This option switches read-only configuration. (0:Read/Write or 1:Read-only)
+/ Read-only configuration removes writing API functions, f_write(), f_sync(),
+/ f_unlink(), f_mkdir(), f_chmod(), f_rename(), f_truncate(), f_getfree()
+/ and optional writing functions as well. */
+
+#define _FS_MINIMIZE 0 /* 0 to 3 */
+/* This option defines minimization level to remove some basic API functions.
+/
+/ 0: All basic functions are enabled.
+/ 1: f_stat(), f_getfree(), f_unlink(), f_mkdir(), f_chmod(), f_utime(),
+/ f_truncate() and f_rename() function are removed.
+/ 2: f_opendir(), f_readdir() and f_closedir() are removed in addition to 1.
+/ 3: f_lseek() function is removed in addition to 2. */
+
+#define _USE_STRFUNC 2 /* 0:Disable or 1-2:Enable */
+/* This option switches string functions, f_gets(), f_putc(), f_puts() and
+/ f_printf().
+/
+/ 0: Disable string functions.
+/ 1: Enable without LF-CRLF conversion.
+/ 2: Enable with LF-CRLF conversion. */
+
+#define _USE_FIND 0
+/* This option switches filtered directory read feature and related functions,
+/ f_findfirst() and f_findnext(). (0:Disable or 1:Enable) */
+
+#define _USE_MKFS 0
+/* This option switches f_mkfs() function. (0:Disable or 1:Enable) */
+
+#define _USE_FASTSEEK 0
+/* This option switches fast seek feature. (0:Disable or 1:Enable) */
+
+#define _USE_LABEL 0
+/* This option switches volume label functions, f_getlabel() and f_setlabel().
+/ (0:Disable or 1:Enable) */
+
+#define _USE_FORWARD 0
+/* This option switches f_forward() function. (0:Disable or 1:Enable)
+/ To enable it, also _FS_TINY need to be set to 1. */
+
+/*-----------------------------------------------------------------------------/
+/ Locale and Namespace Configurations
+/-----------------------------------------------------------------------------*/
+
+#define _CODE_PAGE 850
+/* This option specifies the OEM code page to be used on the target system.
+/ Incorrect setting of the code page can cause a file open failure.
+/
+/ 932 - Japanese Shift_JIS (DBCS, OEM, Windows)
+/ 936 - Simplified Chinese GBK (DBCS, OEM, Windows)
+/ 949 - Korean (DBCS, OEM, Windows)
+/ 950 - Traditional Chinese Big5 (DBCS, OEM, Windows)
+/ 1250 - Central Europe (Windows)
+/ 1251 - Cyrillic (Windows)
+/ 1252 - Latin 1 (Windows)
+/ 1253 - Greek (Windows)
+/ 1254 - Turkish (Windows)
+/ 1255 - Hebrew (Windows)
+/ 1256 - Arabic (Windows)
+/ 1257 - Baltic (Windows)
+/ 1258 - Vietnam (OEM, Windows)
+/ 437 - U.S. (OEM)
+/ 720 - Arabic (OEM)
+/ 737 - Greek (OEM)
+/ 775 - Baltic (OEM)
+/ 850 - Multilingual Latin 1 (OEM)
+/ 858 - Multilingual Latin 1 + Euro (OEM)
+/ 852 - Latin 2 (OEM)
+/ 855 - Cyrillic (OEM)
+/ 866 - Russian (OEM)
+/ 857 - Turkish (OEM)
+/ 862 - Hebrew (OEM)
+/ 874 - Thai (OEM, Windows)
+/ 1 - ASCII (No extended character. Valid for only non-LFN configuration.) */
+
+#define _USE_LFN 0 /* 0 to 3 */
+#define _MAX_LFN 255 /* Maximum LFN length to handle (12 to 255) */
+/* The _USE_LFN option switches the LFN feature.
+/
+/ 0: Disable LFN feature. _MAX_LFN has no effect.
+/ 1: Enable LFN with static working buffer on the BSS. Always NOT thread-safe.
+/ 2: Enable LFN with dynamic working buffer on the STACK.
+/ 3: Enable LFN with dynamic working buffer on the HEAP.
+/
+/ When enable the LFN feature, Unicode handling functions (option/unicode.c) must
+/ be added to the project. The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes.
+/ When use stack for the working buffer, take care on stack overflow. When use heap
+/ memory for the working buffer, memory management functions, ff_memalloc() and
+/ ff_memfree(), must be added to the project. */
+
+#define _LFN_UNICODE 0 /* 0:ANSI/OEM or 1:Unicode */
+/* This option switches character encoding on the API. (0:ANSI/OEM or 1:Unicode)
+/ To use Unicode string for the path name, enable LFN feature and set _LFN_UNICODE
+/ to 1. This option also affects behavior of string I/O functions. */
+
+#define _STRF_ENCODE 0
+/* When _LFN_UNICODE is 1, this option selects the character encoding on the file to
+/ be read/written via string I/O functions, f_gets(), f_putc(), f_puts and f_printf().
+/
+/ 0: ANSI/OEM
+/ 1: UTF-16LE
+/ 2: UTF-16BE
+/ 3: UTF-8
+/
+/ When _LFN_UNICODE is 0, this option has no effect. */
+
+#define _FS_RPATH 0 /* 0 to 2 */
+/* This option configures relative path feature.
+/
+/ 0: Disable relative path feature and remove related functions.
+/ 1: Enable relative path feature. f_chdir() and f_chdrive() are available.
+/ 2: f_getcwd() function is available in addition to 1.
+/
+/ Note that directory items read via f_readdir() are affected by this option. */
+
+/*---------------------------------------------------------------------------/
+/ Drive/Volume Configurations
+/----------------------------------------------------------------------------*/
+
+#define _VOLUMES 1
+/* Number of volumes (logical drives) to be used. */
+
+/* USER CODE BEGIN Volumes */
+#define _STR_VOLUME_ID 0 /* 0:Use only 0-9 for drive ID, 1:Use strings for drive ID */
+#define _VOLUME_STRS "RAM","NAND","CF","SD1","SD2","USB1","USB2","USB3"
+/* _STR_VOLUME_ID option switches string volume ID feature.
+/ When _STR_VOLUME_ID is set to 1, also pre-defined strings can be used as drive
+/ number in the path name. _VOLUME_STRS defines the drive ID strings for each
+/ logical drives. Number of items must be equal to _VOLUMES. Valid characters for
+/ the drive ID strings are: A-Z and 0-9. */
+/* USER CODE END Volumes */
+
+#define _MULTI_PARTITION 0 /* 0:Single partition, 1:Multiple partition */
+/* This option switches multi-partition feature. By default (0), each logical drive
+/ number is bound to the same physical drive number and only an FAT volume found on
+/ the physical drive will be mounted. When multi-partition feature is enabled (1),
+/ each logical drive number is bound to arbitrary physical drive and partition
+/ listed in the VolToPart[]. Also f_fdisk() function will be available. */
+
+#define _MIN_SS 2048 /* 512, 1024, 2048 or 4096 */
+#define _MAX_SS 2048 /* 512, 1024, 2048 or 4096 */
+/* These options configure the range of sector size to be supported. (512, 1024,
+/ 2048 or 4096) Always set both 512 for most systems, all type of memory cards and
+/ harddisk. But a larger value may be required for on-board flash memory and some
+/ type of optical media. When _MAX_SS is larger than _MIN_SS, FatFs is configured
+/ to variable sector size and GET_SECTOR_SIZE command must be implemented to the
+/ disk_ioctl() function. */
+
+#define _USE_TRIM 0
+/* This option switches ATA-TRIM feature. (0:Disable or 1:Enable)
+/ To enable Trim feature, also CTRL_TRIM command should be implemented to the
+/ disk_ioctl() function. */
+
+#define _FS_NOFSINFO 0 /* 0,1,2 or 3 */
+/* If you need to know correct free space on the FAT32 volume, set bit 0 of this
+/ option, and f_getfree() function at first time after volume mount will force
+/ a full FAT scan. Bit 1 controls the use of last allocated cluster number.
+/
+/ bit0=0: Use free cluster count in the FSINFO if available.
+/ bit0=1: Do not trust free cluster count in the FSINFO.
+/ bit1=0: Use last allocated cluster number in the FSINFO if available.
+/ bit1=1: Do not trust last allocated cluster number in the FSINFO.
+*/
+
+/*---------------------------------------------------------------------------/
+/ System Configurations
+/----------------------------------------------------------------------------*/
+
+#define _FS_NORTC 0
+#define _NORTC_MON 6
+#define _NORTC_MDAY 4
+#define _NORTC_YEAR 2015
+/* The _FS_NORTC option switches timestamp feature. If the system does not have
+/ an RTC function or valid timestamp is not needed, set _FS_NORTC to 1 to disable
+/ the timestamp feature. All objects modified by FatFs will have a fixed timestamp
+/ defined by _NORTC_MON, _NORTC_MDAY and _NORTC_YEAR.
+/ When timestamp feature is enabled (_FS_NORTC == 0), get_fattime() function need
+/ to be added to the project to read current time form RTC. _NORTC_MON,
+/ _NORTC_MDAY and _NORTC_YEAR have no effect.
+/ These options have no effect at read-only configuration (_FS_READONLY == 1). */
+
+#define _FS_LOCK 2 /* 0:Disable or >=1:Enable */
+/* The _FS_LOCK option switches file lock feature to control duplicated file open
+/ and illegal operation to open objects. This option must be 0 when _FS_READONLY
+/ is 1.
+/
+/ 0: Disable file lock feature. To avoid volume corruption, application program
+/ should avoid illegal open, remove and rename to the open objects.
+/ >0: Enable file lock feature. The value defines how many files/sub-directories
+/ can be opened simultaneously under file lock control. Note that the file
+/ lock feature is independent of re-entrancy. */
+
+#define _FS_REENTRANT 0 /* 0:Disable or 1:Enable */
+#define _FS_TIMEOUT 1000 /* Timeout period in unit of time ticks */
+#define _SYNC_t NULL
+/* The _FS_REENTRANT option switches the re-entrancy (thread safe) of the FatFs
+/ module itself. Note that regardless of this option, file access to different
+/ volume is always re-entrant and volume control functions, f_mount(), f_mkfs()
+/ and f_fdisk() function, are always not re-entrant. Only file/directory access
+/ to the same volume is under control of this feature.
+/
+/ 0: Disable re-entrancy. _FS_TIMEOUT and _SYNC_t have no effect.
+/ 1: Enable re-entrancy. Also user provided synchronization handlers,
+/ ff_req_grant(), ff_rel_grant(), ff_del_syncobj() and ff_cre_syncobj()
+/ function, must be added to the project. Samples are available in
+/ option/syscall.c.
+/
+/ The _FS_TIMEOUT defines timeout period in unit of time tick.
+/ The _SYNC_t defines O/S dependent sync object type. e.g. HANDLE, ID, OS_EVENT*,
+/ SemaphoreHandle_t and etc.. */
+
+#define _WORD_ACCESS 1 /* 0 or 1 */
+/* The _WORD_ACCESS option is an only platform dependent option. It defines
+/ which access method is used to the word data on the FAT volume.
+/
+/ 0: Byte-by-byte access. Always compatible with all platforms.
+/ 1: Word access. Do not choose this unless under both the following conditions.
+/
+/ * Address misaligned memory access is always allowed to ALL instructions.
+/ * Byte order on the memory is little-endian.
+/
+/ If it is the case, _WORD_ACCESS can also be set to 1 to reduce code size.
+/ Following table shows allowable settings of some processor types.
+/
+/ ARM7TDMI 0 ColdFire 0 V850E 0
+/ Cortex-M3 0 Z80 0/1 V850ES 0/1
+/ Cortex-M0 0 x86 0/1 TLCS-870 0/1
+/ AVR 0/1 RX600(LE) 0/1 TLCS-900 0/1
+/ AVR32 0 RL78 0 R32C 0
+/ PIC18 0/1 SH-2 0 M16C 0/1
+/ PIC24 0 H8S 0 MSP430 0
+/ PIC32 0 H8/300H 0 8051 0/1
+*/
+
+#endif /* _FFCONF */
diff --git a/STM32_bootloader/FATFS/Target/user_diskio.c b/FamicomDumperBootloader/FATFS/Target/user_diskio.c
index 25b4a68..34537ae 100644
--- a/STM32_bootloader/FATFS/Target/user_diskio.c
+++ b/FamicomDumperBootloader/FATFS/Target/user_diskio.c
@@ -1,210 +1,210 @@
-/* USER CODE BEGIN Header */
-/**
- ******************************************************************************
- * @file user_diskio.c
- * @brief This file includes a diskio driver skeleton to be completed by the user.
- ******************************************************************************
- * @attention
- *
- * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
- * All rights reserved.</center></h2>
- *
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
- *
- ******************************************************************************
- */
- /* USER CODE END Header */
-
-#ifdef USE_OBSOLETE_USER_CODE_SECTION_0
-/*
- * Warning: the user section 0 is no more in use (starting from CubeMx version 4.16.0)
- * To be suppressed in the future.
- * Kept to ensure backward compatibility with previous CubeMx versions when
- * migrating projects.
- * User code previously added there should be copied in the new user sections before
- * the section contents can be deleted.
- */
-/* USER CODE BEGIN 0 */
-/* USER CODE END 0 */
-#endif
-
-/* USER CODE BEGIN DECL */
-
-/* Includes ------------------------------------------------------------------*/
-#include <string.h>
-#include "ff_gen_drv.h"
-#include "bootloader.h"
-
-/* Private typedef -----------------------------------------------------------*/
-/* Private define ------------------------------------------------------------*/
-
-/* Private variables ---------------------------------------------------------*/
-/* Disk status */
-static volatile DSTATUS Stat = STA_NOINIT;
-
-/* USER CODE END DECL */
-
-/* Private function prototypes -----------------------------------------------*/
-DSTATUS USER_initialize (BYTE pdrv);
-DSTATUS USER_status (BYTE pdrv);
-DRESULT USER_read (BYTE pdrv, BYTE *buff, DWORD sector, UINT count);
-#if _USE_WRITE == 1
- DRESULT USER_write (BYTE pdrv, const BYTE *buff, DWORD sector, UINT count);
-#endif /* _USE_WRITE == 1 */
-#if _USE_IOCTL == 1
- DRESULT USER_ioctl (BYTE pdrv, BYTE cmd, void *buff);
-#endif /* _USE_IOCTL == 1 */
-
-Diskio_drvTypeDef USER_Driver =
-{
- USER_initialize,
- USER_status,
- USER_read,
-#if _USE_WRITE
- USER_write,
-#endif /* _USE_WRITE == 1 */
-#if _USE_IOCTL == 1
- USER_ioctl,
-#endif /* _USE_IOCTL == 1 */
-};
-
-/* Private functions ---------------------------------------------------------*/
-
-/**
- * @brief Initializes a Drive
- * @param pdrv: Physical drive number (0..)
- * @retval DSTATUS: Operation status
- */
-DSTATUS USER_initialize (
- BYTE pdrv /* Physical drive nmuber to identify the drive */
-)
-{
- /* USER CODE BEGIN INIT */
- return 0;
- /* USER CODE END INIT */
-}
-
-/**
- * @brief Gets Disk Status
- * @param pdrv: Physical drive number (0..)
- * @retval DSTATUS: Operation status
- */
-DSTATUS USER_status (
- BYTE pdrv /* Physical drive number to identify the drive */
-)
-{
- /* USER CODE BEGIN STATUS */
- return 0;
- /* USER CODE END STATUS */
-}
-
-/**
- * @brief Reads Sector(s)
- * @param pdrv: Physical drive number (0..)
- * @param *buff: Data buffer to store read data
- * @param sector: Sector address (LBA)
- * @param count: Number of sectors to read (1..128)
- * @retval DRESULT: Operation result
- */
-DRESULT USER_read (
- BYTE pdrv, /* Physical drive nmuber to identify the drive */
- BYTE *buff, /* Data buffer to store read data */
- DWORD sector, /* Sector address in LBA */
- UINT count /* Number of sectors to read */
-)
-{
- /* USER CODE BEGIN READ */
- int i;
- uint32_t address = MSD_ADDRESS + sector * MSD_BLOCK_SIZE;
-
- for (; count > 0; count--) {
- for (i = 0; i < MSD_BLOCK_SIZE; i++) {
- *buff = *((volatile uint8_t*) address);
- buff++;
- address++;
- }
- }
- return RES_OK;
- /* USER CODE END READ */
-}
-
-/**
- * @brief Writes Sector(s)
- * @param pdrv: Physical drive number (0..)
- * @param *buff: Data to be written
- * @param sector: Sector address (LBA)
- * @param count: Number of sectors to write (1..128)
- * @retval DRESULT: Operation result
- */
-#if _USE_WRITE == 1
-DRESULT USER_write (
- BYTE pdrv, /* Physical drive nmuber to identify the drive */
- const BYTE *buff, /* Data to be written */
- DWORD sector, /* Sector address in LBA */
- UINT count /* Number of sectors to write */
-)
-{
- /* USER CODE BEGIN WRITE */
- /* USER CODE HERE */
- int res, i;
- uint16_t value;
- uint32_t address = MSD_ADDRESS + sector * MSD_BLOCK_SIZE;
-
- res = HAL_FLASH_Unlock();
- if (res != HAL_OK)
- return RES_ERROR;
-
- FLASH_EraseInitTypeDef erase_init_struct;
- uint32_t sector_error = 0;
- erase_init_struct.TypeErase = FLASH_TYPEERASE_PAGES;
- erase_init_struct.PageAddress = address;
- erase_init_struct.NbPages = count;
- res = HAL_FLASHEx_Erase(&erase_init_struct, &sector_error);
- if (res != HAL_OK) {
- HAL_FLASH_Lock();
- return RES_ERROR;
- }
-
- for (; count > 0; count--) {
- for (i = 0; i < MSD_BLOCK_SIZE; i += 2) {
- value = *(volatile uint16_t*) buff;
- res = HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD, address, value);
- if (res != HAL_OK) {
- HAL_FLASH_Lock();
- return RES_ERROR;
- }
- buff += 2;
- address += 2;
- }
- }
-
- HAL_FLASH_Lock();
- return RES_OK;
- /* USER CODE END WRITE */
-}
-#endif /* _USE_WRITE == 1 */
-
-/**
- * @brief I/O control operation
- * @param pdrv: Physical drive number (0..)
- * @param cmd: Control code
- * @param *buff: Buffer to send/receive control data
- * @retval DRESULT: Operation result
- */
-#if _USE_IOCTL == 1
-DRESULT USER_ioctl (
- BYTE pdrv, /* Physical drive nmuber (0..) */
- BYTE cmd, /* Control code */
- void *buff /* Buffer to send/receive control data */
-)
-{
- /* USER CODE BEGIN IOCTL */
- DRESULT res = RES_ERROR;
- return res;
- /* USER CODE END IOCTL */
-}
-#endif /* _USE_IOCTL == 1 */
-
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file user_diskio.c
+ * @brief This file includes a diskio driver skeleton to be completed by the user.
+ ******************************************************************************
+ * @attention
+ *
+ * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
+ * All rights reserved.</center></h2>
+ *
+ * This software component is licensed by ST under Ultimate Liberty license
+ * SLA0044, the "License"; You may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at:
+ * www.st.com/SLA0044
+ *
+ ******************************************************************************
+ */
+ /* USER CODE END Header */
+
+#ifdef USE_OBSOLETE_USER_CODE_SECTION_0
+/*
+ * Warning: the user section 0 is no more in use (starting from CubeMx version 4.16.0)
+ * To be suppressed in the future.
+ * Kept to ensure backward compatibility with previous CubeMx versions when
+ * migrating projects.
+ * User code previously added there should be copied in the new user sections before
+ * the section contents can be deleted.
+ */
+/* USER CODE BEGIN 0 */
+/* USER CODE END 0 */
+#endif
+
+/* USER CODE BEGIN DECL */
+
+/* Includes ------------------------------------------------------------------*/
+#include <string.h>
+#include "ff_gen_drv.h"
+#include "bootloader.h"
+
+/* Private typedef -----------------------------------------------------------*/
+/* Private define ------------------------------------------------------------*/
+
+/* Private variables ---------------------------------------------------------*/
+/* Disk status */
+static volatile DSTATUS Stat = STA_NOINIT;
+
+/* USER CODE END DECL */
+
+/* Private function prototypes -----------------------------------------------*/
+DSTATUS USER_initialize (BYTE pdrv);
+DSTATUS USER_status (BYTE pdrv);
+DRESULT USER_read (BYTE pdrv, BYTE *buff, DWORD sector, UINT count);
+#if _USE_WRITE == 1
+ DRESULT USER_write (BYTE pdrv, const BYTE *buff, DWORD sector, UINT count);
+#endif /* _USE_WRITE == 1 */
+#if _USE_IOCTL == 1
+ DRESULT USER_ioctl (BYTE pdrv, BYTE cmd, void *buff);
+#endif /* _USE_IOCTL == 1 */
+
+Diskio_drvTypeDef USER_Driver =
+{
+ USER_initialize,
+ USER_status,
+ USER_read,
+#if _USE_WRITE
+ USER_write,
+#endif /* _USE_WRITE == 1 */
+#if _USE_IOCTL == 1
+ USER_ioctl,
+#endif /* _USE_IOCTL == 1 */
+};
+
+/* Private functions ---------------------------------------------------------*/
+
+/**
+ * @brief Initializes a Drive
+ * @param pdrv: Physical drive number (0..)
+ * @retval DSTATUS: Operation status
+ */
+DSTATUS USER_initialize (
+ BYTE pdrv /* Physical drive nmuber to identify the drive */
+)
+{
+ /* USER CODE BEGIN INIT */
+ return 0;
+ /* USER CODE END INIT */
+}
+
+/**
+ * @brief Gets Disk Status
+ * @param pdrv: Physical drive number (0..)
+ * @retval DSTATUS: Operation status
+ */
+DSTATUS USER_status (
+ BYTE pdrv /* Physical drive number to identify the drive */
+)
+{
+ /* USER CODE BEGIN STATUS */
+ return 0;
+ /* USER CODE END STATUS */
+}
+
+/**
+ * @brief Reads Sector(s)
+ * @param pdrv: Physical drive number (0..)
+ * @param *buff: Data buffer to store read data
+ * @param sector: Sector address (LBA)
+ * @param count: Number of sectors to read (1..128)
+ * @retval DRESULT: Operation result
+ */
+DRESULT USER_read (
+ BYTE pdrv, /* Physical drive nmuber to identify the drive */
+ BYTE *buff, /* Data buffer to store read data */
+ DWORD sector, /* Sector address in LBA */
+ UINT count /* Number of sectors to read */
+)
+{
+ /* USER CODE BEGIN READ */
+ int i;
+ uint32_t address = MSD_ADDRESS + sector * MSD_BLOCK_SIZE;
+
+ for (; count > 0; count--) {
+ for (i = 0; i < MSD_BLOCK_SIZE; i++) {
+ *buff = *((volatile uint8_t*) address);
+ buff++;
+ address++;
+ }
+ }
+ return RES_OK;
+ /* USER CODE END READ */
+}
+
+/**
+ * @brief Writes Sector(s)
+ * @param pdrv: Physical drive number (0..)
+ * @param *buff: Data to be written
+ * @param sector: Sector address (LBA)
+ * @param count: Number of sectors to write (1..128)
+ * @retval DRESULT: Operation result
+ */
+#if _USE_WRITE == 1
+DRESULT USER_write (
+ BYTE pdrv, /* Physical drive nmuber to identify the drive */
+ const BYTE *buff, /* Data to be written */
+ DWORD sector, /* Sector address in LBA */
+ UINT count /* Number of sectors to write */
+)
+{
+ /* USER CODE BEGIN WRITE */
+ /* USER CODE HERE */
+ int res, i;
+ uint16_t value;
+ uint32_t address = MSD_ADDRESS + sector * MSD_BLOCK_SIZE;
+
+ res = HAL_FLASH_Unlock();
+ if (res != HAL_OK)
+ return RES_ERROR;
+
+ FLASH_EraseInitTypeDef erase_init_struct;
+ uint32_t sector_error = 0;
+ erase_init_struct.TypeErase = FLASH_TYPEERASE_PAGES;
+ erase_init_struct.PageAddress = address;
+ erase_init_struct.NbPages = count;
+ res = HAL_FLASHEx_Erase(&erase_init_struct, &sector_error);
+ if (res != HAL_OK) {
+ HAL_FLASH_Lock();
+ return RES_ERROR;
+ }
+
+ for (; count > 0; count--) {
+ for (i = 0; i < MSD_BLOCK_SIZE; i += 2) {
+ value = *(volatile uint16_t*) buff;
+ res = HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD, address, value);
+ if (res != HAL_OK) {
+ HAL_FLASH_Lock();
+ return RES_ERROR;
+ }
+ buff += 2;
+ address += 2;
+ }
+ }
+
+ HAL_FLASH_Lock();
+ return RES_OK;
+ /* USER CODE END WRITE */
+}
+#endif /* _USE_WRITE == 1 */
+
+/**
+ * @brief I/O control operation
+ * @param pdrv: Physical drive number (0..)
+ * @param cmd: Control code
+ * @param *buff: Buffer to send/receive control data
+ * @retval DRESULT: Operation result
+ */
+#if _USE_IOCTL == 1
+DRESULT USER_ioctl (
+ BYTE pdrv, /* Physical drive nmuber (0..) */
+ BYTE cmd, /* Control code */
+ void *buff /* Buffer to send/receive control data */
+)
+{
+ /* USER CODE BEGIN IOCTL */
+ DRESULT res = RES_ERROR;
+ return res;
+ /* USER CODE END IOCTL */
+}
+#endif /* _USE_IOCTL == 1 */
+
diff --git a/STM32_bootloader/FATFS/Target/user_diskio.h b/FamicomDumperBootloader/FATFS/Target/user_diskio.h
index c859066..9fd9041 100644
--- a/STM32_bootloader/FATFS/Target/user_diskio.h
+++ b/FamicomDumperBootloader/FATFS/Target/user_diskio.h
@@ -1,44 +1,44 @@
-/* USER CODE BEGIN Header */
-/**
- ******************************************************************************
- * @file user_diskio.h
- * @brief This file contains the common defines and functions prototypes for
- * the user_diskio driver.
- ******************************************************************************
- * @attention
- *
- * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
- * All rights reserved.</center></h2>
- *
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
- *
- ******************************************************************************
- */
- /* USER CODE END Header */
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __USER_DISKIO_H
-#define __USER_DISKIO_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* USER CODE BEGIN 0 */
-
-/* Includes ------------------------------------------------------------------*/
-/* Exported types ------------------------------------------------------------*/
-/* Exported constants --------------------------------------------------------*/
-/* Exported functions ------------------------------------------------------- */
-extern Diskio_drvTypeDef USER_Driver;
-
-/* USER CODE END 0 */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __USER_DISKIO_H */
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file user_diskio.h
+ * @brief This file contains the common defines and functions prototypes for
+ * the user_diskio driver.
+ ******************************************************************************
+ * @attention
+ *
+ * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
+ * All rights reserved.</center></h2>
+ *
+ * This software component is licensed by ST under Ultimate Liberty license
+ * SLA0044, the "License"; You may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at:
+ * www.st.com/SLA0044
+ *
+ ******************************************************************************
+ */
+ /* USER CODE END Header */
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USER_DISKIO_H
+#define __USER_DISKIO_H
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* USER CODE BEGIN 0 */
+
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+extern Diskio_drvTypeDef USER_Driver;
+
+/* USER CODE END 0 */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __USER_DISKIO_H */
diff --git a/STM32_bootloader/FamicomDumperBootloader.ioc b/FamicomDumperBootloader/FamicomDumperBootloader.ioc
index 8bfbf75..ad88d45 100644
--- a/STM32_bootloader/FamicomDumperBootloader.ioc
+++ b/FamicomDumperBootloader/FamicomDumperBootloader.ioc
@@ -1,4 +1,7 @@
#MicroXplorer Configuration settings - do not modify
+CAD.formats=
+CAD.pinconfig=
+CAD.provider=
Dma.Request0=TIM5_CH3/UP
Dma.RequestsNb=1
Dma.TIM5_CH3/UP.0.Direction=DMA_MEMORY_TO_PERIPH
@@ -66,8 +69,8 @@ Mcu.PinsNb=26
Mcu.ThirdPartyNb=0
Mcu.UserConstants=
Mcu.UserName=STM32F103ZETx
-MxCube.Version=6.6.1
-MxDb.Version=DB.6.0.60
+MxCube.Version=6.10.0
+MxDb.Version=DB.6.0.100
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.DMA2_Channel2_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
@@ -158,7 +161,7 @@ ProjectManager.FreePins=false
ProjectManager.HalAssertFull=false
ProjectManager.HeapSize=0x200
ProjectManager.KeepUserCode=true
-ProjectManager.LastFirmware=true
+ProjectManager.LastFirmware=false
ProjectManager.LibraryCopy=1
ProjectManager.MainLocation=Core/Src
ProjectManager.NoMain=false
@@ -166,12 +169,15 @@ ProjectManager.PreviousToolchain=
ProjectManager.ProjectBuild=false
ProjectManager.ProjectFileName=FamicomDumperBootloader.ioc
ProjectManager.ProjectName=FamicomDumperBootloader
+ProjectManager.ProjectStructure=
ProjectManager.RegisterCallBack=
ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=STM32CubeIDE
ProjectManager.ToolChainLocation=
+ProjectManager.UAScriptAfterPath=
+ProjectManager.UAScriptBeforePath=
ProjectManager.UnderRoot=true
-ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_USB_DEVICE_Init-USB_DEVICE-false-HAL-false,4-MX_DMA_Init-DMA-false-HAL-true,5-MX_TIM5_Init-TIM5-false-HAL-true,6-MX_FATFS_Init-FATFS-false-HAL-false,7-MX_TIM2_Init-TIM2-false-HAL-true,8-MX_TIM1_Init-TIM1-false-HAL-true
+ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_DMA_Init-DMA-false-HAL-true,4-MX_USB_DEVICE_Init-USB_DEVICE-false-HAL-false,5-MX_TIM5_Init-TIM5-false-HAL-true,6-MX_FATFS_Init-FATFS-false-HAL-false,7-MX_TIM2_Init-TIM2-false-HAL-true,8-MX_TIM1_Init-TIM1-false-HAL-true
RCC.ADCFreqValue=36000000
RCC.AHBFreq_Value=72000000
RCC.APB1CLKDivider=RCC_HCLK_DIV2
diff --git a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc.h b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc.h
index 28b17e3..28b17e3 100644
--- a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc.h
+++ b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc.h
diff --git a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_bot.h b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_bot.h
index 09bc38a..09bc38a 100644
--- a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_bot.h
+++ b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_bot.h
diff --git a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_data.h b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_data.h
index f0cebac..f0cebac 100644
--- a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_data.h
+++ b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_data.h
diff --git a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_scsi.h b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_scsi.h
index 6a8c242..6a8c242 100644
--- a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_scsi.h
+++ b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_scsi.h
diff --git a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc.c b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc.c
index 0260889..0260889 100644
--- a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc.c
+++ b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc.c
diff --git a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_bot.c b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_bot.c
index 1414c19..1414c19 100644
--- a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_bot.c
+++ b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_bot.c
diff --git a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_data.c b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_data.c
index 231d5a2..231d5a2 100644
--- a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_data.c
+++ b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_data.c
diff --git a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_scsi.c b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_scsi.c
index bdae392..bdae392 100644
--- a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_scsi.c
+++ b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_scsi.c
diff --git a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h
index 030927b..030927b 100644
--- a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h
+++ b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h
diff --git a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h
index 25a4758..25a4758 100644
--- a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h
+++ b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h
diff --git a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h
index 8d7502f..8d7502f 100644
--- a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h
+++ b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h
diff --git a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h
index 8a6dd5f..8a6dd5f 100644
--- a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h
+++ b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h
diff --git a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c
index b1a60ae..b1a60ae 100644
--- a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c
+++ b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c
diff --git a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c
index e57c1bc..e57c1bc 100644
--- a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c
+++ b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c
diff --git a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c
index 3351972..3351972 100644
--- a/STM32_bootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c
+++ b/FamicomDumperBootloader/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c
diff --git a/STM32_bootloader/Middlewares/Third_Party/FatFs/src/diskio.c b/FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/diskio.c
index ba0f215..ba0f215 100644
--- a/STM32_bootloader/Middlewares/Third_Party/FatFs/src/diskio.c
+++ b/FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/diskio.c
diff --git a/STM32_bootloader/Middlewares/Third_Party/FatFs/src/diskio.h b/FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/diskio.h
index 5148552..5148552 100644
--- a/STM32_bootloader/Middlewares/Third_Party/FatFs/src/diskio.h
+++ b/FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/diskio.h
diff --git a/STM32_bootloader/Middlewares/Third_Party/FatFs/src/ff.c b/FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/ff.c
index 1f87658..1f87658 100644
--- a/STM32_bootloader/Middlewares/Third_Party/FatFs/src/ff.c
+++ b/FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/ff.c
diff --git a/STM32_bootloader/Middlewares/Third_Party/FatFs/src/ff.h b/FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/ff.h
index a5b092c..a5b092c 100644
--- a/STM32_bootloader/Middlewares/Third_Party/FatFs/src/ff.h
+++ b/FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/ff.h
diff --git a/STM32_bootloader/Middlewares/Third_Party/FatFs/src/ff_gen_drv.c b/FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/ff_gen_drv.c
index 42d44f2..42d44f2 100644
--- a/STM32_bootloader/Middlewares/Third_Party/FatFs/src/ff_gen_drv.c
+++ b/FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/ff_gen_drv.c
diff --git a/STM32_bootloader/Middlewares/Third_Party/FatFs/src/ff_gen_drv.h b/FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/ff_gen_drv.h
index 942cff7..942cff7 100644
--- a/STM32_bootloader/Middlewares/Third_Party/FatFs/src/ff_gen_drv.h
+++ b/FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/ff_gen_drv.h
diff --git a/STM32_bootloader/Middlewares/Third_Party/FatFs/src/integer.h b/FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/integer.h
index 074a46b..074a46b 100644
--- a/STM32_bootloader/Middlewares/Third_Party/FatFs/src/integer.h
+++ b/FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/integer.h
diff --git a/STM32_bootloader/Middlewares/Third_Party/FatFs/src/option/syscall.c b/FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/option/syscall.c
index 9c6d1d9..9c6d1d9 100644
--- a/STM32_bootloader/Middlewares/Third_Party/FatFs/src/option/syscall.c
+++ b/FamicomDumperBootloader/Middlewares/Third_Party/FatFs/src/option/syscall.c
diff --git a/STM32_bootloader/STM32F103ZETX_FLASH.ld b/FamicomDumperBootloader/STM32F103ZETX_FLASH.ld
index 7f2537b..9d773eb 100644
--- a/STM32_bootloader/STM32F103ZETX_FLASH.ld
+++ b/FamicomDumperBootloader/STM32F103ZETX_FLASH.ld
@@ -39,8 +39,8 @@ ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
-_Min_Heap_Size = 0x200 ; /* required amount of heap */
-_Min_Stack_Size = 0x400 ; /* required amount of stack */
+_Min_Heap_Size = 0x200; /* required amount of heap */
+_Min_Stack_Size = 0x400; /* required amount of stack */
/* Memories definition */
MEMORY
diff --git a/STM32_bootloader/STM32F103ZETX_FLASH_debug.ld b/FamicomDumperBootloader/STM32F103ZETX_FLASH_debug.ld
index d2c2238..3cf5489 100644
--- a/STM32_bootloader/STM32F103ZETX_FLASH_debug.ld
+++ b/FamicomDumperBootloader/STM32F103ZETX_FLASH_debug.ld
@@ -39,8 +39,8 @@ ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
-_Min_Heap_Size = 0x200 ; /* required amount of heap */
-_Min_Stack_Size = 0x400 ; /* required amount of stack */
+_Min_Heap_Size = 0x200; /* required amount of heap */
+_Min_Stack_Size = 0x400; /* required amount of stack */
/* Memories definition */
MEMORY
diff --git a/STM32_bootloader/USB_DEVICE/App/usb_device.c b/FamicomDumperBootloader/USB_DEVICE/App/usb_device.c
index 8385dd7..ec19de5 100644
--- a/STM32_bootloader/USB_DEVICE/App/usb_device.c
+++ b/FamicomDumperBootloader/USB_DEVICE/App/usb_device.c
@@ -1,101 +1,101 @@
-/* USER CODE BEGIN Header */
-/**
- ******************************************************************************
- * @file : usb_device.c
- * @version : v2.0_Cube
- * @brief : This file implements the USB Device
- ******************************************************************************
- * @attention
- *
- * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
- * All rights reserved.</center></h2>
- *
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
- *
- ******************************************************************************
- */
-/* USER CODE END Header */
-
-/* Includes ------------------------------------------------------------------*/
-
-#include "usb_device.h"
-#include "usbd_core.h"
-#include "usbd_desc.h"
-#include "usbd_msc.h"
-#include "usbd_storage_if.h"
-
-/* USER CODE BEGIN Includes */
-
-/* USER CODE END Includes */
-
-/* USER CODE BEGIN PV */
-/* Private variables ---------------------------------------------------------*/
-
-/* USER CODE END PV */
-
-/* USER CODE BEGIN PFP */
-/* Private function prototypes -----------------------------------------------*/
-
-/* USER CODE END PFP */
-
-/* USB Device Core handle declaration. */
-USBD_HandleTypeDef hUsbDeviceFS;
-
-/*
- * -- Insert your variables declaration here --
- */
-/* USER CODE BEGIN 0 */
-
-/* USER CODE END 0 */
-
-/*
- * -- Insert your external function declaration here --
- */
-/* USER CODE BEGIN 1 */
-
-/* USER CODE END 1 */
-
-/**
- * Init USB device Library, add supported class and start the library
- * @retval None
- */
-void MX_USB_DEVICE_Init(void)
-{
- /* USER CODE BEGIN USB_DEVICE_Init_PreTreatment */
-
- /* USER CODE END USB_DEVICE_Init_PreTreatment */
-
- /* Init Device Library, add supported class and start the library. */
- if (USBD_Init(&hUsbDeviceFS, &FS_Desc, DEVICE_FS) != USBD_OK)
- {
- Error_Handler();
- }
- if (USBD_RegisterClass(&hUsbDeviceFS, &USBD_MSC) != USBD_OK)
- {
- Error_Handler();
- }
- if (USBD_MSC_RegisterStorage(&hUsbDeviceFS, &USBD_Storage_Interface_fops_FS) != USBD_OK)
- {
- Error_Handler();
- }
- if (USBD_Start(&hUsbDeviceFS) != USBD_OK)
- {
- Error_Handler();
- }
-
- /* USER CODE BEGIN USB_DEVICE_Init_PostTreatment */
-
- /* USER CODE END USB_DEVICE_Init_PostTreatment */
-}
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file : usb_device.c
+ * @version : v2.0_Cube
+ * @brief : This file implements the USB Device
+ ******************************************************************************
+ * @attention
+ *
+ * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
+ * All rights reserved.</center></h2>
+ *
+ * This software component is licensed by ST under Ultimate Liberty license
+ * SLA0044, the "License"; You may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at:
+ * www.st.com/SLA0044
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Includes ------------------------------------------------------------------*/
+
+#include "usb_device.h"
+#include "usbd_core.h"
+#include "usbd_desc.h"
+#include "usbd_msc.h"
+#include "usbd_storage_if.h"
+
+/* USER CODE BEGIN Includes */
+
+/* USER CODE END Includes */
+
+/* USER CODE BEGIN PV */
+/* Private variables ---------------------------------------------------------*/
+
+/* USER CODE END PV */
+
+/* USER CODE BEGIN PFP */
+/* Private function prototypes -----------------------------------------------*/
+
+/* USER CODE END PFP */
+
+/* USB Device Core handle declaration. */
+USBD_HandleTypeDef hUsbDeviceFS;
+
+/*
+ * -- Insert your variables declaration here --
+ */
+/* USER CODE BEGIN 0 */
+
+/* USER CODE END 0 */
+
+/*
+ * -- Insert your external function declaration here --
+ */
+/* USER CODE BEGIN 1 */
+
+/* USER CODE END 1 */
+
+/**
+ * Init USB device Library, add supported class and start the library
+ * @retval None
+ */
+void MX_USB_DEVICE_Init(void)
+{
+ /* USER CODE BEGIN USB_DEVICE_Init_PreTreatment */
+
+ /* USER CODE END USB_DEVICE_Init_PreTreatment */
+
+ /* Init Device Library, add supported class and start the library. */
+ if (USBD_Init(&hUsbDeviceFS, &FS_Desc, DEVICE_FS) != USBD_OK)
+ {
+ Error_Handler();
+ }
+ if (USBD_RegisterClass(&hUsbDeviceFS, &USBD_MSC) != USBD_OK)
+ {
+ Error_Handler();
+ }
+ if (USBD_MSC_RegisterStorage(&hUsbDeviceFS, &USBD_Storage_Interface_fops_FS) != USBD_OK)
+ {
+ Error_Handler();
+ }
+ if (USBD_Start(&hUsbDeviceFS) != USBD_OK)
+ {
+ Error_Handler();
+ }
+
+ /* USER CODE BEGIN USB_DEVICE_Init_PostTreatment */
+
+ /* USER CODE END USB_DEVICE_Init_PostTreatment */
+}
+
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
diff --git a/STM32_bootloader/USB_DEVICE/App/usb_device.h b/FamicomDumperBootloader/USB_DEVICE/App/usb_device.h
index e9e8cff..a74adb7 100644
--- a/STM32_bootloader/USB_DEVICE/App/usb_device.h
+++ b/FamicomDumperBootloader/USB_DEVICE/App/usb_device.h
@@ -1,103 +1,103 @@
-/* USER CODE BEGIN Header */
-/**
- ******************************************************************************
- * @file : usb_device.h
- * @version : v2.0_Cube
- * @brief : Header for usb_device.c file.
- ******************************************************************************
- * @attention
- *
- * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
- * All rights reserved.</center></h2>
- *
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
- *
- ******************************************************************************
- */
-/* USER CODE END Header */
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __USB_DEVICE__H__
-#define __USB_DEVICE__H__
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f1xx.h"
-#include "stm32f1xx_hal.h"
-#include "usbd_def.h"
-
-/* USER CODE BEGIN INCLUDE */
-
-/* USER CODE END INCLUDE */
-
-/** @addtogroup USBD_OTG_DRIVER
- * @{
- */
-
-/** @defgroup USBD_DEVICE USBD_DEVICE
- * @brief Device file for Usb otg low level driver.
- * @{
- */
-
-/** @defgroup USBD_DEVICE_Exported_Variables USBD_DEVICE_Exported_Variables
- * @brief Public variables.
- * @{
- */
-
-/* Private variables ---------------------------------------------------------*/
-/* USER CODE BEGIN PV */
-
-/* USER CODE END PV */
-
-/* Private function prototypes -----------------------------------------------*/
-/* USER CODE BEGIN PFP */
-
-/* USER CODE END PFP */
-
-/*
- * -- Insert your variables declaration here --
- */
-/* USER CODE BEGIN VARIABLES */
-
-/* USER CODE END VARIABLES */
-/**
- * @}
- */
-
-/** @defgroup USBD_DEVICE_Exported_FunctionsPrototype USBD_DEVICE_Exported_FunctionsPrototype
- * @brief Declaration of public functions for Usb device.
- * @{
- */
-
-/** USB Device initialization function. */
-void MX_USB_DEVICE_Init(void);
-
-/*
- * -- Insert functions declaration here --
- */
-/* USER CODE BEGIN FD */
-
-/* USER CODE END FD */
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __USB_DEVICE__H__ */
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file : usb_device.h
+ * @version : v2.0_Cube
+ * @brief : Header for usb_device.c file.
+ ******************************************************************************
+ * @attention
+ *
+ * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
+ * All rights reserved.</center></h2>
+ *
+ * This software component is licensed by ST under Ultimate Liberty license
+ * SLA0044, the "License"; You may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at:
+ * www.st.com/SLA0044
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_DEVICE__H__
+#define __USB_DEVICE__H__
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+#include "stm32f1xx.h"
+#include "stm32f1xx_hal.h"
+#include "usbd_def.h"
+
+/* USER CODE BEGIN INCLUDE */
+
+/* USER CODE END INCLUDE */
+
+/** @addtogroup USBD_OTG_DRIVER
+ * @{
+ */
+
+/** @defgroup USBD_DEVICE USBD_DEVICE
+ * @brief Device file for Usb otg low level driver.
+ * @{
+ */
+
+/** @defgroup USBD_DEVICE_Exported_Variables USBD_DEVICE_Exported_Variables
+ * @brief Public variables.
+ * @{
+ */
+
+/* Private variables ---------------------------------------------------------*/
+/* USER CODE BEGIN PV */
+
+/* USER CODE END PV */
+
+/* Private function prototypes -----------------------------------------------*/
+/* USER CODE BEGIN PFP */
+
+/* USER CODE END PFP */
+
+/*
+ * -- Insert your variables declaration here --
+ */
+/* USER CODE BEGIN VARIABLES */
+
+/* USER CODE END VARIABLES */
+/**
+ * @}
+ */
+
+/** @defgroup USBD_DEVICE_Exported_FunctionsPrototype USBD_DEVICE_Exported_FunctionsPrototype
+ * @brief Declaration of public functions for Usb device.
+ * @{
+ */
+
+/** USB Device initialization function. */
+void MX_USB_DEVICE_Init(void);
+
+/*
+ * -- Insert functions declaration here --
+ */
+/* USER CODE BEGIN FD */
+
+/* USER CODE END FD */
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __USB_DEVICE__H__ */
diff --git a/STM32_bootloader/USB_DEVICE/App/usbd_desc.c b/FamicomDumperBootloader/USB_DEVICE/App/usbd_desc.c
index 3368732..818c785 100644
--- a/STM32_bootloader/USB_DEVICE/App/usbd_desc.c
+++ b/FamicomDumperBootloader/USB_DEVICE/App/usbd_desc.c
@@ -1,393 +1,395 @@
-/* USER CODE BEGIN Header */
-/**
- ******************************************************************************
- * @file : App/usbd_desc.c
- * @version : v2.0_Cube
- * @brief : This file implements the USB device descriptors.
- ******************************************************************************
- * @attention
- *
- * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
- * All rights reserved.</center></h2>
- *
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
- *
- ******************************************************************************
- */
-/* USER CODE END Header */
-
-/* Includes ------------------------------------------------------------------*/
-#include "usbd_core.h"
-#include "usbd_desc.h"
-#include "usbd_conf.h"
-
-/* USER CODE BEGIN INCLUDE */
-
-/* USER CODE END INCLUDE */
-
-/* Private typedef -----------------------------------------------------------*/
-/* Private define ------------------------------------------------------------*/
-/* Private macro -------------------------------------------------------------*/
-
-/* USER CODE BEGIN PV */
-/* Private variables ---------------------------------------------------------*/
-
-/* USER CODE END PV */
-
-/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
- * @{
- */
-
-/** @addtogroup USBD_DESC
- * @{
- */
-
-/** @defgroup USBD_DESC_Private_TypesDefinitions USBD_DESC_Private_TypesDefinitions
- * @brief Private types.
- * @{
- */
-
-/* USER CODE BEGIN PRIVATE_TYPES */
-
-/* USER CODE END PRIVATE_TYPES */
-
-/**
- * @}
- */
-
-/** @defgroup USBD_DESC_Private_Defines USBD_DESC_Private_Defines
- * @brief Private defines.
- * @{
- */
-
-#define USBD_VID 0x1209
-#define USBD_LANGID_STRING 1033
-#define USBD_MANUFACTURER_STRING "Cluster"
-#define USBD_PID_FS 0xBABA
-#define USBD_PRODUCT_STRING_FS "Famicom Dumper/Writer Bootloader"
-#define USBD_CONFIGURATION_STRING_FS "MSC Config"
-#define USBD_INTERFACE_STRING_FS "MSC Interface"
-
-/* USER CODE BEGIN PRIVATE_DEFINES */
-
-/* USER CODE END PRIVATE_DEFINES */
-
-/**
- * @}
- */
-
-/* USER CODE BEGIN 0 */
-
-/* USER CODE END 0 */
-
-/** @defgroup USBD_DESC_Private_Macros USBD_DESC_Private_Macros
- * @brief Private macros.
- * @{
- */
-
-/* USER CODE BEGIN PRIVATE_MACRO */
-
-/* USER CODE END PRIVATE_MACRO */
-
-/**
- * @}
- */
-
-/** @defgroup USBD_DESC_Private_FunctionPrototypes USBD_DESC_Private_FunctionPrototypes
- * @brief Private functions declaration.
- * @{
- */
-
-static void Get_SerialNum(void);
-static void IntToUnicode(uint32_t value, uint8_t * pbuf, uint8_t len);
-
-/**
- * @}
- */
-
-/** @defgroup USBD_DESC_Private_FunctionPrototypes USBD_DESC_Private_FunctionPrototypes
- * @brief Private functions declaration for FS.
- * @{
- */
-
-uint8_t * USBD_FS_DeviceDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
-uint8_t * USBD_FS_LangIDStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
-uint8_t * USBD_FS_ManufacturerStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
-uint8_t * USBD_FS_ProductStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
-uint8_t * USBD_FS_SerialStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
-uint8_t * USBD_FS_ConfigStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
-uint8_t * USBD_FS_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
-
-/**
- * @}
- */
-
-/** @defgroup USBD_DESC_Private_Variables USBD_DESC_Private_Variables
- * @brief Private variables.
- * @{
- */
-
-USBD_DescriptorsTypeDef FS_Desc =
-{
- USBD_FS_DeviceDescriptor
-, USBD_FS_LangIDStrDescriptor
-, USBD_FS_ManufacturerStrDescriptor
-, USBD_FS_ProductStrDescriptor
-, USBD_FS_SerialStrDescriptor
-, USBD_FS_ConfigStrDescriptor
-, USBD_FS_InterfaceStrDescriptor
-};
-
-#if defined ( __ICCARM__ ) /* IAR Compiler */
- #pragma data_alignment=4
-#endif /* defined ( __ICCARM__ ) */
-/** USB standard device descriptor. */
-__ALIGN_BEGIN uint8_t USBD_FS_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END =
-{
- 0x12, /*bLength */
- USB_DESC_TYPE_DEVICE, /*bDescriptorType*/
- 0x00, /*bcdUSB */
- 0x02,
- 0x00, /*bDeviceClass*/
- 0x00, /*bDeviceSubClass*/
- 0x00, /*bDeviceProtocol*/
- USB_MAX_EP0_SIZE, /*bMaxPacketSize*/
- LOBYTE(USBD_VID), /*idVendor*/
- HIBYTE(USBD_VID), /*idVendor*/
- LOBYTE(USBD_PID_FS), /*idProduct*/
- HIBYTE(USBD_PID_FS), /*idProduct*/
- 0x00, /*bcdDevice rel. 2.00*/
- 0x02,
- USBD_IDX_MFC_STR, /*Index of manufacturer string*/
- USBD_IDX_PRODUCT_STR, /*Index of product string*/
- USBD_IDX_SERIAL_STR, /*Index of serial number string*/
- USBD_MAX_NUM_CONFIGURATION /*bNumConfigurations*/
-};
-
-/* USB_DeviceDescriptor */
-
-/**
- * @}
- */
-
-/** @defgroup USBD_DESC_Private_Variables USBD_DESC_Private_Variables
- * @brief Private variables.
- * @{
- */
-
-#if defined ( __ICCARM__ ) /* IAR Compiler */
- #pragma data_alignment=4
-#endif /* defined ( __ICCARM__ ) */
-
-/** USB lang identifier descriptor. */
-__ALIGN_BEGIN uint8_t USBD_LangIDDesc[USB_LEN_LANGID_STR_DESC] __ALIGN_END =
-{
- USB_LEN_LANGID_STR_DESC,
- USB_DESC_TYPE_STRING,
- LOBYTE(USBD_LANGID_STRING),
- HIBYTE(USBD_LANGID_STRING)
-};
-
-#if defined ( __ICCARM__ ) /* IAR Compiler */
- #pragma data_alignment=4
-#endif /* defined ( __ICCARM__ ) */
-/* Internal string descriptor. */
-__ALIGN_BEGIN uint8_t USBD_StrDesc[USBD_MAX_STR_DESC_SIZ] __ALIGN_END;
-
-#if defined ( __ICCARM__ ) /*!< IAR Compiler */
- #pragma data_alignment=4
-#endif
-__ALIGN_BEGIN uint8_t USBD_StringSerial[USB_SIZ_STRING_SERIAL] __ALIGN_END = {
- USB_SIZ_STRING_SERIAL,
- USB_DESC_TYPE_STRING,
-};
-
-/**
- * @}
- */
-
-/** @defgroup USBD_DESC_Private_Functions USBD_DESC_Private_Functions
- * @brief Private functions.
- * @{
- */
-
-/**
- * @brief Return the device descriptor
- * @param speed : Current device speed
- * @param length : Pointer to data length variable
- * @retval Pointer to descriptor buffer
- */
-uint8_t * USBD_FS_DeviceDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
-{
- UNUSED(speed);
- *length = sizeof(USBD_FS_DeviceDesc);
- return USBD_FS_DeviceDesc;
-}
-
-/**
- * @brief Return the LangID string descriptor
- * @param speed : Current device speed
- * @param length : Pointer to data length variable
- * @retval Pointer to descriptor buffer
- */
-uint8_t * USBD_FS_LangIDStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
-{
- UNUSED(speed);
- *length = sizeof(USBD_LangIDDesc);
- return USBD_LangIDDesc;
-}
-
-/**
- * @brief Return the product string descriptor
- * @param speed : Current device speed
- * @param length : Pointer to data length variable
- * @retval Pointer to descriptor buffer
- */
-uint8_t * USBD_FS_ProductStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
-{
- if(speed == 0)
- {
- USBD_GetString((uint8_t *)USBD_PRODUCT_STRING_FS, USBD_StrDesc, length);
- }
- else
- {
- USBD_GetString((uint8_t *)USBD_PRODUCT_STRING_FS, USBD_StrDesc, length);
- }
- return USBD_StrDesc;
-}
-
-/**
- * @brief Return the manufacturer string descriptor
- * @param speed : Current device speed
- * @param length : Pointer to data length variable
- * @retval Pointer to descriptor buffer
- */
-uint8_t * USBD_FS_ManufacturerStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
-{
- UNUSED(speed);
- USBD_GetString((uint8_t *)USBD_MANUFACTURER_STRING, USBD_StrDesc, length);
- return USBD_StrDesc;
-}
-
-/**
- * @brief Return the serial number string descriptor
- * @param speed : Current device speed
- * @param length : Pointer to data length variable
- * @retval Pointer to descriptor buffer
- */
-uint8_t * USBD_FS_SerialStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
-{
- UNUSED(speed);
- *length = USB_SIZ_STRING_SERIAL;
-
- /* Update the serial number string descriptor with the data from the unique
- * ID */
- Get_SerialNum();
- /* USER CODE BEGIN USBD_FS_SerialStrDescriptor */
-
- /* USER CODE END USBD_FS_SerialStrDescriptor */
- return (uint8_t *) USBD_StringSerial;
-}
-
-/**
- * @brief Return the configuration string descriptor
- * @param speed : Current device speed
- * @param length : Pointer to data length variable
- * @retval Pointer to descriptor buffer
- */
-uint8_t * USBD_FS_ConfigStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
-{
- if(speed == USBD_SPEED_HIGH)
- {
- USBD_GetString((uint8_t *)USBD_CONFIGURATION_STRING_FS, USBD_StrDesc, length);
- }
- else
- {
- USBD_GetString((uint8_t *)USBD_CONFIGURATION_STRING_FS, USBD_StrDesc, length);
- }
- return USBD_StrDesc;
-}
-
-/**
- * @brief Return the interface string descriptor
- * @param speed : Current device speed
- * @param length : Pointer to data length variable
- * @retval Pointer to descriptor buffer
- */
-uint8_t * USBD_FS_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
-{
- if(speed == 0)
- {
- USBD_GetString((uint8_t *)USBD_INTERFACE_STRING_FS, USBD_StrDesc, length);
- }
- else
- {
- USBD_GetString((uint8_t *)USBD_INTERFACE_STRING_FS, USBD_StrDesc, length);
- }
- return USBD_StrDesc;
-}
-
-/**
- * @brief Create the serial number string descriptor
- * @param None
- * @retval None
- */
-static void Get_SerialNum(void)
-{
- uint32_t deviceserial0, deviceserial1, deviceserial2;
-
- deviceserial0 = *(uint32_t *) DEVICE_ID1;
- deviceserial1 = *(uint32_t *) DEVICE_ID2;
- deviceserial2 = *(uint32_t *) DEVICE_ID3;
-
- deviceserial0 += deviceserial2;
-
- if (deviceserial0 != 0)
- {
- IntToUnicode(deviceserial0, &USBD_StringSerial[2], 8);
- IntToUnicode(deviceserial1, &USBD_StringSerial[18], 4);
- }
-}
-
-/**
- * @brief Convert Hex 32Bits value into char
- * @param value: value to convert
- * @param pbuf: pointer to the buffer
- * @param len: buffer length
- * @retval None
- */
-static void IntToUnicode(uint32_t value, uint8_t * pbuf, uint8_t len)
-{
- uint8_t idx = 0;
-
- for (idx = 0; idx < len; idx++)
- {
- if (((value >> 28)) < 0xA)
- {
- pbuf[2 * idx] = (value >> 28) + '0';
- }
- else
- {
- pbuf[2 * idx] = (value >> 28) + 'A' - 10;
- }
-
- value = value << 4;
-
- pbuf[2 * idx + 1] = 0;
- }
-}
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file : App/usbd_desc.c
+ * @version : v2.0_Cube
+ * @brief : This file implements the USB device descriptors.
+ ******************************************************************************
+ * @attention
+ *
+ * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
+ * All rights reserved.</center></h2>
+ *
+ * This software component is licensed by ST under Ultimate Liberty license
+ * SLA0044, the "License"; You may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at:
+ * www.st.com/SLA0044
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Includes ------------------------------------------------------------------*/
+#include "usbd_core.h"
+#include "usbd_desc.h"
+#include "usbd_conf.h"
+
+/* USER CODE BEGIN INCLUDE */
+
+/* USER CODE END INCLUDE */
+
+/* Private typedef -----------------------------------------------------------*/
+/* Private define ------------------------------------------------------------*/
+/* Private macro -------------------------------------------------------------*/
+
+/* USER CODE BEGIN PV */
+/* Private variables ---------------------------------------------------------*/
+
+/* USER CODE END PV */
+
+/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
+ * @{
+ */
+
+/** @addtogroup USBD_DESC
+ * @{
+ */
+
+/** @defgroup USBD_DESC_Private_TypesDefinitions USBD_DESC_Private_TypesDefinitions
+ * @brief Private types.
+ * @{
+ */
+
+/* USER CODE BEGIN PRIVATE_TYPES */
+
+/* USER CODE END PRIVATE_TYPES */
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_DESC_Private_Defines USBD_DESC_Private_Defines
+ * @brief Private defines.
+ * @{
+ */
+
+#define USBD_VID 0x1209
+#define USBD_LANGID_STRING 1033
+#define USBD_MANUFACTURER_STRING "Cluster"
+#define USBD_PID_FS 0xBABA
+#define USBD_PRODUCT_STRING_FS "Famicom Dumper/Writer Bootloader"
+#define USBD_CONFIGURATION_STRING_FS "MSC Config"
+#define USBD_INTERFACE_STRING_FS "MSC Interface"
+
+/* USER CODE BEGIN PRIVATE_DEFINES */
+
+/* USER CODE END PRIVATE_DEFINES */
+
+/**
+ * @}
+ */
+
+/* USER CODE BEGIN 0 */
+
+/* USER CODE END 0 */
+
+/** @defgroup USBD_DESC_Private_Macros USBD_DESC_Private_Macros
+ * @brief Private macros.
+ * @{
+ */
+
+/* USER CODE BEGIN PRIVATE_MACRO */
+
+/* USER CODE END PRIVATE_MACRO */
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_DESC_Private_FunctionPrototypes USBD_DESC_Private_FunctionPrototypes
+ * @brief Private functions declaration.
+ * @{
+ */
+
+static void Get_SerialNum(void);
+static void IntToUnicode(uint32_t value, uint8_t * pbuf, uint8_t len);
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_DESC_Private_FunctionPrototypes USBD_DESC_Private_FunctionPrototypes
+ * @brief Private functions declaration for FS.
+ * @{
+ */
+
+uint8_t * USBD_FS_DeviceDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
+uint8_t * USBD_FS_LangIDStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
+uint8_t * USBD_FS_ManufacturerStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
+uint8_t * USBD_FS_ProductStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
+uint8_t * USBD_FS_SerialStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
+uint8_t * USBD_FS_ConfigStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
+uint8_t * USBD_FS_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_DESC_Private_Variables USBD_DESC_Private_Variables
+ * @brief Private variables.
+ * @{
+ */
+
+USBD_DescriptorsTypeDef FS_Desc =
+{
+ USBD_FS_DeviceDescriptor
+, USBD_FS_LangIDStrDescriptor
+, USBD_FS_ManufacturerStrDescriptor
+, USBD_FS_ProductStrDescriptor
+, USBD_FS_SerialStrDescriptor
+, USBD_FS_ConfigStrDescriptor
+, USBD_FS_InterfaceStrDescriptor
+};
+
+#if defined ( __ICCARM__ ) /* IAR Compiler */
+ #pragma data_alignment=4
+#endif /* defined ( __ICCARM__ ) */
+/** USB standard device descriptor. */
+__ALIGN_BEGIN uint8_t USBD_FS_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END =
+{
+ 0x12, /*bLength */
+ USB_DESC_TYPE_DEVICE, /*bDescriptorType*/
+ 0x00, /*bcdUSB */
+ 0x02,
+ 0x00, /*bDeviceClass*/
+ 0x00, /*bDeviceSubClass*/
+ 0x00, /*bDeviceProtocol*/
+ USB_MAX_EP0_SIZE, /*bMaxPacketSize*/
+ LOBYTE(USBD_VID), /*idVendor*/
+ HIBYTE(USBD_VID), /*idVendor*/
+ LOBYTE(USBD_PID_FS), /*idProduct*/
+ HIBYTE(USBD_PID_FS), /*idProduct*/
+ 0x00, /*bcdDevice rel. 2.00*/
+ 0x02,
+ USBD_IDX_MFC_STR, /*Index of manufacturer string*/
+ USBD_IDX_PRODUCT_STR, /*Index of product string*/
+ USBD_IDX_SERIAL_STR, /*Index of serial number string*/
+ USBD_MAX_NUM_CONFIGURATION /*bNumConfigurations*/
+};
+
+/* USB_DeviceDescriptor */
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_DESC_Private_Variables USBD_DESC_Private_Variables
+ * @brief Private variables.
+ * @{
+ */
+
+#if defined ( __ICCARM__ ) /* IAR Compiler */
+ #pragma data_alignment=4
+#endif /* defined ( __ICCARM__ ) */
+
+/** USB lang identifier descriptor. */
+__ALIGN_BEGIN uint8_t USBD_LangIDDesc[USB_LEN_LANGID_STR_DESC] __ALIGN_END =
+{
+ USB_LEN_LANGID_STR_DESC,
+ USB_DESC_TYPE_STRING,
+ LOBYTE(USBD_LANGID_STRING),
+ HIBYTE(USBD_LANGID_STRING)
+};
+
+#if defined ( __ICCARM__ ) /* IAR Compiler */
+ #pragma data_alignment=4
+#endif /* defined ( __ICCARM__ ) */
+/* Internal string descriptor. */
+__ALIGN_BEGIN uint8_t USBD_StrDesc[USBD_MAX_STR_DESC_SIZ] __ALIGN_END;
+
+#if defined ( __ICCARM__ ) /*!< IAR Compiler */
+ #pragma data_alignment=4
+#endif
+__ALIGN_BEGIN uint8_t USBD_StringSerial[USB_SIZ_STRING_SERIAL] __ALIGN_END = {
+ USB_SIZ_STRING_SERIAL,
+ USB_DESC_TYPE_STRING,
+};
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_DESC_Private_Functions USBD_DESC_Private_Functions
+ * @brief Private functions.
+ * @{
+ */
+
+/**
+ * @brief Return the device descriptor
+ * @param speed : Current device speed
+ * @param length : Pointer to data length variable
+ * @retval Pointer to descriptor buffer
+ */
+uint8_t * USBD_FS_DeviceDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
+{
+ UNUSED(speed);
+ *length = sizeof(USBD_FS_DeviceDesc);
+ return USBD_FS_DeviceDesc;
+}
+
+/**
+ * @brief Return the LangID string descriptor
+ * @param speed : Current device speed
+ * @param length : Pointer to data length variable
+ * @retval Pointer to descriptor buffer
+ */
+uint8_t * USBD_FS_LangIDStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
+{
+ UNUSED(speed);
+ *length = sizeof(USBD_LangIDDesc);
+ return USBD_LangIDDesc;
+}
+
+/**
+ * @brief Return the product string descriptor
+ * @param speed : Current device speed
+ * @param length : Pointer to data length variable
+ * @retval Pointer to descriptor buffer
+ */
+uint8_t * USBD_FS_ProductStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
+{
+ if(speed == 0)
+ {
+ USBD_GetString((uint8_t *)USBD_PRODUCT_STRING_FS, USBD_StrDesc, length);
+ }
+ else
+ {
+ USBD_GetString((uint8_t *)USBD_PRODUCT_STRING_FS, USBD_StrDesc, length);
+ }
+ return USBD_StrDesc;
+}
+
+/**
+ * @brief Return the manufacturer string descriptor
+ * @param speed : Current device speed
+ * @param length : Pointer to data length variable
+ * @retval Pointer to descriptor buffer
+ */
+uint8_t * USBD_FS_ManufacturerStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
+{
+ UNUSED(speed);
+ USBD_GetString((uint8_t *)USBD_MANUFACTURER_STRING, USBD_StrDesc, length);
+ return USBD_StrDesc;
+}
+
+/**
+ * @brief Return the serial number string descriptor
+ * @param speed : Current device speed
+ * @param length : Pointer to data length variable
+ * @retval Pointer to descriptor buffer
+ */
+uint8_t * USBD_FS_SerialStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
+{
+ UNUSED(speed);
+ *length = USB_SIZ_STRING_SERIAL;
+
+ /* Update the serial number string descriptor with the data from the unique
+ * ID */
+ Get_SerialNum();
+ /* USER CODE BEGIN USBD_FS_SerialStrDescriptor */
+
+ /* USER CODE END USBD_FS_SerialStrDescriptor */
+ return (uint8_t *) USBD_StringSerial;
+}
+
+/**
+ * @brief Return the configuration string descriptor
+ * @param speed : Current device speed
+ * @param length : Pointer to data length variable
+ * @retval Pointer to descriptor buffer
+ */
+uint8_t * USBD_FS_ConfigStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
+{
+ if(speed == USBD_SPEED_HIGH)
+ {
+ USBD_GetString((uint8_t *)USBD_CONFIGURATION_STRING_FS, USBD_StrDesc, length);
+ }
+ else
+ {
+ USBD_GetString((uint8_t *)USBD_CONFIGURATION_STRING_FS, USBD_StrDesc, length);
+ }
+ return USBD_StrDesc;
+}
+
+/**
+ * @brief Return the interface string descriptor
+ * @param speed : Current device speed
+ * @param length : Pointer to data length variable
+ * @retval Pointer to descriptor buffer
+ */
+uint8_t * USBD_FS_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
+{
+ if(speed == 0)
+ {
+ USBD_GetString((uint8_t *)USBD_INTERFACE_STRING_FS, USBD_StrDesc, length);
+ }
+ else
+ {
+ USBD_GetString((uint8_t *)USBD_INTERFACE_STRING_FS, USBD_StrDesc, length);
+ }
+ return USBD_StrDesc;
+}
+
+/**
+ * @brief Create the serial number string descriptor
+ * @param None
+ * @retval None
+ */
+static void Get_SerialNum(void)
+{
+ uint32_t deviceserial0;
+ uint32_t deviceserial1;
+ uint32_t deviceserial2;
+
+ deviceserial0 = *(uint32_t *) DEVICE_ID1;
+ deviceserial1 = *(uint32_t *) DEVICE_ID2;
+ deviceserial2 = *(uint32_t *) DEVICE_ID3;
+
+ deviceserial0 += deviceserial2;
+
+ if (deviceserial0 != 0)
+ {
+ IntToUnicode(deviceserial0, &USBD_StringSerial[2], 8);
+ IntToUnicode(deviceserial1, &USBD_StringSerial[18], 4);
+ }
+}
+
+/**
+ * @brief Convert Hex 32Bits value into char
+ * @param value: value to convert
+ * @param pbuf: pointer to the buffer
+ * @param len: buffer length
+ * @retval None
+ */
+static void IntToUnicode(uint32_t value, uint8_t * pbuf, uint8_t len)
+{
+ uint8_t idx = 0;
+
+ for (idx = 0; idx < len; idx++)
+ {
+ if (((value >> 28)) < 0xA)
+ {
+ pbuf[2 * idx] = (value >> 28) + '0';
+ }
+ else
+ {
+ pbuf[2 * idx] = (value >> 28) + 'A' - 10;
+ }
+
+ value = value << 4;
+
+ pbuf[2 * idx + 1] = 0;
+ }
+}
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
diff --git a/STM32_bootloader/USB_DEVICE/App/usbd_desc.h b/FamicomDumperBootloader/USB_DEVICE/App/usbd_desc.h
index 31a62c3..e9c899b 100644
--- a/STM32_bootloader/USB_DEVICE/App/usbd_desc.h
+++ b/FamicomDumperBootloader/USB_DEVICE/App/usbd_desc.h
@@ -1,144 +1,144 @@
-/* USER CODE BEGIN Header */
-/**
- ******************************************************************************
- * @file : usbd_desc.c
- * @version : v2.0_Cube
- * @brief : Header for usbd_conf.c file.
- ******************************************************************************
- * @attention
- *
- * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
- * All rights reserved.</center></h2>
- *
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
- *
- ******************************************************************************
- */
-/* USER CODE END Header */
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __USBD_DESC__C__
-#define __USBD_DESC__C__
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "usbd_def.h"
-
-/* USER CODE BEGIN INCLUDE */
-
-/* USER CODE END INCLUDE */
-
-/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
- * @{
- */
-
-/** @defgroup USBD_DESC USBD_DESC
- * @brief Usb device descriptors module.
- * @{
- */
-
-/** @defgroup USBD_DESC_Exported_Constants USBD_DESC_Exported_Constants
- * @brief Constants.
- * @{
- */
-#define DEVICE_ID1 (UID_BASE)
-#define DEVICE_ID2 (UID_BASE + 0x4)
-#define DEVICE_ID3 (UID_BASE + 0x8)
-
-#define USB_SIZ_STRING_SERIAL 0x1A
-
-/* USER CODE BEGIN EXPORTED_CONSTANTS */
-
-/* USER CODE END EXPORTED_CONSTANTS */
-
-/**
- * @}
- */
-
-/** @defgroup USBD_DESC_Exported_Defines USBD_DESC_Exported_Defines
- * @brief Defines.
- * @{
- */
-
-/* USER CODE BEGIN EXPORTED_DEFINES */
-
-/* USER CODE END EXPORTED_DEFINES */
-
-/**
- * @}
- */
-
-/** @defgroup USBD_DESC_Exported_TypesDefinitions USBD_DESC_Exported_TypesDefinitions
- * @brief Types.
- * @{
- */
-
-/* USER CODE BEGIN EXPORTED_TYPES */
-
-/* USER CODE END EXPORTED_TYPES */
-
-/**
- * @}
- */
-
-/** @defgroup USBD_DESC_Exported_Macros USBD_DESC_Exported_Macros
- * @brief Aliases.
- * @{
- */
-
-/* USER CODE BEGIN EXPORTED_MACRO */
-
-/* USER CODE END EXPORTED_MACRO */
-
-/**
- * @}
- */
-
-/** @defgroup USBD_DESC_Exported_Variables USBD_DESC_Exported_Variables
- * @brief Public variables.
- * @{
- */
-
-/** Descriptor for the Usb device. */
-extern USBD_DescriptorsTypeDef FS_Desc;
-
-/* USER CODE BEGIN EXPORTED_VARIABLES */
-
-/* USER CODE END EXPORTED_VARIABLES */
-
-/**
- * @}
- */
-
-/** @defgroup USBD_DESC_Exported_FunctionsPrototype USBD_DESC_Exported_FunctionsPrototype
- * @brief Public functions declaration.
- * @{
- */
-
-/* USER CODE BEGIN EXPORTED_FUNCTIONS */
-
-/* USER CODE END EXPORTED_FUNCTIONS */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __USBD_DESC__C__ */
-
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file : usbd_desc.c
+ * @version : v2.0_Cube
+ * @brief : Header for usbd_conf.c file.
+ ******************************************************************************
+ * @attention
+ *
+ * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
+ * All rights reserved.</center></h2>
+ *
+ * This software component is licensed by ST under Ultimate Liberty license
+ * SLA0044, the "License"; You may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at:
+ * www.st.com/SLA0044
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USBD_DESC__C__
+#define __USBD_DESC__C__
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+#include "usbd_def.h"
+
+/* USER CODE BEGIN INCLUDE */
+
+/* USER CODE END INCLUDE */
+
+/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
+ * @{
+ */
+
+/** @defgroup USBD_DESC USBD_DESC
+ * @brief Usb device descriptors module.
+ * @{
+ */
+
+/** @defgroup USBD_DESC_Exported_Constants USBD_DESC_Exported_Constants
+ * @brief Constants.
+ * @{
+ */
+#define DEVICE_ID1 (UID_BASE)
+#define DEVICE_ID2 (UID_BASE + 0x4)
+#define DEVICE_ID3 (UID_BASE + 0x8)
+
+#define USB_SIZ_STRING_SERIAL 0x1A
+
+/* USER CODE BEGIN EXPORTED_CONSTANTS */
+
+/* USER CODE END EXPORTED_CONSTANTS */
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_DESC_Exported_Defines USBD_DESC_Exported_Defines
+ * @brief Defines.
+ * @{
+ */
+
+/* USER CODE BEGIN EXPORTED_DEFINES */
+
+/* USER CODE END EXPORTED_DEFINES */
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_DESC_Exported_TypesDefinitions USBD_DESC_Exported_TypesDefinitions
+ * @brief Types.
+ * @{
+ */
+
+/* USER CODE BEGIN EXPORTED_TYPES */
+
+/* USER CODE END EXPORTED_TYPES */
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_DESC_Exported_Macros USBD_DESC_Exported_Macros
+ * @brief Aliases.
+ * @{
+ */
+
+/* USER CODE BEGIN EXPORTED_MACRO */
+
+/* USER CODE END EXPORTED_MACRO */
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_DESC_Exported_Variables USBD_DESC_Exported_Variables
+ * @brief Public variables.
+ * @{
+ */
+
+/** Descriptor for the Usb device. */
+extern USBD_DescriptorsTypeDef FS_Desc;
+
+/* USER CODE BEGIN EXPORTED_VARIABLES */
+
+/* USER CODE END EXPORTED_VARIABLES */
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_DESC_Exported_FunctionsPrototype USBD_DESC_Exported_FunctionsPrototype
+ * @brief Public functions declaration.
+ * @{
+ */
+
+/* USER CODE BEGIN EXPORTED_FUNCTIONS */
+
+/* USER CODE END EXPORTED_FUNCTIONS */
+
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __USBD_DESC__C__ */
+
diff --git a/STM32_bootloader/USB_DEVICE/App/usbd_storage_if.c b/FamicomDumperBootloader/USB_DEVICE/App/usbd_storage_if.c
index d2a8fe4..caee9d9 100644
--- a/STM32_bootloader/USB_DEVICE/App/usbd_storage_if.c
+++ b/FamicomDumperBootloader/USB_DEVICE/App/usbd_storage_if.c
@@ -1,317 +1,317 @@
-/* USER CODE BEGIN Header */
-/**
- ******************************************************************************
- * @file : usbd_storage_if.c
- * @version : v2.0_Cube
- * @brief : Memory management layer.
- ******************************************************************************
- * @attention
- *
- * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
- * All rights reserved.</center></h2>
- *
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
- *
- ******************************************************************************
- */
-/* USER CODE END Header */
-
-/* Includes ------------------------------------------------------------------*/
-#include "usbd_storage_if.h"
-
-/* USER CODE BEGIN INCLUDE */
-#include "bootloader.h"
-/* USER CODE END INCLUDE */
-
-/* Private typedef -----------------------------------------------------------*/
-/* Private define ------------------------------------------------------------*/
-/* Private macro -------------------------------------------------------------*/
-
-/* USER CODE BEGIN PV */
-/* Private variables ---------------------------------------------------------*/
-extern uint32_t last_write_ts;
-/* USER CODE END PV */
-
-/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
- * @brief Usb device.
- * @{
- */
-
-/** @defgroup USBD_STORAGE
- * @brief Usb mass storage device module
- * @{
- */
-
-/** @defgroup USBD_STORAGE_Private_TypesDefinitions
- * @brief Private types.
- * @{
- */
-
-/* USER CODE BEGIN PRIVATE_TYPES */
-
-/* USER CODE END PRIVATE_TYPES */
-
-/**
- * @}
- */
-
-/** @defgroup USBD_STORAGE_Private_Defines
- * @brief Private defines.
- * @{
- */
-
-#define STORAGE_LUN_NBR 1
-#define STORAGE_BLK_NBR 0x10000
-#define STORAGE_BLK_SIZ 0x200
-
-/* USER CODE BEGIN PRIVATE_DEFINES */
-
-/* USER CODE END PRIVATE_DEFINES */
-
-/**
- * @}
- */
-
-/** @defgroup USBD_STORAGE_Private_Macros
- * @brief Private macros.
- * @{
- */
-
-/* USER CODE BEGIN PRIVATE_MACRO */
-
-/* USER CODE END PRIVATE_MACRO */
-
-/**
- * @}
- */
-
-/** @defgroup USBD_STORAGE_Private_Variables
- * @brief Private variables.
- * @{
- */
-
-/* USER CODE BEGIN INQUIRY_DATA_FS */
-/** USB Mass storage Standard Inquiry Data. */
-const int8_t STORAGE_Inquirydata_FS[] = {/* 36 */
-
- /* LUN 0 */
- 0x00,
- 0x80,
- 0x02,
- 0x02,
- (STANDARD_INQUIRY_DATA_LEN - 5),
- 0x00,
- 0x00,
- 0x00,
- 'S', 'T', 'M', ' ', ' ', ' ', ' ', ' ', /* Manufacturer : 8 bytes */
- 'P', 'r', 'o', 'd', 'u', 'c', 't', ' ', /* Product : 16 Bytes */
- ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
- '0', '.', '0' ,'1' /* Version : 4 Bytes */
-};
-/* USER CODE END INQUIRY_DATA_FS */
-
-/* USER CODE BEGIN PRIVATE_VARIABLES */
-
-/* USER CODE END PRIVATE_VARIABLES */
-
-/**
- * @}
- */
-
-/** @defgroup USBD_STORAGE_Exported_Variables
- * @brief Public variables.
- * @{
- */
-
-extern USBD_HandleTypeDef hUsbDeviceFS;
-
-/* USER CODE BEGIN EXPORTED_VARIABLES */
-
-/* USER CODE END EXPORTED_VARIABLES */
-
-/**
- * @}
- */
-
-/** @defgroup USBD_STORAGE_Private_FunctionPrototypes
- * @brief Private functions declaration.
- * @{
- */
-
-static int8_t STORAGE_Init_FS(uint8_t lun);
-static int8_t STORAGE_GetCapacity_FS(uint8_t lun, uint32_t *block_num, uint16_t *block_size);
-static int8_t STORAGE_IsReady_FS(uint8_t lun);
-static int8_t STORAGE_IsWriteProtected_FS(uint8_t lun);
-static int8_t STORAGE_Read_FS(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len);
-static int8_t STORAGE_Write_FS(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len);
-static int8_t STORAGE_GetMaxLun_FS(void);
-
-/* USER CODE BEGIN PRIVATE_FUNCTIONS_DECLARATION */
-
-/* USER CODE END PRIVATE_FUNCTIONS_DECLARATION */
-
-/**
- * @}
- */
-
-USBD_StorageTypeDef USBD_Storage_Interface_fops_FS =
-{
- STORAGE_Init_FS,
- STORAGE_GetCapacity_FS,
- STORAGE_IsReady_FS,
- STORAGE_IsWriteProtected_FS,
- STORAGE_Read_FS,
- STORAGE_Write_FS,
- STORAGE_GetMaxLun_FS,
- (int8_t *)STORAGE_Inquirydata_FS
-};
-
-/* Private functions ---------------------------------------------------------*/
-/**
- * @brief Initializes over USB FS IP
- * @param lun:
- * @retval USBD_OK if all operations are OK else USBD_FAIL
- */
-int8_t STORAGE_Init_FS(uint8_t lun)
-{
- /* USER CODE BEGIN 2 */
- return (USBD_OK);
- /* USER CODE END 2 */
-}
-
-/**
- * @brief .
- * @param lun: .
- * @param block_num: .
- * @param block_size: .
- * @retval USBD_OK if all operations are OK else USBD_FAIL
- */
-int8_t STORAGE_GetCapacity_FS(uint8_t lun, uint32_t *block_num, uint16_t *block_size)
-{
- /* USER CODE BEGIN 3 */
- *block_num = MSD_BLOCK_COUNT;
- *block_size = MSD_BLOCK_SIZE;
- return (USBD_OK);
- /* USER CODE END 3 */
-}
-
-/**
- * @brief .
- * @param lun: .
- * @retval USBD_OK if all operations are OK else USBD_FAIL
- */
-int8_t STORAGE_IsReady_FS(uint8_t lun)
-{
- /* USER CODE BEGIN 4 */
- return (USBD_OK);
- /* USER CODE END 4 */
-}
-
-/**
- * @brief .
- * @param lun: .
- * @retval USBD_OK if all operations are OK else USBD_FAIL
- */
-int8_t STORAGE_IsWriteProtected_FS(uint8_t lun)
-{
- /* USER CODE BEGIN 5 */
- return (USBD_OK);
- /* USER CODE END 5 */
-}
-
-/**
- * @brief .
- * @param lun: .
- * @retval USBD_OK if all operations are OK else USBD_FAIL
- */
-int8_t STORAGE_Read_FS(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len)
-{
- /* USER CODE BEGIN 6 */
- int i;
- uint32_t address = MSD_ADDRESS + blk_addr * MSD_BLOCK_SIZE;
-
- for (; blk_len > 0; blk_len--) {
- for (i = 0; i < MSD_BLOCK_SIZE; i++) {
- *buf = *((volatile uint8_t*) address);
- buf++;
- address++;
- }
- }
- return (USBD_OK);
- /* USER CODE END 6 */
-}
-
-/**
- * @brief .
- * @param lun: .
- * @retval USBD_OK if all operations are OK else USBD_FAIL
- */
-int8_t STORAGE_Write_FS(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len)
-{
- /* USER CODE BEGIN 7 */
- int res, i;
- uint16_t value;
- uint32_t address = MSD_ADDRESS + blk_addr * MSD_BLOCK_SIZE;
-
- res = HAL_FLASH_Unlock();
- if (res != HAL_OK) return USBD_FAIL;
-
- FLASH_EraseInitTypeDef erase_init_struct;
- uint32_t sector_error = 0;
- erase_init_struct.TypeErase = FLASH_TYPEERASE_PAGES;
- erase_init_struct.PageAddress = address;
- erase_init_struct.NbPages = blk_len;
- res = HAL_FLASHEx_Erase(&erase_init_struct, &sector_error);
- if (res != HAL_OK) {
- HAL_FLASH_Lock();
- return USBD_FAIL;
- }
-
- for (; blk_len > 0; blk_len--) {
- for (i = 0; i < MSD_BLOCK_SIZE; i += 2) {
- value = *(volatile uint16_t*) buf;
- res = HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD, address, value);
- if (res != HAL_OK) {
- HAL_FLASH_Lock();
- return USBD_FAIL;
- }
- buf += 2;
- address += 2;
- }
- }
-
- HAL_FLASH_Lock();
-
- last_write_ts = HAL_GetTick();
-
- return (USBD_OK);
- /* USER CODE END 7 */
-}
-
-/**
- * @brief .
- * @param None
- * @retval .
- */
-int8_t STORAGE_GetMaxLun_FS(void)
-{
- /* USER CODE BEGIN 8 */
- return (STORAGE_LUN_NBR - 1);
- /* USER CODE END 8 */
-}
-
-/* USER CODE BEGIN PRIVATE_FUNCTIONS_IMPLEMENTATION */
-
-/* USER CODE END PRIVATE_FUNCTIONS_IMPLEMENTATION */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file : usbd_storage_if.c
+ * @version : v2.0_Cube
+ * @brief : Memory management layer.
+ ******************************************************************************
+ * @attention
+ *
+ * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
+ * All rights reserved.</center></h2>
+ *
+ * This software component is licensed by ST under Ultimate Liberty license
+ * SLA0044, the "License"; You may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at:
+ * www.st.com/SLA0044
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Includes ------------------------------------------------------------------*/
+#include "usbd_storage_if.h"
+
+/* USER CODE BEGIN INCLUDE */
+#include "bootloader.h"
+/* USER CODE END INCLUDE */
+
+/* Private typedef -----------------------------------------------------------*/
+/* Private define ------------------------------------------------------------*/
+/* Private macro -------------------------------------------------------------*/
+
+/* USER CODE BEGIN PV */
+/* Private variables ---------------------------------------------------------*/
+extern uint32_t last_write_ts;
+/* USER CODE END PV */
+
+/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
+ * @brief Usb device.
+ * @{
+ */
+
+/** @defgroup USBD_STORAGE
+ * @brief Usb mass storage device module
+ * @{
+ */
+
+/** @defgroup USBD_STORAGE_Private_TypesDefinitions
+ * @brief Private types.
+ * @{
+ */
+
+/* USER CODE BEGIN PRIVATE_TYPES */
+
+/* USER CODE END PRIVATE_TYPES */
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_STORAGE_Private_Defines
+ * @brief Private defines.
+ * @{
+ */
+
+#define STORAGE_LUN_NBR 1
+#define STORAGE_BLK_NBR 0x10000
+#define STORAGE_BLK_SIZ 0x200
+
+/* USER CODE BEGIN PRIVATE_DEFINES */
+
+/* USER CODE END PRIVATE_DEFINES */
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_STORAGE_Private_Macros
+ * @brief Private macros.
+ * @{
+ */
+
+/* USER CODE BEGIN PRIVATE_MACRO */
+
+/* USER CODE END PRIVATE_MACRO */
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_STORAGE_Private_Variables
+ * @brief Private variables.
+ * @{
+ */
+
+/* USER CODE BEGIN INQUIRY_DATA_FS */
+/** USB Mass storage Standard Inquiry Data. */
+const int8_t STORAGE_Inquirydata_FS[] = {/* 36 */
+
+ /* LUN 0 */
+ 0x00,
+ 0x80,
+ 0x02,
+ 0x02,
+ (STANDARD_INQUIRY_DATA_LEN - 5),
+ 0x00,
+ 0x00,
+ 0x00,
+ 'S', 'T', 'M', ' ', ' ', ' ', ' ', ' ', /* Manufacturer : 8 bytes */
+ 'P', 'r', 'o', 'd', 'u', 'c', 't', ' ', /* Product : 16 Bytes */
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
+ '0', '.', '0' ,'1' /* Version : 4 Bytes */
+};
+/* USER CODE END INQUIRY_DATA_FS */
+
+/* USER CODE BEGIN PRIVATE_VARIABLES */
+
+/* USER CODE END PRIVATE_VARIABLES */
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_STORAGE_Exported_Variables
+ * @brief Public variables.
+ * @{
+ */
+
+extern USBD_HandleTypeDef hUsbDeviceFS;
+
+/* USER CODE BEGIN EXPORTED_VARIABLES */
+
+/* USER CODE END EXPORTED_VARIABLES */
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_STORAGE_Private_FunctionPrototypes
+ * @brief Private functions declaration.
+ * @{
+ */
+
+static int8_t STORAGE_Init_FS(uint8_t lun);
+static int8_t STORAGE_GetCapacity_FS(uint8_t lun, uint32_t *block_num, uint16_t *block_size);
+static int8_t STORAGE_IsReady_FS(uint8_t lun);
+static int8_t STORAGE_IsWriteProtected_FS(uint8_t lun);
+static int8_t STORAGE_Read_FS(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len);
+static int8_t STORAGE_Write_FS(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len);
+static int8_t STORAGE_GetMaxLun_FS(void);
+
+/* USER CODE BEGIN PRIVATE_FUNCTIONS_DECLARATION */
+
+/* USER CODE END PRIVATE_FUNCTIONS_DECLARATION */
+
+/**
+ * @}
+ */
+
+USBD_StorageTypeDef USBD_Storage_Interface_fops_FS =
+{
+ STORAGE_Init_FS,
+ STORAGE_GetCapacity_FS,
+ STORAGE_IsReady_FS,
+ STORAGE_IsWriteProtected_FS,
+ STORAGE_Read_FS,
+ STORAGE_Write_FS,
+ STORAGE_GetMaxLun_FS,
+ (int8_t *)STORAGE_Inquirydata_FS
+};
+
+/* Private functions ---------------------------------------------------------*/
+/**
+ * @brief Initializes over USB FS IP
+ * @param lun:
+ * @retval USBD_OK if all operations are OK else USBD_FAIL
+ */
+int8_t STORAGE_Init_FS(uint8_t lun)
+{
+ /* USER CODE BEGIN 2 */
+ return (USBD_OK);
+ /* USER CODE END 2 */
+}
+
+/**
+ * @brief .
+ * @param lun: .
+ * @param block_num: .
+ * @param block_size: .
+ * @retval USBD_OK if all operations are OK else USBD_FAIL
+ */
+int8_t STORAGE_GetCapacity_FS(uint8_t lun, uint32_t *block_num, uint16_t *block_size)
+{
+ /* USER CODE BEGIN 3 */
+ *block_num = MSD_BLOCK_COUNT;
+ *block_size = MSD_BLOCK_SIZE;
+ return (USBD_OK);
+ /* USER CODE END 3 */
+}
+
+/**
+ * @brief .
+ * @param lun: .
+ * @retval USBD_OK if all operations are OK else USBD_FAIL
+ */
+int8_t STORAGE_IsReady_FS(uint8_t lun)
+{
+ /* USER CODE BEGIN 4 */
+ return (USBD_OK);
+ /* USER CODE END 4 */
+}
+
+/**
+ * @brief .
+ * @param lun: .
+ * @retval USBD_OK if all operations are OK else USBD_FAIL
+ */
+int8_t STORAGE_IsWriteProtected_FS(uint8_t lun)
+{
+ /* USER CODE BEGIN 5 */
+ return (USBD_OK);
+ /* USER CODE END 5 */
+}
+
+/**
+ * @brief .
+ * @param lun: .
+ * @retval USBD_OK if all operations are OK else USBD_FAIL
+ */
+int8_t STORAGE_Read_FS(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len)
+{
+ /* USER CODE BEGIN 6 */
+ int i;
+ uint32_t address = MSD_ADDRESS + blk_addr * MSD_BLOCK_SIZE;
+
+ for (; blk_len > 0; blk_len--) {
+ for (i = 0; i < MSD_BLOCK_SIZE; i++) {
+ *buf = *((volatile uint8_t*) address);
+ buf++;
+ address++;
+ }
+ }
+ return (USBD_OK);
+ /* USER CODE END 6 */
+}
+
+/**
+ * @brief .
+ * @param lun: .
+ * @retval USBD_OK if all operations are OK else USBD_FAIL
+ */
+int8_t STORAGE_Write_FS(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len)
+{
+ /* USER CODE BEGIN 7 */
+ int res, i;
+ uint16_t value;
+ uint32_t address = MSD_ADDRESS + blk_addr * MSD_BLOCK_SIZE;
+
+ res = HAL_FLASH_Unlock();
+ if (res != HAL_OK) return USBD_FAIL;
+
+ FLASH_EraseInitTypeDef erase_init_struct;
+ uint32_t sector_error = 0;
+ erase_init_struct.TypeErase = FLASH_TYPEERASE_PAGES;
+ erase_init_struct.PageAddress = address;
+ erase_init_struct.NbPages = blk_len;
+ res = HAL_FLASHEx_Erase(&erase_init_struct, &sector_error);
+ if (res != HAL_OK) {
+ HAL_FLASH_Lock();
+ return USBD_FAIL;
+ }
+
+ for (; blk_len > 0; blk_len--) {
+ for (i = 0; i < MSD_BLOCK_SIZE; i += 2) {
+ value = *(volatile uint16_t*) buf;
+ res = HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD, address, value);
+ if (res != HAL_OK) {
+ HAL_FLASH_Lock();
+ return USBD_FAIL;
+ }
+ buf += 2;
+ address += 2;
+ }
+ }
+
+ HAL_FLASH_Lock();
+
+ last_write_ts = HAL_GetTick();
+
+ return (USBD_OK);
+ /* USER CODE END 7 */
+}
+
+/**
+ * @brief .
+ * @param None
+ * @retval .
+ */
+int8_t STORAGE_GetMaxLun_FS(void)
+{
+ /* USER CODE BEGIN 8 */
+ return (STORAGE_LUN_NBR - 1);
+ /* USER CODE END 8 */
+}
+
+/* USER CODE BEGIN PRIVATE_FUNCTIONS_IMPLEMENTATION */
+
+/* USER CODE END PRIVATE_FUNCTIONS_IMPLEMENTATION */
+
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
diff --git a/STM32_bootloader/USB_DEVICE/App/usbd_storage_if.h b/FamicomDumperBootloader/USB_DEVICE/App/usbd_storage_if.h
index 928a1fc..3e573d9 100644
--- a/STM32_bootloader/USB_DEVICE/App/usbd_storage_if.h
+++ b/FamicomDumperBootloader/USB_DEVICE/App/usbd_storage_if.h
@@ -1,128 +1,128 @@
-/* USER CODE BEGIN Header */
-/**
- ******************************************************************************
- * @file : usbd_storage_if.h
- * @version : v2.0_Cube
- * @brief : Header for usbd_storage_if.c file.
- ******************************************************************************
- * @attention
- *
- * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
- * All rights reserved.</center></h2>
- *
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
- *
- ******************************************************************************
- */
-/* USER CODE END Header */
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __USBD_STORAGE_IF_H__
-#define __USBD_STORAGE_IF_H__
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "usbd_msc.h"
-
-/* USER CODE BEGIN INCLUDE */
-
-/* USER CODE END INCLUDE */
-
-/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
- * @brief For Usb device.
- * @{
- */
-
-/** @defgroup USBD_STORAGE USBD_STORAGE
- * @brief Header file for the usb_storage_if.c file
- * @{
- */
-
-/** @defgroup USBD_STORAGE_Exported_Defines USBD_STORAGE_Exported_Defines
- * @brief Defines.
- * @{
- */
-
-/* USER CODE BEGIN EXPORTED_DEFINES */
-
-/* USER CODE END EXPORTED_DEFINES */
-
-/**
- * @}
- */
-
-/** @defgroup USBD_STORAGE_Exported_Types USBD_STORAGE_Exported_Types
- * @brief Types.
- * @{
- */
-
-/* USER CODE BEGIN EXPORTED_TYPES */
-
-/* USER CODE END EXPORTED_TYPES */
-
-/**
- * @}
- */
-
-/** @defgroup USBD_STORAGE_Exported_Macros USBD_STORAGE_Exported_Macros
- * @brief Aliases.
- * @{
- */
-
-/* USER CODE BEGIN EXPORTED_MACRO */
-
-/* USER CODE END EXPORTED_MACRO */
-
-/**
- * @}
- */
-
-/** @defgroup USBD_STORAGE_Exported_Variables USBD_STORAGE_Exported_Variables
- * @brief Public variables.
- * @{
- */
-
-/** STORAGE Interface callback. */
-extern USBD_StorageTypeDef USBD_Storage_Interface_fops_FS;
-
-/* USER CODE BEGIN EXPORTED_VARIABLES */
-
-/* USER CODE END EXPORTED_VARIABLES */
-
-/**
- * @}
- */
-
-/** @defgroup USBD_STORAGE_Exported_FunctionsPrototype USBD_STORAGE_Exported_FunctionsPrototype
- * @brief Public functions declaration.
- * @{
- */
-
-/* USER CODE BEGIN EXPORTED_FUNCTIONS */
-
-/* USER CODE END EXPORTED_FUNCTIONS */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __USBD_STORAGE_IF_H__ */
-
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file : usbd_storage_if.h
+ * @version : v2.0_Cube
+ * @brief : Header for usbd_storage_if.c file.
+ ******************************************************************************
+ * @attention
+ *
+ * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
+ * All rights reserved.</center></h2>
+ *
+ * This software component is licensed by ST under Ultimate Liberty license
+ * SLA0044, the "License"; You may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at:
+ * www.st.com/SLA0044
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USBD_STORAGE_IF_H__
+#define __USBD_STORAGE_IF_H__
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+#include "usbd_msc.h"
+
+/* USER CODE BEGIN INCLUDE */
+
+/* USER CODE END INCLUDE */
+
+/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
+ * @brief For Usb device.
+ * @{
+ */
+
+/** @defgroup USBD_STORAGE USBD_STORAGE
+ * @brief Header file for the usb_storage_if.c file
+ * @{
+ */
+
+/** @defgroup USBD_STORAGE_Exported_Defines USBD_STORAGE_Exported_Defines
+ * @brief Defines.
+ * @{
+ */
+
+/* USER CODE BEGIN EXPORTED_DEFINES */
+
+/* USER CODE END EXPORTED_DEFINES */
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_STORAGE_Exported_Types USBD_STORAGE_Exported_Types
+ * @brief Types.
+ * @{
+ */
+
+/* USER CODE BEGIN EXPORTED_TYPES */
+
+/* USER CODE END EXPORTED_TYPES */
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_STORAGE_Exported_Macros USBD_STORAGE_Exported_Macros
+ * @brief Aliases.
+ * @{
+ */
+
+/* USER CODE BEGIN EXPORTED_MACRO */
+
+/* USER CODE END EXPORTED_MACRO */
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_STORAGE_Exported_Variables USBD_STORAGE_Exported_Variables
+ * @brief Public variables.
+ * @{
+ */
+
+/** STORAGE Interface callback. */
+extern USBD_StorageTypeDef USBD_Storage_Interface_fops_FS;
+
+/* USER CODE BEGIN EXPORTED_VARIABLES */
+
+/* USER CODE END EXPORTED_VARIABLES */
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_STORAGE_Exported_FunctionsPrototype USBD_STORAGE_Exported_FunctionsPrototype
+ * @brief Public functions declaration.
+ * @{
+ */
+
+/* USER CODE BEGIN EXPORTED_FUNCTIONS */
+
+/* USER CODE END EXPORTED_FUNCTIONS */
+
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __USBD_STORAGE_IF_H__ */
+
diff --git a/STM32_bootloader/USB_DEVICE/Target/usbd_conf.c b/FamicomDumperBootloader/USB_DEVICE/Target/usbd_conf.c
index d16e5b5..e1ace6f 100644
--- a/STM32_bootloader/USB_DEVICE/Target/usbd_conf.c
+++ b/FamicomDumperBootloader/USB_DEVICE/Target/usbd_conf.c
@@ -1,662 +1,662 @@
-/* USER CODE BEGIN Header */
-/**
- ******************************************************************************
- * @file : Target/usbd_conf.c
- * @version : v2.0_Cube
- * @brief : This file implements the board support package for the USB device library
- ******************************************************************************
- * @attention
- *
- * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
- * All rights reserved.</center></h2>
- *
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
- *
- ******************************************************************************
- */
-/* USER CODE END Header */
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f1xx.h"
-#include "stm32f1xx_hal.h"
-#include "usbd_def.h"
-#include "usbd_core.h"
-#include "usbd_msc.h"
-
-/* USER CODE BEGIN Includes */
-
-/* USER CODE END Includes */
-
-/* Private typedef -----------------------------------------------------------*/
-/* Private define ------------------------------------------------------------*/
-/* Private macro -------------------------------------------------------------*/
-
-/* USER CODE BEGIN PV */
-/* Private variables ---------------------------------------------------------*/
-
-/* USER CODE END PV */
-
-PCD_HandleTypeDef hpcd_USB_FS;
-void Error_Handler(void);
-
-/* USER CODE BEGIN 0 */
-
-/* USER CODE END 0 */
-
-/* USER CODE BEGIN PFP */
-/* Private function prototypes -----------------------------------------------*/
-
-/* USER CODE END PFP */
-
-/* Private functions ---------------------------------------------------------*/
-static USBD_StatusTypeDef USBD_Get_USB_Status(HAL_StatusTypeDef hal_status);
-/* USER CODE BEGIN 1 */
-
-/* USER CODE END 1 */
-#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
-static void PCDEx_SetConnectionState(PCD_HandleTypeDef *hpcd, uint8_t state);
-#else
-void HAL_PCDEx_SetConnectionState(PCD_HandleTypeDef *hpcd, uint8_t state);
-#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
-
-/*******************************************************************************
- LL Driver Callbacks (PCD -> USB Device Library)
-*******************************************************************************/
-/* MSP Init */
-
-void HAL_PCD_MspInit(PCD_HandleTypeDef* pcdHandle)
-{
- if(pcdHandle->Instance==USB)
- {
- /* USER CODE BEGIN USB_MspInit 0 */
- // Tweak to set max current to 500ma
- uint16_t length;
- *(USBD_MSC.GetFSConfigDescriptor(&length) + 8) = (500 / 2);
- /* USER CODE END USB_MspInit 0 */
- /* Peripheral clock enable */
- __HAL_RCC_USB_CLK_ENABLE();
-
- /* Peripheral interrupt init */
- HAL_NVIC_SetPriority(USB_LP_CAN1_RX0_IRQn, 0, 0);
- HAL_NVIC_EnableIRQ(USB_LP_CAN1_RX0_IRQn);
- /* USER CODE BEGIN USB_MspInit 1 */
-
- /* USER CODE END USB_MspInit 1 */
- }
-}
-
-void HAL_PCD_MspDeInit(PCD_HandleTypeDef* pcdHandle)
-{
- if(pcdHandle->Instance==USB)
- {
- /* USER CODE BEGIN USB_MspDeInit 0 */
-
- /* USER CODE END USB_MspDeInit 0 */
- /* Peripheral clock disable */
- __HAL_RCC_USB_CLK_DISABLE();
-
- /* Peripheral interrupt Deinit*/
- HAL_NVIC_DisableIRQ(USB_LP_CAN1_RX0_IRQn);
-
- /* USER CODE BEGIN USB_MspDeInit 1 */
-
- /* USER CODE END USB_MspDeInit 1 */
- }
-}
-
-/**
- * @brief Setup stage callback
- * @param hpcd: PCD handle
- * @retval None
- */
-#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
-static void PCD_SetupStageCallback(PCD_HandleTypeDef *hpcd)
-#else
-void HAL_PCD_SetupStageCallback(PCD_HandleTypeDef *hpcd)
-#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
-{
- USBD_LL_SetupStage((USBD_HandleTypeDef*)hpcd->pData, (uint8_t *)hpcd->Setup);
-}
-
-/**
- * @brief Data Out stage callback.
- * @param hpcd: PCD handle
- * @param epnum: Endpoint number
- * @retval None
- */
-#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
-static void PCD_DataOutStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
-#else
-void HAL_PCD_DataOutStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
-#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
-{
- USBD_LL_DataOutStage((USBD_HandleTypeDef*)hpcd->pData, epnum, hpcd->OUT_ep[epnum].xfer_buff);
-}
-
-/**
- * @brief Data In stage callback.
- * @param hpcd: PCD handle
- * @param epnum: Endpoint number
- * @retval None
- */
-#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
-static void PCD_DataInStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
-#else
-void HAL_PCD_DataInStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
-#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
-{
- USBD_LL_DataInStage((USBD_HandleTypeDef*)hpcd->pData, epnum, hpcd->IN_ep[epnum].xfer_buff);
-}
-
-/**
- * @brief SOF callback.
- * @param hpcd: PCD handle
- * @retval None
- */
-#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
-static void PCD_SOFCallback(PCD_HandleTypeDef *hpcd)
-#else
-void HAL_PCD_SOFCallback(PCD_HandleTypeDef *hpcd)
-#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
-{
- USBD_LL_SOF((USBD_HandleTypeDef*)hpcd->pData);
-}
-
-/**
- * @brief Reset callback.
- * @param hpcd: PCD handle
- * @retval None
- */
-#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
-static void PCD_ResetCallback(PCD_HandleTypeDef *hpcd)
-#else
-void HAL_PCD_ResetCallback(PCD_HandleTypeDef *hpcd)
-#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
-{
- USBD_SpeedTypeDef speed = USBD_SPEED_FULL;
-
- if ( hpcd->Init.speed != PCD_SPEED_FULL)
- {
- Error_Handler();
- }
- /* Set Speed. */
- USBD_LL_SetSpeed((USBD_HandleTypeDef*)hpcd->pData, speed);
-
- /* Reset Device. */
- USBD_LL_Reset((USBD_HandleTypeDef*)hpcd->pData);
-}
-
-/**
- * @brief Suspend callback.
- * When Low power mode is enabled the debug cannot be used (IAR, Keil doesn't support it)
- * @param hpcd: PCD handle
- * @retval None
- */
-#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
-static void PCD_SuspendCallback(PCD_HandleTypeDef *hpcd)
-#else
-void HAL_PCD_SuspendCallback(PCD_HandleTypeDef *hpcd)
-#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
-{
- /* Inform USB library that core enters in suspend Mode. */
- USBD_LL_Suspend((USBD_HandleTypeDef*)hpcd->pData);
- /* Enter in STOP mode. */
- /* USER CODE BEGIN 2 */
- if (hpcd->Init.low_power_enable)
- {
- /* Set SLEEPDEEP bit and SleepOnExit of Cortex System Control Register. */
- SCB->SCR |= (uint32_t)((uint32_t)(SCB_SCR_SLEEPDEEP_Msk | SCB_SCR_SLEEPONEXIT_Msk));
- }
- /* USER CODE END 2 */
-}
-
-/**
- * @brief Resume callback.
- * When Low power mode is enabled the debug cannot be used (IAR, Keil doesn't support it)
- * @param hpcd: PCD handle
- * @retval None
- */
-#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
-static void PCD_ResumeCallback(PCD_HandleTypeDef *hpcd)
-#else
-void HAL_PCD_ResumeCallback(PCD_HandleTypeDef *hpcd)
-#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
-{
- /* USER CODE BEGIN 3 */
-
- /* USER CODE END 3 */
- USBD_LL_Resume((USBD_HandleTypeDef*)hpcd->pData);
-}
-
-/**
- * @brief ISOOUTIncomplete callback.
- * @param hpcd: PCD handle
- * @param epnum: Endpoint number
- * @retval None
- */
-#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
-static void PCD_ISOOUTIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
-#else
-void HAL_PCD_ISOOUTIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
-#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
-{
- USBD_LL_IsoOUTIncomplete((USBD_HandleTypeDef*)hpcd->pData, epnum);
-}
-
-/**
- * @brief ISOINIncomplete callback.
- * @param hpcd: PCD handle
- * @param epnum: Endpoint number
- * @retval None
- */
-#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
-static void PCD_ISOINIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
-#else
-void HAL_PCD_ISOINIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
-#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
-{
- USBD_LL_IsoINIncomplete((USBD_HandleTypeDef*)hpcd->pData, epnum);
-}
-
-/**
- * @brief Connect callback.
- * @param hpcd: PCD handle
- * @retval None
- */
-#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
-static void PCD_ConnectCallback(PCD_HandleTypeDef *hpcd)
-#else
-void HAL_PCD_ConnectCallback(PCD_HandleTypeDef *hpcd)
-#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
-{
- USBD_LL_DevConnected((USBD_HandleTypeDef*)hpcd->pData);
-}
-
-/**
- * @brief Disconnect callback.
- * @param hpcd: PCD handle
- * @retval None
- */
-#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
-static void PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd)
-#else
-void HAL_PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd)
-#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
-{
- USBD_LL_DevDisconnected((USBD_HandleTypeDef*)hpcd->pData);
-}
-
-/*******************************************************************************
- LL Driver Interface (USB Device Library --> PCD)
-*******************************************************************************/
-
-/**
- * @brief Initializes the low level portion of the device driver.
- * @param pdev: Device handle
- * @retval USBD status
- */
-USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev)
-{
- /* Init USB Ip. */
- /* Link the driver to the stack. */
- hpcd_USB_FS.pData = pdev;
- pdev->pData = &hpcd_USB_FS;
-
- hpcd_USB_FS.Instance = USB;
- hpcd_USB_FS.Init.dev_endpoints = 8;
- hpcd_USB_FS.Init.speed = PCD_SPEED_FULL;
- hpcd_USB_FS.Init.low_power_enable = DISABLE;
- hpcd_USB_FS.Init.lpm_enable = DISABLE;
- hpcd_USB_FS.Init.battery_charging_enable = DISABLE;
- if (HAL_PCD_Init(&hpcd_USB_FS) != HAL_OK)
- {
- Error_Handler( );
- }
-
-#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
- /* Register USB PCD CallBacks */
- HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_SOF_CB_ID, PCD_SOFCallback);
- HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_SETUPSTAGE_CB_ID, PCD_SetupStageCallback);
- HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_RESET_CB_ID, PCD_ResetCallback);
- HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_SUSPEND_CB_ID, PCD_SuspendCallback);
- HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_RESUME_CB_ID, PCD_ResumeCallback);
- HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_CONNECT_CB_ID, PCD_ConnectCallback);
- HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_DISCONNECT_CB_ID, PCD_DisconnectCallback);
-
- HAL_PCD_RegisterDataOutStageCallback(&hpcd_USB_FS, PCD_DataOutStageCallback);
- HAL_PCD_RegisterDataInStageCallback(&hpcd_USB_FS, PCD_DataInStageCallback);
- HAL_PCD_RegisterIsoOutIncpltCallback(&hpcd_USB_FS, PCD_ISOOUTIncompleteCallback);
- HAL_PCD_RegisterIsoInIncpltCallback(&hpcd_USB_FS, PCD_ISOINIncompleteCallback);
-#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
- /* USER CODE BEGIN EndPoint_Configuration */
- HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x00 , PCD_SNG_BUF, 0x18);
- HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x80 , PCD_SNG_BUF, 0x58);
- /* USER CODE END EndPoint_Configuration */
- /* USER CODE BEGIN EndPoint_Configuration_MSC */
- HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x81 , PCD_SNG_BUF, 0x98);
- HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x01 , PCD_SNG_BUF, 0xD8);
- /* USER CODE END EndPoint_Configuration_MSC */
- return USBD_OK;
-}
-
-/**
- * @brief De-Initializes the low level portion of the device driver.
- * @param pdev: Device handle
- * @retval USBD status
- */
-USBD_StatusTypeDef USBD_LL_DeInit(USBD_HandleTypeDef *pdev)
-{
- HAL_StatusTypeDef hal_status = HAL_OK;
- USBD_StatusTypeDef usb_status = USBD_OK;
-
- hal_status = HAL_PCD_DeInit(pdev->pData);
-
- usb_status = USBD_Get_USB_Status(hal_status);
-
- return usb_status;
-}
-
-/**
- * @brief Starts the low level portion of the device driver.
- * @param pdev: Device handle
- * @retval USBD status
- */
-USBD_StatusTypeDef USBD_LL_Start(USBD_HandleTypeDef *pdev)
-{
- HAL_StatusTypeDef hal_status = HAL_OK;
- USBD_StatusTypeDef usb_status = USBD_OK;
-
- hal_status = HAL_PCD_Start(pdev->pData);
-
- usb_status = USBD_Get_USB_Status(hal_status);
-
- return usb_status;
-}
-
-/**
- * @brief Stops the low level portion of the device driver.
- * @param pdev: Device handle
- * @retval USBD status
- */
-USBD_StatusTypeDef USBD_LL_Stop(USBD_HandleTypeDef *pdev)
-{
- HAL_StatusTypeDef hal_status = HAL_OK;
- USBD_StatusTypeDef usb_status = USBD_OK;
-
- hal_status = HAL_PCD_Stop(pdev->pData);
-
- usb_status = USBD_Get_USB_Status(hal_status);
-
- return usb_status;
-}
-
-/**
- * @brief Opens an endpoint of the low level driver.
- * @param pdev: Device handle
- * @param ep_addr: Endpoint number
- * @param ep_type: Endpoint type
- * @param ep_mps: Endpoint max packet size
- * @retval USBD status
- */
-USBD_StatusTypeDef USBD_LL_OpenEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t ep_type, uint16_t ep_mps)
-{
- HAL_StatusTypeDef hal_status = HAL_OK;
- USBD_StatusTypeDef usb_status = USBD_OK;
-
- hal_status = HAL_PCD_EP_Open(pdev->pData, ep_addr, ep_mps, ep_type);
-
- usb_status = USBD_Get_USB_Status(hal_status);
-
- return usb_status;
-}
-
-/**
- * @brief Closes an endpoint of the low level driver.
- * @param pdev: Device handle
- * @param ep_addr: Endpoint number
- * @retval USBD status
- */
-USBD_StatusTypeDef USBD_LL_CloseEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
-{
- HAL_StatusTypeDef hal_status = HAL_OK;
- USBD_StatusTypeDef usb_status = USBD_OK;
-
- hal_status = HAL_PCD_EP_Close(pdev->pData, ep_addr);
-
- usb_status = USBD_Get_USB_Status(hal_status);
-
- return usb_status;
-}
-
-/**
- * @brief Flushes an endpoint of the Low Level Driver.
- * @param pdev: Device handle
- * @param ep_addr: Endpoint number
- * @retval USBD status
- */
-USBD_StatusTypeDef USBD_LL_FlushEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
-{
- HAL_StatusTypeDef hal_status = HAL_OK;
- USBD_StatusTypeDef usb_status = USBD_OK;
-
- hal_status = HAL_PCD_EP_Flush(pdev->pData, ep_addr);
-
- usb_status = USBD_Get_USB_Status(hal_status);
-
- return usb_status;
-}
-
-/**
- * @brief Sets a Stall condition on an endpoint of the Low Level Driver.
- * @param pdev: Device handle
- * @param ep_addr: Endpoint number
- * @retval USBD status
- */
-USBD_StatusTypeDef USBD_LL_StallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
-{
- HAL_StatusTypeDef hal_status = HAL_OK;
- USBD_StatusTypeDef usb_status = USBD_OK;
-
- hal_status = HAL_PCD_EP_SetStall(pdev->pData, ep_addr);
-
- usb_status = USBD_Get_USB_Status(hal_status);
-
- return usb_status;
-}
-
-/**
- * @brief Clears a Stall condition on an endpoint of the Low Level Driver.
- * @param pdev: Device handle
- * @param ep_addr: Endpoint number
- * @retval USBD status
- */
-USBD_StatusTypeDef USBD_LL_ClearStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
-{
- HAL_StatusTypeDef hal_status = HAL_OK;
- USBD_StatusTypeDef usb_status = USBD_OK;
-
- hal_status = HAL_PCD_EP_ClrStall(pdev->pData, ep_addr);
-
- usb_status = USBD_Get_USB_Status(hal_status);
-
- return usb_status;
-}
-
-/**
- * @brief Returns Stall condition.
- * @param pdev: Device handle
- * @param ep_addr: Endpoint number
- * @retval Stall (1: Yes, 0: No)
- */
-uint8_t USBD_LL_IsStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
-{
- PCD_HandleTypeDef *hpcd = (PCD_HandleTypeDef*) pdev->pData;
-
- if((ep_addr & 0x80) == 0x80)
- {
- return hpcd->IN_ep[ep_addr & 0x7F].is_stall;
- }
- else
- {
- return hpcd->OUT_ep[ep_addr & 0x7F].is_stall;
- }
-}
-
-/**
- * @brief Assigns a USB address to the device.
- * @param pdev: Device handle
- * @param dev_addr: Device address
- * @retval USBD status
- */
-USBD_StatusTypeDef USBD_LL_SetUSBAddress(USBD_HandleTypeDef *pdev, uint8_t dev_addr)
-{
- HAL_StatusTypeDef hal_status = HAL_OK;
- USBD_StatusTypeDef usb_status = USBD_OK;
-
- hal_status = HAL_PCD_SetAddress(pdev->pData, dev_addr);
-
- usb_status = USBD_Get_USB_Status(hal_status);
-
- return usb_status;
-}
-
-/**
- * @brief Transmits data over an endpoint.
- * @param pdev: Device handle
- * @param ep_addr: Endpoint number
- * @param pbuf: Pointer to data to be sent
- * @param size: Data size
- * @retval USBD status
- */
-USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t size)
-{
- HAL_StatusTypeDef hal_status = HAL_OK;
- USBD_StatusTypeDef usb_status = USBD_OK;
-
- hal_status = HAL_PCD_EP_Transmit(pdev->pData, ep_addr, pbuf, size);
-
- usb_status = USBD_Get_USB_Status(hal_status);
-
- return usb_status;
-}
-
-/**
- * @brief Prepares an endpoint for reception.
- * @param pdev: Device handle
- * @param ep_addr: Endpoint number
- * @param pbuf: Pointer to data to be received
- * @param size: Data size
- * @retval USBD status
- */
-USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t size)
-{
- HAL_StatusTypeDef hal_status = HAL_OK;
- USBD_StatusTypeDef usb_status = USBD_OK;
-
- hal_status = HAL_PCD_EP_Receive(pdev->pData, ep_addr, pbuf, size);
-
- usb_status = USBD_Get_USB_Status(hal_status);
-
- return usb_status;
-}
-
-/**
- * @brief Returns the last transferred packet size.
- * @param pdev: Device handle
- * @param ep_addr: Endpoint number
- * @retval Received Data Size
- */
-uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
-{
- return HAL_PCD_EP_GetRxCount((PCD_HandleTypeDef*) pdev->pData, ep_addr);
-}
-
-/**
- * @brief Delays routine for the USB device library.
- * @param Delay: Delay in ms
- * @retval None
- */
-void USBD_LL_Delay(uint32_t Delay)
-{
- HAL_Delay(Delay);
-}
-
-/**
- * @brief Static single allocation.
- * @param size: Size of allocated memory
- * @retval None
- */
-void *USBD_static_malloc(uint32_t size)
-{
- static uint32_t mem[(sizeof(USBD_MSC_BOT_HandleTypeDef)/4)+1];/* On 32-bit boundary */
- return mem;
-}
-
-/**
- * @brief Dummy memory free
- * @param p: Pointer to allocated memory address
- * @retval None
- */
-void USBD_static_free(void *p)
-{
-
-}
-
-/**
- * @brief Software Device Connection
- * @param hpcd: PCD handle
- * @param state: Connection state (0: disconnected / 1: connected)
- * @retval None
- */
-#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
-static void PCDEx_SetConnectionState(PCD_HandleTypeDef *hpcd, uint8_t state)
-#else
-void HAL_PCDEx_SetConnectionState(PCD_HandleTypeDef *hpcd, uint8_t state)
-#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
-{
- /* USER CODE BEGIN 6 */
- if (state == 1)
- {
- /* Configure Low connection state. */
-
- }
- else
- {
- /* Configure High connection state. */
-
- }
- /* USER CODE END 6 */
-}
-
-/**
- * @brief Returns the USB status depending on the HAL status:
- * @param hal_status: HAL status
- * @retval USB status
- */
-USBD_StatusTypeDef USBD_Get_USB_Status(HAL_StatusTypeDef hal_status)
-{
- USBD_StatusTypeDef usb_status = USBD_OK;
-
- switch (hal_status)
- {
- case HAL_OK :
- usb_status = USBD_OK;
- break;
- case HAL_ERROR :
- usb_status = USBD_FAIL;
- break;
- case HAL_BUSY :
- usb_status = USBD_BUSY;
- break;
- case HAL_TIMEOUT :
- usb_status = USBD_FAIL;
- break;
- default :
- usb_status = USBD_FAIL;
- break;
- }
- return usb_status;
-}
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file : Target/usbd_conf.c
+ * @version : v2.0_Cube
+ * @brief : This file implements the board support package for the USB device library
+ ******************************************************************************
+ * @attention
+ *
+ * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
+ * All rights reserved.</center></h2>
+ *
+ * This software component is licensed by ST under Ultimate Liberty license
+ * SLA0044, the "License"; You may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at:
+ * www.st.com/SLA0044
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Includes ------------------------------------------------------------------*/
+#include "stm32f1xx.h"
+#include "stm32f1xx_hal.h"
+#include "usbd_def.h"
+#include "usbd_core.h"
+#include "usbd_msc.h"
+
+/* USER CODE BEGIN Includes */
+
+/* USER CODE END Includes */
+
+/* Private typedef -----------------------------------------------------------*/
+/* Private define ------------------------------------------------------------*/
+/* Private macro -------------------------------------------------------------*/
+
+/* USER CODE BEGIN PV */
+/* Private variables ---------------------------------------------------------*/
+
+/* USER CODE END PV */
+
+PCD_HandleTypeDef hpcd_USB_FS;
+void Error_Handler(void);
+
+/* USER CODE BEGIN 0 */
+
+/* USER CODE END 0 */
+
+/* USER CODE BEGIN PFP */
+/* Private function prototypes -----------------------------------------------*/
+
+/* USER CODE END PFP */
+
+/* Private functions ---------------------------------------------------------*/
+static USBD_StatusTypeDef USBD_Get_USB_Status(HAL_StatusTypeDef hal_status);
+/* USER CODE BEGIN 1 */
+
+/* USER CODE END 1 */
+#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
+static void PCDEx_SetConnectionState(PCD_HandleTypeDef *hpcd, uint8_t state);
+#else
+void HAL_PCDEx_SetConnectionState(PCD_HandleTypeDef *hpcd, uint8_t state);
+#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
+
+/*******************************************************************************
+ LL Driver Callbacks (PCD -> USB Device Library)
+*******************************************************************************/
+/* MSP Init */
+
+void HAL_PCD_MspInit(PCD_HandleTypeDef* pcdHandle)
+{
+ if(pcdHandle->Instance==USB)
+ {
+ /* USER CODE BEGIN USB_MspInit 0 */
+ // Tweak to set max current to 500ma
+ uint16_t length;
+ *(USBD_MSC.GetFSConfigDescriptor(&length) + 8) = (500 / 2);
+ /* USER CODE END USB_MspInit 0 */
+ /* Peripheral clock enable */
+ __HAL_RCC_USB_CLK_ENABLE();
+
+ /* Peripheral interrupt init */
+ HAL_NVIC_SetPriority(USB_LP_CAN1_RX0_IRQn, 0, 0);
+ HAL_NVIC_EnableIRQ(USB_LP_CAN1_RX0_IRQn);
+ /* USER CODE BEGIN USB_MspInit 1 */
+
+ /* USER CODE END USB_MspInit 1 */
+ }
+}
+
+void HAL_PCD_MspDeInit(PCD_HandleTypeDef* pcdHandle)
+{
+ if(pcdHandle->Instance==USB)
+ {
+ /* USER CODE BEGIN USB_MspDeInit 0 */
+
+ /* USER CODE END USB_MspDeInit 0 */
+ /* Peripheral clock disable */
+ __HAL_RCC_USB_CLK_DISABLE();
+
+ /* Peripheral interrupt Deinit*/
+ HAL_NVIC_DisableIRQ(USB_LP_CAN1_RX0_IRQn);
+
+ /* USER CODE BEGIN USB_MspDeInit 1 */
+
+ /* USER CODE END USB_MspDeInit 1 */
+ }
+}
+
+/**
+ * @brief Setup stage callback
+ * @param hpcd: PCD handle
+ * @retval None
+ */
+#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
+static void PCD_SetupStageCallback(PCD_HandleTypeDef *hpcd)
+#else
+void HAL_PCD_SetupStageCallback(PCD_HandleTypeDef *hpcd)
+#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
+{
+ USBD_LL_SetupStage((USBD_HandleTypeDef*)hpcd->pData, (uint8_t *)hpcd->Setup);
+}
+
+/**
+ * @brief Data Out stage callback.
+ * @param hpcd: PCD handle
+ * @param epnum: Endpoint number
+ * @retval None
+ */
+#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
+static void PCD_DataOutStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
+#else
+void HAL_PCD_DataOutStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
+#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
+{
+ USBD_LL_DataOutStage((USBD_HandleTypeDef*)hpcd->pData, epnum, hpcd->OUT_ep[epnum].xfer_buff);
+}
+
+/**
+ * @brief Data In stage callback.
+ * @param hpcd: PCD handle
+ * @param epnum: Endpoint number
+ * @retval None
+ */
+#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
+static void PCD_DataInStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
+#else
+void HAL_PCD_DataInStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
+#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
+{
+ USBD_LL_DataInStage((USBD_HandleTypeDef*)hpcd->pData, epnum, hpcd->IN_ep[epnum].xfer_buff);
+}
+
+/**
+ * @brief SOF callback.
+ * @param hpcd: PCD handle
+ * @retval None
+ */
+#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
+static void PCD_SOFCallback(PCD_HandleTypeDef *hpcd)
+#else
+void HAL_PCD_SOFCallback(PCD_HandleTypeDef *hpcd)
+#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
+{
+ USBD_LL_SOF((USBD_HandleTypeDef*)hpcd->pData);
+}
+
+/**
+ * @brief Reset callback.
+ * @param hpcd: PCD handle
+ * @retval None
+ */
+#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
+static void PCD_ResetCallback(PCD_HandleTypeDef *hpcd)
+#else
+void HAL_PCD_ResetCallback(PCD_HandleTypeDef *hpcd)
+#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
+{
+ USBD_SpeedTypeDef speed = USBD_SPEED_FULL;
+
+ if ( hpcd->Init.speed != PCD_SPEED_FULL)
+ {
+ Error_Handler();
+ }
+ /* Set Speed. */
+ USBD_LL_SetSpeed((USBD_HandleTypeDef*)hpcd->pData, speed);
+
+ /* Reset Device. */
+ USBD_LL_Reset((USBD_HandleTypeDef*)hpcd->pData);
+}
+
+/**
+ * @brief Suspend callback.
+ * When Low power mode is enabled the debug cannot be used (IAR, Keil doesn't support it)
+ * @param hpcd: PCD handle
+ * @retval None
+ */
+#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
+static void PCD_SuspendCallback(PCD_HandleTypeDef *hpcd)
+#else
+void HAL_PCD_SuspendCallback(PCD_HandleTypeDef *hpcd)
+#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
+{
+ /* Inform USB library that core enters in suspend Mode. */
+ USBD_LL_Suspend((USBD_HandleTypeDef*)hpcd->pData);
+ /* Enter in STOP mode. */
+ /* USER CODE BEGIN 2 */
+ if (hpcd->Init.low_power_enable)
+ {
+ /* Set SLEEPDEEP bit and SleepOnExit of Cortex System Control Register. */
+ SCB->SCR |= (uint32_t)((uint32_t)(SCB_SCR_SLEEPDEEP_Msk | SCB_SCR_SLEEPONEXIT_Msk));
+ }
+ /* USER CODE END 2 */
+}
+
+/**
+ * @brief Resume callback.
+ * When Low power mode is enabled the debug cannot be used (IAR, Keil doesn't support it)
+ * @param hpcd: PCD handle
+ * @retval None
+ */
+#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
+static void PCD_ResumeCallback(PCD_HandleTypeDef *hpcd)
+#else
+void HAL_PCD_ResumeCallback(PCD_HandleTypeDef *hpcd)
+#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
+{
+ /* USER CODE BEGIN 3 */
+
+ /* USER CODE END 3 */
+ USBD_LL_Resume((USBD_HandleTypeDef*)hpcd->pData);
+}
+
+/**
+ * @brief ISOOUTIncomplete callback.
+ * @param hpcd: PCD handle
+ * @param epnum: Endpoint number
+ * @retval None
+ */
+#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
+static void PCD_ISOOUTIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
+#else
+void HAL_PCD_ISOOUTIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
+#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
+{
+ USBD_LL_IsoOUTIncomplete((USBD_HandleTypeDef*)hpcd->pData, epnum);
+}
+
+/**
+ * @brief ISOINIncomplete callback.
+ * @param hpcd: PCD handle
+ * @param epnum: Endpoint number
+ * @retval None
+ */
+#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
+static void PCD_ISOINIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
+#else
+void HAL_PCD_ISOINIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
+#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
+{
+ USBD_LL_IsoINIncomplete((USBD_HandleTypeDef*)hpcd->pData, epnum);
+}
+
+/**
+ * @brief Connect callback.
+ * @param hpcd: PCD handle
+ * @retval None
+ */
+#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
+static void PCD_ConnectCallback(PCD_HandleTypeDef *hpcd)
+#else
+void HAL_PCD_ConnectCallback(PCD_HandleTypeDef *hpcd)
+#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
+{
+ USBD_LL_DevConnected((USBD_HandleTypeDef*)hpcd->pData);
+}
+
+/**
+ * @brief Disconnect callback.
+ * @param hpcd: PCD handle
+ * @retval None
+ */
+#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
+static void PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd)
+#else
+void HAL_PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd)
+#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
+{
+ USBD_LL_DevDisconnected((USBD_HandleTypeDef*)hpcd->pData);
+}
+
+/*******************************************************************************
+ LL Driver Interface (USB Device Library --> PCD)
+*******************************************************************************/
+
+/**
+ * @brief Initializes the low level portion of the device driver.
+ * @param pdev: Device handle
+ * @retval USBD status
+ */
+USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev)
+{
+ /* Init USB Ip. */
+ /* Link the driver to the stack. */
+ hpcd_USB_FS.pData = pdev;
+ pdev->pData = &hpcd_USB_FS;
+
+ hpcd_USB_FS.Instance = USB;
+ hpcd_USB_FS.Init.dev_endpoints = 8;
+ hpcd_USB_FS.Init.speed = PCD_SPEED_FULL;
+ hpcd_USB_FS.Init.low_power_enable = DISABLE;
+ hpcd_USB_FS.Init.lpm_enable = DISABLE;
+ hpcd_USB_FS.Init.battery_charging_enable = DISABLE;
+ if (HAL_PCD_Init(&hpcd_USB_FS) != HAL_OK)
+ {
+ Error_Handler( );
+ }
+
+#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
+ /* Register USB PCD CallBacks */
+ HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_SOF_CB_ID, PCD_SOFCallback);
+ HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_SETUPSTAGE_CB_ID, PCD_SetupStageCallback);
+ HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_RESET_CB_ID, PCD_ResetCallback);
+ HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_SUSPEND_CB_ID, PCD_SuspendCallback);
+ HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_RESUME_CB_ID, PCD_ResumeCallback);
+ HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_CONNECT_CB_ID, PCD_ConnectCallback);
+ HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_DISCONNECT_CB_ID, PCD_DisconnectCallback);
+
+ HAL_PCD_RegisterDataOutStageCallback(&hpcd_USB_FS, PCD_DataOutStageCallback);
+ HAL_PCD_RegisterDataInStageCallback(&hpcd_USB_FS, PCD_DataInStageCallback);
+ HAL_PCD_RegisterIsoOutIncpltCallback(&hpcd_USB_FS, PCD_ISOOUTIncompleteCallback);
+ HAL_PCD_RegisterIsoInIncpltCallback(&hpcd_USB_FS, PCD_ISOINIncompleteCallback);
+#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
+ /* USER CODE BEGIN EndPoint_Configuration */
+ HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x00 , PCD_SNG_BUF, 0x18);
+ HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x80 , PCD_SNG_BUF, 0x58);
+ /* USER CODE END EndPoint_Configuration */
+ /* USER CODE BEGIN EndPoint_Configuration_MSC */
+ HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x81 , PCD_SNG_BUF, 0x98);
+ HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x01 , PCD_SNG_BUF, 0xD8);
+ /* USER CODE END EndPoint_Configuration_MSC */
+ return USBD_OK;
+}
+
+/**
+ * @brief De-Initializes the low level portion of the device driver.
+ * @param pdev: Device handle
+ * @retval USBD status
+ */
+USBD_StatusTypeDef USBD_LL_DeInit(USBD_HandleTypeDef *pdev)
+{
+ HAL_StatusTypeDef hal_status = HAL_OK;
+ USBD_StatusTypeDef usb_status = USBD_OK;
+
+ hal_status = HAL_PCD_DeInit(pdev->pData);
+
+ usb_status = USBD_Get_USB_Status(hal_status);
+
+ return usb_status;
+}
+
+/**
+ * @brief Starts the low level portion of the device driver.
+ * @param pdev: Device handle
+ * @retval USBD status
+ */
+USBD_StatusTypeDef USBD_LL_Start(USBD_HandleTypeDef *pdev)
+{
+ HAL_StatusTypeDef hal_status = HAL_OK;
+ USBD_StatusTypeDef usb_status = USBD_OK;
+
+ hal_status = HAL_PCD_Start(pdev->pData);
+
+ usb_status = USBD_Get_USB_Status(hal_status);
+
+ return usb_status;
+}
+
+/**
+ * @brief Stops the low level portion of the device driver.
+ * @param pdev: Device handle
+ * @retval USBD status
+ */
+USBD_StatusTypeDef USBD_LL_Stop(USBD_HandleTypeDef *pdev)
+{
+ HAL_StatusTypeDef hal_status = HAL_OK;
+ USBD_StatusTypeDef usb_status = USBD_OK;
+
+ hal_status = HAL_PCD_Stop(pdev->pData);
+
+ usb_status = USBD_Get_USB_Status(hal_status);
+
+ return usb_status;
+}
+
+/**
+ * @brief Opens an endpoint of the low level driver.
+ * @param pdev: Device handle
+ * @param ep_addr: Endpoint number
+ * @param ep_type: Endpoint type
+ * @param ep_mps: Endpoint max packet size
+ * @retval USBD status
+ */
+USBD_StatusTypeDef USBD_LL_OpenEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t ep_type, uint16_t ep_mps)
+{
+ HAL_StatusTypeDef hal_status = HAL_OK;
+ USBD_StatusTypeDef usb_status = USBD_OK;
+
+ hal_status = HAL_PCD_EP_Open(pdev->pData, ep_addr, ep_mps, ep_type);
+
+ usb_status = USBD_Get_USB_Status(hal_status);
+
+ return usb_status;
+}
+
+/**
+ * @brief Closes an endpoint of the low level driver.
+ * @param pdev: Device handle
+ * @param ep_addr: Endpoint number
+ * @retval USBD status
+ */
+USBD_StatusTypeDef USBD_LL_CloseEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
+{
+ HAL_StatusTypeDef hal_status = HAL_OK;
+ USBD_StatusTypeDef usb_status = USBD_OK;
+
+ hal_status = HAL_PCD_EP_Close(pdev->pData, ep_addr);
+
+ usb_status = USBD_Get_USB_Status(hal_status);
+
+ return usb_status;
+}
+
+/**
+ * @brief Flushes an endpoint of the Low Level Driver.
+ * @param pdev: Device handle
+ * @param ep_addr: Endpoint number
+ * @retval USBD status
+ */
+USBD_StatusTypeDef USBD_LL_FlushEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
+{
+ HAL_StatusTypeDef hal_status = HAL_OK;
+ USBD_StatusTypeDef usb_status = USBD_OK;
+
+ hal_status = HAL_PCD_EP_Flush(pdev->pData, ep_addr);
+
+ usb_status = USBD_Get_USB_Status(hal_status);
+
+ return usb_status;
+}
+
+/**
+ * @brief Sets a Stall condition on an endpoint of the Low Level Driver.
+ * @param pdev: Device handle
+ * @param ep_addr: Endpoint number
+ * @retval USBD status
+ */
+USBD_StatusTypeDef USBD_LL_StallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
+{
+ HAL_StatusTypeDef hal_status = HAL_OK;
+ USBD_StatusTypeDef usb_status = USBD_OK;
+
+ hal_status = HAL_PCD_EP_SetStall(pdev->pData, ep_addr);
+
+ usb_status = USBD_Get_USB_Status(hal_status);
+
+ return usb_status;
+}
+
+/**
+ * @brief Clears a Stall condition on an endpoint of the Low Level Driver.
+ * @param pdev: Device handle
+ * @param ep_addr: Endpoint number
+ * @retval USBD status
+ */
+USBD_StatusTypeDef USBD_LL_ClearStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
+{
+ HAL_StatusTypeDef hal_status = HAL_OK;
+ USBD_StatusTypeDef usb_status = USBD_OK;
+
+ hal_status = HAL_PCD_EP_ClrStall(pdev->pData, ep_addr);
+
+ usb_status = USBD_Get_USB_Status(hal_status);
+
+ return usb_status;
+}
+
+/**
+ * @brief Returns Stall condition.
+ * @param pdev: Device handle
+ * @param ep_addr: Endpoint number
+ * @retval Stall (1: Yes, 0: No)
+ */
+uint8_t USBD_LL_IsStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
+{
+ PCD_HandleTypeDef *hpcd = (PCD_HandleTypeDef*) pdev->pData;
+
+ if((ep_addr & 0x80) == 0x80)
+ {
+ return hpcd->IN_ep[ep_addr & 0x7F].is_stall;
+ }
+ else
+ {
+ return hpcd->OUT_ep[ep_addr & 0x7F].is_stall;
+ }
+}
+
+/**
+ * @brief Assigns a USB address to the device.
+ * @param pdev: Device handle
+ * @param dev_addr: Device address
+ * @retval USBD status
+ */
+USBD_StatusTypeDef USBD_LL_SetUSBAddress(USBD_HandleTypeDef *pdev, uint8_t dev_addr)
+{
+ HAL_StatusTypeDef hal_status = HAL_OK;
+ USBD_StatusTypeDef usb_status = USBD_OK;
+
+ hal_status = HAL_PCD_SetAddress(pdev->pData, dev_addr);
+
+ usb_status = USBD_Get_USB_Status(hal_status);
+
+ return usb_status;
+}
+
+/**
+ * @brief Transmits data over an endpoint.
+ * @param pdev: Device handle
+ * @param ep_addr: Endpoint number
+ * @param pbuf: Pointer to data to be sent
+ * @param size: Data size
+ * @retval USBD status
+ */
+USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t size)
+{
+ HAL_StatusTypeDef hal_status = HAL_OK;
+ USBD_StatusTypeDef usb_status = USBD_OK;
+
+ hal_status = HAL_PCD_EP_Transmit(pdev->pData, ep_addr, pbuf, size);
+
+ usb_status = USBD_Get_USB_Status(hal_status);
+
+ return usb_status;
+}
+
+/**
+ * @brief Prepares an endpoint for reception.
+ * @param pdev: Device handle
+ * @param ep_addr: Endpoint number
+ * @param pbuf: Pointer to data to be received
+ * @param size: Data size
+ * @retval USBD status
+ */
+USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t size)
+{
+ HAL_StatusTypeDef hal_status = HAL_OK;
+ USBD_StatusTypeDef usb_status = USBD_OK;
+
+ hal_status = HAL_PCD_EP_Receive(pdev->pData, ep_addr, pbuf, size);
+
+ usb_status = USBD_Get_USB_Status(hal_status);
+
+ return usb_status;
+}
+
+/**
+ * @brief Returns the last transferred packet size.
+ * @param pdev: Device handle
+ * @param ep_addr: Endpoint number
+ * @retval Received Data Size
+ */
+uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
+{
+ return HAL_PCD_EP_GetRxCount((PCD_HandleTypeDef*) pdev->pData, ep_addr);
+}
+
+/**
+ * @brief Delays routine for the USB device library.
+ * @param Delay: Delay in ms
+ * @retval None
+ */
+void USBD_LL_Delay(uint32_t Delay)
+{
+ HAL_Delay(Delay);
+}
+
+/**
+ * @brief Static single allocation.
+ * @param size: Size of allocated memory
+ * @retval None
+ */
+void *USBD_static_malloc(uint32_t size)
+{
+ static uint32_t mem[(sizeof(USBD_MSC_BOT_HandleTypeDef)/4)+1];/* On 32-bit boundary */
+ return mem;
+}
+
+/**
+ * @brief Dummy memory free
+ * @param p: Pointer to allocated memory address
+ * @retval None
+ */
+void USBD_static_free(void *p)
+{
+
+}
+
+/**
+ * @brief Software Device Connection
+ * @param hpcd: PCD handle
+ * @param state: Connection state (0: disconnected / 1: connected)
+ * @retval None
+ */
+#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
+static void PCDEx_SetConnectionState(PCD_HandleTypeDef *hpcd, uint8_t state)
+#else
+void HAL_PCDEx_SetConnectionState(PCD_HandleTypeDef *hpcd, uint8_t state)
+#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
+{
+ /* USER CODE BEGIN 6 */
+ if (state == 1)
+ {
+ /* Configure Low connection state. */
+
+ }
+ else
+ {
+ /* Configure High connection state. */
+
+ }
+ /* USER CODE END 6 */
+}
+
+/**
+ * @brief Returns the USB status depending on the HAL status:
+ * @param hal_status: HAL status
+ * @retval USB status
+ */
+USBD_StatusTypeDef USBD_Get_USB_Status(HAL_StatusTypeDef hal_status)
+{
+ USBD_StatusTypeDef usb_status = USBD_OK;
+
+ switch (hal_status)
+ {
+ case HAL_OK :
+ usb_status = USBD_OK;
+ break;
+ case HAL_ERROR :
+ usb_status = USBD_FAIL;
+ break;
+ case HAL_BUSY :
+ usb_status = USBD_BUSY;
+ break;
+ case HAL_TIMEOUT :
+ usb_status = USBD_FAIL;
+ break;
+ default :
+ usb_status = USBD_FAIL;
+ break;
+ }
+ return usb_status;
+}
diff --git a/STM32_bootloader/USB_DEVICE/Target/usbd_conf.h b/FamicomDumperBootloader/USB_DEVICE/Target/usbd_conf.h
index 8c64c7f..0f78086 100644
--- a/STM32_bootloader/USB_DEVICE/Target/usbd_conf.h
+++ b/FamicomDumperBootloader/USB_DEVICE/Target/usbd_conf.h
@@ -1,176 +1,176 @@
-/* USER CODE BEGIN Header */
-/**
- ******************************************************************************
- * @file : usbd_conf.h
- * @version : v2.0_Cube
- * @brief : Header for usbd_conf.c file.
- ******************************************************************************
- * @attention
- *
- * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
- * All rights reserved.</center></h2>
- *
- * This software component is licensed by ST under Ultimate Liberty license
- * SLA0044, the "License"; You may not use this file except in compliance with
- * the License. You may obtain a copy of the License at:
- * www.st.com/SLA0044
- *
- ******************************************************************************
- */
-/* USER CODE END Header */
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __USBD_CONF__H__
-#define __USBD_CONF__H__
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "main.h"
-#include "stm32f1xx.h"
-#include "stm32f1xx_hal.h"
-
-/* USER CODE BEGIN INCLUDE */
-
-/* USER CODE END INCLUDE */
-
-/** @addtogroup USBD_OTG_DRIVER
- * @{
- */
-
-/** @defgroup USBD_CONF USBD_CONF
- * @brief Configuration file for Usb otg low level driver.
- * @{
- */
-
-/** @defgroup USBD_CONF_Exported_Variables USBD_CONF_Exported_Variables
- * @brief Public variables.
- * @{
- */
-
-/**
- * @}
- */
-
-/** @defgroup USBD_CONF_Exported_Defines USBD_CONF_Exported_Defines
- * @brief Defines for configuration of the Usb device.
- * @{
- */
-
-/*---------- -----------*/
-#define USBD_MAX_NUM_INTERFACES 1
-/*---------- -----------*/
-#define USBD_MAX_NUM_CONFIGURATION 1
-/*---------- -----------*/
-#define USBD_MAX_STR_DESC_SIZ 512
-/*---------- -----------*/
-#define USBD_DEBUG_LEVEL 0
-/*---------- -----------*/
-#define USBD_SELF_POWERED 1
-/*---------- -----------*/
-#define MSC_MEDIA_PACKET 2048
-
-/****************************************/
-/* #define for FS and HS identification */
-#define DEVICE_FS 0
-
-/**
- * @}
- */
-
-/** @defgroup USBD_CONF_Exported_Macros USBD_CONF_Exported_Macros
- * @brief Aliases.
- * @{
- */
-
-/* Memory management macros */
-
-/** Alias for memory allocation. */
-#define USBD_malloc (uint32_t *)USBD_static_malloc
-
-/** Alias for memory release. */
-#define USBD_free USBD_static_free
-
-/** Alias for memory set. */
-#define USBD_memset /* Not used */
-
-/** Alias for memory copy. */
-#define USBD_memcpy /* Not used */
-
-/** Alias for delay. */
-#define USBD_Delay HAL_Delay
-
-/* For footprint reasons and since only one allocation is handled in the HID class
- driver, the malloc/free is changed into a static allocation method */
-void *USBD_static_malloc(uint32_t size);
-void USBD_static_free(void *p);
-
-/* DEBUG macros */
-
-#if (USBD_DEBUG_LEVEL > 0)
-#define USBD_UsrLog(...) printf(__VA_ARGS__);\
- printf("\n");
-#else
-#define USBD_UsrLog(...)
-#endif
-
-#if (USBD_DEBUG_LEVEL > 1)
-
-#define USBD_ErrLog(...) printf("ERROR: ") ;\
- printf(__VA_ARGS__);\
- printf("\n");
-#else
-#define USBD_ErrLog(...)
-#endif
-
-#if (USBD_DEBUG_LEVEL > 2)
-#define USBD_DbgLog(...) printf("DEBUG : ") ;\
- printf(__VA_ARGS__);\
- printf("\n");
-#else
-#define USBD_DbgLog(...)
-#endif
-
-/**
- * @}
- */
-
-/** @defgroup USBD_CONF_Exported_Types USBD_CONF_Exported_Types
- * @brief Types.
- * @{
- */
-
-/**
- * @}
- */
-
-/** @defgroup USBD_CONF_Exported_FunctionsPrototype USBD_CONF_Exported_FunctionsPrototype
- * @brief Declaration of public functions for Usb device.
- * @{
- */
-
-/* Exported functions -------------------------------------------------------*/
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __USBD_CONF__H__ */
-
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file : usbd_conf.h
+ * @version : v2.0_Cube
+ * @brief : Header for usbd_conf.c file.
+ ******************************************************************************
+ * @attention
+ *
+ * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
+ * All rights reserved.</center></h2>
+ *
+ * This software component is licensed by ST under Ultimate Liberty license
+ * SLA0044, the "License"; You may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at:
+ * www.st.com/SLA0044
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USBD_CONF__H__
+#define __USBD_CONF__H__
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "main.h"
+#include "stm32f1xx.h"
+#include "stm32f1xx_hal.h"
+
+/* USER CODE BEGIN INCLUDE */
+
+/* USER CODE END INCLUDE */
+
+/** @addtogroup USBD_OTG_DRIVER
+ * @{
+ */
+
+/** @defgroup USBD_CONF USBD_CONF
+ * @brief Configuration file for Usb otg low level driver.
+ * @{
+ */
+
+/** @defgroup USBD_CONF_Exported_Variables USBD_CONF_Exported_Variables
+ * @brief Public variables.
+ * @{
+ */
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_CONF_Exported_Defines USBD_CONF_Exported_Defines
+ * @brief Defines for configuration of the Usb device.
+ * @{
+ */
+
+/*---------- -----------*/
+#define USBD_MAX_NUM_INTERFACES 1
+/*---------- -----------*/
+#define USBD_MAX_NUM_CONFIGURATION 1
+/*---------- -----------*/
+#define USBD_MAX_STR_DESC_SIZ 512
+/*---------- -----------*/
+#define USBD_DEBUG_LEVEL 0
+/*---------- -----------*/
+#define USBD_SELF_POWERED 1
+/*---------- -----------*/
+#define MSC_MEDIA_PACKET 2048
+
+/****************************************/
+/* #define for FS and HS identification */
+#define DEVICE_FS 0
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_CONF_Exported_Macros USBD_CONF_Exported_Macros
+ * @brief Aliases.
+ * @{
+ */
+
+/* Memory management macros */
+
+/** Alias for memory allocation. */
+#define USBD_malloc (uint32_t *)USBD_static_malloc
+
+/** Alias for memory release. */
+#define USBD_free USBD_static_free
+
+/** Alias for memory set. */
+#define USBD_memset /* Not used */
+
+/** Alias for memory copy. */
+#define USBD_memcpy /* Not used */
+
+/** Alias for delay. */
+#define USBD_Delay HAL_Delay
+
+/* For footprint reasons and since only one allocation is handled in the HID class
+ driver, the malloc/free is changed into a static allocation method */
+void *USBD_static_malloc(uint32_t size);
+void USBD_static_free(void *p);
+
+/* DEBUG macros */
+
+#if (USBD_DEBUG_LEVEL > 0)
+#define USBD_UsrLog(...) printf(__VA_ARGS__);\
+ printf("\n");
+#else
+#define USBD_UsrLog(...)
+#endif
+
+#if (USBD_DEBUG_LEVEL > 1)
+
+#define USBD_ErrLog(...) printf("ERROR: ") ;\
+ printf(__VA_ARGS__);\
+ printf("\n");
+#else
+#define USBD_ErrLog(...)
+#endif
+
+#if (USBD_DEBUG_LEVEL > 2)
+#define USBD_DbgLog(...) printf("DEBUG : ") ;\
+ printf(__VA_ARGS__);\
+ printf("\n");
+#else
+#define USBD_DbgLog(...)
+#endif
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_CONF_Exported_Types USBD_CONF_Exported_Types
+ * @brief Types.
+ * @{
+ */
+
+/**
+ * @}
+ */
+
+/** @defgroup USBD_CONF_Exported_FunctionsPrototype USBD_CONF_Exported_FunctionsPrototype
+ * @brief Declaration of public functions for Usb device.
+ * @{
+ */
+
+/* Exported functions -------------------------------------------------------*/
+
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __USBD_CONF__H__ */
+
diff --git a/STM32_bootloader/USB_DEVICE/.project b/STM32_bootloader/USB_DEVICE/.project
deleted file mode 100644
index 7a4c077..0000000
--- a/STM32_bootloader/USB_DEVICE/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>USB_DEVICE</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>