├── LICENSE ├── README.md ├── STLINKv3_YAB ├── APP_1_Sample │ ├── SLV3APP1_DAPv1_HID+VCP │ │ ├── SLV3APP1_DAPv1_HID+VCP.rar │ │ └── slv3app1.bin │ └── SLV3APP1sample │ │ ├── LEDblink_USART6print_500ms.txt │ │ ├── SLV3APP1sample.rar │ │ └── slv3app1.bin ├── APP_2_Sample │ ├── SLV3APP2_DAPv2WinUSB+VCP │ │ ├── SLV3APP2_DAPv2WinUSB+VCP.rar │ │ └── slv3app2.bin │ └── SLV3APP2sample │ │ ├── LEDblink_USART6print_2s.txt │ │ ├── SLV3APP2sample.rar │ │ └── slv3app2.bin ├── Build │ ├── STLINKv3_YAB.bin │ ├── STLinkUpgrade.jar │ ├── StlinkRulesFilesForLinux │ │ ├── 49-stlinkv1.rules │ │ ├── 49-stlinkv2-1.rules │ │ ├── 49-stlinkv2.rules │ │ ├── 49-stlinkv3.rules │ │ └── Readme.txt │ ├── Write-to-stlink-v3.bat │ ├── encrypt_to_f3_files.bat │ ├── f3_1.bin │ ├── f3_2.bin │ ├── lib │ │ └── commons-cli-1.3.1.jar │ ├── native │ │ ├── linux_x64 │ │ │ └── libSTLinkUSBDriver.so │ │ ├── linux_x86 │ │ │ └── libSTLinkUSBDriver.so │ │ ├── mac_x64 │ │ │ └── libSTLinkUSBDriver.dylib │ │ ├── win_x64 │ │ │ └── STLinkUSBDriver.dll │ │ └── win_x86 │ │ │ └── STLinkUSBDriver.dll │ └── st_decrypt.jar ├── DebugConfig │ └── STLINKv3_YAB_STM32F723IEKx_2.0.0.dbgconf ├── RTE │ ├── CMSIS │ │ ├── RTX_Config.c │ │ └── RTX_Config.h │ ├── Compiler │ │ └── EventRecorderConf.h │ ├── Device │ │ ├── STM32F723IEKx │ │ │ ├── RTE_Device.h │ │ │ ├── startup_stm32f723xx.s │ │ │ ├── stm32f7xx_hal_conf.h │ │ │ └── system_stm32f7xx.c │ │ └── project.script │ ├── File_System │ │ ├── FS_Config.c │ │ ├── FS_Config_MC_0.h │ │ ├── FS_Config_NOR_0.h │ │ ├── FS_Config_RAM_0.h │ │ └── FS_Debug.c │ ├── USB │ │ ├── USBD_Config_0.c │ │ ├── USBD_Config_CDC_0.h │ │ └── USBD_Config_MSC_0.h │ └── _STLINKv3_YAB │ │ └── RTE_Components.h ├── Readme.txt ├── STLINKv3_YAB.jpg ├── STLINKv3_YAB.uvprojx ├── USER │ ├── STLINK_V3MINI_BSP.c │ ├── STLINK_V3MINI_BSP.h │ ├── STLINKv3_YAB.sct │ ├── USBD_User_CDC_ACM_UART_0.c │ ├── USBD_User_MSC_0.c │ ├── USBD_User_MSC_Init.c │ ├── main.c │ └── osObjects.h ├── Utility │ ├── Flash.c │ ├── Flash.h │ ├── crc.h │ └── crc32.c └── Win7-VCP-Driver │ └── Win7_VCP_Driver.inf ├── STM32F723_YAB ├── APP_1_Sample │ ├── F723APP1sample │ │ ├── F723APP1sample.rar │ │ ├── LEDblink_USART6print_500ms.txt │ │ └── f723app1.bin │ └── STLINKv3DAPv1_HID+VCP │ │ ├── STLINKv3DAPv1_HID+VCP.rar │ │ └── f723app1.bin ├── APP_2_Sample │ ├── F723APP2sample │ │ ├── F723APP2sample.rar │ │ ├── LEDblink_USART6print_2s.txt │ │ └── f723app2.bin │ └── STLINKv3DAPv2_WinUSB+VCP │ │ ├── STLINKv3DAPv2_WinUSB+VCP.rar │ │ └── f723app2.bin ├── DebugConfig │ └── STM32F723_YAB_STM32F723IEKx_2.0.0.dbgconf ├── Listings │ ├── STM32F723_YAB.axf │ ├── STM32F723_YAB.bin │ └── STM32F723_YAB.hex ├── RTE │ ├── CMSIS │ │ ├── RTX_Config.c │ │ └── RTX_Config.h │ ├── Compiler │ │ └── EventRecorderConf.h │ ├── Device │ │ ├── STM32F723IEKx │ │ │ ├── RTE_Device.h │ │ │ ├── startup_stm32f723xx.s │ │ │ ├── stm32f7xx_hal_conf.h │ │ │ └── system_stm32f7xx.c │ │ └── project.script │ ├── File_System │ │ ├── FS_Config.c │ │ ├── FS_Config_MC_0.h │ │ ├── FS_Config_NOR_0.h │ │ ├── FS_Config_RAM_0.h │ │ └── FS_Debug.c │ ├── USB │ │ ├── USBD_Config_0.c │ │ ├── USBD_Config_CDC_0.h │ │ └── USBD_Config_MSC_0.h │ └── _STM32F723_YAB │ │ └── RTE_Components.h ├── Readme.txt ├── STM32F723_YAB.jpg ├── STM32F723_YAB.uvprojx ├── USER │ ├── STLINK_V3MINI_BSP.c │ ├── STLINK_V3MINI_BSP.h │ ├── STM32F723_YAB.sct │ ├── USBD_User_CDC_ACM_UART_0.c │ ├── USBD_User_MSC_0.c │ ├── USBD_User_MSC_Init.c │ ├── main.c │ └── osObjects.h ├── Utility │ ├── Flash.c │ ├── Flash.h │ ├── crc.h │ └── crc32.c └── Win7-VCP-Driver │ └── Win7_VCP_Driver.inf └── YAB_STM32F103_F407_L433_F723 ├── Readme.txt ├── STM32F103C8T6_YAB ├── .mxproject ├── Build │ ├── STM32F103C8T6_YAB.axf │ ├── STM32F103C8T6_YAB.hex │ └── STM32F103C8T6_YAB.sct ├── Drivers │ ├── CMSIS │ │ ├── Device │ │ │ └── ST │ │ │ │ └── STM32F1xx │ │ │ │ └── Include │ │ │ │ ├── stm32f103xb.h │ │ │ │ ├── stm32f1xx.h │ │ │ │ └── system_stm32f1xx.h │ │ └── Include │ │ │ ├── cmsis_armcc.h │ │ │ ├── cmsis_armclang.h │ │ │ ├── cmsis_compiler.h │ │ │ ├── cmsis_gcc.h │ │ │ ├── cmsis_iccarm.h │ │ │ ├── cmsis_version.h │ │ │ ├── core_armv8mbl.h │ │ │ ├── core_armv8mml.h │ │ │ ├── core_cm0.h │ │ │ ├── core_cm0plus.h │ │ │ ├── core_cm1.h │ │ │ ├── core_cm23.h │ │ │ ├── core_cm3.h │ │ │ ├── core_cm33.h │ │ │ ├── core_cm4.h │ │ │ ├── core_cm7.h │ │ │ ├── core_sc000.h │ │ │ ├── core_sc300.h │ │ │ ├── mpu_armv7.h │ │ │ ├── mpu_armv8.h │ │ │ └── tz_context.h │ └── STM32F1xx_HAL_Driver │ │ ├── Inc │ │ ├── Legacy │ │ │ └── stm32_hal_legacy.h │ │ ├── stm32f1xx_hal.h │ │ ├── stm32f1xx_hal_cortex.h │ │ ├── stm32f1xx_hal_def.h │ │ ├── stm32f1xx_hal_dma.h │ │ ├── stm32f1xx_hal_dma_ex.h │ │ ├── stm32f1xx_hal_exti.h │ │ ├── stm32f1xx_hal_flash.h │ │ ├── stm32f1xx_hal_flash_ex.h │ │ ├── stm32f1xx_hal_gpio.h │ │ ├── stm32f1xx_hal_gpio_ex.h │ │ ├── stm32f1xx_hal_pcd.h │ │ ├── stm32f1xx_hal_pcd_ex.h │ │ ├── stm32f1xx_hal_pwr.h │ │ ├── stm32f1xx_hal_rcc.h │ │ ├── stm32f1xx_hal_rcc_ex.h │ │ ├── stm32f1xx_hal_tim.h │ │ ├── stm32f1xx_hal_tim_ex.h │ │ └── stm32f1xx_ll_usb.h │ │ └── Src │ │ ├── stm32f1xx_hal.c │ │ ├── stm32f1xx_hal_cortex.c │ │ ├── stm32f1xx_hal_dma.c │ │ ├── stm32f1xx_hal_exti.c │ │ ├── stm32f1xx_hal_flash.c │ │ ├── stm32f1xx_hal_flash_ex.c │ │ ├── stm32f1xx_hal_gpio.c │ │ ├── stm32f1xx_hal_gpio_ex.c │ │ ├── stm32f1xx_hal_pcd.c │ │ ├── stm32f1xx_hal_pcd_ex.c │ │ ├── stm32f1xx_hal_pwr.c │ │ ├── stm32f1xx_hal_rcc.c │ │ ├── stm32f1xx_hal_rcc_ex.c │ │ ├── stm32f1xx_hal_tim.c │ │ ├── stm32f1xx_hal_tim_ex.c │ │ └── stm32f1xx_ll_usb.c ├── Inc │ ├── YAB_F103_config.h │ ├── YAB_fat32.h │ ├── main.h │ ├── stm32f1xx_hal_conf.h │ ├── stm32f1xx_it.h │ ├── usb_device.h │ ├── usbd_conf.h │ ├── usbd_desc.h │ └── usbd_storage_if.h ├── MDK-ARM │ ├── DebugConfig │ │ └── STM32F103C8T6_YAB_STM32F103C8_1.0.0.dbgconf │ ├── RTE │ │ └── _STM32F103C8T6_YAB │ │ │ └── RTE_Components.h │ ├── STM32F103C8T6_YAB.uvoptx │ ├── STM32F103C8T6_YAB.uvprojx │ └── startup_stm32f103xb.s ├── Middlewares │ └── ST │ │ └── STM32_USB_Device_Library │ │ ├── Class │ │ └── MSC │ │ │ ├── Inc │ │ │ ├── usbd_msc.h │ │ │ ├── usbd_msc_bot.h │ │ │ ├── usbd_msc_data.h │ │ │ └── usbd_msc_scsi.h │ │ │ └── Src │ │ │ ├── usbd_msc.c │ │ │ ├── usbd_msc_bot.c │ │ │ ├── usbd_msc_data.c │ │ │ └── usbd_msc_scsi.c │ │ └── Core │ │ ├── Inc │ │ ├── usbd_core.h │ │ ├── usbd_ctlreq.h │ │ ├── usbd_def.h │ │ └── usbd_ioreq.h │ │ └── Src │ │ ├── usbd_core.c │ │ ├── usbd_ctlreq.c │ │ └── usbd_ioreq.c ├── STM32F103C8T6_YAB.ioc └── Src │ ├── YAB_fat32.c │ ├── main.c │ ├── stm32f1xx_hal_msp.c │ ├── stm32f1xx_it.c │ ├── system_stm32f1xx.c │ ├── usb_device.c │ ├── usbd_conf.c │ ├── usbd_desc.c │ └── usbd_storage_if.c ├── STM32F407VET6_YAB ├── .mxproject ├── Build │ ├── STM32F407VET6_YAB.axf │ ├── STM32F407VET6_YAB.hex │ └── STM32F407VET6_YAB.sct ├── Drivers │ ├── CMSIS │ │ ├── Device │ │ │ └── ST │ │ │ │ └── STM32F4xx │ │ │ │ └── Include │ │ │ │ ├── stm32f407xx.h │ │ │ │ ├── stm32f4xx.h │ │ │ │ └── system_stm32f4xx.h │ │ └── Include │ │ │ ├── cmsis_armcc.h │ │ │ ├── cmsis_armclang.h │ │ │ ├── cmsis_compiler.h │ │ │ ├── cmsis_gcc.h │ │ │ ├── cmsis_iccarm.h │ │ │ ├── cmsis_version.h │ │ │ ├── core_armv8mbl.h │ │ │ ├── core_armv8mml.h │ │ │ ├── core_cm0.h │ │ │ ├── core_cm0plus.h │ │ │ ├── core_cm1.h │ │ │ ├── core_cm23.h │ │ │ ├── core_cm3.h │ │ │ ├── core_cm33.h │ │ │ ├── core_cm4.h │ │ │ ├── core_cm7.h │ │ │ ├── core_sc000.h │ │ │ ├── core_sc300.h │ │ │ ├── mpu_armv7.h │ │ │ ├── mpu_armv8.h │ │ │ └── tz_context.h │ └── STM32F4xx_HAL_Driver │ │ ├── Inc │ │ ├── Legacy │ │ │ └── stm32_hal_legacy.h │ │ ├── stm32f4xx_hal.h │ │ ├── stm32f4xx_hal_cortex.h │ │ ├── stm32f4xx_hal_def.h │ │ ├── stm32f4xx_hal_dma.h │ │ ├── stm32f4xx_hal_dma_ex.h │ │ ├── stm32f4xx_hal_exti.h │ │ ├── stm32f4xx_hal_flash.h │ │ ├── stm32f4xx_hal_flash_ex.h │ │ ├── stm32f4xx_hal_flash_ramfunc.h │ │ ├── stm32f4xx_hal_gpio.h │ │ ├── stm32f4xx_hal_gpio_ex.h │ │ ├── stm32f4xx_hal_pcd.h │ │ ├── stm32f4xx_hal_pcd_ex.h │ │ ├── stm32f4xx_hal_pwr.h │ │ ├── stm32f4xx_hal_pwr_ex.h │ │ ├── stm32f4xx_hal_rcc.h │ │ ├── stm32f4xx_hal_rcc_ex.h │ │ ├── stm32f4xx_hal_tim.h │ │ ├── stm32f4xx_hal_tim_ex.h │ │ └── stm32f4xx_ll_usb.h │ │ └── Src │ │ ├── stm32f4xx_hal.c │ │ ├── stm32f4xx_hal_cortex.c │ │ ├── stm32f4xx_hal_dma.c │ │ ├── stm32f4xx_hal_dma_ex.c │ │ ├── stm32f4xx_hal_exti.c │ │ ├── stm32f4xx_hal_flash.c │ │ ├── stm32f4xx_hal_flash_ex.c │ │ ├── stm32f4xx_hal_flash_ramfunc.c │ │ ├── stm32f4xx_hal_gpio.c │ │ ├── stm32f4xx_hal_pcd.c │ │ ├── stm32f4xx_hal_pcd_ex.c │ │ ├── stm32f4xx_hal_pwr.c │ │ ├── stm32f4xx_hal_pwr_ex.c │ │ ├── stm32f4xx_hal_rcc.c │ │ ├── stm32f4xx_hal_rcc_ex.c │ │ ├── stm32f4xx_hal_tim.c │ │ ├── stm32f4xx_hal_tim_ex.c │ │ └── stm32f4xx_ll_usb.c ├── Inc │ ├── YAB_F407_config.h │ ├── YAB_fat32.h │ ├── main.h │ ├── stm32f4xx_hal_conf.h │ ├── stm32f4xx_it.h │ ├── usb_device.h │ ├── usbd_conf.h │ ├── usbd_desc.h │ └── usbd_storage_if.h ├── MDK-ARM │ ├── DebugConfig │ │ └── STM32F407VET6_YAB_STM32F407VETx.dbgconf │ ├── RTE │ │ └── _STM32F407VET6_YAB │ │ │ └── RTE_Components.h │ ├── STM32F407VET6_YAB.uvoptx │ ├── STM32F407VET6_YAB.uvprojx │ └── startup_stm32f407xx.s ├── Middlewares │ └── ST │ │ └── STM32_USB_Device_Library │ │ ├── Class │ │ └── MSC │ │ │ ├── Inc │ │ │ ├── usbd_msc.h │ │ │ ├── usbd_msc_bot.h │ │ │ ├── usbd_msc_data.h │ │ │ └── usbd_msc_scsi.h │ │ │ └── Src │ │ │ ├── usbd_msc.c │ │ │ ├── usbd_msc_bot.c │ │ │ ├── usbd_msc_data.c │ │ │ └── usbd_msc_scsi.c │ │ └── Core │ │ ├── Inc │ │ ├── usbd_core.h │ │ ├── usbd_ctlreq.h │ │ ├── usbd_def.h │ │ └── usbd_ioreq.h │ │ └── Src │ │ ├── usbd_core.c │ │ ├── usbd_ctlreq.c │ │ └── usbd_ioreq.c ├── STM32F407VET6_YAB.ioc └── Src │ ├── YAB_fat32.c │ ├── main.c │ ├── stm32f4xx_hal_msp.c │ ├── stm32f4xx_it.c │ ├── system_stm32f4xx.c │ ├── usb_device.c │ ├── usbd_conf.c │ ├── usbd_desc.c │ └── usbd_storage_if.c ├── STM32F723IEK6_YAB ├── .mxproject ├── Build │ ├── STM32F723IEK6_YAB.axf │ ├── STM32F723IEK6_YAB.hex │ └── STM32F723IEK6_YAB.sct ├── Drivers │ ├── CMSIS │ │ ├── Device │ │ │ └── ST │ │ │ │ └── STM32F7xx │ │ │ │ └── Include │ │ │ │ ├── stm32f723xx.h │ │ │ │ ├── stm32f7xx.h │ │ │ │ └── system_stm32f7xx.h │ │ └── Include │ │ │ ├── cmsis_armcc.h │ │ │ ├── cmsis_armclang.h │ │ │ ├── cmsis_compiler.h │ │ │ ├── cmsis_gcc.h │ │ │ ├── cmsis_iccarm.h │ │ │ ├── cmsis_version.h │ │ │ ├── core_armv8mbl.h │ │ │ ├── core_armv8mml.h │ │ │ ├── core_cm0.h │ │ │ ├── core_cm0plus.h │ │ │ ├── core_cm1.h │ │ │ ├── core_cm23.h │ │ │ ├── core_cm3.h │ │ │ ├── core_cm33.h │ │ │ ├── core_cm4.h │ │ │ ├── core_cm7.h │ │ │ ├── core_sc000.h │ │ │ ├── core_sc300.h │ │ │ ├── mpu_armv7.h │ │ │ ├── mpu_armv8.h │ │ │ └── tz_context.h │ └── STM32F7xx_HAL_Driver │ │ ├── Inc │ │ ├── Legacy │ │ │ └── stm32_hal_legacy.h │ │ ├── stm32f7xx_hal.h │ │ ├── stm32f7xx_hal_cortex.h │ │ ├── stm32f7xx_hal_def.h │ │ ├── stm32f7xx_hal_dma.h │ │ ├── stm32f7xx_hal_dma_ex.h │ │ ├── stm32f7xx_hal_exti.h │ │ ├── stm32f7xx_hal_flash.h │ │ ├── stm32f7xx_hal_flash_ex.h │ │ ├── stm32f7xx_hal_gpio.h │ │ ├── stm32f7xx_hal_gpio_ex.h │ │ ├── stm32f7xx_hal_i2c.h │ │ ├── stm32f7xx_hal_i2c_ex.h │ │ ├── stm32f7xx_hal_pcd.h │ │ ├── stm32f7xx_hal_pcd_ex.h │ │ ├── stm32f7xx_hal_pwr.h │ │ ├── stm32f7xx_hal_pwr_ex.h │ │ ├── stm32f7xx_hal_rcc.h │ │ ├── stm32f7xx_hal_rcc_ex.h │ │ ├── stm32f7xx_hal_tim.h │ │ ├── stm32f7xx_hal_tim_ex.h │ │ └── stm32f7xx_ll_usb.h │ │ └── Src │ │ ├── stm32f7xx_hal.c │ │ ├── stm32f7xx_hal_cortex.c │ │ ├── stm32f7xx_hal_dma.c │ │ ├── stm32f7xx_hal_dma_ex.c │ │ ├── stm32f7xx_hal_exti.c │ │ ├── stm32f7xx_hal_flash.c │ │ ├── stm32f7xx_hal_flash_ex.c │ │ ├── stm32f7xx_hal_gpio.c │ │ ├── stm32f7xx_hal_i2c.c │ │ ├── stm32f7xx_hal_i2c_ex.c │ │ ├── stm32f7xx_hal_pcd.c │ │ ├── stm32f7xx_hal_pcd_ex.c │ │ ├── stm32f7xx_hal_pwr.c │ │ ├── stm32f7xx_hal_pwr_ex.c │ │ ├── stm32f7xx_hal_rcc.c │ │ ├── stm32f7xx_hal_rcc_ex.c │ │ ├── stm32f7xx_hal_tim.c │ │ ├── stm32f7xx_hal_tim_ex.c │ │ └── stm32f7xx_ll_usb.c ├── Inc │ ├── YAB_F723_config.h │ ├── YAB_fat32.h │ ├── main.h │ ├── stm32f7xx_hal_conf.h │ ├── stm32f7xx_it.h │ ├── usb_device.h │ ├── usbd_conf.h │ ├── usbd_desc.h │ └── usbd_storage_if.h ├── MDK-ARM │ ├── DebugConfig │ │ └── STM32F723IEK6_YAB_STM32F723IEKx_2.0.0.dbgconf │ ├── RTE │ │ └── _STM32F723IEK6_YAB │ │ │ └── RTE_Components.h │ ├── STM32F723IEK6_YAB.uvoptx │ ├── STM32F723IEK6_YAB.uvprojx │ └── startup_stm32f723xx.s ├── Middlewares │ └── ST │ │ └── STM32_USB_Device_Library │ │ ├── Class │ │ └── MSC │ │ │ ├── Inc │ │ │ ├── usbd_msc.h │ │ │ ├── usbd_msc_bot.h │ │ │ ├── usbd_msc_data.h │ │ │ └── usbd_msc_scsi.h │ │ │ └── Src │ │ │ ├── usbd_msc.c │ │ │ ├── usbd_msc_bot.c │ │ │ ├── usbd_msc_data.c │ │ │ └── usbd_msc_scsi.c │ │ └── Core │ │ ├── Inc │ │ ├── usbd_core.h │ │ ├── usbd_ctlreq.h │ │ ├── usbd_def.h │ │ └── usbd_ioreq.h │ │ └── Src │ │ ├── usbd_core.c │ │ ├── usbd_ctlreq.c │ │ └── usbd_ioreq.c ├── STM32F723IEK6_YAB.ioc └── Src │ ├── YAB_fat32.c │ ├── main.c │ ├── stm32f7xx_hal_msp.c │ ├── stm32f7xx_it.c │ ├── system_stm32f7xx.c │ ├── usb_device.c │ ├── usbd_conf.c │ ├── usbd_desc.c │ └── usbd_storage_if.c └── STM32L433CCT6_YAB ├── .mxproject ├── Drivers ├── CMSIS │ ├── Device │ │ └── ST │ │ │ └── STM32L4xx │ │ │ └── Include │ │ │ ├── stm32l433xx.h │ │ │ ├── stm32l4xx.h │ │ │ └── system_stm32l4xx.h │ └── Include │ │ ├── cmsis_armcc.h │ │ ├── cmsis_armclang.h │ │ ├── cmsis_armclang_ltm.h │ │ ├── cmsis_compiler.h │ │ ├── cmsis_gcc.h │ │ ├── cmsis_iccarm.h │ │ ├── cmsis_version.h │ │ ├── core_armv81mml.h │ │ ├── core_armv8mbl.h │ │ ├── core_armv8mml.h │ │ ├── core_cm0.h │ │ ├── core_cm0plus.h │ │ ├── core_cm1.h │ │ ├── core_cm23.h │ │ ├── core_cm3.h │ │ ├── core_cm33.h │ │ ├── core_cm35p.h │ │ ├── core_cm4.h │ │ ├── core_cm7.h │ │ ├── core_sc000.h │ │ ├── core_sc300.h │ │ ├── mpu_armv7.h │ │ ├── mpu_armv8.h │ │ └── tz_context.h └── STM32L4xx_HAL_Driver │ ├── Inc │ ├── Legacy │ │ └── stm32_hal_legacy.h │ ├── stm32l4xx_hal.h │ ├── stm32l4xx_hal_cortex.h │ ├── stm32l4xx_hal_def.h │ ├── stm32l4xx_hal_dma.h │ ├── stm32l4xx_hal_dma_ex.h │ ├── stm32l4xx_hal_exti.h │ ├── stm32l4xx_hal_flash.h │ ├── stm32l4xx_hal_flash_ex.h │ ├── stm32l4xx_hal_flash_ramfunc.h │ ├── stm32l4xx_hal_gpio.h │ ├── stm32l4xx_hal_gpio_ex.h │ ├── stm32l4xx_hal_i2c.h │ ├── stm32l4xx_hal_i2c_ex.h │ ├── stm32l4xx_hal_pcd.h │ ├── stm32l4xx_hal_pcd_ex.h │ ├── stm32l4xx_hal_pwr.h │ ├── stm32l4xx_hal_pwr_ex.h │ ├── stm32l4xx_hal_rcc.h │ ├── stm32l4xx_hal_rcc_ex.h │ ├── stm32l4xx_hal_tim.h │ ├── stm32l4xx_hal_tim_ex.h │ └── stm32l4xx_ll_usb.h │ └── Src │ ├── stm32l4xx_hal.c │ ├── stm32l4xx_hal_cortex.c │ ├── stm32l4xx_hal_dma.c │ ├── stm32l4xx_hal_dma_ex.c │ ├── stm32l4xx_hal_exti.c │ ├── stm32l4xx_hal_flash.c │ ├── stm32l4xx_hal_flash_ex.c │ ├── stm32l4xx_hal_flash_ramfunc.c │ ├── stm32l4xx_hal_gpio.c │ ├── stm32l4xx_hal_i2c.c │ ├── stm32l4xx_hal_i2c_ex.c │ ├── stm32l4xx_hal_pcd.c │ ├── stm32l4xx_hal_pcd_ex.c │ ├── stm32l4xx_hal_pwr.c │ ├── stm32l4xx_hal_pwr_ex.c │ ├── stm32l4xx_hal_rcc.c │ ├── stm32l4xx_hal_rcc_ex.c │ ├── stm32l4xx_hal_tim.c │ ├── stm32l4xx_hal_tim_ex.c │ └── stm32l4xx_ll_usb.c ├── Inc ├── YAB_L433_config.h ├── YAB_fat32.h ├── main.h ├── stm32l4xx_hal_conf.h ├── stm32l4xx_it.h ├── usb_device.h ├── usbd_conf.h ├── usbd_desc.h └── usbd_storage_if.h ├── MDK-ARM ├── DebugConfig │ └── STM32L433CCT6_YAB_STM32L433CCTx.dbgconf ├── RTE │ └── _STM32L433CCT6_YAB │ │ └── RTE_Components.h ├── STM32L433CCT6_YAB.uvoptx ├── STM32L433CCT6_YAB.uvprojx ├── STM32L433CCT6_YAB │ ├── STM32L433CCT6_YAB.axf │ ├── STM32L433CCT6_YAB.hex │ └── STM32L433CCT6_YAB.sct └── startup_stm32l433xx.s ├── Middlewares └── ST │ └── STM32_USB_Device_Library │ ├── Class │ └── MSC │ │ ├── Inc │ │ ├── usbd_msc.h │ │ ├── usbd_msc_bot.h │ │ ├── usbd_msc_data.h │ │ └── usbd_msc_scsi.h │ │ └── Src │ │ ├── usbd_msc.c │ │ ├── usbd_msc_bot.c │ │ ├── usbd_msc_data.c │ │ └── usbd_msc_scsi.c │ └── Core │ ├── Inc │ ├── usbd_core.h │ ├── usbd_ctlreq.h │ ├── usbd_def.h │ └── usbd_ioreq.h │ └── Src │ ├── usbd_core.c │ ├── usbd_ctlreq.c │ └── usbd_ioreq.c ├── STM32L433CCT6_YAB.ioc └── Src ├── YAB_fat32.c ├── main.c ├── stm32l4xx_hal_msp.c ├── stm32l4xx_it.c ├── system_stm32l4xx.c ├── usb_device.c ├── usbd_conf.c ├── usbd_desc.c └── usbd_storage_if.c /README.md: -------------------------------------------------------------------------------- 1 | ## Yet_Another_Bootloader 2 | This Yet Another Bootloader (YAB) is for STM32, STM32F103, STM32F407, STM32L433, STM32F723, STLINK-V3, STLINK-V3MINI, CMSIS-DAP. 3 | 4 | YAB, Free to use / Easy to use / Intelligent 5 | YAB, a PC MSC drive to Drag&Drop your App BIN code to flash the STM32 IC, no other Host software needed. 6 | YAB, easy to port to any other MCU with USB port. 7 | 8 | 9 | There are 3 projects in this repo: 10 | 11 | ### 1. [STLINKv3_YAB](STLINKv3_YAB): 12 | Use on STLINK-V3MINI board, YAB co-exist with STLINK-V3 Factory Bootloader. MSC Drive using SDRAM. 13 | For details, [refer to the Project Readme.txt file](STLINKv3_YAB/Readme.txt). 14 | 15 | ![alt text](https://github.com/RadioOperator/Yet_Another_Bootloader/blob/master/STLINKv3_YAB/STLINKv3_YAB.jpg) 16 | 17 | 18 | ### 2. [STM32F723_YAB](STM32F723_YAB): 19 | Use on STLINK-V3MINI board, YAB standalone in IC STM32F723. MSC Drive using SDRAM. 20 | For details, [refer to the Project Readme.txt file](STM32F723_YAB/Readme.txt). 21 | 22 | ![alt text](https://github.com/RadioOperator/Yet_Another_Bootloader/blob/master/STM32F723_YAB/STM32F723_YAB.jpg) 23 | 24 | 25 | ### 3. [YAB_STM32F103_F407_L433_F723](YAB_STM32F103_F407_L433_F723): 26 | Four YAB sample for any STM32 ICs, MSC Drive using internal Flash ROM. 27 | For details, [refer to the Readme.txt file](YAB_STM32F103_F407_L433_F723/Readme.txt). 28 | 29 | 30 | ### Declarations: 31 | 32 | > The project is for experiments only. Use any parts and info on your own risks. 33 | 34 | -------------------------------------------------------------------------------- /STLINKv3_YAB/APP_1_Sample/SLV3APP1_DAPv1_HID+VCP/SLV3APP1_DAPv1_HID+VCP.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/APP_1_Sample/SLV3APP1_DAPv1_HID+VCP/SLV3APP1_DAPv1_HID+VCP.rar -------------------------------------------------------------------------------- /STLINKv3_YAB/APP_1_Sample/SLV3APP1_DAPv1_HID+VCP/slv3app1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/APP_1_Sample/SLV3APP1_DAPv1_HID+VCP/slv3app1.bin -------------------------------------------------------------------------------- /STLINKv3_YAB/APP_1_Sample/SLV3APP1sample/LEDblink_USART6print_500ms.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/APP_1_Sample/SLV3APP1sample/LEDblink_USART6print_500ms.txt -------------------------------------------------------------------------------- /STLINKv3_YAB/APP_1_Sample/SLV3APP1sample/SLV3APP1sample.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/APP_1_Sample/SLV3APP1sample/SLV3APP1sample.rar -------------------------------------------------------------------------------- /STLINKv3_YAB/APP_1_Sample/SLV3APP1sample/slv3app1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/APP_1_Sample/SLV3APP1sample/slv3app1.bin -------------------------------------------------------------------------------- /STLINKv3_YAB/APP_2_Sample/SLV3APP2_DAPv2WinUSB+VCP/SLV3APP2_DAPv2WinUSB+VCP.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/APP_2_Sample/SLV3APP2_DAPv2WinUSB+VCP/SLV3APP2_DAPv2WinUSB+VCP.rar -------------------------------------------------------------------------------- /STLINKv3_YAB/APP_2_Sample/SLV3APP2_DAPv2WinUSB+VCP/slv3app2.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/APP_2_Sample/SLV3APP2_DAPv2WinUSB+VCP/slv3app2.bin -------------------------------------------------------------------------------- /STLINKv3_YAB/APP_2_Sample/SLV3APP2sample/LEDblink_USART6print_2s.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/APP_2_Sample/SLV3APP2sample/LEDblink_USART6print_2s.txt -------------------------------------------------------------------------------- /STLINKv3_YAB/APP_2_Sample/SLV3APP2sample/SLV3APP2sample.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/APP_2_Sample/SLV3APP2sample/SLV3APP2sample.rar -------------------------------------------------------------------------------- /STLINKv3_YAB/APP_2_Sample/SLV3APP2sample/slv3app2.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/APP_2_Sample/SLV3APP2sample/slv3app2.bin -------------------------------------------------------------------------------- /STLINKv3_YAB/Build/STLINKv3_YAB.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/Build/STLINKv3_YAB.bin -------------------------------------------------------------------------------- /STLINKv3_YAB/Build/STLinkUpgrade.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/Build/STLinkUpgrade.jar -------------------------------------------------------------------------------- /STLINKv3_YAB/Build/StlinkRulesFilesForLinux/49-stlinkv1.rules: -------------------------------------------------------------------------------- 1 | # stm32 discovery boards, with onboard st/linkv1 2 | # ie, STM32VL. 3 | 4 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3744", \ 5 | MODE="660", GROUP="plugdev", TAG+="uaccess", \ 6 | SYMLINK+="stlinkv1_%n" 7 | -------------------------------------------------------------------------------- /STLINKv3_YAB/Build/StlinkRulesFilesForLinux/49-stlinkv2-1.rules: -------------------------------------------------------------------------------- 1 | # stm32 nucleo boards, with onboard st/linkv2-1 2 | # ie, STM32F0, STM32F4. 3 | 4 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", \ 5 | MODE="660", GROUP="plugdev", TAG+="uaccess", \ 6 | SYMLINK+="stlinkv2-1_%n" 7 | 8 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3752", \ 9 | MODE="660", GROUP="plugdev", TAG+="uaccess", \ 10 | SYMLINK+="stlinkv2-1_%n" 11 | 12 | -------------------------------------------------------------------------------- /STLINKv3_YAB/Build/StlinkRulesFilesForLinux/49-stlinkv2.rules: -------------------------------------------------------------------------------- 1 | # stm32 discovery boards, with onboard st/linkv2 2 | # ie, STM32L, STM32F4. 3 | 4 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", \ 5 | MODE="660", GROUP="plugdev", TAG+="uaccess", \ 6 | SYMLINK+="stlinkv2_%n" 7 | -------------------------------------------------------------------------------- /STLINKv3_YAB/Build/StlinkRulesFilesForLinux/49-stlinkv3.rules: -------------------------------------------------------------------------------- 1 | # stlink-v3 boards (standalone and embedded) in usbloader mode and standard (debug) mode 2 | 3 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374d", \ 4 | MODE="660", GROUP="plugdev", TAG+="uaccess", \ 5 | SYMLINK+="stlinkv3loader_%n" 6 | 7 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374e", \ 8 | MODE="660", GROUP="plugdev", TAG+="uaccess", \ 9 | SYMLINK+="stlinkv3_%n" 10 | 11 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374f", \ 12 | MODE="660", GROUP="plugdev", TAG+="uaccess", \ 13 | SYMLINK+="stlinkv3_%n" 14 | 15 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3753", \ 16 | MODE="660", GROUP="plugdev", TAG+="uaccess", \ 17 | SYMLINK+="stlinkv3_%n" 18 | 19 | -------------------------------------------------------------------------------- /STLINKv3_YAB/Build/StlinkRulesFilesForLinux/Readme.txt: -------------------------------------------------------------------------------- 1 | Files to copy in /etc/udev/rules.d/ on Ubuntu ("sudo cp *.* /etc/udev/rules.d"). 2 | 3 | Note that a file is provided for ST-Link/V1 (idProduct=3744) despite most toolsets do 4 | not support it. -------------------------------------------------------------------------------- /STLINKv3_YAB/Build/Write-to-stlink-v3.bat: -------------------------------------------------------------------------------- 1 | java -jar STLinkUpgrade.jar -force_prog 2 | 3 | pause 4 | -------------------------------------------------------------------------------- /STLINKv3_YAB/Build/encrypt_to_f3_files.bat: -------------------------------------------------------------------------------- 1 | cd .\Build 2 | java -jar st_decrypt.jar --key " .ST-Link.ver.3." -i STLINKv3_YAB.bin -o f3_1.bin --encrypt 3 | java -jar st_decrypt.jar --key " .ST-Link.ver.3." -i STLINKv3_YAB.bin -o f3_2.bin --encrypt 4 | -------------------------------------------------------------------------------- /STLINKv3_YAB/Build/f3_1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/Build/f3_1.bin -------------------------------------------------------------------------------- /STLINKv3_YAB/Build/f3_2.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/Build/f3_2.bin -------------------------------------------------------------------------------- /STLINKv3_YAB/Build/lib/commons-cli-1.3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/Build/lib/commons-cli-1.3.1.jar -------------------------------------------------------------------------------- /STLINKv3_YAB/Build/native/linux_x64/libSTLinkUSBDriver.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/Build/native/linux_x64/libSTLinkUSBDriver.so -------------------------------------------------------------------------------- /STLINKv3_YAB/Build/native/linux_x86/libSTLinkUSBDriver.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/Build/native/linux_x86/libSTLinkUSBDriver.so -------------------------------------------------------------------------------- /STLINKv3_YAB/Build/native/mac_x64/libSTLinkUSBDriver.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/Build/native/mac_x64/libSTLinkUSBDriver.dylib -------------------------------------------------------------------------------- /STLINKv3_YAB/Build/native/win_x64/STLinkUSBDriver.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/Build/native/win_x64/STLinkUSBDriver.dll -------------------------------------------------------------------------------- /STLINKv3_YAB/Build/native/win_x86/STLinkUSBDriver.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/Build/native/win_x86/STLinkUSBDriver.dll -------------------------------------------------------------------------------- /STLINKv3_YAB/Build/st_decrypt.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/Build/st_decrypt.jar -------------------------------------------------------------------------------- /STLINKv3_YAB/RTE/CMSIS/RTX_Config.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2018 Arm Limited. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the License); you may 7 | * not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 14 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | * ----------------------------------------------------------------------------- 19 | * 20 | * $Revision: V5.1.0 21 | * 22 | * Project: CMSIS-RTOS RTX 23 | * Title: RTX Configuration 24 | * 25 | * ----------------------------------------------------------------------------- 26 | */ 27 | 28 | #include "cmsis_compiler.h" 29 | #include "rtx_os.h" 30 | 31 | // OS Idle Thread 32 | __WEAK __NO_RETURN void osRtxIdleThread (void *argument) { 33 | (void)argument; 34 | 35 | for (;;) {} 36 | } 37 | 38 | // OS Error Callback function 39 | __WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) { 40 | (void)object_id; 41 | 42 | switch (code) { 43 | case osRtxErrorStackUnderflow: 44 | // Stack overflow detected for thread (thread_id=object_id) 45 | break; 46 | case osRtxErrorISRQueueOverflow: 47 | // ISR Queue overflow detected when inserting object (object_id) 48 | break; 49 | case osRtxErrorTimerQueueOverflow: 50 | // User Timer Callback Queue overflow detected for timer (timer_id=object_id) 51 | break; 52 | case osRtxErrorClibSpace: 53 | // Standard C/C++ library libspace not available: increase OS_THREAD_LIBSPACE_NUM 54 | break; 55 | case osRtxErrorClibMutex: 56 | // Standard C/C++ library mutex initialization failed 57 | break; 58 | default: 59 | // Reserved 60 | break; 61 | } 62 | for (;;) {} 63 | //return 0U; 64 | } 65 | -------------------------------------------------------------------------------- /STLINKv3_YAB/RTE/Compiler/EventRecorderConf.h: -------------------------------------------------------------------------------- 1 | /*------------------------------------------------------------------------------ 2 | * MDK - Component ::Event Recorder 3 | * Copyright (c) 2016-2018 ARM Germany GmbH. All rights reserved. 4 | *------------------------------------------------------------------------------ 5 | * Name: EventRecorderConf.h 6 | * Purpose: Event Recorder Configuration 7 | * Rev.: V1.1.0 8 | *----------------------------------------------------------------------------*/ 9 | 10 | //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- 11 | 12 | // Event Recorder 13 | 14 | // Number of Records 15 | // <8=>8 <16=>16 <32=>32 <64=>64 <128=>128 <256=>256 <512=>512 <1024=>1024 16 | // <2048=>2048 <4096=>4096 <8192=>8192 <16384=>16384 <32768=>32768 17 | // <65536=>65536 18 | // Configures size of Event Record Buffer (each record is 16 bytes) 19 | // Must be 2^n (min=8, max=65536) 20 | #define EVENT_RECORD_COUNT 64U 21 | 22 | // Time Stamp Source 23 | // <0=> DWT Cycle Counter <1=> SysTick <2=> CMSIS-RTOS2 System Timer 24 | // <3=> User Timer (Normal Reset) <4=> User Timer (Power-On Reset) 25 | // Selects source for 32-bit time stamp 26 | #define EVENT_TIMESTAMP_SOURCE 0 27 | 28 | // Time Stamp Clock Frequency [Hz] <0-1000000000> 29 | // Defines default time stamp clock frequency (0 when not used) 30 | #define EVENT_TIMESTAMP_FREQ 0U 31 | 32 | // 33 | 34 | //------------- <<< end of configuration section >>> --------------------------- 35 | -------------------------------------------------------------------------------- /STLINKv3_YAB/RTE/Device/project.script: -------------------------------------------------------------------------------- 1 | load STM32F723IEKx 2 | project name STCubeGenerated 3 | project toolchain "MDK-ARM V5" 4 | project path "C:\STM32F723\STM32F723IEK6DAP\RTE\Device\STM32F723IEKx\" 5 | -------------------------------------------------------------------------------- /STLINKv3_YAB/RTE/File_System/FS_Config.c: -------------------------------------------------------------------------------- 1 | /*------------------------------------------------------------------------------ 2 | * MDK Middleware - Component ::File System 3 | * Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved. 4 | *------------------------------------------------------------------------------ 5 | * Name: FS_Config.c 6 | * Purpose: File System Configuration 7 | * Rev.: V6.3.0 8 | *----------------------------------------------------------------------------*/ 9 | 10 | //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- 11 | 12 | // FAT File System 13 | // Define FAT File System parameters 14 | 15 | // Number of open files <1-16> 16 | // Define number of files that can be opened at the same time. 17 | // Default: 4 18 | #define FAT_MAX_OPEN_FILES 16 19 | 20 | // 21 | 22 | // Embedded File System 23 | // Define Embedded File System parameters 24 | 25 | // Number of open files <1-16> 26 | // Define number of files that can be opened at the same time. 27 | // Default: 4 28 | #define EFS_MAX_OPEN_FILES 16 29 | 30 | // 31 | 32 | // Initial Current Drive <0=>F0: <1=>F1: 33 | // <2=>M0: <3=>M1: 34 | // <4=>N0: <5=>N1: 35 | // <6=>R0: <9=>R1: 36 | // <7=>U0: <8=>U1: 37 | // Set initial setting for current drive. Current drive is used for File System functions 38 | // that are invoked with the "" string and can be altered anytime during run-time. 39 | #define FS_INITIAL_CDRIVE 6 40 | 41 | #include "RTE_Components.h" 42 | 43 | #ifdef RTE_FileSystem_Drive_RAM_0 44 | #include "FS_Config_RAM_0.h" 45 | #endif 46 | #ifdef RTE_FileSystem_Drive_RAM_1 47 | #include "FS_Config_RAM_1.h" 48 | #endif 49 | 50 | #ifdef RTE_FileSystem_Drive_NOR_0 51 | #include "FS_Config_NOR_0.h" 52 | #endif 53 | #ifdef RTE_FileSystem_Drive_NOR_1 54 | #include "FS_Config_NOR_1.h" 55 | #endif 56 | 57 | #ifdef RTE_FileSystem_Drive_NAND_0 58 | #include "FS_Config_NAND_0.h" 59 | #endif 60 | #ifdef RTE_FileSystem_Drive_NAND_1 61 | #include "FS_Config_NAND_1.h" 62 | #endif 63 | 64 | #ifdef RTE_FileSystem_Drive_MC_0 65 | #include "FS_Config_MC_0.h" 66 | #endif 67 | #ifdef RTE_FileSystem_Drive_MC_1 68 | #include "FS_Config_MC_1.h" 69 | #endif 70 | 71 | #ifdef RTE_FileSystem_Drive_USB_0 72 | #include "FS_Config_USB_0.h" 73 | #endif 74 | #ifdef RTE_FileSystem_Drive_USB_1 75 | #include "FS_Config_USB_1.h" 76 | #endif 77 | 78 | #include "fs_config.h" 79 | -------------------------------------------------------------------------------- /STLINKv3_YAB/RTE/File_System/FS_Config_MC_0.h: -------------------------------------------------------------------------------- 1 | /*------------------------------------------------------------------------------ 2 | * MDK Middleware - Component ::File System:Drive 3 | * Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved. 4 | *------------------------------------------------------------------------------ 5 | * Name: FS_Config_MC_0.h 6 | * Purpose: File System Configuration for Memory Card Drive 7 | * Rev.: V6.2.0 8 | *----------------------------------------------------------------------------*/ 9 | 10 | //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- 11 | 12 | // Memory Card Drive 0 13 | // Configuration for SD/SDHC/MMC Memory Card assigned to drive letter "M0:" 14 | #define MC0_ENABLE 1 15 | 16 | // Connect to hardware via Driver_MCI# <0-255> 17 | // Select driver control block for hardware interface 18 | #define MC0_MCI_DRIVER 1 19 | 20 | // Connect to hardware via Driver_SPI# <0-255> 21 | // Select driver control block for hardware interface when in SPI mode 22 | #define MC0_SPI_DRIVER 0 23 | 24 | // Memory Card Interface Mode <0=>Native <1=>SPI 25 | // Native uses a SD Bus with up to 8 data lines, CLK, and CMD 26 | // SPI uses 2 data lines (MOSI and MISO), SCLK and CS 27 | #define MC0_SPI 0 28 | 29 | // Drive Cache Size <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB 30 | // <8=>8 KB <16=>16 KB <32=>32 KB 31 | // Drive Cache stores data sectors and may be increased to speed-up 32 | // file read/write operations on this drive (default: 4 KB) 33 | #define MC0_CACHE_SIZE 32 34 | 35 | // Locate Drive Cache and Drive Buffer 36 | // Some microcontrollers support DMA only in specific memory areas and 37 | // require to locate the drive buffers at a fixed address. 38 | #define MC0_CACHE_RELOC 1 39 | 40 | // Base address <0x0000-0xFFFFFE00:0x200> 41 | // Set buffer base address to RAM areas that support DMA with the drive. 42 | #define MC0_CACHE_ADDR 0x7FD00000 43 | 44 | // 45 | // Filename Cache Size <0-1000000> 46 | // Define number of cached file or directory names. 47 | // 48 bytes of RAM is required for each cached name. 48 | #define MC0_NAME_CACHE_SIZE 0 49 | 50 | // Use FAT Journal 51 | // Protect File Allocation Table and Directory Entries for 52 | // fail-safe operation. 53 | #define MC0_FAT_JOURNAL 1 54 | 55 | // 56 | -------------------------------------------------------------------------------- /STLINKv3_YAB/RTE/File_System/FS_Config_NOR_0.h: -------------------------------------------------------------------------------- 1 | /*------------------------------------------------------------------------------ 2 | * MDK Middleware - Component ::File System:Drive 3 | * Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved. 4 | *------------------------------------------------------------------------------ 5 | * Name: FS_Config_NOR_0.h 6 | * Purpose: File System Configuration for NOR Flash Drive 7 | * Rev.: V6.2.0 8 | *----------------------------------------------------------------------------*/ 9 | 10 | //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- 11 | 12 | // NOR Flash Drive 0 13 | // Configuration for NOR Flash device assigned to drive letter "F0:" 14 | #define NOR0_ENABLE 1 15 | 16 | // Connect to hardware via Driver_Flash# <0-255> 17 | // Select driver control block for hardware interface 18 | #define NOR0_DRIVER 0 19 | 20 | // 21 | -------------------------------------------------------------------------------- /STLINKv3_YAB/RTE/File_System/FS_Config_RAM_0.h: -------------------------------------------------------------------------------- 1 | /*------------------------------------------------------------------------------ 2 | * MDK Middleware - Component ::File System:Drive 3 | * Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved. 4 | *------------------------------------------------------------------------------ 5 | * Name: FS_Config_RAM_0.h 6 | * Purpose: File System Configuration for RAM Drive 7 | * Rev.: V6.2.0 8 | *----------------------------------------------------------------------------*/ 9 | 10 | //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- 11 | 12 | // RAM Drive 0 13 | // Configuration for RAM assigned to drive letter "R0:" 14 | #define RAM0_ENABLE 1 15 | 16 | // Device Size <0x4C00-0xFFFFF000:0x400> 17 | // Define the size of RAM device in bytes 18 | // Default: 0x8000 19 | #define RAM0_SIZE 0x030000 20 | 21 | // Locate Drive Cache and Drive Buffer 22 | // Locate RAM drive buffer at a specific address. 23 | // If not enabled, the linker selects base address. 24 | #define RAM0_RELOC 0 25 | 26 | // Base address <0x0-0xFFFFF000:0x1000> 27 | // Define the target device Base address. 28 | // Default: 0x80000000 29 | #define RAM0_BASE_ADDR 0x80000000 30 | 31 | // 32 | 33 | // 34 | -------------------------------------------------------------------------------- /STLINKv3_YAB/RTE/File_System/FS_Debug.c: -------------------------------------------------------------------------------- 1 | /*------------------------------------------------------------------------------ 2 | * MDK Middleware - Component ::File System 3 | * Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved. 4 | *------------------------------------------------------------------------------ 5 | * Name: FS_Debug.c 6 | * Purpose: File System Debug Configuration 7 | * Rev.: V1.0.0 8 | *----------------------------------------------------------------------------*/ 9 | 10 | //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- 11 | 12 | // File System Debug 13 | // Enable File System event recording 14 | #define FS_DEBUG_EVR_ENABLE 0 15 | 16 | // Core Management <0=>Off <1=>Errors <2=>Errors + API <3=>All 17 | // Configure FsCore: Core Management event recording 18 | #define FS_DEBUG_EVR_CORE 1 19 | 20 | // FAT File System <0=>Off <1=>Errors <2=>Errors + API <3=>All 21 | // Configure FsFAT: FAT File System event recording 22 | #define FS_DEBUG_EVR_FAT 1 23 | 24 | // EFS File System <0=>Off <1=>Errors <2=>Errors + API <3=>All 25 | // Configure FsEFS: EFS File System event recording 26 | #define FS_DEBUG_EVR_EFS 1 27 | 28 | // I/O Control Interface <0=>Off <1=>Errors <2=>Errors + API <3=>All 29 | // Configure FsIOC: I/O Control Interface event recording 30 | #define FS_DEBUG_EVR_IOC 1 31 | 32 | // NAND Flash Translation Layer <0=>Off <1=>Errors <2=>Errors + API <3=>All 33 | // Configure FsNFTL: NAND Flash Translation Layer event recording 34 | #define FS_DEBUG_EVR_NFTL 1 35 | 36 | // NAND Device Interface <0=>Off <1=>Errors <2=>Errors + API <3=>All 37 | // Configure FsNAND: NAND Device Interface event recording 38 | #define FS_DEBUG_EVR_NAND 1 39 | 40 | // Memory Card MCI <0=>Off <1=>Errors <2=>Errors + API <3=>All 41 | // Configure FsMcMCI: Memory Card MCI event recording 42 | #define FS_DEBUG_EVR_MC_MCI 1 43 | 44 | // Memory Card SPI <0=>Off <1=>Errors <2=>Errors + API <3=>All 45 | // Configure FsMcSPI: Memory Card SPI event recording 46 | #define FS_DEBUG_EVR_MC_SPI 1 47 | 48 | // 49 | 50 | #include "fs_debug.h" 51 | -------------------------------------------------------------------------------- /STLINKv3_YAB/STLINKv3_YAB.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STLINKv3_YAB/STLINKv3_YAB.jpg -------------------------------------------------------------------------------- /STLINKv3_YAB/USER/STLINKv3_YAB.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File for STLINKv3_YAB *** 3 | ; *** Modified by RadioOperator 2020-07-23 *** 4 | ; ************************************************************* 5 | 6 | LR_IROM1 0x08020000 0x00020000 { ; load region size_region 7 | ER_IROM1 0x08020000 0x00020000 { ; load address = execution address 8 | *.o (RESET, +First) 9 | *(InRoot$$Sections) 10 | .ANY (+RO) 11 | .ANY (+XO) 12 | } 13 | RW_RAM1 0x20010000 UNINIT 0x00030000 { ; MSC RAM drive 14 | .ANY (RAM_Drive) 15 | } 16 | RW_IRAM1 0x20000000 0x00010000 { 17 | .ANY (+RW +ZI) 18 | } 19 | END_OF_BLOCK 0x08040000 FIXED EMPTY 0x0 {} ; dummy area to fill 0xFF 20 | } 21 | -------------------------------------------------------------------------------- /STLINKv3_YAB/USER/osObjects.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2017 ARM Limited. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the License); you may 7 | * not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 14 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | * ---------------------------------------------------------------------- 19 | * 20 | * $Date: 1. December 2017 21 | * $Revision: V2.0.0 22 | * 23 | * Project: CMSIS-DAP Examples LPC-Link-II 24 | * Title: osObjects.h CMSIS-DAP RTOS2 Objects for LPC-Link-II 25 | * 26 | *---------------------------------------------------------------------------*/ 27 | 28 | #ifndef __osObjects_h__ 29 | #define __osObjects_h__ 30 | 31 | #include "cmsis_os2.h" 32 | 33 | #ifdef osObjectsExternal 34 | extern osThreadId_t BOOTLOADER_ThreadId; 35 | #else 36 | const osThreadAttr_t BOOTLOADER_ThreadAttr = { 37 | .priority = osPriorityNormal 38 | }; 39 | 40 | extern osThreadId_t BOOTLOADER_ThreadId; 41 | osThreadId_t BOOTLOADER_ThreadId; 42 | #endif 43 | 44 | extern void bootloader_main (void *argument); 45 | extern void BOOTLOADER_Thread (void *argument); 46 | 47 | #endif /* __osObjects_h__ */ 48 | -------------------------------------------------------------------------------- /STLINKv3_YAB/Utility/Flash.h: -------------------------------------------------------------------------------- 1 | /******************** (C) COPYRIGHT 2015 merafour ******************** 2 | * File Name : Files.h 3 | * Author : 冷月追风 && Merafour 4 | * Version : V1.0.0 5 | * Last Modified Date : 07/03/2020 6 | * Description : STM32F4 片内 Flash 操作接口. 7 | ******************************************************************************** 8 | * https://merafour.blog.163.com 9 | * merafour@163.com 10 | * https://github.com/merafour 11 | *******************************************************************************/ 12 | #ifndef __FLASH_H__ 13 | #define __FLASH_H__ 14 | 15 | #include 16 | 17 | extern int Flash_Write(const uint32_t WriteAddr, const uint32_t *const pBuffer, const uint32_t NumToWrite); 18 | extern int Flash_Write_Force(const uint32_t WriteAddr, const uint32_t *const pBuffer, const uint32_t NumToWrite); 19 | extern int Flash_Read(const uint32_t ReadAddr, uint32_t *const pBuffer, const uint32_t NumToRead); 20 | extern int FLASH_Erase(const uint32_t start_addr, const uint32_t end_addr); 21 | 22 | #endif // __FLASH_H__ 23 | -------------------------------------------------------------------------------- /STLINKv3_YAB/Utility/crc.h: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | * 3 | * Filename: crc.h 4 | * 5 | * Description: A header file describing the various CRC standards. 6 | * 7 | * Notes: 8 | * 9 | * 10 | * Copyright (c) 2000 by Michael Barr. This software is placed into 11 | * the public domain and may be used for any purpose. However, this 12 | * notice must not be changed or removed and no warranty is either 13 | * expressed or implied by its publication or distribution. 14 | **********************************************************************/ 15 | 16 | /** 17 | * @file crc.h 18 | * @brief CRC functions 19 | */ 20 | 21 | #ifndef _crc_h 22 | #define _crc_h 23 | 24 | #include "stdint.h" 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | uint16_t crc16(const void *data, int nBytes); 31 | uint32_t crc32(const void *data, int nBytes); 32 | uint32_t crc32_continue(uint32_t prev_crc, const void *data, int nBytes); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /STLINKv3_YAB/Win7-VCP-Driver/Win7_VCP_Driver.inf: -------------------------------------------------------------------------------- 1 | [Version] 2 | Signature = "$Windows NT$" 3 | Class = Ports 4 | ClassGUID = {4D36E978-E325-11CE-BFC1-08002BE10318} 5 | Provider = %ManufacturerName% 6 | DriverVer=07/20/2020,1.00 7 | 8 | ; ========== Manufacturer/Models sections =========== 9 | 10 | [Manufacturer] 11 | %ManufacturerName% = Standard,NTx86,NTamd64 12 | 13 | ; List of devices supporting the Virtual COM port (with the corresponding interface ID) 14 | 15 | [Standard.NTx86] 16 | %DeviceNameVCP% =USB_InstallVCP, USB\VID_0483&PID_5729 17 | %DeviceNameVCP% =USB_InstallVCP, USB\VID_0483&PID_5729&MI_00 18 | %DeviceNameVCP% =USB_InstallVCP, USB\VID_0483&PID_5729&MI_01 19 | 20 | [Standard.NTamd64] 21 | %DeviceNameVCP% =USB_InstallVCP, USB\VID_0483&PID_5729 22 | %DeviceNameVCP% =USB_InstallVCP, USB\VID_0483&PID_5729&MI_00 23 | %DeviceNameVCP% =USB_InstallVCP, USB\VID_0483&PID_5729&MI_01 24 | 25 | ; =================== Installation =================== 26 | 27 | [USB_InstallVCP] 28 | Include = mdmcpq.inf 29 | CopyFiles = FakeModemCopyFileSection 30 | AddReg = USB_InstallVCP.AddReg 31 | 32 | [USB_InstallVCP.AddReg] 33 | HKR,,DevLoader,,*ntkern 34 | HKR,,NTMPDriver,,usbser.sys 35 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 36 | 37 | [USB_InstallVCP.Services] 38 | AddService=usbser, 0x00000002, DriverService 39 | 40 | [DriverService] 41 | DisplayName=%DeviceNameVCP% 42 | ServiceType=1 43 | StartType=3 44 | ErrorControl=1 45 | ServiceBinary=%12%\usbser.sys 46 | 47 | ; [DestinationDirs] 48 | ; If your INF needs to copy files, you must not use the DefaultDestDir directive here. 49 | ; You must explicitly reference all file-list-section names in this section. 50 | 51 | ; =================== Strings =================== 52 | 53 | [Strings] 54 | ManufacturerName="STM" 55 | ;ClassName="Universal Serial Bus devices" 56 | DeviceNameVCP="YAB_VCP_STM32F723" 57 | REG_MULTI_SZ = 0x00010000 58 | -------------------------------------------------------------------------------- /STM32F723_YAB/APP_1_Sample/F723APP1sample/F723APP1sample.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STM32F723_YAB/APP_1_Sample/F723APP1sample/F723APP1sample.rar -------------------------------------------------------------------------------- /STM32F723_YAB/APP_1_Sample/F723APP1sample/LEDblink_USART6print_500ms.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STM32F723_YAB/APP_1_Sample/F723APP1sample/LEDblink_USART6print_500ms.txt -------------------------------------------------------------------------------- /STM32F723_YAB/APP_1_Sample/F723APP1sample/f723app1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STM32F723_YAB/APP_1_Sample/F723APP1sample/f723app1.bin -------------------------------------------------------------------------------- /STM32F723_YAB/APP_1_Sample/STLINKv3DAPv1_HID+VCP/STLINKv3DAPv1_HID+VCP.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STM32F723_YAB/APP_1_Sample/STLINKv3DAPv1_HID+VCP/STLINKv3DAPv1_HID+VCP.rar -------------------------------------------------------------------------------- /STM32F723_YAB/APP_1_Sample/STLINKv3DAPv1_HID+VCP/f723app1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STM32F723_YAB/APP_1_Sample/STLINKv3DAPv1_HID+VCP/f723app1.bin -------------------------------------------------------------------------------- /STM32F723_YAB/APP_2_Sample/F723APP2sample/F723APP2sample.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STM32F723_YAB/APP_2_Sample/F723APP2sample/F723APP2sample.rar -------------------------------------------------------------------------------- /STM32F723_YAB/APP_2_Sample/F723APP2sample/LEDblink_USART6print_2s.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STM32F723_YAB/APP_2_Sample/F723APP2sample/LEDblink_USART6print_2s.txt -------------------------------------------------------------------------------- /STM32F723_YAB/APP_2_Sample/F723APP2sample/f723app2.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STM32F723_YAB/APP_2_Sample/F723APP2sample/f723app2.bin -------------------------------------------------------------------------------- /STM32F723_YAB/APP_2_Sample/STLINKv3DAPv2_WinUSB+VCP/STLINKv3DAPv2_WinUSB+VCP.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STM32F723_YAB/APP_2_Sample/STLINKv3DAPv2_WinUSB+VCP/STLINKv3DAPv2_WinUSB+VCP.rar -------------------------------------------------------------------------------- /STM32F723_YAB/APP_2_Sample/STLINKv3DAPv2_WinUSB+VCP/f723app2.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STM32F723_YAB/APP_2_Sample/STLINKv3DAPv2_WinUSB+VCP/f723app2.bin -------------------------------------------------------------------------------- /STM32F723_YAB/Listings/STM32F723_YAB.axf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STM32F723_YAB/Listings/STM32F723_YAB.axf -------------------------------------------------------------------------------- /STM32F723_YAB/Listings/STM32F723_YAB.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STM32F723_YAB/Listings/STM32F723_YAB.bin -------------------------------------------------------------------------------- /STM32F723_YAB/RTE/CMSIS/RTX_Config.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2018 Arm Limited. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the License); you may 7 | * not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 14 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | * ----------------------------------------------------------------------------- 19 | * 20 | * $Revision: V5.1.0 21 | * 22 | * Project: CMSIS-RTOS RTX 23 | * Title: RTX Configuration 24 | * 25 | * ----------------------------------------------------------------------------- 26 | */ 27 | 28 | #include "cmsis_compiler.h" 29 | #include "rtx_os.h" 30 | 31 | // OS Idle Thread 32 | __WEAK __NO_RETURN void osRtxIdleThread (void *argument) { 33 | (void)argument; 34 | 35 | for (;;) {} 36 | } 37 | 38 | // OS Error Callback function 39 | __WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) { 40 | (void)object_id; 41 | 42 | switch (code) { 43 | case osRtxErrorStackUnderflow: 44 | // Stack overflow detected for thread (thread_id=object_id) 45 | break; 46 | case osRtxErrorISRQueueOverflow: 47 | // ISR Queue overflow detected when inserting object (object_id) 48 | break; 49 | case osRtxErrorTimerQueueOverflow: 50 | // User Timer Callback Queue overflow detected for timer (timer_id=object_id) 51 | break; 52 | case osRtxErrorClibSpace: 53 | // Standard C/C++ library libspace not available: increase OS_THREAD_LIBSPACE_NUM 54 | break; 55 | case osRtxErrorClibMutex: 56 | // Standard C/C++ library mutex initialization failed 57 | break; 58 | default: 59 | // Reserved 60 | break; 61 | } 62 | for (;;) {} 63 | //return 0U; 64 | } 65 | -------------------------------------------------------------------------------- /STM32F723_YAB/RTE/Compiler/EventRecorderConf.h: -------------------------------------------------------------------------------- 1 | /*------------------------------------------------------------------------------ 2 | * MDK - Component ::Event Recorder 3 | * Copyright (c) 2016-2018 ARM Germany GmbH. All rights reserved. 4 | *------------------------------------------------------------------------------ 5 | * Name: EventRecorderConf.h 6 | * Purpose: Event Recorder Configuration 7 | * Rev.: V1.1.0 8 | *----------------------------------------------------------------------------*/ 9 | 10 | //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- 11 | 12 | // Event Recorder 13 | 14 | // Number of Records 15 | // <8=>8 <16=>16 <32=>32 <64=>64 <128=>128 <256=>256 <512=>512 <1024=>1024 16 | // <2048=>2048 <4096=>4096 <8192=>8192 <16384=>16384 <32768=>32768 17 | // <65536=>65536 18 | // Configures size of Event Record Buffer (each record is 16 bytes) 19 | // Must be 2^n (min=8, max=65536) 20 | #define EVENT_RECORD_COUNT 64U 21 | 22 | // Time Stamp Source 23 | // <0=> DWT Cycle Counter <1=> SysTick <2=> CMSIS-RTOS2 System Timer 24 | // <3=> User Timer (Normal Reset) <4=> User Timer (Power-On Reset) 25 | // Selects source for 32-bit time stamp 26 | #define EVENT_TIMESTAMP_SOURCE 0 27 | 28 | // Time Stamp Clock Frequency [Hz] <0-1000000000> 29 | // Defines default time stamp clock frequency (0 when not used) 30 | #define EVENT_TIMESTAMP_FREQ 0U 31 | 32 | // 33 | 34 | //------------- <<< end of configuration section >>> --------------------------- 35 | -------------------------------------------------------------------------------- /STM32F723_YAB/RTE/Device/project.script: -------------------------------------------------------------------------------- 1 | load STM32F723IEKx 2 | project name STCubeGenerated 3 | project toolchain "MDK-ARM V5" 4 | project path "C:\STM32F723\STM32F723IEK6DAP\RTE\Device\STM32F723IEKx\" 5 | -------------------------------------------------------------------------------- /STM32F723_YAB/RTE/File_System/FS_Config.c: -------------------------------------------------------------------------------- 1 | /*------------------------------------------------------------------------------ 2 | * MDK Middleware - Component ::File System 3 | * Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved. 4 | *------------------------------------------------------------------------------ 5 | * Name: FS_Config.c 6 | * Purpose: File System Configuration 7 | * Rev.: V6.3.0 8 | *----------------------------------------------------------------------------*/ 9 | 10 | //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- 11 | 12 | // FAT File System 13 | // Define FAT File System parameters 14 | 15 | // Number of open files <1-16> 16 | // Define number of files that can be opened at the same time. 17 | // Default: 4 18 | #define FAT_MAX_OPEN_FILES 16 19 | 20 | // 21 | 22 | // Embedded File System 23 | // Define Embedded File System parameters 24 | 25 | // Number of open files <1-16> 26 | // Define number of files that can be opened at the same time. 27 | // Default: 4 28 | #define EFS_MAX_OPEN_FILES 16 29 | 30 | // 31 | 32 | // Initial Current Drive <0=>F0: <1=>F1: 33 | // <2=>M0: <3=>M1: 34 | // <4=>N0: <5=>N1: 35 | // <6=>R0: <9=>R1: 36 | // <7=>U0: <8=>U1: 37 | // Set initial setting for current drive. Current drive is used for File System functions 38 | // that are invoked with the "" string and can be altered anytime during run-time. 39 | #define FS_INITIAL_CDRIVE 6 40 | 41 | #include "RTE_Components.h" 42 | 43 | #ifdef RTE_FileSystem_Drive_RAM_0 44 | #include "FS_Config_RAM_0.h" 45 | #endif 46 | #ifdef RTE_FileSystem_Drive_RAM_1 47 | #include "FS_Config_RAM_1.h" 48 | #endif 49 | 50 | #ifdef RTE_FileSystem_Drive_NOR_0 51 | #include "FS_Config_NOR_0.h" 52 | #endif 53 | #ifdef RTE_FileSystem_Drive_NOR_1 54 | #include "FS_Config_NOR_1.h" 55 | #endif 56 | 57 | #ifdef RTE_FileSystem_Drive_NAND_0 58 | #include "FS_Config_NAND_0.h" 59 | #endif 60 | #ifdef RTE_FileSystem_Drive_NAND_1 61 | #include "FS_Config_NAND_1.h" 62 | #endif 63 | 64 | #ifdef RTE_FileSystem_Drive_MC_0 65 | #include "FS_Config_MC_0.h" 66 | #endif 67 | #ifdef RTE_FileSystem_Drive_MC_1 68 | #include "FS_Config_MC_1.h" 69 | #endif 70 | 71 | #ifdef RTE_FileSystem_Drive_USB_0 72 | #include "FS_Config_USB_0.h" 73 | #endif 74 | #ifdef RTE_FileSystem_Drive_USB_1 75 | #include "FS_Config_USB_1.h" 76 | #endif 77 | 78 | #include "fs_config.h" 79 | -------------------------------------------------------------------------------- /STM32F723_YAB/RTE/File_System/FS_Config_MC_0.h: -------------------------------------------------------------------------------- 1 | /*------------------------------------------------------------------------------ 2 | * MDK Middleware - Component ::File System:Drive 3 | * Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved. 4 | *------------------------------------------------------------------------------ 5 | * Name: FS_Config_MC_0.h 6 | * Purpose: File System Configuration for Memory Card Drive 7 | * Rev.: V6.2.0 8 | *----------------------------------------------------------------------------*/ 9 | 10 | //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- 11 | 12 | // Memory Card Drive 0 13 | // Configuration for SD/SDHC/MMC Memory Card assigned to drive letter "M0:" 14 | #define MC0_ENABLE 1 15 | 16 | // Connect to hardware via Driver_MCI# <0-255> 17 | // Select driver control block for hardware interface 18 | #define MC0_MCI_DRIVER 1 19 | 20 | // Connect to hardware via Driver_SPI# <0-255> 21 | // Select driver control block for hardware interface when in SPI mode 22 | #define MC0_SPI_DRIVER 0 23 | 24 | // Memory Card Interface Mode <0=>Native <1=>SPI 25 | // Native uses a SD Bus with up to 8 data lines, CLK, and CMD 26 | // SPI uses 2 data lines (MOSI and MISO), SCLK and CS 27 | #define MC0_SPI 0 28 | 29 | // Drive Cache Size <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB 30 | // <8=>8 KB <16=>16 KB <32=>32 KB 31 | // Drive Cache stores data sectors and may be increased to speed-up 32 | // file read/write operations on this drive (default: 4 KB) 33 | #define MC0_CACHE_SIZE 32 34 | 35 | // Locate Drive Cache and Drive Buffer 36 | // Some microcontrollers support DMA only in specific memory areas and 37 | // require to locate the drive buffers at a fixed address. 38 | #define MC0_CACHE_RELOC 1 39 | 40 | // Base address <0x0000-0xFFFFFE00:0x200> 41 | // Set buffer base address to RAM areas that support DMA with the drive. 42 | #define MC0_CACHE_ADDR 0x7FD00000 43 | 44 | // 45 | // Filename Cache Size <0-1000000> 46 | // Define number of cached file or directory names. 47 | // 48 bytes of RAM is required for each cached name. 48 | #define MC0_NAME_CACHE_SIZE 0 49 | 50 | // Use FAT Journal 51 | // Protect File Allocation Table and Directory Entries for 52 | // fail-safe operation. 53 | #define MC0_FAT_JOURNAL 1 54 | 55 | // 56 | -------------------------------------------------------------------------------- /STM32F723_YAB/RTE/File_System/FS_Config_NOR_0.h: -------------------------------------------------------------------------------- 1 | /*------------------------------------------------------------------------------ 2 | * MDK Middleware - Component ::File System:Drive 3 | * Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved. 4 | *------------------------------------------------------------------------------ 5 | * Name: FS_Config_NOR_0.h 6 | * Purpose: File System Configuration for NOR Flash Drive 7 | * Rev.: V6.2.0 8 | *----------------------------------------------------------------------------*/ 9 | 10 | //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- 11 | 12 | // NOR Flash Drive 0 13 | // Configuration for NOR Flash device assigned to drive letter "F0:" 14 | #define NOR0_ENABLE 1 15 | 16 | // Connect to hardware via Driver_Flash# <0-255> 17 | // Select driver control block for hardware interface 18 | #define NOR0_DRIVER 0 19 | 20 | // 21 | -------------------------------------------------------------------------------- /STM32F723_YAB/RTE/File_System/FS_Config_RAM_0.h: -------------------------------------------------------------------------------- 1 | /*------------------------------------------------------------------------------ 2 | * MDK Middleware - Component ::File System:Drive 3 | * Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved. 4 | *------------------------------------------------------------------------------ 5 | * Name: FS_Config_RAM_0.h 6 | * Purpose: File System Configuration for RAM Drive 7 | * Rev.: V6.2.0 8 | *----------------------------------------------------------------------------*/ 9 | 10 | //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- 11 | 12 | // RAM Drive 0 13 | // Configuration for RAM assigned to drive letter "R0:" 14 | #define RAM0_ENABLE 1 15 | 16 | // Device Size <0x4C00-0xFFFFF000:0x400> 17 | // Define the size of RAM device in bytes 18 | // Default: 0x8000 19 | #define RAM0_SIZE 0x030000 20 | 21 | // Locate Drive Cache and Drive Buffer 22 | // Locate RAM drive buffer at a specific address. 23 | // If not enabled, the linker selects base address. 24 | #define RAM0_RELOC 0 25 | 26 | // Base address <0x0-0xFFFFF000:0x1000> 27 | // Define the target device Base address. 28 | // Default: 0x80000000 29 | #define RAM0_BASE_ADDR 0x80000000 30 | 31 | // 32 | 33 | // 34 | -------------------------------------------------------------------------------- /STM32F723_YAB/RTE/File_System/FS_Debug.c: -------------------------------------------------------------------------------- 1 | /*------------------------------------------------------------------------------ 2 | * MDK Middleware - Component ::File System 3 | * Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved. 4 | *------------------------------------------------------------------------------ 5 | * Name: FS_Debug.c 6 | * Purpose: File System Debug Configuration 7 | * Rev.: V1.0.0 8 | *----------------------------------------------------------------------------*/ 9 | 10 | //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- 11 | 12 | // File System Debug 13 | // Enable File System event recording 14 | #define FS_DEBUG_EVR_ENABLE 0 15 | 16 | // Core Management <0=>Off <1=>Errors <2=>Errors + API <3=>All 17 | // Configure FsCore: Core Management event recording 18 | #define FS_DEBUG_EVR_CORE 1 19 | 20 | // FAT File System <0=>Off <1=>Errors <2=>Errors + API <3=>All 21 | // Configure FsFAT: FAT File System event recording 22 | #define FS_DEBUG_EVR_FAT 1 23 | 24 | // EFS File System <0=>Off <1=>Errors <2=>Errors + API <3=>All 25 | // Configure FsEFS: EFS File System event recording 26 | #define FS_DEBUG_EVR_EFS 1 27 | 28 | // I/O Control Interface <0=>Off <1=>Errors <2=>Errors + API <3=>All 29 | // Configure FsIOC: I/O Control Interface event recording 30 | #define FS_DEBUG_EVR_IOC 1 31 | 32 | // NAND Flash Translation Layer <0=>Off <1=>Errors <2=>Errors + API <3=>All 33 | // Configure FsNFTL: NAND Flash Translation Layer event recording 34 | #define FS_DEBUG_EVR_NFTL 1 35 | 36 | // NAND Device Interface <0=>Off <1=>Errors <2=>Errors + API <3=>All 37 | // Configure FsNAND: NAND Device Interface event recording 38 | #define FS_DEBUG_EVR_NAND 1 39 | 40 | // Memory Card MCI <0=>Off <1=>Errors <2=>Errors + API <3=>All 41 | // Configure FsMcMCI: Memory Card MCI event recording 42 | #define FS_DEBUG_EVR_MC_MCI 1 43 | 44 | // Memory Card SPI <0=>Off <1=>Errors <2=>Errors + API <3=>All 45 | // Configure FsMcSPI: Memory Card SPI event recording 46 | #define FS_DEBUG_EVR_MC_SPI 1 47 | 48 | // 49 | 50 | #include "fs_debug.h" 51 | -------------------------------------------------------------------------------- /STM32F723_YAB/STM32F723_YAB.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/STM32F723_YAB/STM32F723_YAB.jpg -------------------------------------------------------------------------------- /STM32F723_YAB/USER/STM32F723_YAB.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x08000000 0x00010000 { ; load region size_region 6 | ER_IROM1 0x08000000 0x00010000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | .ANY (+RO) 10 | .ANY (+XO) 11 | } 12 | RW_RAM1 0x20010000 UNINIT 0x00030000 { ; MSC RAM drive 13 | .ANY (RAM_Drive) 14 | } 15 | RW_IRAM1 0x20000000 0x00010000 { 16 | .ANY (+RW +ZI) 17 | } 18 | END_OF_BLOCK 0x08010000 FIXED EMPTY 0x0 {} ; dummy area to fill 0xFF 19 | } 20 | -------------------------------------------------------------------------------- /STM32F723_YAB/USER/osObjects.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2017 ARM Limited. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the License); you may 7 | * not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 14 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | * ---------------------------------------------------------------------- 19 | * 20 | * $Date: 1. December 2017 21 | * $Revision: V2.0.0 22 | * 23 | * Project: CMSIS-DAP Examples LPC-Link-II 24 | * Title: osObjects.h CMSIS-DAP RTOS2 Objects for LPC-Link-II 25 | * 26 | *---------------------------------------------------------------------------*/ 27 | 28 | #ifndef __osObjects_h__ 29 | #define __osObjects_h__ 30 | 31 | #include "cmsis_os2.h" 32 | 33 | #ifdef osObjectsExternal 34 | extern osThreadId_t BOOTLOADER_ThreadId; 35 | #else 36 | const osThreadAttr_t BOOTLOADER_ThreadAttr = { 37 | .priority = osPriorityNormal 38 | }; 39 | 40 | extern osThreadId_t BOOTLOADER_ThreadId; 41 | osThreadId_t BOOTLOADER_ThreadId; 42 | #endif 43 | 44 | extern void bootloader_main (void *argument); 45 | extern void BOOTLOADER_Thread (void *argument); 46 | 47 | #endif /* __osObjects_h__ */ 48 | -------------------------------------------------------------------------------- /STM32F723_YAB/Utility/Flash.h: -------------------------------------------------------------------------------- 1 | /******************** (C) COPYRIGHT 2015 merafour ******************** 2 | * File Name : Files.h 3 | * Author : 冷月追风 && Merafour 4 | * Version : V1.0.0 5 | * Last Modified Date : 07/03/2020 6 | * Description : STM32F4 片内 Flash 操作接口. 7 | ******************************************************************************** 8 | * https://merafour.blog.163.com 9 | * merafour@163.com 10 | * https://github.com/merafour 11 | *******************************************************************************/ 12 | #ifndef __FLASH_H__ 13 | #define __FLASH_H__ 14 | 15 | #include 16 | 17 | extern int Flash_Write(const uint32_t WriteAddr, const uint32_t *const pBuffer, const uint32_t NumToWrite); 18 | extern int Flash_Write_Force(const uint32_t WriteAddr, const uint32_t *const pBuffer, const uint32_t NumToWrite); 19 | extern int Flash_Read(const uint32_t ReadAddr, uint32_t *const pBuffer, const uint32_t NumToRead); 20 | extern int FLASH_Erase(const uint32_t start_addr, const uint32_t end_addr); 21 | 22 | #endif // __FLASH_H__ 23 | -------------------------------------------------------------------------------- /STM32F723_YAB/Utility/crc.h: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | * 3 | * Filename: crc.h 4 | * 5 | * Description: A header file describing the various CRC standards. 6 | * 7 | * Notes: 8 | * 9 | * 10 | * Copyright (c) 2000 by Michael Barr. This software is placed into 11 | * the public domain and may be used for any purpose. However, this 12 | * notice must not be changed or removed and no warranty is either 13 | * expressed or implied by its publication or distribution. 14 | **********************************************************************/ 15 | 16 | /** 17 | * @file crc.h 18 | * @brief CRC functions 19 | */ 20 | 21 | #ifndef _crc_h 22 | #define _crc_h 23 | 24 | #include "stdint.h" 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | uint16_t crc16(const void *data, int nBytes); 31 | uint32_t crc32(const void *data, int nBytes); 32 | uint32_t crc32_continue(uint32_t prev_crc, const void *data, int nBytes); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /STM32F723_YAB/Win7-VCP-Driver/Win7_VCP_Driver.inf: -------------------------------------------------------------------------------- 1 | [Version] 2 | Signature = "$Windows NT$" 3 | Class = Ports 4 | ClassGUID = {4D36E978-E325-11CE-BFC1-08002BE10318} 5 | Provider = %ManufacturerName% 6 | DriverVer=07/20/2020,1.00 7 | 8 | ; ========== Manufacturer/Models sections =========== 9 | 10 | [Manufacturer] 11 | %ManufacturerName% = Standard,NTx86,NTamd64 12 | 13 | ; List of devices supporting the Virtual COM port (with the corresponding interface ID) 14 | 15 | [Standard.NTx86] 16 | %DeviceNameVCP% =USB_InstallVCP, USB\VID_0483&PID_5729 17 | %DeviceNameVCP% =USB_InstallVCP, USB\VID_0483&PID_5729&MI_00 18 | %DeviceNameVCP% =USB_InstallVCP, USB\VID_0483&PID_5729&MI_01 19 | 20 | [Standard.NTamd64] 21 | %DeviceNameVCP% =USB_InstallVCP, USB\VID_0483&PID_5729 22 | %DeviceNameVCP% =USB_InstallVCP, USB\VID_0483&PID_5729&MI_00 23 | %DeviceNameVCP% =USB_InstallVCP, USB\VID_0483&PID_5729&MI_01 24 | 25 | ; =================== Installation =================== 26 | 27 | [USB_InstallVCP] 28 | Include = mdmcpq.inf 29 | CopyFiles = FakeModemCopyFileSection 30 | AddReg = USB_InstallVCP.AddReg 31 | 32 | [USB_InstallVCP.AddReg] 33 | HKR,,DevLoader,,*ntkern 34 | HKR,,NTMPDriver,,usbser.sys 35 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 36 | 37 | [USB_InstallVCP.Services] 38 | AddService=usbser, 0x00000002, DriverService 39 | 40 | [DriverService] 41 | DisplayName=%DeviceNameVCP% 42 | ServiceType=1 43 | StartType=3 44 | ErrorControl=1 45 | ServiceBinary=%12%\usbser.sys 46 | 47 | ; [DestinationDirs] 48 | ; If your INF needs to copy files, you must not use the DefaultDestDir directive here. 49 | ; You must explicitly reference all file-list-section names in this section. 50 | 51 | ; =================== Strings =================== 52 | 53 | [Strings] 54 | ManufacturerName="STM" 55 | ;ClassName="Universal Serial Bus devices" 56 | DeviceNameVCP="YAB_VCP_STM32F723" 57 | REG_MULTI_SZ = 0x00010000 58 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/Readme.txt: -------------------------------------------------------------------------------- 1 | 2 | YAB - Using Internal Flash ROM for MSC Drive 3 | 4 | Hardware: 5 | - MCU with a USB full-speed / high-speed port 6 | - 1 Button/Wire, for YAB mode / APP mode switch 7 | - 1 LED indicator (optional) 8 | 9 | Software: 10 | - IDE: ARM MDK/Keil + STM32CubeMX 11 | 12 | - Memory Map: 16KB YAB + all rest Flash for APP 13 | 14 | STM32F103C8T6 YAB 0x08000000 - 0x08003FFF (16 KB) 15 | APP 0x08004000 - 0x0801FFFF (112 KB) 16 | 17 | STM32F407VET6 YAB 0x08000000 - 0x08003FFF (16 KB) 18 | APP 0x08004000 - 0x0807FFFF (496 KB) 19 | 20 | STM32L433CCT6 YAB 0x08000000 - 0x08003FFF (16 KB) 21 | APP 0x08004000 - 0x0803FFFF (240 KB) 22 | 23 | STM32F723IEK6 YAB 0x08000000 - 0x08003FFF (16 KB) 24 | APP 0x08004000 - 0x0807FFFF (496 KB) 25 | 26 | Build/Edit/Flash YAB: 27 | a. Nothing special, all refer to the source code. 28 | b. Porting to other STM32 IC, try to set the Heap_Size to 0x2000 or more. 29 | c. Modify the "YAB_Fxxx_config.h" file. 30 | d. Modify the Flash Erase/Write function in "YAB_fat32.c" file. 31 | e. Modify file "main.c" and "usbd_storage_if.c", coordinately. 32 | f. to get YAB <16KB BIN code size, use -Oz and Link-time Opt. of AC6. 33 | 34 | Build and use your APP: 35 | a. Set Target IROM1 start from 0x08004000. 36 | b. Add { SCB->VTOR = 0x08004000; } in the first line of "main()" function. 37 | c. Build and create the target BIN code. 38 | d. Connect the GPIO (Button/Wire) to GND. Plug USB to your PC. 39 | e. The Device into "YAB mode", LED blinking. 40 | f. Drag&Drop the BIN file to the "YAB Disk" Drive. 41 | g. Release the GPIO, Re-power the Device, APP will Running. 42 | 43 | Note: 44 | For easy to use, no any complicated secuity/identity code applied. 45 | 46 | 47 | Declarations: 48 | 49 | The project is for experiments only. Use any parts and info on your own risks. 50 | 51 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Build/STM32F103C8T6_YAB.axf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Build/STM32F103C8T6_YAB.axf -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Build/STM32F103C8T6_YAB.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x08000000 0x00010000 { ; load region size_region 6 | ER_IROM1 0x08000000 0x00010000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | .ANY (+RO) 10 | .ANY (+XO) 11 | } 12 | RW_IRAM1 0x20000000 0x00005000 { ; RW data 13 | .ANY (+RW +ZI) 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file system_stm32f10x.h 4 | * @author MCD Application Team 5 | * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Header File. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2017 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /** @addtogroup CMSIS 21 | * @{ 22 | */ 23 | 24 | /** @addtogroup stm32f10x_system 25 | * @{ 26 | */ 27 | 28 | /** 29 | * @brief Define to prevent recursive inclusion 30 | */ 31 | #ifndef __SYSTEM_STM32F10X_H 32 | #define __SYSTEM_STM32F10X_H 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | /** @addtogroup STM32F10x_System_Includes 39 | * @{ 40 | */ 41 | 42 | /** 43 | * @} 44 | */ 45 | 46 | 47 | /** @addtogroup STM32F10x_System_Exported_types 48 | * @{ 49 | */ 50 | 51 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 52 | extern const uint8_t AHBPrescTable[16U]; /*!< AHB prescalers table values */ 53 | extern const uint8_t APBPrescTable[8U]; /*!< APB prescalers table values */ 54 | 55 | /** 56 | * @} 57 | */ 58 | 59 | /** @addtogroup STM32F10x_System_Exported_Constants 60 | * @{ 61 | */ 62 | 63 | /** 64 | * @} 65 | */ 66 | 67 | /** @addtogroup STM32F10x_System_Exported_Macros 68 | * @{ 69 | */ 70 | 71 | /** 72 | * @} 73 | */ 74 | 75 | /** @addtogroup STM32F10x_System_Exported_Functions 76 | * @{ 77 | */ 78 | 79 | extern void SystemInit(void); 80 | extern void SystemCoreClockUpdate(void); 81 | /** 82 | * @} 83 | */ 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | 89 | #endif /*__SYSTEM_STM32F10X_H */ 90 | 91 | /** 92 | * @} 93 | */ 94 | 95 | /** 96 | * @} 97 | */ 98 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 99 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Drivers/CMSIS/Include/cmsis_version.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file cmsis_version.h 3 | * @brief CMSIS Core(M) Version definitions 4 | * @version V5.0.2 5 | * @date 19. April 2017 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2009-2017 ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef __CMSIS_VERSION_H 32 | #define __CMSIS_VERSION_H 33 | 34 | /* CMSIS Version definitions */ 35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ 36 | #define __CM_CMSIS_VERSION_SUB ( 1U) /*!< [15:0] CMSIS Core(M) sub version */ 37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ 38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ 39 | #endif 40 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Drivers/CMSIS/Include/tz_context.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * @file tz_context.h 3 | * @brief Context Management for Armv8-M TrustZone 4 | * @version V1.0.1 5 | * @date 10. January 2018 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2017-2018 Arm Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef TZ_CONTEXT_H 32 | #define TZ_CONTEXT_H 33 | 34 | #include 35 | 36 | #ifndef TZ_MODULEID_T 37 | #define TZ_MODULEID_T 38 | /// \details Data type that identifies secure software modules called by a process. 39 | typedef uint32_t TZ_ModuleId_t; 40 | #endif 41 | 42 | /// \details TZ Memory ID identifies an allocated memory slot. 43 | typedef uint32_t TZ_MemoryId_t; 44 | 45 | /// Initialize secure context memory system 46 | /// \return execution status (1: success, 0: error) 47 | uint32_t TZ_InitContextSystem_S (void); 48 | 49 | /// Allocate context memory for calling secure software modules in TrustZone 50 | /// \param[in] module identifies software modules called from non-secure mode 51 | /// \return value != 0 id TrustZone memory slot identifier 52 | /// \return value 0 no memory available or internal error 53 | TZ_MemoryId_t TZ_AllocModuleContext_S (TZ_ModuleId_t module); 54 | 55 | /// Free context memory that was previously allocated with \ref TZ_AllocModuleContext_S 56 | /// \param[in] id TrustZone memory slot identifier 57 | /// \return execution status (1: success, 0: error) 58 | uint32_t TZ_FreeModuleContext_S (TZ_MemoryId_t id); 59 | 60 | /// Load secure context (called on RTOS thread context switch) 61 | /// \param[in] id TrustZone memory slot identifier 62 | /// \return execution status (1: success, 0: error) 63 | uint32_t TZ_LoadContext_S (TZ_MemoryId_t id); 64 | 65 | /// Store secure context (called on RTOS thread context switch) 66 | /// \param[in] id TrustZone memory slot identifier 67 | /// \return execution status (1: success, 0: error) 68 | uint32_t TZ_StoreContext_S (TZ_MemoryId_t id); 69 | 70 | #endif // TZ_CONTEXT_H 71 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd_ex.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f1xx_hal_pcd_ex.h 4 | * @author MCD Application Team 5 | * @brief Header file of PCD HAL Extension module. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2016 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef STM32F1xx_HAL_PCD_EX_H 22 | #define STM32F1xx_HAL_PCD_EX_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32f1xx_hal_def.h" 30 | 31 | #if defined (USB) || defined (USB_OTG_FS) 32 | /** @addtogroup STM32F1xx_HAL_Driver 33 | * @{ 34 | */ 35 | 36 | /** @addtogroup PCDEx 37 | * @{ 38 | */ 39 | /* Exported types ------------------------------------------------------------*/ 40 | /* Exported constants --------------------------------------------------------*/ 41 | /* Exported macros -----------------------------------------------------------*/ 42 | /* Exported functions --------------------------------------------------------*/ 43 | /** @addtogroup PCDEx_Exported_Functions PCDEx Exported Functions 44 | * @{ 45 | */ 46 | /** @addtogroup PCDEx_Exported_Functions_Group1 Peripheral Control functions 47 | * @{ 48 | */ 49 | 50 | #if defined (USB_OTG_FS) 51 | HAL_StatusTypeDef HAL_PCDEx_SetTxFiFo(PCD_HandleTypeDef *hpcd, uint8_t fifo, uint16_t size); 52 | HAL_StatusTypeDef HAL_PCDEx_SetRxFiFo(PCD_HandleTypeDef *hpcd, uint16_t size); 53 | #endif /* defined (USB_OTG_FS) */ 54 | 55 | #if defined (USB) 56 | HAL_StatusTypeDef HAL_PCDEx_PMAConfig(PCD_HandleTypeDef *hpcd, uint16_t ep_addr, 57 | uint16_t ep_kind, uint32_t pmaadress); 58 | 59 | void HAL_PCDEx_SetConnectionState(PCD_HandleTypeDef *hpcd, uint8_t state); 60 | #endif /* defined (USB) */ 61 | void HAL_PCDEx_LPM_Callback(PCD_HandleTypeDef *hpcd, PCD_LPM_MsgTypeDef msg); 62 | void HAL_PCDEx_BCD_Callback(PCD_HandleTypeDef *hpcd, PCD_BCD_MsgTypeDef msg); 63 | 64 | /** 65 | * @} 66 | */ 67 | 68 | /** 69 | * @} 70 | */ 71 | 72 | /** 73 | * @} 74 | */ 75 | 76 | /** 77 | * @} 78 | */ 79 | #endif /* defined (USB) || defined (USB_OTG_FS) */ 80 | 81 | #ifdef __cplusplus 82 | } 83 | #endif 84 | 85 | 86 | #endif /* STM32F1xx_HAL_PCD_EX_H */ 87 | 88 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 89 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Inc/YAB_F103_config.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************* 2 | # Released under MIT License 3 | 4 | Copyright (c) 2020 SF Yip (yipxxx@gmail.com) 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 9 | 10 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 11 | 12 | note: This Source Code modified by RadioOperator 2020-12-06. 13 | **************************************************************************************/ 14 | 15 | #ifndef _YAB_F103_CONFIG_H_ 16 | #define _YAB_F103_CONFIG_H_ 17 | 18 | // STM32F103C8T6 - 128KB Flash Size 19 | #define FLASH_START_ADDR 0x08000000 //STM32 20 | #define FLASH_SIZE (128*1024) //128KB 21 | #define FLASH_ERASE_PAGE_SIZE 1024 22 | 23 | #define BOOTLOADER_SIZE 0x4000 //16KB max, bootloader size 24 | 25 | #define APP_ADDR (FLASH_START_ADDR + BOOTLOADER_SIZE) 26 | #define APP_SIZE (FLASH_SIZE - BOOTLOADER_SIZE) 27 | #define APP_DRIVE_NAME "YAB Disk " //11 chars 28 | #define APP_FILE_NAME "F103_APPBIN" //11 chars, 8+3 name format, = f103_app.bin 29 | 30 | #define APP_READBACK_ENABLE 1 //0-firmware can not read back, 1-can 31 | 32 | //YAB mode entry control, button or pin to GND, PA0 33 | //LED on Bluepill board, PC13 34 | //If GPIOs here modified, take care the "MX_GPIO_Init" function coordinately. 35 | #define BTN_GPIO_PORT GPIOA 36 | #define BTN_GPIO_PIN GPIO_PIN_0 37 | 38 | #define LED_ENABLE 1 //1-LED function enabled, 0-disable 39 | #define LED_GPIO_PORT GPIOC 40 | #define LED_GPIO_PIN GPIO_PIN_13 41 | #define LED_ON HAL_GPIO_WritePin(LED_GPIO_PORT, LED_GPIO_PIN, GPIO_PIN_RESET) 42 | #define LED_OFF HAL_GPIO_WritePin(LED_GPIO_PORT, LED_GPIO_PIN, GPIO_PIN_SET) 43 | 44 | #define LED_SLOW_BLINK 250 //250ms ON, 750ms OFF 45 | #define LED_OFF_NOBLINK 0 //always OFF 46 | #define LED_ON_NOBLINK 255 //always ON 47 | 48 | #if LED_ENABLE 49 | extern volatile uint8_t LED_On_Time; 50 | #endif //#if LED_ENABLE 51 | 52 | 53 | #endif //_YAB_F103_CONFIG_H_ 54 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Inc/YAB_fat32.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************* 2 | # Released under MIT License 3 | 4 | Copyright (c) 2020 SF Yip (yipxxx@gmail.com) 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 9 | 10 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 11 | 12 | note: This Source Code modified by RadioOperator 2020-12-06. 13 | **************************************************************************************/ 14 | 15 | #ifndef _YAB_FAT32_H_ 16 | #define _YAB_FAT32_H_ 17 | 18 | #include 19 | #include 20 | 21 | bool fat32_read(uint8_t *b, uint32_t addr); 22 | bool fat32_write(const uint8_t *b, uint32_t addr); 23 | 24 | #endif //_YAB_FAT32_H_ 25 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Inc/main.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : main.h 5 | * @brief : Header for main.c file. 6 | * This file contains the common defines of the application. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2020 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Define to prevent recursive inclusion -------------------------------------*/ 23 | #ifndef __MAIN_H 24 | #define __MAIN_H 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /* Includes ------------------------------------------------------------------*/ 31 | #include "stm32f1xx_hal.h" 32 | 33 | /* Private includes ----------------------------------------------------------*/ 34 | /* USER CODE BEGIN Includes */ 35 | 36 | /* USER CODE END Includes */ 37 | 38 | /* Exported types ------------------------------------------------------------*/ 39 | /* USER CODE BEGIN ET */ 40 | 41 | /* USER CODE END ET */ 42 | 43 | /* Exported constants --------------------------------------------------------*/ 44 | /* USER CODE BEGIN EC */ 45 | 46 | /* USER CODE END EC */ 47 | 48 | /* Exported macro ------------------------------------------------------------*/ 49 | /* USER CODE BEGIN EM */ 50 | 51 | /* USER CODE END EM */ 52 | 53 | /* Exported functions prototypes ---------------------------------------------*/ 54 | void Error_Handler(void); 55 | 56 | /* USER CODE BEGIN EFP */ 57 | 58 | /* USER CODE END EFP */ 59 | 60 | /* Private defines -----------------------------------------------------------*/ 61 | /* USER CODE BEGIN Private defines */ 62 | 63 | /* USER CODE END Private defines */ 64 | 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | 69 | #endif /* __MAIN_H */ 70 | 71 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 72 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Inc/stm32f1xx_it.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file stm32f1xx_it.h 5 | * @brief This file contains the headers of the interrupt handlers. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2020 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* USER CODE END Header */ 20 | 21 | /* Define to prevent recursive inclusion -------------------------------------*/ 22 | #ifndef __STM32F1xx_IT_H 23 | #define __STM32F1xx_IT_H 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | /* Private includes ----------------------------------------------------------*/ 30 | /* USER CODE BEGIN Includes */ 31 | 32 | /* USER CODE END Includes */ 33 | 34 | /* Exported types ------------------------------------------------------------*/ 35 | /* USER CODE BEGIN ET */ 36 | 37 | /* USER CODE END ET */ 38 | 39 | /* Exported constants --------------------------------------------------------*/ 40 | /* USER CODE BEGIN EC */ 41 | 42 | /* USER CODE END EC */ 43 | 44 | /* Exported macro ------------------------------------------------------------*/ 45 | /* USER CODE BEGIN EM */ 46 | 47 | /* USER CODE END EM */ 48 | 49 | /* Exported functions prototypes ---------------------------------------------*/ 50 | void NMI_Handler(void); 51 | void HardFault_Handler(void); 52 | void MemManage_Handler(void); 53 | void BusFault_Handler(void); 54 | void UsageFault_Handler(void); 55 | void SVC_Handler(void); 56 | void DebugMon_Handler(void); 57 | void PendSV_Handler(void); 58 | void SysTick_Handler(void); 59 | void USB_LP_CAN1_RX0_IRQHandler(void); 60 | /* USER CODE BEGIN EFP */ 61 | 62 | /* USER CODE END EFP */ 63 | 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | 68 | #endif /* __STM32F1xx_IT_H */ 69 | 70 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 71 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Inc/usb_device.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : usb_device.h 5 | * @version : v2.0_Cube 6 | * @brief : Header for usb_device.c file. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2020 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Define to prevent recursive inclusion -------------------------------------*/ 23 | #ifndef __USB_DEVICE__H__ 24 | #define __USB_DEVICE__H__ 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /* Includes ------------------------------------------------------------------*/ 31 | #include "stm32f1xx.h" 32 | #include "stm32f1xx_hal.h" 33 | #include "usbd_def.h" 34 | 35 | /* USER CODE BEGIN INCLUDE */ 36 | 37 | /* USER CODE END INCLUDE */ 38 | 39 | /** @addtogroup USBD_OTG_DRIVER 40 | * @{ 41 | */ 42 | 43 | /** @defgroup USBD_DEVICE USBD_DEVICE 44 | * @brief Device file for Usb otg low level driver. 45 | * @{ 46 | */ 47 | 48 | /** @defgroup USBD_DEVICE_Exported_Variables USBD_DEVICE_Exported_Variables 49 | * @brief Public variables. 50 | * @{ 51 | */ 52 | 53 | /* Private variables ---------------------------------------------------------*/ 54 | /* USER CODE BEGIN PV */ 55 | 56 | /* USER CODE END PV */ 57 | 58 | /* Private function prototypes -----------------------------------------------*/ 59 | /* USER CODE BEGIN PFP */ 60 | 61 | /* USER CODE END PFP */ 62 | 63 | /* 64 | * -- Insert your variables declaration here -- 65 | */ 66 | /* USER CODE BEGIN VARIABLES */ 67 | 68 | /* USER CODE END VARIABLES */ 69 | /** 70 | * @} 71 | */ 72 | 73 | /** @defgroup USBD_DEVICE_Exported_FunctionsPrototype USBD_DEVICE_Exported_FunctionsPrototype 74 | * @brief Declaration of public functions for Usb device. 75 | * @{ 76 | */ 77 | 78 | /** USB Device initialization function. */ 79 | void MX_USB_DEVICE_Init(void); 80 | 81 | /* 82 | * -- Insert functions declaration here -- 83 | */ 84 | /* USER CODE BEGIN FD */ 85 | 86 | /* USER CODE END FD */ 87 | /** 88 | * @} 89 | */ 90 | 91 | /** 92 | * @} 93 | */ 94 | 95 | /** 96 | * @} 97 | */ 98 | 99 | #ifdef __cplusplus 100 | } 101 | #endif 102 | 103 | #endif /* __USB_DEVICE__H__ */ 104 | 105 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 106 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/MDK-ARM/DebugConfig/STM32F103C8T6_YAB_STM32F103C8_1.0.0.dbgconf: -------------------------------------------------------------------------------- 1 | // File: STM32F101_102_103_105_107.dbgconf 2 | // Version: 1.0.0 3 | // Note: refer to STM32F101xx STM32F102xx STM32F103xx STM32F105xx STM32F107xx Reference manual (RM0008) 4 | // STM32F101xx STM32F102xx STM32F103xx STM32F105xx STM32F107xx datasheets 5 | 6 | // <<< Use Configuration Wizard in Context Menu >>> 7 | 8 | // Debug MCU configuration register (DBGMCU_CR) 9 | // Reserved bits must be kept at reset value 10 | // DBG_TIM11_STOP TIM11 counter stopped when core is halted 11 | // DBG_TIM10_STOP TIM10 counter stopped when core is halted 12 | // DBG_TIM9_STOP TIM9 counter stopped when core is halted 13 | // DBG_TIM14_STOP TIM14 counter stopped when core is halted 14 | // DBG_TIM13_STOP TIM13 counter stopped when core is halted 15 | // DBG_TIM12_STOP TIM12 counter stopped when core is halted 16 | // DBG_CAN2_STOP Debug CAN2 stopped when core is halted 17 | // DBG_TIM7_STOP TIM7 counter stopped when core is halted 18 | // DBG_TIM6_STOP TIM6 counter stopped when core is halted 19 | // DBG_TIM5_STOP TIM5 counter stopped when core is halted 20 | // DBG_TIM8_STOP TIM8 counter stopped when core is halted 21 | // DBG_I2C2_SMBUS_TIMEOUT SMBUS timeout mode stopped when core is halted 22 | // DBG_I2C1_SMBUS_TIMEOUT SMBUS timeout mode stopped when core is halted 23 | // DBG_CAN1_STOP Debug CAN1 stopped when Core is halted 24 | // DBG_TIM4_STOP TIM4 counter stopped when core is halted 25 | // DBG_TIM3_STOP TIM3 counter stopped when core is halted 26 | // DBG_TIM2_STOP TIM2 counter stopped when core is halted 27 | // DBG_TIM1_STOP TIM1 counter stopped when core is halted 28 | // DBG_WWDG_STOP Debug window watchdog stopped when core is halted 29 | // DBG_IWDG_STOP Debug independent watchdog stopped when core is halted 30 | // DBG_STANDBY Debug standby mode 31 | // DBG_STOP Debug stop mode 32 | // DBG_SLEEP Debug sleep mode 33 | // 34 | DbgMCU_CR = 0x00000007; 35 | 36 | // <<< end of configuration section >>> 37 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/MDK-ARM/RTE/_STM32F103C8T6_YAB/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'STM32F103C8T6_YAB' 7 | * Target: 'STM32F103C8T6_YAB' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "stm32f10x.h" 18 | 19 | 20 | 21 | #endif /* RTE_COMPONENTS_H */ 22 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_data.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usbd_msc_data.h 4 | * @author MCD Application Team 5 | * @brief Header for the usbd_msc_data.c file 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2015 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __USBD_MSC_DATA_H 22 | #define __USBD_MSC_DATA_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "usbd_conf.h" 30 | 31 | /** @addtogroup STM32_USB_DEVICE_LIBRARY 32 | * @{ 33 | */ 34 | 35 | /** @defgroup USB_INFO 36 | * @brief general defines for the usb device library file 37 | * @{ 38 | */ 39 | 40 | /** @defgroup USB_INFO_Exported_Defines 41 | * @{ 42 | */ 43 | #define MODE_SENSE6_LEN 8U 44 | #define MODE_SENSE10_LEN 8U 45 | #define LENGTH_INQUIRY_PAGE00 7U 46 | #define LENGTH_FORMAT_CAPACITIES 20U 47 | 48 | /** 49 | * @} 50 | */ 51 | 52 | 53 | /** @defgroup USBD_INFO_Exported_TypesDefinitions 54 | * @{ 55 | */ 56 | /** 57 | * @} 58 | */ 59 | 60 | 61 | 62 | /** @defgroup USBD_INFO_Exported_Macros 63 | * @{ 64 | */ 65 | 66 | /** 67 | * @} 68 | */ 69 | 70 | /** @defgroup USBD_INFO_Exported_Variables 71 | * @{ 72 | */ 73 | extern const uint8_t MSC_Page00_Inquiry_Data[]; 74 | extern const uint8_t MSC_Mode_Sense6_data[]; 75 | extern const uint8_t MSC_Mode_Sense10_data[] ; 76 | 77 | /** 78 | * @} 79 | */ 80 | 81 | /** @defgroup USBD_INFO_Exported_FunctionsPrototype 82 | * @{ 83 | */ 84 | 85 | /** 86 | * @} 87 | */ 88 | 89 | #ifdef __cplusplus 90 | } 91 | #endif 92 | 93 | #endif /* __USBD_MSC_DATA_H */ 94 | 95 | /** 96 | * @} 97 | */ 98 | 99 | /** 100 | * @} 101 | */ 102 | 103 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 104 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_data.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usbd_msc_data.c 4 | * @author MCD Application Team 5 | * @brief This file provides all the vital inquiry pages and sense data. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2015 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* BSPDependencies 21 | - "stm32xxxxx_{eval}{discovery}{nucleo_144}.c" 22 | - "stm32xxxxx_{eval}{discovery}_io.c" 23 | - "stm32xxxxx_{eval}{discovery}{adafruit}_sd.c" 24 | EndBSPDependencies */ 25 | 26 | /* Includes ------------------------------------------------------------------*/ 27 | #include "usbd_msc_data.h" 28 | 29 | 30 | /** @addtogroup STM32_USB_DEVICE_LIBRARY 31 | * @{ 32 | */ 33 | 34 | 35 | /** @defgroup MSC_DATA 36 | * @brief Mass storage info/data module 37 | * @{ 38 | */ 39 | 40 | /** @defgroup MSC_DATA_Private_TypesDefinitions 41 | * @{ 42 | */ 43 | /** 44 | * @} 45 | */ 46 | 47 | 48 | /** @defgroup MSC_DATA_Private_Defines 49 | * @{ 50 | */ 51 | /** 52 | * @} 53 | */ 54 | 55 | 56 | /** @defgroup MSC_DATA_Private_Macros 57 | * @{ 58 | */ 59 | /** 60 | * @} 61 | */ 62 | 63 | 64 | /** @defgroup MSC_DATA_Private_Variables 65 | * @{ 66 | */ 67 | 68 | 69 | /* USB Mass storage Page 0 Inquiry Data */ 70 | const uint8_t MSC_Page00_Inquiry_Data[] = 71 | { 72 | 0x00, 73 | 0x00, 74 | 0x00, 75 | (LENGTH_INQUIRY_PAGE00 - 4U), 76 | 0x00, 77 | 0x80, 78 | 0x83 79 | }; 80 | /* USB Mass storage sense 6 Data */ 81 | const uint8_t MSC_Mode_Sense6_data[] = 82 | { 83 | 0x00, 84 | 0x00, 85 | 0x00, 86 | 0x00, 87 | 0x00, 88 | 0x00, 89 | 0x00, 90 | 0x00 91 | }; 92 | /* USB Mass storage sense 10 Data */ 93 | const uint8_t MSC_Mode_Sense10_data[] = 94 | { 95 | 0x00, 96 | 0x06, 97 | 0x00, 98 | 0x00, 99 | 0x00, 100 | 0x00, 101 | 0x00, 102 | 0x00 103 | }; 104 | /** 105 | * @} 106 | */ 107 | 108 | 109 | /** @defgroup MSC_DATA_Private_FunctionPrototypes 110 | * @{ 111 | */ 112 | /** 113 | * @} 114 | */ 115 | 116 | 117 | /** @defgroup MSC_DATA_Private_Functions 118 | * @{ 119 | */ 120 | 121 | /** 122 | * @} 123 | */ 124 | 125 | 126 | /** 127 | * @} 128 | */ 129 | 130 | 131 | /** 132 | * @} 133 | */ 134 | 135 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 136 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usbd_req.h 4 | * @author MCD Application Team 5 | * @brief Header file for the usbd_req.c file 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2015 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __USB_REQUEST_H 22 | #define __USB_REQUEST_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "usbd_def.h" 30 | 31 | 32 | /** @addtogroup STM32_USB_DEVICE_LIBRARY 33 | * @{ 34 | */ 35 | 36 | /** @defgroup USBD_REQ 37 | * @brief header file for the usbd_req.c file 38 | * @{ 39 | */ 40 | 41 | /** @defgroup USBD_REQ_Exported_Defines 42 | * @{ 43 | */ 44 | /** 45 | * @} 46 | */ 47 | 48 | 49 | /** @defgroup USBD_REQ_Exported_Types 50 | * @{ 51 | */ 52 | /** 53 | * @} 54 | */ 55 | 56 | 57 | 58 | /** @defgroup USBD_REQ_Exported_Macros 59 | * @{ 60 | */ 61 | /** 62 | * @} 63 | */ 64 | 65 | /** @defgroup USBD_REQ_Exported_Variables 66 | * @{ 67 | */ 68 | /** 69 | * @} 70 | */ 71 | 72 | /** @defgroup USBD_REQ_Exported_FunctionsPrototype 73 | * @{ 74 | */ 75 | 76 | USBD_StatusTypeDef USBD_StdDevReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); 77 | USBD_StatusTypeDef USBD_StdItfReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); 78 | USBD_StatusTypeDef USBD_StdEPReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); 79 | 80 | 81 | void USBD_CtlError(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); 82 | 83 | void USBD_ParseSetupRequest(USBD_SetupReqTypedef *req, uint8_t *pdata); 84 | 85 | void USBD_GetString(uint8_t *desc, uint8_t *unicode, uint16_t *len); 86 | /** 87 | * @} 88 | */ 89 | 90 | #ifdef __cplusplus 91 | } 92 | #endif 93 | 94 | #endif /* __USB_REQUEST_H */ 95 | 96 | /** 97 | * @} 98 | */ 99 | 100 | /** 101 | * @} 102 | */ 103 | 104 | 105 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 106 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usbd_ioreq.h 4 | * @author MCD Application Team 5 | * @brief Header file for the usbd_ioreq.c file 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2015 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __USBD_IOREQ_H 22 | #define __USBD_IOREQ_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "usbd_def.h" 30 | #include "usbd_core.h" 31 | 32 | /** @addtogroup STM32_USB_DEVICE_LIBRARY 33 | * @{ 34 | */ 35 | 36 | /** @defgroup USBD_IOREQ 37 | * @brief header file for the usbd_ioreq.c file 38 | * @{ 39 | */ 40 | 41 | /** @defgroup USBD_IOREQ_Exported_Defines 42 | * @{ 43 | */ 44 | /** 45 | * @} 46 | */ 47 | 48 | 49 | /** @defgroup USBD_IOREQ_Exported_Types 50 | * @{ 51 | */ 52 | 53 | 54 | /** 55 | * @} 56 | */ 57 | 58 | 59 | 60 | /** @defgroup USBD_IOREQ_Exported_Macros 61 | * @{ 62 | */ 63 | 64 | /** 65 | * @} 66 | */ 67 | 68 | /** @defgroup USBD_IOREQ_Exported_Variables 69 | * @{ 70 | */ 71 | 72 | /** 73 | * @} 74 | */ 75 | 76 | /** @defgroup USBD_IOREQ_Exported_FunctionsPrototype 77 | * @{ 78 | */ 79 | 80 | USBD_StatusTypeDef USBD_CtlSendData(USBD_HandleTypeDef *pdev, 81 | uint8_t *pbuf, 82 | uint16_t len); 83 | 84 | USBD_StatusTypeDef USBD_CtlContinueSendData(USBD_HandleTypeDef *pdev, 85 | uint8_t *pbuf, 86 | uint16_t len); 87 | 88 | USBD_StatusTypeDef USBD_CtlPrepareRx(USBD_HandleTypeDef *pdev, 89 | uint8_t *pbuf, 90 | uint16_t len); 91 | 92 | USBD_StatusTypeDef USBD_CtlContinueRx(USBD_HandleTypeDef *pdev, 93 | uint8_t *pbuf, 94 | uint16_t len); 95 | 96 | USBD_StatusTypeDef USBD_CtlSendStatus(USBD_HandleTypeDef *pdev); 97 | 98 | USBD_StatusTypeDef USBD_CtlReceiveStatus(USBD_HandleTypeDef *pdev); 99 | 100 | uint32_t USBD_GetRxCount(USBD_HandleTypeDef *pdev, uint8_t ep_addr); 101 | 102 | /** 103 | * @} 104 | */ 105 | 106 | #ifdef __cplusplus 107 | } 108 | #endif 109 | 110 | #endif /* __USBD_IOREQ_H */ 111 | 112 | /** 113 | * @} 114 | */ 115 | 116 | /** 117 | * @} 118 | */ 119 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 120 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Src/stm32f1xx_hal_msp.c: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * File Name : stm32f1xx_hal_msp.c 5 | * Description : This file provides code for the MSP Initialization 6 | * and de-Initialization codes. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2020 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Includes ------------------------------------------------------------------*/ 23 | #include "main.h" 24 | /* USER CODE BEGIN Includes */ 25 | 26 | /* USER CODE END Includes */ 27 | 28 | /* Private typedef -----------------------------------------------------------*/ 29 | /* USER CODE BEGIN TD */ 30 | 31 | /* USER CODE END TD */ 32 | 33 | /* Private define ------------------------------------------------------------*/ 34 | /* USER CODE BEGIN Define */ 35 | 36 | /* USER CODE END Define */ 37 | 38 | /* Private macro -------------------------------------------------------------*/ 39 | /* USER CODE BEGIN Macro */ 40 | 41 | /* USER CODE END Macro */ 42 | 43 | /* Private variables ---------------------------------------------------------*/ 44 | /* USER CODE BEGIN PV */ 45 | 46 | /* USER CODE END PV */ 47 | 48 | /* Private function prototypes -----------------------------------------------*/ 49 | /* USER CODE BEGIN PFP */ 50 | 51 | /* USER CODE END PFP */ 52 | 53 | /* External functions --------------------------------------------------------*/ 54 | /* USER CODE BEGIN ExternalFunctions */ 55 | 56 | /* USER CODE END ExternalFunctions */ 57 | 58 | /* USER CODE BEGIN 0 */ 59 | 60 | /* USER CODE END 0 */ 61 | /** 62 | * Initializes the Global MSP. 63 | */ 64 | void HAL_MspInit(void) 65 | { 66 | /* USER CODE BEGIN MspInit 0 */ 67 | 68 | /* USER CODE END MspInit 0 */ 69 | 70 | __HAL_RCC_AFIO_CLK_ENABLE(); 71 | __HAL_RCC_PWR_CLK_ENABLE(); 72 | 73 | /* System interrupt init*/ 74 | 75 | /** NOJTAG: JTAG-DP Disabled and SW-DP Enabled 76 | */ 77 | __HAL_AFIO_REMAP_SWJ_NOJTAG(); 78 | 79 | /* USER CODE BEGIN MspInit 1 */ 80 | 81 | /* USER CODE END MspInit 1 */ 82 | } 83 | 84 | /* USER CODE BEGIN 1 */ 85 | 86 | /* USER CODE END 1 */ 87 | 88 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 89 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F103C8T6_YAB/Src/usb_device.c: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : usb_device.c 5 | * @version : v2.0_Cube 6 | * @brief : This file implements the USB Device 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2020 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Includes ------------------------------------------------------------------*/ 23 | 24 | #include "usb_device.h" 25 | #include "usbd_core.h" 26 | #include "usbd_desc.h" 27 | #include "usbd_msc.h" 28 | #include "usbd_storage_if.h" 29 | 30 | /* USER CODE BEGIN Includes */ 31 | 32 | /* USER CODE END Includes */ 33 | 34 | /* USER CODE BEGIN PV */ 35 | /* Private variables ---------------------------------------------------------*/ 36 | 37 | /* USER CODE END PV */ 38 | 39 | /* USER CODE BEGIN PFP */ 40 | /* Private function prototypes -----------------------------------------------*/ 41 | 42 | /* USER CODE END PFP */ 43 | 44 | /* USB Device Core handle declaration. */ 45 | USBD_HandleTypeDef hUsbDeviceFS; 46 | 47 | /* 48 | * -- Insert your variables declaration here -- 49 | */ 50 | /* USER CODE BEGIN 0 */ 51 | 52 | /* USER CODE END 0 */ 53 | 54 | /* 55 | * -- Insert your external function declaration here -- 56 | */ 57 | /* USER CODE BEGIN 1 */ 58 | 59 | /* USER CODE END 1 */ 60 | 61 | /** 62 | * Init USB device Library, add supported class and start the library 63 | * @retval None 64 | */ 65 | void MX_USB_DEVICE_Init(void) 66 | { 67 | /* USER CODE BEGIN USB_DEVICE_Init_PreTreatment */ 68 | 69 | /* USER CODE END USB_DEVICE_Init_PreTreatment */ 70 | 71 | /* Init Device Library, add supported class and start the library. */ 72 | if (USBD_Init(&hUsbDeviceFS, &FS_Desc, DEVICE_FS) != USBD_OK) 73 | { 74 | Error_Handler(); 75 | } 76 | if (USBD_RegisterClass(&hUsbDeviceFS, &USBD_MSC) != USBD_OK) 77 | { 78 | Error_Handler(); 79 | } 80 | if (USBD_MSC_RegisterStorage(&hUsbDeviceFS, &USBD_Storage_Interface_fops_FS) != USBD_OK) 81 | { 82 | Error_Handler(); 83 | } 84 | if (USBD_Start(&hUsbDeviceFS) != USBD_OK) 85 | { 86 | Error_Handler(); 87 | } 88 | 89 | /* USER CODE BEGIN USB_DEVICE_Init_PostTreatment */ 90 | 91 | /* USER CODE END USB_DEVICE_Init_PostTreatment */ 92 | } 93 | 94 | /** 95 | * @} 96 | */ 97 | 98 | /** 99 | * @} 100 | */ 101 | 102 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 103 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F407VET6_YAB/Build/STM32F407VET6_YAB.axf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/YAB_STM32F103_F407_L433_F723/STM32F407VET6_YAB/Build/STM32F407VET6_YAB.axf -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F407VET6_YAB/Build/STM32F407VET6_YAB.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x08000000 0x00080000 { ; load region size_region 6 | ER_IROM1 0x08000000 0x00080000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | .ANY (+RO) 10 | .ANY (+XO) 11 | } 12 | RW_IRAM1 0x20000000 0x00020000 { ; RW data 13 | .ANY (+RW +ZI) 14 | } 15 | RW_IRAM2 0x10000000 0x00010000 { 16 | .ANY (+RW +ZI) 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F407VET6_YAB/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/YAB_STM32F103_F407_L433_F723/STM32F407VET6_YAB/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F407VET6_YAB/Drivers/CMSIS/Include/cmsis_version.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file cmsis_version.h 3 | * @brief CMSIS Core(M) Version definitions 4 | * @version V5.0.2 5 | * @date 19. April 2017 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2009-2017 ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef __CMSIS_VERSION_H 32 | #define __CMSIS_VERSION_H 33 | 34 | /* CMSIS Version definitions */ 35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ 36 | #define __CM_CMSIS_VERSION_SUB ( 1U) /*!< [15:0] CMSIS Core(M) sub version */ 37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ 38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ 39 | #endif 40 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F407VET6_YAB/Drivers/CMSIS/Include/tz_context.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * @file tz_context.h 3 | * @brief Context Management for Armv8-M TrustZone 4 | * @version V1.0.1 5 | * @date 10. January 2018 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2017-2018 Arm Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef TZ_CONTEXT_H 32 | #define TZ_CONTEXT_H 33 | 34 | #include 35 | 36 | #ifndef TZ_MODULEID_T 37 | #define TZ_MODULEID_T 38 | /// \details Data type that identifies secure software modules called by a process. 39 | typedef uint32_t TZ_ModuleId_t; 40 | #endif 41 | 42 | /// \details TZ Memory ID identifies an allocated memory slot. 43 | typedef uint32_t TZ_MemoryId_t; 44 | 45 | /// Initialize secure context memory system 46 | /// \return execution status (1: success, 0: error) 47 | uint32_t TZ_InitContextSystem_S (void); 48 | 49 | /// Allocate context memory for calling secure software modules in TrustZone 50 | /// \param[in] module identifies software modules called from non-secure mode 51 | /// \return value != 0 id TrustZone memory slot identifier 52 | /// \return value 0 no memory available or internal error 53 | TZ_MemoryId_t TZ_AllocModuleContext_S (TZ_ModuleId_t module); 54 | 55 | /// Free context memory that was previously allocated with \ref TZ_AllocModuleContext_S 56 | /// \param[in] id TrustZone memory slot identifier 57 | /// \return execution status (1: success, 0: error) 58 | uint32_t TZ_FreeModuleContext_S (TZ_MemoryId_t id); 59 | 60 | /// Load secure context (called on RTOS thread context switch) 61 | /// \param[in] id TrustZone memory slot identifier 62 | /// \return execution status (1: success, 0: error) 63 | uint32_t TZ_LoadContext_S (TZ_MemoryId_t id); 64 | 65 | /// Store secure context (called on RTOS thread context switch) 66 | /// \param[in] id TrustZone memory slot identifier 67 | /// \return execution status (1: success, 0: error) 68 | uint32_t TZ_StoreContext_S (TZ_MemoryId_t id); 69 | 70 | #endif // TZ_CONTEXT_H 71 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F407VET6_YAB/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f4xx_hal_flash_ramfunc.h 4 | * @author MCD Application Team 5 | * @brief Header file of FLASH RAMFUNC driver. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2017 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __STM32F4xx_FLASH_RAMFUNC_H 22 | #define __STM32F4xx_FLASH_RAMFUNC_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | #if defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) || defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) ||\ 28 | defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) 29 | 30 | /* Includes ------------------------------------------------------------------*/ 31 | #include "stm32f4xx_hal_def.h" 32 | 33 | /** @addtogroup STM32F4xx_HAL_Driver 34 | * @{ 35 | */ 36 | 37 | /** @addtogroup FLASH_RAMFUNC 38 | * @{ 39 | */ 40 | 41 | /* Exported types ------------------------------------------------------------*/ 42 | /* Exported macro ------------------------------------------------------------*/ 43 | /* Exported functions --------------------------------------------------------*/ 44 | /** @addtogroup FLASH_RAMFUNC_Exported_Functions 45 | * @{ 46 | */ 47 | 48 | /** @addtogroup FLASH_RAMFUNC_Exported_Functions_Group1 49 | * @{ 50 | */ 51 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_StopFlashInterfaceClk(void); 52 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_StartFlashInterfaceClk(void); 53 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_EnableFlashSleepMode(void); 54 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_DisableFlashSleepMode(void); 55 | /** 56 | * @} 57 | */ 58 | 59 | /** 60 | * @} 61 | */ 62 | 63 | /** 64 | * @} 65 | */ 66 | 67 | /** 68 | * @} 69 | */ 70 | 71 | #endif /* STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */ 72 | #ifdef __cplusplus 73 | } 74 | #endif 75 | 76 | 77 | #endif /* __STM32F4xx_FLASH_RAMFUNC_H */ 78 | 79 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 80 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F407VET6_YAB/Inc/YAB_F407_config.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************* 2 | # Released under MIT License 3 | 4 | Copyright (c) 2020 SF Yip (yipxxx@gmail.com) 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 9 | 10 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 11 | 12 | note: This Source Code modified by RadioOperator 2020-12-06. 13 | **************************************************************************************/ 14 | 15 | #ifndef _YAB_F407_CONFIG_H_ 16 | #define _YAB_F407_CONFIG_H_ 17 | 18 | // STM32F407VET6 - 512KB Flash Size 19 | #define FLASH_START_ADDR 0x08000000 //STM32 20 | #define FLASH_SIZE (512*1024) //512KB for STM32F407VET6 21 | #define FLASH_ERASE_SECTOR FLASH_SECTOR_1 //App start from Sector_1 22 | #define FLASH_ERASE_NBSECTORS 7 //App in 7 sectors, total from 1 to 7 23 | 24 | #define BOOTLOADER_SIZE 0x4000 //16KB max, bootloader size, Sector_0 25 | 26 | #define APP_ADDR (FLASH_START_ADDR + BOOTLOADER_SIZE) 27 | #define APP_SIZE (FLASH_SIZE - BOOTLOADER_SIZE) 28 | #define APP_DRIVE_NAME "YAB Disk " //11 chars 29 | #define APP_FILE_NAME "F407_APPBIN" //11 chars, 8+3 name format, = f407_app.bin 30 | 31 | #define APP_READBACK_ENABLE 1 //0-firmware can not read back, 1-can 32 | 33 | //YAB mode entry control, button or pin to GNG, PA0 34 | //LED on an Eva board, PA7 35 | //If GPIOs here modified, take care the "MX_GPIO_Init" function coordinately. 36 | #define BTN_GPIO_PORT GPIOA 37 | #define BTN_GPIO_PIN GPIO_PIN_0 38 | 39 | #define LED_ENABLE 1 //1-LED function enabled, 0-disable 40 | #define LED_GPIO_PORT GPIOA 41 | #define LED_GPIO_PIN GPIO_PIN_7 42 | #define LED_ON HAL_GPIO_WritePin(LED_GPIO_PORT, LED_GPIO_PIN, GPIO_PIN_RESET) 43 | #define LED_OFF HAL_GPIO_WritePin(LED_GPIO_PORT, LED_GPIO_PIN, GPIO_PIN_SET) 44 | 45 | #define LED_SLOW_BLINK 250 //250ms ON, 750ms OFF 46 | #define LED_OFF_NOBLINK 0 //always OFF 47 | #define LED_ON_NOBLINK 255 //always ON 48 | 49 | #if LED_ENABLE 50 | extern volatile uint8_t LED_On_Time; 51 | #endif //#if LED_ENABLE 52 | 53 | #endif //_YAB_F407_CONFIG_H_ 54 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F407VET6_YAB/Inc/YAB_fat32.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************* 2 | # Released under MIT License 3 | 4 | Copyright (c) 2020 SF Yip (yipxxx@gmail.com) 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 9 | 10 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 11 | 12 | note: This Source Code modified by RadioOperator 2020-12-06. 13 | **************************************************************************************/ 14 | 15 | #ifndef _YAB_FAT32_H_ 16 | #define _YAB_FAT32_H_ 17 | 18 | #include 19 | #include 20 | 21 | bool fat32_read(uint8_t *b, uint32_t addr); 22 | bool fat32_write(const uint8_t *b, uint32_t addr); 23 | 24 | #endif //_YAB_FAT32_H_ 25 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F407VET6_YAB/Inc/main.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : main.h 5 | * @brief : Header for main.c file. 6 | * This file contains the common defines of the application. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2020 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Define to prevent recursive inclusion -------------------------------------*/ 23 | #ifndef __MAIN_H 24 | #define __MAIN_H 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /* Includes ------------------------------------------------------------------*/ 31 | #include "stm32f4xx_hal.h" 32 | 33 | /* Private includes ----------------------------------------------------------*/ 34 | /* USER CODE BEGIN Includes */ 35 | 36 | /* USER CODE END Includes */ 37 | 38 | /* Exported types ------------------------------------------------------------*/ 39 | /* USER CODE BEGIN ET */ 40 | 41 | /* USER CODE END ET */ 42 | 43 | /* Exported constants --------------------------------------------------------*/ 44 | /* USER CODE BEGIN EC */ 45 | 46 | /* USER CODE END EC */ 47 | 48 | /* Exported macro ------------------------------------------------------------*/ 49 | /* USER CODE BEGIN EM */ 50 | 51 | /* USER CODE END EM */ 52 | 53 | /* Exported functions prototypes ---------------------------------------------*/ 54 | void Error_Handler(void); 55 | 56 | /* USER CODE BEGIN EFP */ 57 | 58 | /* USER CODE END EFP */ 59 | 60 | /* Private defines -----------------------------------------------------------*/ 61 | /* USER CODE BEGIN Private defines */ 62 | 63 | /* USER CODE END Private defines */ 64 | 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | 69 | #endif /* __MAIN_H */ 70 | 71 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 72 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F407VET6_YAB/Inc/stm32f4xx_it.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file stm32f4xx_it.h 5 | * @brief This file contains the headers of the interrupt handlers. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2020 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* USER CODE END Header */ 20 | 21 | /* Define to prevent recursive inclusion -------------------------------------*/ 22 | #ifndef __STM32F4xx_IT_H 23 | #define __STM32F4xx_IT_H 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | /* Private includes ----------------------------------------------------------*/ 30 | /* USER CODE BEGIN Includes */ 31 | 32 | /* USER CODE END Includes */ 33 | 34 | /* Exported types ------------------------------------------------------------*/ 35 | /* USER CODE BEGIN ET */ 36 | 37 | /* USER CODE END ET */ 38 | 39 | /* Exported constants --------------------------------------------------------*/ 40 | /* USER CODE BEGIN EC */ 41 | 42 | /* USER CODE END EC */ 43 | 44 | /* Exported macro ------------------------------------------------------------*/ 45 | /* USER CODE BEGIN EM */ 46 | 47 | /* USER CODE END EM */ 48 | 49 | /* Exported functions prototypes ---------------------------------------------*/ 50 | void NMI_Handler(void); 51 | void HardFault_Handler(void); 52 | void MemManage_Handler(void); 53 | void BusFault_Handler(void); 54 | void UsageFault_Handler(void); 55 | void SVC_Handler(void); 56 | void DebugMon_Handler(void); 57 | void PendSV_Handler(void); 58 | void SysTick_Handler(void); 59 | void OTG_FS_IRQHandler(void); 60 | /* USER CODE BEGIN EFP */ 61 | 62 | /* USER CODE END EFP */ 63 | 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | 68 | #endif /* __STM32F4xx_IT_H */ 69 | 70 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 71 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F407VET6_YAB/Inc/usb_device.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : usb_device.h 5 | * @version : v1.0_Cube 6 | * @brief : Header for usb_device.c file. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2020 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Define to prevent recursive inclusion -------------------------------------*/ 23 | #ifndef __USB_DEVICE__H__ 24 | #define __USB_DEVICE__H__ 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /* Includes ------------------------------------------------------------------*/ 31 | #include "stm32f4xx.h" 32 | #include "stm32f4xx_hal.h" 33 | #include "usbd_def.h" 34 | 35 | /* USER CODE BEGIN INCLUDE */ 36 | 37 | /* USER CODE END INCLUDE */ 38 | 39 | /** @addtogroup USBD_OTG_DRIVER 40 | * @{ 41 | */ 42 | 43 | /** @defgroup USBD_DEVICE USBD_DEVICE 44 | * @brief Device file for Usb otg low level driver. 45 | * @{ 46 | */ 47 | 48 | /** @defgroup USBD_DEVICE_Exported_Variables USBD_DEVICE_Exported_Variables 49 | * @brief Public variables. 50 | * @{ 51 | */ 52 | 53 | /* Private variables ---------------------------------------------------------*/ 54 | /* USER CODE BEGIN PV */ 55 | 56 | /* USER CODE END PV */ 57 | 58 | /* Private function prototypes -----------------------------------------------*/ 59 | /* USER CODE BEGIN PFP */ 60 | 61 | /* USER CODE END PFP */ 62 | 63 | /* 64 | * -- Insert your variables declaration here -- 65 | */ 66 | /* USER CODE BEGIN VARIABLES */ 67 | 68 | /* USER CODE END VARIABLES */ 69 | /** 70 | * @} 71 | */ 72 | 73 | /** @defgroup USBD_DEVICE_Exported_FunctionsPrototype USBD_DEVICE_Exported_FunctionsPrototype 74 | * @brief Declaration of public functions for Usb device. 75 | * @{ 76 | */ 77 | 78 | /** USB Device initialization function. */ 79 | void MX_USB_DEVICE_Init(void); 80 | 81 | /* 82 | * -- Insert functions declaration here -- 83 | */ 84 | /* USER CODE BEGIN FD */ 85 | 86 | /* USER CODE END FD */ 87 | /** 88 | * @} 89 | */ 90 | 91 | /** 92 | * @} 93 | */ 94 | 95 | /** 96 | * @} 97 | */ 98 | 99 | #ifdef __cplusplus 100 | } 101 | #endif 102 | 103 | #endif /* __USB_DEVICE__H__ */ 104 | 105 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 106 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F407VET6_YAB/MDK-ARM/DebugConfig/STM32F407VET6_YAB_STM32F407VETx.dbgconf: -------------------------------------------------------------------------------- 1 | // File: STM32F405_415_407_417_427_437_429_439.dbgconf 2 | // Version: 1.0.0 3 | // Note: refer to STM32F405/415 STM32F407/417 STM32F427/437 STM32F429/439 reference manual (RM0090) 4 | // refer to STM32F40x STM32F41x datasheets 5 | // refer to STM32F42x STM32F43x datasheets 6 | 7 | // <<< Use Configuration Wizard in Context Menu >>> 8 | 9 | // Debug MCU configuration register (DBGMCU_CR) 10 | // DBG_STANDBY Debug Standby Mode 11 | // DBG_STOP Debug Stop Mode 12 | // DBG_SLEEP Debug Sleep Mode 13 | // 14 | DbgMCU_CR = 0x00000007; 15 | 16 | // Debug MCU APB1 freeze register (DBGMCU_APB1_FZ) 17 | // Reserved bits must be kept at reset value 18 | // DBG_CAN2_STOP CAN2 stopped when core is halted 19 | // DBG_CAN1_STOP CAN2 stopped when core is halted 20 | // DBG_I2C3_SMBUS_TIMEOUT I2C3 SMBUS timeout mode stopped when core is halted 21 | // DBG_I2C2_SMBUS_TIMEOUT I2C2 SMBUS timeout mode stopped when core is halted 22 | // DBG_I2C1_SMBUS_TIMEOUT I2C1 SMBUS timeout mode stopped when core is halted 23 | // DBG_IWDG_STOP Independent watchdog stopped when core is halted 24 | // DBG_WWDG_STOP Window watchdog stopped when core is halted 25 | // DBG_RTC_STOP RTC stopped when core is halted 26 | // DBG_TIM14_STOP TIM14 counter stopped when core is halted 27 | // DBG_TIM13_STOP TIM13 counter stopped when core is halted 28 | // DBG_TIM12_STOP TIM12 counter stopped when core is halted 29 | // DBG_TIM7_STOP TIM7 counter stopped when core is halted 30 | // DBG_TIM6_STOP TIM6 counter stopped when core is halted 31 | // DBG_TIM5_STOP TIM5 counter stopped when core is halted 32 | // DBG_TIM4_STOP TIM4 counter stopped when core is halted 33 | // DBG_TIM3_STOP TIM3 counter stopped when core is halted 34 | // DBG_TIM2_STOP TIM2 counter stopped when core is halted 35 | // 36 | DbgMCU_APB1_Fz = 0x00000000; 37 | 38 | // Debug MCU APB2 freeze register (DBGMCU_APB2_FZ) 39 | // Reserved bits must be kept at reset value 40 | // DBG_TIM11_STOP TIM11 counter stopped when core is halted 41 | // DBG_TIM10_STOP TIM10 counter stopped when core is halted 42 | // DBG_TIM9_STOP TIM9 counter stopped when core is halted 43 | // DBG_TIM8_STOP TIM8 counter stopped when core is halted 44 | // DBG_TIM1_STOP TIM1 counter stopped when core is halted 45 | // 46 | DbgMCU_APB2_Fz = 0x00000000; 47 | 48 | // <<< end of configuration section >>> -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F407VET6_YAB/MDK-ARM/RTE/_STM32F407VET6_YAB/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'STM32F407VET6_YAB' 7 | * Target: 'STM32F407VET6_YAB' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "stm32f4xx.h" 18 | 19 | 20 | 21 | #endif /* RTE_COMPONENTS_H */ 22 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F407VET6_YAB/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_data.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usbd_msc_data.h 4 | * @author MCD Application Team 5 | * @brief Header for the usbd_msc_data.c file 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2015 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __USBD_MSC_DATA_H 22 | #define __USBD_MSC_DATA_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "usbd_conf.h" 30 | 31 | /** @addtogroup STM32_USB_DEVICE_LIBRARY 32 | * @{ 33 | */ 34 | 35 | /** @defgroup USB_INFO 36 | * @brief general defines for the usb device library file 37 | * @{ 38 | */ 39 | 40 | /** @defgroup USB_INFO_Exported_Defines 41 | * @{ 42 | */ 43 | #define MODE_SENSE6_LEN 0x17U 44 | #define MODE_SENSE10_LEN 0x1BU 45 | #define LENGTH_INQUIRY_PAGE00 0x06U 46 | #define LENGTH_INQUIRY_PAGE80 0x08U 47 | #define LENGTH_FORMAT_CAPACITIES 0x14U 48 | 49 | /** 50 | * @} 51 | */ 52 | 53 | 54 | /** @defgroup USBD_INFO_Exported_TypesDefinitions 55 | * @{ 56 | */ 57 | /** 58 | * @} 59 | */ 60 | 61 | 62 | 63 | /** @defgroup USBD_INFO_Exported_Macros 64 | * @{ 65 | */ 66 | 67 | /** 68 | * @} 69 | */ 70 | 71 | /** @defgroup USBD_INFO_Exported_Variables 72 | * @{ 73 | */ 74 | extern uint8_t MSC_Page00_Inquiry_Data[LENGTH_INQUIRY_PAGE00]; 75 | extern uint8_t MSC_Page80_Inquiry_Data[LENGTH_INQUIRY_PAGE80]; 76 | extern uint8_t MSC_Mode_Sense6_data[MODE_SENSE6_LEN]; 77 | extern uint8_t MSC_Mode_Sense10_data[MODE_SENSE10_LEN]; 78 | 79 | /** 80 | * @} 81 | */ 82 | 83 | /** @defgroup USBD_INFO_Exported_FunctionsPrototype 84 | * @{ 85 | */ 86 | 87 | /** 88 | * @} 89 | */ 90 | 91 | #ifdef __cplusplus 92 | } 93 | #endif 94 | 95 | #endif /* __USBD_MSC_DATA_H */ 96 | 97 | /** 98 | * @} 99 | */ 100 | 101 | /** 102 | * @} 103 | */ 104 | 105 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 106 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F407VET6_YAB/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usbd_req.h 4 | * @author MCD Application Team 5 | * @brief Header file for the usbd_req.c file 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2015 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __USB_REQUEST_H 22 | #define __USB_REQUEST_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "usbd_def.h" 30 | 31 | 32 | /** @addtogroup STM32_USB_DEVICE_LIBRARY 33 | * @{ 34 | */ 35 | 36 | /** @defgroup USBD_REQ 37 | * @brief header file for the usbd_req.c file 38 | * @{ 39 | */ 40 | 41 | /** @defgroup USBD_REQ_Exported_Defines 42 | * @{ 43 | */ 44 | /** 45 | * @} 46 | */ 47 | 48 | 49 | /** @defgroup USBD_REQ_Exported_Types 50 | * @{ 51 | */ 52 | /** 53 | * @} 54 | */ 55 | 56 | 57 | 58 | /** @defgroup USBD_REQ_Exported_Macros 59 | * @{ 60 | */ 61 | /** 62 | * @} 63 | */ 64 | 65 | /** @defgroup USBD_REQ_Exported_Variables 66 | * @{ 67 | */ 68 | /** 69 | * @} 70 | */ 71 | 72 | /** @defgroup USBD_REQ_Exported_FunctionsPrototype 73 | * @{ 74 | */ 75 | 76 | USBD_StatusTypeDef USBD_StdDevReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); 77 | USBD_StatusTypeDef USBD_StdItfReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); 78 | USBD_StatusTypeDef USBD_StdEPReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); 79 | 80 | void USBD_CtlError(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); 81 | void USBD_ParseSetupRequest(USBD_SetupReqTypedef *req, uint8_t *pdata); 82 | void USBD_GetString(uint8_t *desc, uint8_t *unicode, uint16_t *len); 83 | 84 | /** 85 | * @} 86 | */ 87 | 88 | #ifdef __cplusplus 89 | } 90 | #endif 91 | 92 | #endif /* __USB_REQUEST_H */ 93 | 94 | /** 95 | * @} 96 | */ 97 | 98 | /** 99 | * @} 100 | */ 101 | 102 | 103 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 104 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F407VET6_YAB/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usbd_ioreq.h 4 | * @author MCD Application Team 5 | * @brief Header file for the usbd_ioreq.c file 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2015 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __USBD_IOREQ_H 22 | #define __USBD_IOREQ_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "usbd_def.h" 30 | #include "usbd_core.h" 31 | 32 | /** @addtogroup STM32_USB_DEVICE_LIBRARY 33 | * @{ 34 | */ 35 | 36 | /** @defgroup USBD_IOREQ 37 | * @brief header file for the usbd_ioreq.c file 38 | * @{ 39 | */ 40 | 41 | /** @defgroup USBD_IOREQ_Exported_Defines 42 | * @{ 43 | */ 44 | /** 45 | * @} 46 | */ 47 | 48 | 49 | /** @defgroup USBD_IOREQ_Exported_Types 50 | * @{ 51 | */ 52 | 53 | 54 | /** 55 | * @} 56 | */ 57 | 58 | 59 | 60 | /** @defgroup USBD_IOREQ_Exported_Macros 61 | * @{ 62 | */ 63 | 64 | /** 65 | * @} 66 | */ 67 | 68 | /** @defgroup USBD_IOREQ_Exported_Variables 69 | * @{ 70 | */ 71 | 72 | /** 73 | * @} 74 | */ 75 | 76 | /** @defgroup USBD_IOREQ_Exported_FunctionsPrototype 77 | * @{ 78 | */ 79 | 80 | USBD_StatusTypeDef USBD_CtlSendData(USBD_HandleTypeDef *pdev, 81 | uint8_t *pbuf, uint32_t len); 82 | 83 | USBD_StatusTypeDef USBD_CtlContinueSendData(USBD_HandleTypeDef *pdev, 84 | uint8_t *pbuf, uint32_t len); 85 | 86 | USBD_StatusTypeDef USBD_CtlPrepareRx(USBD_HandleTypeDef *pdev, 87 | uint8_t *pbuf, uint32_t len); 88 | 89 | USBD_StatusTypeDef USBD_CtlContinueRx(USBD_HandleTypeDef *pdev, 90 | uint8_t *pbuf, uint32_t len); 91 | 92 | USBD_StatusTypeDef USBD_CtlSendStatus(USBD_HandleTypeDef *pdev); 93 | USBD_StatusTypeDef USBD_CtlReceiveStatus(USBD_HandleTypeDef *pdev); 94 | 95 | uint32_t USBD_GetRxCount(USBD_HandleTypeDef *pdev, uint8_t ep_addr); 96 | 97 | /** 98 | * @} 99 | */ 100 | 101 | #ifdef __cplusplus 102 | } 103 | #endif 104 | 105 | #endif /* __USBD_IOREQ_H */ 106 | 107 | /** 108 | * @} 109 | */ 110 | 111 | /** 112 | * @} 113 | */ 114 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 115 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F407VET6_YAB/Src/stm32f4xx_hal_msp.c: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * File Name : stm32f4xx_hal_msp.c 5 | * Description : This file provides code for the MSP Initialization 6 | * and de-Initialization codes. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2020 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Includes ------------------------------------------------------------------*/ 23 | #include "main.h" 24 | /* USER CODE BEGIN Includes */ 25 | 26 | /* USER CODE END Includes */ 27 | 28 | /* Private typedef -----------------------------------------------------------*/ 29 | /* USER CODE BEGIN TD */ 30 | 31 | /* USER CODE END TD */ 32 | 33 | /* Private define ------------------------------------------------------------*/ 34 | /* USER CODE BEGIN Define */ 35 | 36 | /* USER CODE END Define */ 37 | 38 | /* Private macro -------------------------------------------------------------*/ 39 | /* USER CODE BEGIN Macro */ 40 | 41 | /* USER CODE END Macro */ 42 | 43 | /* Private variables ---------------------------------------------------------*/ 44 | /* USER CODE BEGIN PV */ 45 | 46 | /* USER CODE END PV */ 47 | 48 | /* Private function prototypes -----------------------------------------------*/ 49 | /* USER CODE BEGIN PFP */ 50 | 51 | /* USER CODE END PFP */ 52 | 53 | /* External functions --------------------------------------------------------*/ 54 | /* USER CODE BEGIN ExternalFunctions */ 55 | 56 | /* USER CODE END ExternalFunctions */ 57 | 58 | /* USER CODE BEGIN 0 */ 59 | 60 | /* USER CODE END 0 */ 61 | /** 62 | * Initializes the Global MSP. 63 | */ 64 | void HAL_MspInit(void) 65 | { 66 | /* USER CODE BEGIN MspInit 0 */ 67 | 68 | /* USER CODE END MspInit 0 */ 69 | 70 | __HAL_RCC_SYSCFG_CLK_ENABLE(); 71 | __HAL_RCC_PWR_CLK_ENABLE(); 72 | 73 | /* System interrupt init*/ 74 | 75 | /* USER CODE BEGIN MspInit 1 */ 76 | 77 | /* USER CODE END MspInit 1 */ 78 | } 79 | 80 | /* USER CODE BEGIN 1 */ 81 | 82 | /* USER CODE END 1 */ 83 | 84 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 85 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F407VET6_YAB/Src/usb_device.c: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : usb_device.c 5 | * @version : v1.0_Cube 6 | * @brief : This file implements the USB Device 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2020 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Includes ------------------------------------------------------------------*/ 23 | 24 | #include "usb_device.h" 25 | #include "usbd_core.h" 26 | #include "usbd_desc.h" 27 | #include "usbd_msc.h" 28 | #include "usbd_storage_if.h" 29 | 30 | /* USER CODE BEGIN Includes */ 31 | 32 | /* USER CODE END Includes */ 33 | 34 | /* USER CODE BEGIN PV */ 35 | /* Private variables ---------------------------------------------------------*/ 36 | 37 | /* USER CODE END PV */ 38 | 39 | /* USER CODE BEGIN PFP */ 40 | /* Private function prototypes -----------------------------------------------*/ 41 | 42 | /* USER CODE END PFP */ 43 | 44 | /* USB Device Core handle declaration. */ 45 | USBD_HandleTypeDef hUsbDeviceFS; 46 | 47 | /* 48 | * -- Insert your variables declaration here -- 49 | */ 50 | /* USER CODE BEGIN 0 */ 51 | 52 | /* USER CODE END 0 */ 53 | 54 | /* 55 | * -- Insert your external function declaration here -- 56 | */ 57 | /* USER CODE BEGIN 1 */ 58 | 59 | /* USER CODE END 1 */ 60 | 61 | /** 62 | * Init USB device Library, add supported class and start the library 63 | * @retval None 64 | */ 65 | void MX_USB_DEVICE_Init(void) 66 | { 67 | /* USER CODE BEGIN USB_DEVICE_Init_PreTreatment */ 68 | 69 | /* USER CODE END USB_DEVICE_Init_PreTreatment */ 70 | 71 | /* Init Device Library, add supported class and start the library. */ 72 | if (USBD_Init(&hUsbDeviceFS, &FS_Desc, DEVICE_FS) != USBD_OK) 73 | { 74 | Error_Handler(); 75 | } 76 | if (USBD_RegisterClass(&hUsbDeviceFS, &USBD_MSC) != USBD_OK) 77 | { 78 | Error_Handler(); 79 | } 80 | if (USBD_MSC_RegisterStorage(&hUsbDeviceFS, &USBD_Storage_Interface_fops_FS) != USBD_OK) 81 | { 82 | Error_Handler(); 83 | } 84 | if (USBD_Start(&hUsbDeviceFS) != USBD_OK) 85 | { 86 | Error_Handler(); 87 | } 88 | 89 | /* USER CODE BEGIN USB_DEVICE_Init_PostTreatment */ 90 | 91 | /* USER CODE END USB_DEVICE_Init_PostTreatment */ 92 | } 93 | 94 | /** 95 | * @} 96 | */ 97 | 98 | /** 99 | * @} 100 | */ 101 | 102 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 103 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F723IEK6_YAB/Build/STM32F723IEK6_YAB.axf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/YAB_STM32F103_F407_L433_F723/STM32F723IEK6_YAB/Build/STM32F723IEK6_YAB.axf -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F723IEK6_YAB/Build/STM32F723IEK6_YAB.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x08000000 0x00080000 { ; load region size_region 6 | ER_IROM1 0x08000000 0x00080000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | .ANY (+RO) 10 | .ANY (+XO) 11 | } 12 | RW_IRAM1 0x20000000 0x00040000 { ; RW data 13 | .ANY (+RW +ZI) 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F723IEK6_YAB/Drivers/CMSIS/Device/ST/STM32F7xx/Include/stm32f723xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/YAB_STM32F103_F407_L433_F723/STM32F723IEK6_YAB/Drivers/CMSIS/Device/ST/STM32F7xx/Include/stm32f723xx.h -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F723IEK6_YAB/Drivers/CMSIS/Device/ST/STM32F7xx/Include/stm32f7xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/YAB_STM32F103_F407_L433_F723/STM32F723IEK6_YAB/Drivers/CMSIS/Device/ST/STM32F7xx/Include/stm32f7xx.h -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F723IEK6_YAB/Drivers/CMSIS/Include/cmsis_version.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file cmsis_version.h 3 | * @brief CMSIS Core(M) Version definitions 4 | * @version V5.0.2 5 | * @date 19. April 2017 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2009-2017 ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef __CMSIS_VERSION_H 32 | #define __CMSIS_VERSION_H 33 | 34 | /* CMSIS Version definitions */ 35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ 36 | #define __CM_CMSIS_VERSION_SUB ( 1U) /*!< [15:0] CMSIS Core(M) sub version */ 37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ 38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ 39 | #endif 40 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F723IEK6_YAB/Drivers/CMSIS/Include/tz_context.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * @file tz_context.h 3 | * @brief Context Management for Armv8-M TrustZone 4 | * @version V1.0.1 5 | * @date 10. January 2018 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2017-2018 Arm Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef TZ_CONTEXT_H 32 | #define TZ_CONTEXT_H 33 | 34 | #include 35 | 36 | #ifndef TZ_MODULEID_T 37 | #define TZ_MODULEID_T 38 | /// \details Data type that identifies secure software modules called by a process. 39 | typedef uint32_t TZ_ModuleId_t; 40 | #endif 41 | 42 | /// \details TZ Memory ID identifies an allocated memory slot. 43 | typedef uint32_t TZ_MemoryId_t; 44 | 45 | /// Initialize secure context memory system 46 | /// \return execution status (1: success, 0: error) 47 | uint32_t TZ_InitContextSystem_S (void); 48 | 49 | /// Allocate context memory for calling secure software modules in TrustZone 50 | /// \param[in] module identifies software modules called from non-secure mode 51 | /// \return value != 0 id TrustZone memory slot identifier 52 | /// \return value 0 no memory available or internal error 53 | TZ_MemoryId_t TZ_AllocModuleContext_S (TZ_ModuleId_t module); 54 | 55 | /// Free context memory that was previously allocated with \ref TZ_AllocModuleContext_S 56 | /// \param[in] id TrustZone memory slot identifier 57 | /// \return execution status (1: success, 0: error) 58 | uint32_t TZ_FreeModuleContext_S (TZ_MemoryId_t id); 59 | 60 | /// Load secure context (called on RTOS thread context switch) 61 | /// \param[in] id TrustZone memory slot identifier 62 | /// \return execution status (1: success, 0: error) 63 | uint32_t TZ_LoadContext_S (TZ_MemoryId_t id); 64 | 65 | /// Store secure context (called on RTOS thread context switch) 66 | /// \param[in] id TrustZone memory slot identifier 67 | /// \return execution status (1: success, 0: error) 68 | uint32_t TZ_StoreContext_S (TZ_MemoryId_t id); 69 | 70 | #endif // TZ_CONTEXT_H 71 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F723IEK6_YAB/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_pcd_ex.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f7xx_hal_pcd_ex.h 4 | * @author MCD Application Team 5 | * @brief Header file of PCD HAL Extension module. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2017 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef STM32F7xx_HAL_PCD_EX_H 22 | #define STM32F7xx_HAL_PCD_EX_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32f7xx_hal_def.h" 30 | 31 | #if defined (USB_OTG_FS) || defined (USB_OTG_HS) 32 | /** @addtogroup STM32F7xx_HAL_Driver 33 | * @{ 34 | */ 35 | 36 | /** @addtogroup PCDEx 37 | * @{ 38 | */ 39 | /* Exported types ------------------------------------------------------------*/ 40 | /* Exported constants --------------------------------------------------------*/ 41 | /* Exported macros -----------------------------------------------------------*/ 42 | /* Exported functions --------------------------------------------------------*/ 43 | /** @addtogroup PCDEx_Exported_Functions PCDEx Exported Functions 44 | * @{ 45 | */ 46 | /** @addtogroup PCDEx_Exported_Functions_Group1 Peripheral Control functions 47 | * @{ 48 | */ 49 | 50 | #if defined (USB_OTG_FS) || defined (USB_OTG_HS) 51 | HAL_StatusTypeDef HAL_PCDEx_SetTxFiFo(PCD_HandleTypeDef *hpcd, uint8_t fifo, uint16_t size); 52 | HAL_StatusTypeDef HAL_PCDEx_SetRxFiFo(PCD_HandleTypeDef *hpcd, uint16_t size); 53 | #endif /* defined (USB_OTG_FS) || defined (USB_OTG_HS) */ 54 | 55 | 56 | HAL_StatusTypeDef HAL_PCDEx_ActivateLPM(PCD_HandleTypeDef *hpcd); 57 | HAL_StatusTypeDef HAL_PCDEx_DeActivateLPM(PCD_HandleTypeDef *hpcd); 58 | 59 | void HAL_PCDEx_LPM_Callback(PCD_HandleTypeDef *hpcd, PCD_LPM_MsgTypeDef msg); 60 | void HAL_PCDEx_BCD_Callback(PCD_HandleTypeDef *hpcd, PCD_BCD_MsgTypeDef msg); 61 | 62 | /** 63 | * @} 64 | */ 65 | 66 | /** 67 | * @} 68 | */ 69 | 70 | /** 71 | * @} 72 | */ 73 | 74 | /** 75 | * @} 76 | */ 77 | #endif /* defined (USB_OTG_FS) || defined (USB_OTG_HS) */ 78 | 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | 83 | 84 | #endif /* STM32F7xx_HAL_PCD_EX_H */ 85 | 86 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 87 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F723IEK6_YAB/Inc/YAB_F723_config.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************* 2 | # Released under MIT License 3 | 4 | Copyright (c) 2020 SF Yip (yipxxx@gmail.com) 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 9 | 10 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 11 | 12 | note: This Source Code modified by RadioOperator 2020-12-06. 13 | **************************************************************************************/ 14 | 15 | #ifndef _YAB_F723_CONFIG_H_ 16 | #define _YAB_F723_CONFIG_H_ 17 | 18 | // STM32F723IEK6 - 512KB Flash Size 19 | #define FLASH_START_ADDR 0x08000000 //STM32 20 | #define FLASH_SIZE (512*1024) //512KB for STM32F723IEK6 21 | #define FLASH_ERASE_SECTOR FLASH_SECTOR_1 //App start from Sector_1 22 | #define FLASH_ERASE_NBSECTORS 7 //App in 7 sectors, total from 1 to 7 23 | 24 | #define BOOTLOADER_SIZE 0x4000 //16KB max, bootloader size, Sector_0 25 | 26 | #define APP_ADDR (FLASH_START_ADDR + BOOTLOADER_SIZE) //App start address 27 | #define APP_SIZE (FLASH_SIZE - BOOTLOADER_SIZE) 28 | #define APP_DRIVE_NAME "YAB Disk " //11 chars 29 | #define APP_FILE_NAME "F723_APPBIN" //11 chars, 8+3 name format, = f723_app.bin 30 | #define APP_READBACK_ENABLE 1 //0-firmware can not read back, 1-can 31 | 32 | //YAB mode entry control, button or pin to GNG, PA7 33 | //LED on STLINK_V3MINI board, PA10 34 | //If GPIOs here modified, take care the "MX_GPIO_Init" function coordinately. 35 | #define BTN_GPIO_PORT GPIOA 36 | #define BTN_GPIO_PIN GPIO_PIN_7 37 | 38 | #define LED_ENABLE 1 //1-LED function enabled, 0-disable 39 | #define LED_GPIO_PORT GPIOA 40 | #define LED_GPIO_PIN GPIO_PIN_10 41 | #define LED_ON HAL_GPIO_WritePin(LED_GPIO_PORT, LED_GPIO_PIN, GPIO_PIN_RESET) 42 | #define LED_OFF HAL_GPIO_WritePin(LED_GPIO_PORT, LED_GPIO_PIN, GPIO_PIN_SET) 43 | 44 | #define LED_SLOW_BLINK 250 //250ms ON, 750ms OFF 45 | #define LED_OFF_NOBLINK 0 //always OFF 46 | #define LED_ON_NOBLINK 255 //always ON 47 | 48 | #if LED_ENABLE 49 | extern volatile uint8_t LED_On_Time; 50 | #endif //#if LED_ENABLE 51 | 52 | #endif //_YAB_F723_CONFIG_H_ 53 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F723IEK6_YAB/Inc/YAB_fat32.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************* 2 | # Released under MIT License 3 | 4 | Copyright (c) 2020 SF Yip (yipxxx@gmail.com) 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 9 | 10 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 11 | 12 | note: This Source Code modified by RadioOperator 2020-12-06. 13 | **************************************************************************************/ 14 | 15 | #ifndef _YAB_FAT32_H_ 16 | #define _YAB_FAT32_H_ 17 | 18 | #include 19 | #include 20 | 21 | bool fat32_read(uint8_t *b, uint32_t addr); 22 | bool fat32_write(const uint8_t *b, uint32_t addr); 23 | 24 | #endif //_YAB_FAT32_H_ 25 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F723IEK6_YAB/Inc/main.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : main.h 5 | * @brief : Header for main.c file. 6 | * This file contains the common defines of the application. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2020 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Define to prevent recursive inclusion -------------------------------------*/ 23 | #ifndef __MAIN_H 24 | #define __MAIN_H 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /* Includes ------------------------------------------------------------------*/ 31 | #include "stm32f7xx_hal.h" 32 | 33 | /* Private includes ----------------------------------------------------------*/ 34 | /* USER CODE BEGIN Includes */ 35 | 36 | /* USER CODE END Includes */ 37 | 38 | /* Exported types ------------------------------------------------------------*/ 39 | /* USER CODE BEGIN ET */ 40 | 41 | /* USER CODE END ET */ 42 | 43 | /* Exported constants --------------------------------------------------------*/ 44 | /* USER CODE BEGIN EC */ 45 | 46 | /* USER CODE END EC */ 47 | 48 | /* Exported macro ------------------------------------------------------------*/ 49 | /* USER CODE BEGIN EM */ 50 | 51 | /* USER CODE END EM */ 52 | 53 | /* Exported functions prototypes ---------------------------------------------*/ 54 | void Error_Handler(void); 55 | 56 | /* USER CODE BEGIN EFP */ 57 | 58 | /* USER CODE END EFP */ 59 | 60 | /* Private defines -----------------------------------------------------------*/ 61 | /* USER CODE BEGIN Private defines */ 62 | 63 | /* USER CODE END Private defines */ 64 | 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | 69 | #endif /* __MAIN_H */ 70 | 71 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 72 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F723IEK6_YAB/Inc/stm32f7xx_it.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file stm32f7xx_it.h 5 | * @brief This file contains the headers of the interrupt handlers. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2020 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* USER CODE END Header */ 20 | 21 | /* Define to prevent recursive inclusion -------------------------------------*/ 22 | #ifndef __STM32F7xx_IT_H 23 | #define __STM32F7xx_IT_H 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | /* Private includes ----------------------------------------------------------*/ 30 | /* USER CODE BEGIN Includes */ 31 | 32 | /* USER CODE END Includes */ 33 | 34 | /* Exported types ------------------------------------------------------------*/ 35 | /* USER CODE BEGIN ET */ 36 | 37 | /* USER CODE END ET */ 38 | 39 | /* Exported constants --------------------------------------------------------*/ 40 | /* USER CODE BEGIN EC */ 41 | 42 | /* USER CODE END EC */ 43 | 44 | /* Exported macro ------------------------------------------------------------*/ 45 | /* USER CODE BEGIN EM */ 46 | 47 | /* USER CODE END EM */ 48 | 49 | /* Exported functions prototypes ---------------------------------------------*/ 50 | void NMI_Handler(void); 51 | void HardFault_Handler(void); 52 | void MemManage_Handler(void); 53 | void BusFault_Handler(void); 54 | void UsageFault_Handler(void); 55 | void SVC_Handler(void); 56 | void DebugMon_Handler(void); 57 | void PendSV_Handler(void); 58 | void SysTick_Handler(void); 59 | void OTG_HS_IRQHandler(void); 60 | /* USER CODE BEGIN EFP */ 61 | 62 | /* USER CODE END EFP */ 63 | 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | 68 | #endif /* __STM32F7xx_IT_H */ 69 | 70 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 71 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F723IEK6_YAB/Inc/usb_device.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : usb_device.h 5 | * @version : v1.0_Cube 6 | * @brief : Header for usb_device.c file. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2020 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Define to prevent recursive inclusion -------------------------------------*/ 23 | #ifndef __USB_DEVICE__H__ 24 | #define __USB_DEVICE__H__ 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /* Includes ------------------------------------------------------------------*/ 31 | #include "stm32f7xx.h" 32 | #include "stm32f7xx_hal.h" 33 | #include "usbd_def.h" 34 | 35 | /* USER CODE BEGIN INCLUDE */ 36 | 37 | /* USER CODE END INCLUDE */ 38 | 39 | /** @addtogroup USBD_OTG_DRIVER 40 | * @{ 41 | */ 42 | 43 | /** @defgroup USBD_DEVICE USBD_DEVICE 44 | * @brief Device file for Usb otg low level driver. 45 | * @{ 46 | */ 47 | 48 | /** @defgroup USBD_DEVICE_Exported_Variables USBD_DEVICE_Exported_Variables 49 | * @brief Public variables. 50 | * @{ 51 | */ 52 | 53 | /* Private variables ---------------------------------------------------------*/ 54 | /* USER CODE BEGIN PV */ 55 | 56 | /* USER CODE END PV */ 57 | 58 | /* Private function prototypes -----------------------------------------------*/ 59 | /* USER CODE BEGIN PFP */ 60 | 61 | /* USER CODE END PFP */ 62 | 63 | /* 64 | * -- Insert your variables declaration here -- 65 | */ 66 | /* USER CODE BEGIN VARIABLES */ 67 | 68 | /* USER CODE END VARIABLES */ 69 | /** 70 | * @} 71 | */ 72 | 73 | /** @defgroup USBD_DEVICE_Exported_FunctionsPrototype USBD_DEVICE_Exported_FunctionsPrototype 74 | * @brief Declaration of public functions for Usb device. 75 | * @{ 76 | */ 77 | 78 | /** USB Device initialization function. */ 79 | void MX_USB_DEVICE_Init(void); 80 | 81 | /* 82 | * -- Insert functions declaration here -- 83 | */ 84 | /* USER CODE BEGIN FD */ 85 | 86 | /* USER CODE END FD */ 87 | /** 88 | * @} 89 | */ 90 | 91 | /** 92 | * @} 93 | */ 94 | 95 | /** 96 | * @} 97 | */ 98 | 99 | #ifdef __cplusplus 100 | } 101 | #endif 102 | 103 | #endif /* __USB_DEVICE__H__ */ 104 | 105 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 106 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F723IEK6_YAB/MDK-ARM/RTE/_STM32F723IEK6_YAB/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'STM32F723IEK6_YAB' 7 | * Target: 'STM32F723IEK6_YAB' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "stm32f7xx.h" 18 | 19 | 20 | 21 | #endif /* RTE_COMPONENTS_H */ 22 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F723IEK6_YAB/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_data.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usbd_msc_data.h 4 | * @author MCD Application Team 5 | * @brief Header for the usbd_msc_data.c file 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2015 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __USBD_MSC_DATA_H 22 | #define __USBD_MSC_DATA_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "usbd_conf.h" 30 | 31 | /** @addtogroup STM32_USB_DEVICE_LIBRARY 32 | * @{ 33 | */ 34 | 35 | /** @defgroup USB_INFO 36 | * @brief general defines for the usb device library file 37 | * @{ 38 | */ 39 | 40 | /** @defgroup USB_INFO_Exported_Defines 41 | * @{ 42 | */ 43 | #define MODE_SENSE6_LEN 0x17U 44 | #define MODE_SENSE10_LEN 0x1BU 45 | #define LENGTH_INQUIRY_PAGE00 0x06U 46 | #define LENGTH_INQUIRY_PAGE80 0x08U 47 | #define LENGTH_FORMAT_CAPACITIES 0x14U 48 | 49 | /** 50 | * @} 51 | */ 52 | 53 | 54 | /** @defgroup USBD_INFO_Exported_TypesDefinitions 55 | * @{ 56 | */ 57 | /** 58 | * @} 59 | */ 60 | 61 | 62 | 63 | /** @defgroup USBD_INFO_Exported_Macros 64 | * @{ 65 | */ 66 | 67 | /** 68 | * @} 69 | */ 70 | 71 | /** @defgroup USBD_INFO_Exported_Variables 72 | * @{ 73 | */ 74 | extern uint8_t MSC_Page00_Inquiry_Data[LENGTH_INQUIRY_PAGE00]; 75 | extern uint8_t MSC_Page80_Inquiry_Data[LENGTH_INQUIRY_PAGE80]; 76 | extern uint8_t MSC_Mode_Sense6_data[MODE_SENSE6_LEN]; 77 | extern uint8_t MSC_Mode_Sense10_data[MODE_SENSE10_LEN]; 78 | 79 | /** 80 | * @} 81 | */ 82 | 83 | /** @defgroup USBD_INFO_Exported_FunctionsPrototype 84 | * @{ 85 | */ 86 | 87 | /** 88 | * @} 89 | */ 90 | 91 | #ifdef __cplusplus 92 | } 93 | #endif 94 | 95 | #endif /* __USBD_MSC_DATA_H */ 96 | 97 | /** 98 | * @} 99 | */ 100 | 101 | /** 102 | * @} 103 | */ 104 | 105 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 106 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F723IEK6_YAB/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usbd_req.h 4 | * @author MCD Application Team 5 | * @brief Header file for the usbd_req.c file 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2015 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __USB_REQUEST_H 22 | #define __USB_REQUEST_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "usbd_def.h" 30 | 31 | 32 | /** @addtogroup STM32_USB_DEVICE_LIBRARY 33 | * @{ 34 | */ 35 | 36 | /** @defgroup USBD_REQ 37 | * @brief header file for the usbd_req.c file 38 | * @{ 39 | */ 40 | 41 | /** @defgroup USBD_REQ_Exported_Defines 42 | * @{ 43 | */ 44 | /** 45 | * @} 46 | */ 47 | 48 | 49 | /** @defgroup USBD_REQ_Exported_Types 50 | * @{ 51 | */ 52 | /** 53 | * @} 54 | */ 55 | 56 | 57 | 58 | /** @defgroup USBD_REQ_Exported_Macros 59 | * @{ 60 | */ 61 | /** 62 | * @} 63 | */ 64 | 65 | /** @defgroup USBD_REQ_Exported_Variables 66 | * @{ 67 | */ 68 | /** 69 | * @} 70 | */ 71 | 72 | /** @defgroup USBD_REQ_Exported_FunctionsPrototype 73 | * @{ 74 | */ 75 | 76 | USBD_StatusTypeDef USBD_StdDevReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); 77 | USBD_StatusTypeDef USBD_StdItfReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); 78 | USBD_StatusTypeDef USBD_StdEPReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); 79 | 80 | void USBD_CtlError(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); 81 | void USBD_ParseSetupRequest(USBD_SetupReqTypedef *req, uint8_t *pdata); 82 | void USBD_GetString(uint8_t *desc, uint8_t *unicode, uint16_t *len); 83 | 84 | /** 85 | * @} 86 | */ 87 | 88 | #ifdef __cplusplus 89 | } 90 | #endif 91 | 92 | #endif /* __USB_REQUEST_H */ 93 | 94 | /** 95 | * @} 96 | */ 97 | 98 | /** 99 | * @} 100 | */ 101 | 102 | 103 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 104 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F723IEK6_YAB/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usbd_ioreq.h 4 | * @author MCD Application Team 5 | * @brief Header file for the usbd_ioreq.c file 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2015 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __USBD_IOREQ_H 22 | #define __USBD_IOREQ_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "usbd_def.h" 30 | #include "usbd_core.h" 31 | 32 | /** @addtogroup STM32_USB_DEVICE_LIBRARY 33 | * @{ 34 | */ 35 | 36 | /** @defgroup USBD_IOREQ 37 | * @brief header file for the usbd_ioreq.c file 38 | * @{ 39 | */ 40 | 41 | /** @defgroup USBD_IOREQ_Exported_Defines 42 | * @{ 43 | */ 44 | /** 45 | * @} 46 | */ 47 | 48 | 49 | /** @defgroup USBD_IOREQ_Exported_Types 50 | * @{ 51 | */ 52 | 53 | 54 | /** 55 | * @} 56 | */ 57 | 58 | 59 | 60 | /** @defgroup USBD_IOREQ_Exported_Macros 61 | * @{ 62 | */ 63 | 64 | /** 65 | * @} 66 | */ 67 | 68 | /** @defgroup USBD_IOREQ_Exported_Variables 69 | * @{ 70 | */ 71 | 72 | /** 73 | * @} 74 | */ 75 | 76 | /** @defgroup USBD_IOREQ_Exported_FunctionsPrototype 77 | * @{ 78 | */ 79 | 80 | USBD_StatusTypeDef USBD_CtlSendData(USBD_HandleTypeDef *pdev, 81 | uint8_t *pbuf, uint32_t len); 82 | 83 | USBD_StatusTypeDef USBD_CtlContinueSendData(USBD_HandleTypeDef *pdev, 84 | uint8_t *pbuf, uint32_t len); 85 | 86 | USBD_StatusTypeDef USBD_CtlPrepareRx(USBD_HandleTypeDef *pdev, 87 | uint8_t *pbuf, uint32_t len); 88 | 89 | USBD_StatusTypeDef USBD_CtlContinueRx(USBD_HandleTypeDef *pdev, 90 | uint8_t *pbuf, uint32_t len); 91 | 92 | USBD_StatusTypeDef USBD_CtlSendStatus(USBD_HandleTypeDef *pdev); 93 | USBD_StatusTypeDef USBD_CtlReceiveStatus(USBD_HandleTypeDef *pdev); 94 | 95 | uint32_t USBD_GetRxCount(USBD_HandleTypeDef *pdev, uint8_t ep_addr); 96 | 97 | /** 98 | * @} 99 | */ 100 | 101 | #ifdef __cplusplus 102 | } 103 | #endif 104 | 105 | #endif /* __USBD_IOREQ_H */ 106 | 107 | /** 108 | * @} 109 | */ 110 | 111 | /** 112 | * @} 113 | */ 114 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 115 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F723IEK6_YAB/Src/stm32f7xx_hal_msp.c: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * File Name : stm32f7xx_hal_msp.c 5 | * Description : This file provides code for the MSP Initialization 6 | * and de-Initialization codes. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2020 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Includes ------------------------------------------------------------------*/ 23 | #include "main.h" 24 | /* USER CODE BEGIN Includes */ 25 | 26 | /* USER CODE END Includes */ 27 | 28 | /* Private typedef -----------------------------------------------------------*/ 29 | /* USER CODE BEGIN TD */ 30 | 31 | /* USER CODE END TD */ 32 | 33 | /* Private define ------------------------------------------------------------*/ 34 | /* USER CODE BEGIN Define */ 35 | 36 | /* USER CODE END Define */ 37 | 38 | /* Private macro -------------------------------------------------------------*/ 39 | /* USER CODE BEGIN Macro */ 40 | 41 | /* USER CODE END Macro */ 42 | 43 | /* Private variables ---------------------------------------------------------*/ 44 | /* USER CODE BEGIN PV */ 45 | 46 | /* USER CODE END PV */ 47 | 48 | /* Private function prototypes -----------------------------------------------*/ 49 | /* USER CODE BEGIN PFP */ 50 | 51 | /* USER CODE END PFP */ 52 | 53 | /* External functions --------------------------------------------------------*/ 54 | /* USER CODE BEGIN ExternalFunctions */ 55 | 56 | /* USER CODE END ExternalFunctions */ 57 | 58 | /* USER CODE BEGIN 0 */ 59 | 60 | /* USER CODE END 0 */ 61 | /** 62 | * Initializes the Global MSP. 63 | */ 64 | void HAL_MspInit(void) 65 | { 66 | /* USER CODE BEGIN MspInit 0 */ 67 | 68 | /* USER CODE END MspInit 0 */ 69 | 70 | __HAL_RCC_PWR_CLK_ENABLE(); 71 | __HAL_RCC_SYSCFG_CLK_ENABLE(); 72 | 73 | /* System interrupt init*/ 74 | 75 | /* USER CODE BEGIN MspInit 1 */ 76 | 77 | /* USER CODE END MspInit 1 */ 78 | } 79 | 80 | /* USER CODE BEGIN 1 */ 81 | 82 | /* USER CODE END 1 */ 83 | 84 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 85 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32F723IEK6_YAB/Src/usb_device.c: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : usb_device.c 5 | * @version : v1.0_Cube 6 | * @brief : This file implements the USB Device 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2020 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Includes ------------------------------------------------------------------*/ 23 | 24 | #include "usb_device.h" 25 | #include "usbd_core.h" 26 | #include "usbd_desc.h" 27 | #include "usbd_msc.h" 28 | #include "usbd_storage_if.h" 29 | 30 | /* USER CODE BEGIN Includes */ 31 | 32 | /* USER CODE END Includes */ 33 | 34 | /* USER CODE BEGIN PV */ 35 | /* Private variables ---------------------------------------------------------*/ 36 | 37 | /* USER CODE END PV */ 38 | 39 | /* USER CODE BEGIN PFP */ 40 | /* Private function prototypes -----------------------------------------------*/ 41 | 42 | /* USER CODE END PFP */ 43 | 44 | /* USB Device Core handle declaration. */ 45 | USBD_HandleTypeDef hUsbDeviceHS; 46 | 47 | /* 48 | * -- Insert your variables declaration here -- 49 | */ 50 | /* USER CODE BEGIN 0 */ 51 | 52 | /* USER CODE END 0 */ 53 | 54 | /* 55 | * -- Insert your external function declaration here -- 56 | */ 57 | /* USER CODE BEGIN 1 */ 58 | 59 | /* USER CODE END 1 */ 60 | 61 | /** 62 | * Init USB device Library, add supported class and start the library 63 | * @retval None 64 | */ 65 | void MX_USB_DEVICE_Init(void) 66 | { 67 | /* USER CODE BEGIN USB_DEVICE_Init_PreTreatment */ 68 | 69 | /* USER CODE END USB_DEVICE_Init_PreTreatment */ 70 | 71 | /* Init Device Library, add supported class and start the library. */ 72 | if (USBD_Init(&hUsbDeviceHS, &HS_Desc, DEVICE_HS) != USBD_OK) 73 | { 74 | Error_Handler(); 75 | } 76 | if (USBD_RegisterClass(&hUsbDeviceHS, &USBD_MSC) != USBD_OK) 77 | { 78 | Error_Handler(); 79 | } 80 | if (USBD_MSC_RegisterStorage(&hUsbDeviceHS, &USBD_Storage_Interface_fops_HS) != USBD_OK) 81 | { 82 | Error_Handler(); 83 | } 84 | if (USBD_Start(&hUsbDeviceHS) != USBD_OK) 85 | { 86 | Error_Handler(); 87 | } 88 | 89 | /* USER CODE BEGIN USB_DEVICE_Init_PostTreatment */ 90 | 91 | /* USER CODE END USB_DEVICE_Init_PostTreatment */ 92 | } 93 | 94 | /** 95 | * @} 96 | */ 97 | 98 | /** 99 | * @} 100 | */ 101 | 102 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 103 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l433xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l433xx.h -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l4xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l4xx.h -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/Drivers/CMSIS/Device/ST/STM32L4xx/Include/system_stm32l4xx.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file system_stm32l4xx.h 4 | * @author MCD Application Team 5 | * @brief CMSIS Cortex-M4 Device System Source File for STM32L4xx devices. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2017 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Apache License, Version 2.0, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/Apache-2.0 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /** @addtogroup CMSIS 21 | * @{ 22 | */ 23 | 24 | /** @addtogroup stm32l4xx_system 25 | * @{ 26 | */ 27 | 28 | /** 29 | * @brief Define to prevent recursive inclusion 30 | */ 31 | #ifndef __SYSTEM_STM32L4XX_H 32 | #define __SYSTEM_STM32L4XX_H 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | /** @addtogroup STM32L4xx_System_Includes 39 | * @{ 40 | */ 41 | 42 | /** 43 | * @} 44 | */ 45 | 46 | 47 | /** @addtogroup STM32L4xx_System_Exported_Variables 48 | * @{ 49 | */ 50 | /* The SystemCoreClock variable is updated in three ways: 51 | 1) by calling CMSIS function SystemCoreClockUpdate() 52 | 2) by calling HAL API function HAL_RCC_GetSysClockFreq() 53 | 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency 54 | Note: If you use this function to configure the system clock; then there 55 | is no need to call the 2 first functions listed above, since SystemCoreClock 56 | variable is updated automatically. 57 | */ 58 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 59 | 60 | extern const uint8_t AHBPrescTable[16]; /*!< AHB prescalers table values */ 61 | extern const uint8_t APBPrescTable[8]; /*!< APB prescalers table values */ 62 | extern const uint32_t MSIRangeTable[12]; /*!< MSI ranges table values */ 63 | 64 | /** 65 | * @} 66 | */ 67 | 68 | /** @addtogroup STM32L4xx_System_Exported_Constants 69 | * @{ 70 | */ 71 | 72 | /** 73 | * @} 74 | */ 75 | 76 | /** @addtogroup STM32L4xx_System_Exported_Macros 77 | * @{ 78 | */ 79 | 80 | /** 81 | * @} 82 | */ 83 | 84 | /** @addtogroup STM32L4xx_System_Exported_Functions 85 | * @{ 86 | */ 87 | 88 | extern void SystemInit(void); 89 | extern void SystemCoreClockUpdate(void); 90 | /** 91 | * @} 92 | */ 93 | 94 | #ifdef __cplusplus 95 | } 96 | #endif 97 | 98 | #endif /*__SYSTEM_STM32L4XX_H */ 99 | 100 | /** 101 | * @} 102 | */ 103 | 104 | /** 105 | * @} 106 | */ 107 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 108 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/Drivers/CMSIS/Include/cmsis_version.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file cmsis_version.h 3 | * @brief CMSIS Core(M) Version definitions 4 | * @version V5.0.3 5 | * @date 24. June 2019 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2009-2019 ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef __CMSIS_VERSION_H 32 | #define __CMSIS_VERSION_H 33 | 34 | /* CMSIS Version definitions */ 35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ 36 | #define __CM_CMSIS_VERSION_SUB ( 3U) /*!< [15:0] CMSIS Core(M) sub version */ 37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ 38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ 39 | #endif 40 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/Drivers/CMSIS/Include/tz_context.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * @file tz_context.h 3 | * @brief Context Management for Armv8-M TrustZone 4 | * @version V1.0.1 5 | * @date 10. January 2018 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2017-2018 Arm Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef TZ_CONTEXT_H 32 | #define TZ_CONTEXT_H 33 | 34 | #include 35 | 36 | #ifndef TZ_MODULEID_T 37 | #define TZ_MODULEID_T 38 | /// \details Data type that identifies secure software modules called by a process. 39 | typedef uint32_t TZ_ModuleId_t; 40 | #endif 41 | 42 | /// \details TZ Memory ID identifies an allocated memory slot. 43 | typedef uint32_t TZ_MemoryId_t; 44 | 45 | /// Initialize secure context memory system 46 | /// \return execution status (1: success, 0: error) 47 | uint32_t TZ_InitContextSystem_S (void); 48 | 49 | /// Allocate context memory for calling secure software modules in TrustZone 50 | /// \param[in] module identifies software modules called from non-secure mode 51 | /// \return value != 0 id TrustZone memory slot identifier 52 | /// \return value 0 no memory available or internal error 53 | TZ_MemoryId_t TZ_AllocModuleContext_S (TZ_ModuleId_t module); 54 | 55 | /// Free context memory that was previously allocated with \ref TZ_AllocModuleContext_S 56 | /// \param[in] id TrustZone memory slot identifier 57 | /// \return execution status (1: success, 0: error) 58 | uint32_t TZ_FreeModuleContext_S (TZ_MemoryId_t id); 59 | 60 | /// Load secure context (called on RTOS thread context switch) 61 | /// \param[in] id TrustZone memory slot identifier 62 | /// \return execution status (1: success, 0: error) 63 | uint32_t TZ_LoadContext_S (TZ_MemoryId_t id); 64 | 65 | /// Store secure context (called on RTOS thread context switch) 66 | /// \param[in] id TrustZone memory slot identifier 67 | /// \return execution status (1: success, 0: error) 68 | uint32_t TZ_StoreContext_S (TZ_MemoryId_t id); 69 | 70 | #endif // TZ_CONTEXT_H 71 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_flash_ramfunc.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32l4xx_hal_flash_ramfunc.h 4 | * @author MCD Application Team 5 | * @brief Header file of FLASH RAMFUNC driver. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2017 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef STM32L4xx_FLASH_RAMFUNC_H 22 | #define STM32L4xx_FLASH_RAMFUNC_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32l4xx_hal_def.h" 30 | 31 | /** @addtogroup STM32L4xx_HAL_Driver 32 | * @{ 33 | */ 34 | 35 | /** @addtogroup FLASH_RAMFUNC 36 | * @{ 37 | */ 38 | 39 | /* Exported types ------------------------------------------------------------*/ 40 | /* Exported macro ------------------------------------------------------------*/ 41 | /* Exported functions --------------------------------------------------------*/ 42 | /** @addtogroup FLASH_RAMFUNC_Exported_Functions 43 | * @{ 44 | */ 45 | 46 | /** @addtogroup FLASH_RAMFUNC_Exported_Functions_Group1 47 | * @{ 48 | */ 49 | /* Peripheral Control functions ************************************************/ 50 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_EnableRunPowerDown(void); 51 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_DisableRunPowerDown(void); 52 | #if defined (STM32L4P5xx) || defined (STM32L4Q5xx) || defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx) 53 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_OB_DBankConfig(uint32_t DBankConfig); 54 | #endif 55 | /** 56 | * @} 57 | */ 58 | 59 | /** 60 | * @} 61 | */ 62 | 63 | /** 64 | * @} 65 | */ 66 | 67 | /** 68 | * @} 69 | */ 70 | 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | 75 | #endif /* STM32L4xx_FLASH_RAMFUNC_H */ 76 | 77 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 78 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/Inc/YAB_L433_config.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************* 2 | # Released under MIT License 3 | 4 | Copyright (c) 2020 SF Yip (yipxxx@gmail.com) 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 9 | 10 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 11 | 12 | note: This Source Code modified by RadioOperator 2020-12-06. 13 | **************************************************************************************/ 14 | 15 | #ifndef _YAB_L433_CONFIG_H_ 16 | #define _YAB_L433_CONFIG_H_ 17 | 18 | // STM32L433CCT6 - 256KB Flash Size 19 | #define FLASH_START_ADDR 0x08000000 //STM32 20 | #define FLASH_SIZE_ALL (256*1024) //256KB for STM32L433CCT6 21 | #define FLASH_ERASE_PAGE_SIZE 2048 //2KB Flash page size for STM32L433CCT6 22 | #define FLASH_ERASE_1ST_PAGE 8 //APP start from page-8 23 | 24 | #define BOOTLOADER_SIZE 0x4000 //16KB max, bootloader size, Sector_0 25 | 26 | #define APP_ADDR (FLASH_START_ADDR + BOOTLOADER_SIZE) 27 | #define APP_SIZE (FLASH_SIZE_ALL - BOOTLOADER_SIZE) 28 | #define APP_DRIVE_NAME "YAB Disk " //11 chars 29 | #define APP_FILE_NAME "L433_APPBIN" //11 chars, 8+3 name format, = l433_app.bin 30 | 31 | #define APP_READBACK_ENABLE 1 //0-firmware can not read back, 1-can 32 | 33 | //YAB mode entry control, button or pin to GNG, PA0 34 | //LED on an Eva board, PA1 35 | //If GPIOs here modified, take care the "MX_GPIO_Init" function coordinately. 36 | #define BTN_GPIO_PORT GPIOA 37 | #define BTN_GPIO_PIN GPIO_PIN_0 38 | 39 | #define LED_ENABLE 1 //1-LED function enabled, 0-disable 40 | #define LED_GPIO_PORT GPIOA 41 | #define LED_GPIO_PIN GPIO_PIN_1 42 | #define LED_ON HAL_GPIO_WritePin(LED_GPIO_PORT, LED_GPIO_PIN, GPIO_PIN_RESET) 43 | #define LED_OFF HAL_GPIO_WritePin(LED_GPIO_PORT, LED_GPIO_PIN, GPIO_PIN_SET) 44 | 45 | #define LED_SLOW_BLINK 250 //250ms ON, 750ms OFF 46 | #define LED_OFF_NOBLINK 0 //always OFF 47 | #define LED_ON_NOBLINK 255 //always ON 48 | 49 | #if LED_ENABLE 50 | extern volatile uint8_t LED_On_Time; 51 | #endif //#if LED_ENABLE 52 | 53 | #endif //_YAB_L433_CONFIG_H_ 54 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/Inc/YAB_fat32.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************* 2 | # Released under MIT License 3 | 4 | Copyright (c) 2020 SF Yip (yipxxx@gmail.com) 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 9 | 10 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 11 | 12 | note: This Source Code modified by RadioOperator 2020-12-06. 13 | **************************************************************************************/ 14 | 15 | #ifndef _YAB_FAT32_H_ 16 | #define _YAB_FAT32_H_ 17 | 18 | #include 19 | #include 20 | 21 | bool fat32_read(uint8_t *b, uint32_t addr); 22 | bool fat32_write(const uint8_t *b, uint32_t addr); 23 | 24 | #endif //_YAB_FAT32_H_ 25 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/Inc/main.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : main.h 5 | * @brief : Header for main.c file. 6 | * This file contains the common defines of the application. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2020 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Define to prevent recursive inclusion -------------------------------------*/ 23 | #ifndef __MAIN_H 24 | #define __MAIN_H 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /* Includes ------------------------------------------------------------------*/ 31 | #include "stm32l4xx_hal.h" 32 | 33 | /* Private includes ----------------------------------------------------------*/ 34 | /* USER CODE BEGIN Includes */ 35 | 36 | /* USER CODE END Includes */ 37 | 38 | /* Exported types ------------------------------------------------------------*/ 39 | /* USER CODE BEGIN ET */ 40 | 41 | /* USER CODE END ET */ 42 | 43 | /* Exported constants --------------------------------------------------------*/ 44 | /* USER CODE BEGIN EC */ 45 | 46 | /* USER CODE END EC */ 47 | 48 | /* Exported macro ------------------------------------------------------------*/ 49 | /* USER CODE BEGIN EM */ 50 | 51 | /* USER CODE END EM */ 52 | 53 | /* Exported functions prototypes ---------------------------------------------*/ 54 | void Error_Handler(void); 55 | 56 | /* USER CODE BEGIN EFP */ 57 | 58 | /* USER CODE END EFP */ 59 | 60 | /* Private defines -----------------------------------------------------------*/ 61 | /* USER CODE BEGIN Private defines */ 62 | 63 | /* USER CODE END Private defines */ 64 | 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | 69 | #endif /* __MAIN_H */ 70 | 71 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 72 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/Inc/stm32l4xx_it.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file stm32l4xx_it.h 5 | * @brief This file contains the headers of the interrupt handlers. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2020 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* USER CODE END Header */ 20 | 21 | /* Define to prevent recursive inclusion -------------------------------------*/ 22 | #ifndef __STM32L4xx_IT_H 23 | #define __STM32L4xx_IT_H 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | /* Private includes ----------------------------------------------------------*/ 30 | /* USER CODE BEGIN Includes */ 31 | 32 | /* USER CODE END Includes */ 33 | 34 | /* Exported types ------------------------------------------------------------*/ 35 | /* USER CODE BEGIN ET */ 36 | 37 | /* USER CODE END ET */ 38 | 39 | /* Exported constants --------------------------------------------------------*/ 40 | /* USER CODE BEGIN EC */ 41 | 42 | /* USER CODE END EC */ 43 | 44 | /* Exported macro ------------------------------------------------------------*/ 45 | /* USER CODE BEGIN EM */ 46 | 47 | /* USER CODE END EM */ 48 | 49 | /* Exported functions prototypes ---------------------------------------------*/ 50 | void NMI_Handler(void); 51 | void HardFault_Handler(void); 52 | void MemManage_Handler(void); 53 | void BusFault_Handler(void); 54 | void UsageFault_Handler(void); 55 | void SVC_Handler(void); 56 | void DebugMon_Handler(void); 57 | void PendSV_Handler(void); 58 | void SysTick_Handler(void); 59 | void USB_IRQHandler(void); 60 | /* USER CODE BEGIN EFP */ 61 | 62 | /* USER CODE END EFP */ 63 | 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | 68 | #endif /* __STM32L4xx_IT_H */ 69 | 70 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 71 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/Inc/usb_device.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : usb_device.h 5 | * @version : v2.0_Cube 6 | * @brief : Header for usb_device.c file. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2020 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Define to prevent recursive inclusion -------------------------------------*/ 23 | #ifndef __USB_DEVICE__H__ 24 | #define __USB_DEVICE__H__ 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /* Includes ------------------------------------------------------------------*/ 31 | #include "stm32l4xx.h" 32 | #include "stm32l4xx_hal.h" 33 | #include "usbd_def.h" 34 | 35 | /* USER CODE BEGIN INCLUDE */ 36 | 37 | /* USER CODE END INCLUDE */ 38 | 39 | /** @addtogroup USBD_OTG_DRIVER 40 | * @{ 41 | */ 42 | 43 | /** @defgroup USBD_DEVICE USBD_DEVICE 44 | * @brief Device file for Usb otg low level driver. 45 | * @{ 46 | */ 47 | 48 | /** @defgroup USBD_DEVICE_Exported_Variables USBD_DEVICE_Exported_Variables 49 | * @brief Public variables. 50 | * @{ 51 | */ 52 | 53 | /* Private variables ---------------------------------------------------------*/ 54 | /* USER CODE BEGIN PV */ 55 | 56 | /* USER CODE END PV */ 57 | 58 | /* Private function prototypes -----------------------------------------------*/ 59 | /* USER CODE BEGIN PFP */ 60 | 61 | /* USER CODE END PFP */ 62 | 63 | /* 64 | * -- Insert your variables declaration here -- 65 | */ 66 | /* USER CODE BEGIN VARIABLES */ 67 | 68 | /* USER CODE END VARIABLES */ 69 | /** 70 | * @} 71 | */ 72 | 73 | /** @defgroup USBD_DEVICE_Exported_FunctionsPrototype USBD_DEVICE_Exported_FunctionsPrototype 74 | * @brief Declaration of public functions for Usb device. 75 | * @{ 76 | */ 77 | 78 | /** USB Device initialization function. */ 79 | void MX_USB_DEVICE_Init(void); 80 | 81 | /* 82 | * -- Insert functions declaration here -- 83 | */ 84 | /* USER CODE BEGIN FD */ 85 | 86 | /* USER CODE END FD */ 87 | /** 88 | * @} 89 | */ 90 | 91 | /** 92 | * @} 93 | */ 94 | 95 | /** 96 | * @} 97 | */ 98 | 99 | #ifdef __cplusplus 100 | } 101 | #endif 102 | 103 | #endif /* __USB_DEVICE__H__ */ 104 | 105 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 106 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/MDK-ARM/RTE/_STM32L433CCT6_YAB/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'STM32L433CCT6_YAB' 7 | * Target: 'STM32L433CCT6_YAB' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "stm32l4xx.h" 18 | 19 | 20 | 21 | #endif /* RTE_COMPONENTS_H */ 22 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/MDK-ARM/STM32L433CCT6_YAB/STM32L433CCT6_YAB.axf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RadioOperator/Yet_Another_Bootloader/d23c6878dd1cec9133be52186e42122d6acacac0/YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/MDK-ARM/STM32L433CCT6_YAB/STM32L433CCT6_YAB.axf -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/MDK-ARM/STM32L433CCT6_YAB/STM32L433CCT6_YAB.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x08000000 0x00040000 { ; load region size_region 6 | ER_IROM1 0x08000000 0x00040000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | .ANY (+RO) 10 | .ANY (+XO) 11 | } 12 | RW_IRAM1 0x20000000 0x00010000 { ; RW data 13 | .ANY (+RW +ZI) 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_data.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usbd_msc_data.h 4 | * @author MCD Application Team 5 | * @brief Header for the usbd_msc_data.c file 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2015 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __USBD_MSC_DATA_H 22 | #define __USBD_MSC_DATA_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "usbd_conf.h" 30 | 31 | /** @addtogroup STM32_USB_DEVICE_LIBRARY 32 | * @{ 33 | */ 34 | 35 | /** @defgroup USB_INFO 36 | * @brief general defines for the usb device library file 37 | * @{ 38 | */ 39 | 40 | /** @defgroup USB_INFO_Exported_Defines 41 | * @{ 42 | */ 43 | #define MODE_SENSE6_LEN 0x17U 44 | #define MODE_SENSE10_LEN 0x1BU 45 | #define LENGTH_INQUIRY_PAGE00 0x06U 46 | #define LENGTH_INQUIRY_PAGE80 0x08U 47 | #define LENGTH_FORMAT_CAPACITIES 0x14U 48 | 49 | /** 50 | * @} 51 | */ 52 | 53 | 54 | /** @defgroup USBD_INFO_Exported_TypesDefinitions 55 | * @{ 56 | */ 57 | /** 58 | * @} 59 | */ 60 | 61 | 62 | 63 | /** @defgroup USBD_INFO_Exported_Macros 64 | * @{ 65 | */ 66 | 67 | /** 68 | * @} 69 | */ 70 | 71 | /** @defgroup USBD_INFO_Exported_Variables 72 | * @{ 73 | */ 74 | extern uint8_t MSC_Page00_Inquiry_Data[LENGTH_INQUIRY_PAGE00]; 75 | extern uint8_t MSC_Page80_Inquiry_Data[LENGTH_INQUIRY_PAGE80]; 76 | extern uint8_t MSC_Mode_Sense6_data[MODE_SENSE6_LEN]; 77 | extern uint8_t MSC_Mode_Sense10_data[MODE_SENSE10_LEN]; 78 | 79 | /** 80 | * @} 81 | */ 82 | 83 | /** @defgroup USBD_INFO_Exported_FunctionsPrototype 84 | * @{ 85 | */ 86 | 87 | /** 88 | * @} 89 | */ 90 | 91 | #ifdef __cplusplus 92 | } 93 | #endif 94 | 95 | #endif /* __USBD_MSC_DATA_H */ 96 | 97 | /** 98 | * @} 99 | */ 100 | 101 | /** 102 | * @} 103 | */ 104 | 105 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 106 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usbd_req.h 4 | * @author MCD Application Team 5 | * @brief Header file for the usbd_req.c file 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2015 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __USB_REQUEST_H 22 | #define __USB_REQUEST_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "usbd_def.h" 30 | 31 | 32 | /** @addtogroup STM32_USB_DEVICE_LIBRARY 33 | * @{ 34 | */ 35 | 36 | /** @defgroup USBD_REQ 37 | * @brief header file for the usbd_req.c file 38 | * @{ 39 | */ 40 | 41 | /** @defgroup USBD_REQ_Exported_Defines 42 | * @{ 43 | */ 44 | /** 45 | * @} 46 | */ 47 | 48 | 49 | /** @defgroup USBD_REQ_Exported_Types 50 | * @{ 51 | */ 52 | /** 53 | * @} 54 | */ 55 | 56 | 57 | 58 | /** @defgroup USBD_REQ_Exported_Macros 59 | * @{ 60 | */ 61 | /** 62 | * @} 63 | */ 64 | 65 | /** @defgroup USBD_REQ_Exported_Variables 66 | * @{ 67 | */ 68 | /** 69 | * @} 70 | */ 71 | 72 | /** @defgroup USBD_REQ_Exported_FunctionsPrototype 73 | * @{ 74 | */ 75 | 76 | USBD_StatusTypeDef USBD_StdDevReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); 77 | USBD_StatusTypeDef USBD_StdItfReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); 78 | USBD_StatusTypeDef USBD_StdEPReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); 79 | 80 | void USBD_CtlError(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); 81 | void USBD_ParseSetupRequest(USBD_SetupReqTypedef *req, uint8_t *pdata); 82 | void USBD_GetString(uint8_t *desc, uint8_t *unicode, uint16_t *len); 83 | 84 | /** 85 | * @} 86 | */ 87 | 88 | #ifdef __cplusplus 89 | } 90 | #endif 91 | 92 | #endif /* __USB_REQUEST_H */ 93 | 94 | /** 95 | * @} 96 | */ 97 | 98 | /** 99 | * @} 100 | */ 101 | 102 | 103 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 104 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usbd_ioreq.h 4 | * @author MCD Application Team 5 | * @brief Header file for the usbd_ioreq.c file 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2015 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __USBD_IOREQ_H 22 | #define __USBD_IOREQ_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "usbd_def.h" 30 | #include "usbd_core.h" 31 | 32 | /** @addtogroup STM32_USB_DEVICE_LIBRARY 33 | * @{ 34 | */ 35 | 36 | /** @defgroup USBD_IOREQ 37 | * @brief header file for the usbd_ioreq.c file 38 | * @{ 39 | */ 40 | 41 | /** @defgroup USBD_IOREQ_Exported_Defines 42 | * @{ 43 | */ 44 | /** 45 | * @} 46 | */ 47 | 48 | 49 | /** @defgroup USBD_IOREQ_Exported_Types 50 | * @{ 51 | */ 52 | 53 | 54 | /** 55 | * @} 56 | */ 57 | 58 | 59 | 60 | /** @defgroup USBD_IOREQ_Exported_Macros 61 | * @{ 62 | */ 63 | 64 | /** 65 | * @} 66 | */ 67 | 68 | /** @defgroup USBD_IOREQ_Exported_Variables 69 | * @{ 70 | */ 71 | 72 | /** 73 | * @} 74 | */ 75 | 76 | /** @defgroup USBD_IOREQ_Exported_FunctionsPrototype 77 | * @{ 78 | */ 79 | 80 | USBD_StatusTypeDef USBD_CtlSendData(USBD_HandleTypeDef *pdev, 81 | uint8_t *pbuf, uint32_t len); 82 | 83 | USBD_StatusTypeDef USBD_CtlContinueSendData(USBD_HandleTypeDef *pdev, 84 | uint8_t *pbuf, uint32_t len); 85 | 86 | USBD_StatusTypeDef USBD_CtlPrepareRx(USBD_HandleTypeDef *pdev, 87 | uint8_t *pbuf, uint32_t len); 88 | 89 | USBD_StatusTypeDef USBD_CtlContinueRx(USBD_HandleTypeDef *pdev, 90 | uint8_t *pbuf, uint32_t len); 91 | 92 | USBD_StatusTypeDef USBD_CtlSendStatus(USBD_HandleTypeDef *pdev); 93 | USBD_StatusTypeDef USBD_CtlReceiveStatus(USBD_HandleTypeDef *pdev); 94 | 95 | uint32_t USBD_GetRxCount(USBD_HandleTypeDef *pdev, uint8_t ep_addr); 96 | 97 | /** 98 | * @} 99 | */ 100 | 101 | #ifdef __cplusplus 102 | } 103 | #endif 104 | 105 | #endif /* __USBD_IOREQ_H */ 106 | 107 | /** 108 | * @} 109 | */ 110 | 111 | /** 112 | * @} 113 | */ 114 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 115 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/Src/stm32l4xx_hal_msp.c: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file stm32l4xx_hal_msp.c 5 | * @brief This file provides code for the MSP Initialization 6 | * and de-Initialization codes. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2020 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Includes ------------------------------------------------------------------*/ 23 | #include "main.h" 24 | /* USER CODE BEGIN Includes */ 25 | 26 | /* USER CODE END Includes */ 27 | 28 | /* Private typedef -----------------------------------------------------------*/ 29 | /* USER CODE BEGIN TD */ 30 | 31 | /* USER CODE END TD */ 32 | 33 | /* Private define ------------------------------------------------------------*/ 34 | /* USER CODE BEGIN Define */ 35 | 36 | /* USER CODE END Define */ 37 | 38 | /* Private macro -------------------------------------------------------------*/ 39 | /* USER CODE BEGIN Macro */ 40 | 41 | /* USER CODE END Macro */ 42 | 43 | /* Private variables ---------------------------------------------------------*/ 44 | /* USER CODE BEGIN PV */ 45 | 46 | /* USER CODE END PV */ 47 | 48 | /* Private function prototypes -----------------------------------------------*/ 49 | /* USER CODE BEGIN PFP */ 50 | 51 | /* USER CODE END PFP */ 52 | 53 | /* External functions --------------------------------------------------------*/ 54 | /* USER CODE BEGIN ExternalFunctions */ 55 | 56 | /* USER CODE END ExternalFunctions */ 57 | 58 | /* USER CODE BEGIN 0 */ 59 | 60 | /* USER CODE END 0 */ 61 | /** 62 | * Initializes the Global MSP. 63 | */ 64 | void HAL_MspInit(void) 65 | { 66 | /* USER CODE BEGIN MspInit 0 */ 67 | 68 | /* USER CODE END MspInit 0 */ 69 | 70 | __HAL_RCC_SYSCFG_CLK_ENABLE(); 71 | __HAL_RCC_PWR_CLK_ENABLE(); 72 | 73 | /* System interrupt init*/ 74 | 75 | /* USER CODE BEGIN MspInit 1 */ 76 | 77 | /* USER CODE END MspInit 1 */ 78 | } 79 | 80 | /* USER CODE BEGIN 1 */ 81 | 82 | /* USER CODE END 1 */ 83 | 84 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 85 | -------------------------------------------------------------------------------- /YAB_STM32F103_F407_L433_F723/STM32L433CCT6_YAB/Src/usb_device.c: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : usb_device.c 5 | * @version : v2.0_Cube 6 | * @brief : This file implements the USB Device 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2020 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Includes ------------------------------------------------------------------*/ 23 | 24 | #include "usb_device.h" 25 | #include "usbd_core.h" 26 | #include "usbd_desc.h" 27 | #include "usbd_msc.h" 28 | #include "usbd_storage_if.h" 29 | 30 | /* USER CODE BEGIN Includes */ 31 | 32 | /* USER CODE END Includes */ 33 | 34 | /* USER CODE BEGIN PV */ 35 | /* Private variables ---------------------------------------------------------*/ 36 | 37 | /* USER CODE END PV */ 38 | 39 | /* USER CODE BEGIN PFP */ 40 | /* Private function prototypes -----------------------------------------------*/ 41 | 42 | /* USER CODE END PFP */ 43 | 44 | /* USB Device Core handle declaration. */ 45 | USBD_HandleTypeDef hUsbDeviceFS; 46 | extern USBD_DescriptorsTypeDef FS_Desc; 47 | 48 | /* 49 | * -- Insert your variables declaration here -- 50 | */ 51 | /* USER CODE BEGIN 0 */ 52 | 53 | /* USER CODE END 0 */ 54 | 55 | /* 56 | * -- Insert your external function declaration here -- 57 | */ 58 | /* USER CODE BEGIN 1 */ 59 | 60 | /* USER CODE END 1 */ 61 | 62 | /** 63 | * Init USB device Library, add supported class and start the library 64 | * @retval None 65 | */ 66 | void MX_USB_DEVICE_Init(void) 67 | { 68 | /* USER CODE BEGIN USB_DEVICE_Init_PreTreatment */ 69 | 70 | /* USER CODE END USB_DEVICE_Init_PreTreatment */ 71 | 72 | /* Init Device Library, add supported class and start the library. */ 73 | if (USBD_Init(&hUsbDeviceFS, &FS_Desc, DEVICE_FS) != USBD_OK) 74 | { 75 | Error_Handler(); 76 | } 77 | if (USBD_RegisterClass(&hUsbDeviceFS, &USBD_MSC) != USBD_OK) 78 | { 79 | Error_Handler(); 80 | } 81 | if (USBD_MSC_RegisterStorage(&hUsbDeviceFS, &USBD_Storage_Interface_fops_FS) != USBD_OK) 82 | { 83 | Error_Handler(); 84 | } 85 | if (USBD_Start(&hUsbDeviceFS) != USBD_OK) 86 | { 87 | Error_Handler(); 88 | } 89 | /* USER CODE BEGIN USB_DEVICE_Init_PostTreatment */ 90 | 91 | /* USER CODE END USB_DEVICE_Init_PostTreatment */ 92 | } 93 | 94 | /** 95 | * @} 96 | */ 97 | 98 | /** 99 | * @} 100 | */ 101 | 102 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 103 | --------------------------------------------------------------------------------