实例介绍
在st官网的例子上修改过来的,usb的iap即DFU功能实现无误,在prop.c文件里面dnload函数是对下载更新的处理,如果要对升级文件进行加密解密操作,可以在这儿进行解密,或者FLASH_If_Write函数内部进行解密
【实例截图】
【核心代码】
4744300845378585297.zip
└── stm32 dfu
├── CMSIS
│ ├── core_cm3.c
│ ├── core_cm3.h
│ ├── startup
│ │ ├── startup_stm32f10x_cl.s
│ │ ├── startup_stm32f10x_hd.s
│ │ ├── startup_stm32f10x_hd_vl.s
│ │ ├── startup_stm32f10x_ld.s
│ │ ├── startup_stm32f10x_ld_vl.s
│ │ ├── startup_stm32f10x_md.s
│ │ ├── startup_stm32f10x_md_vl.s
│ │ └── startup_stm32f10x_xl.s
│ ├── stm32f10x.h
│ ├── system_stm32f10x.c
│ └── system_stm32f10x.h
├── DFU
│ ├── dfu_mal.c
│ ├── dfu_mal.h
│ ├── flash_if.c
│ ├── flash_if.h
│ ├── fsmc_nor.c
│ ├── fsmc_nor.h
│ ├── hw_config.c
│ ├── hw_config.h
│ ├── main.c
│ ├── nor_if.c
│ ├── nor_if.h
│ ├── platform_config.h
│ ├── spi_if.c
│ ├── spi_if.h
│ ├── stm32f10x_conf.h
│ ├── stm32f30x_conf.h
│ ├── stm32f37x_conf.h
│ ├── stm32_it.c
│ ├── stm32_it.h
│ ├── stm32l1xx_conf.h
│ ├── system_stm32f10x.c
│ ├── system_stm32f30x.c
│ ├── system_stm32f37x.c
│ ├── system_stm32l1xx.c
│ ├── usb_conf.h
│ ├── usb_desc.c
│ ├── usb_desc.h
│ ├── usb_istr.c
│ ├── usb_istr.h
│ ├── usb_prop.c
│ ├── usb_prop.h
│ ├── usb_pwr.c
│ └── usb_pwr.h
├── FWlib
│ ├── inc
│ │ ├── misc.h
│ │ ├── stm32f10x_adc.h
│ │ ├── stm32f10x_bkp.h
│ │ ├── stm32f10x_can.h
│ │ ├── stm32f10x_cec.h
│ │ ├── stm32f10x_crc.h
│ │ ├── stm32f10x_dac.h
│ │ ├── stm32f10x_dbgmcu.h
│ │ ├── stm32f10x_dma.h
│ │ ├── stm32f10x_exti.h
│ │ ├── stm32f10x_flash.h
│ │ ├── stm32f10x_fsmc.h
│ │ ├── stm32f10x_gpio.h
│ │ ├── stm32f10x_i2c.h
│ │ ├── stm32f10x_iwdg.h
│ │ ├── stm32f10x_pwr.h
│ │ ├── stm32f10x_rcc.h
│ │ ├── stm32f10x_rtc.h
│ │ ├── stm32f10x_sdio.h
│ │ ├── stm32f10x_spi.h
│ │ ├── stm32f10x_tim.h
│ │ ├── stm32f10x_usart.h
│ │ └── stm32f10x_wwdg.h
│ └── src
│ ├── misc.c
│ ├── stm32f10x_adc.c
│ ├── stm32f10x_bkp.c
│ ├── stm32f10x_can.c
│ ├── stm32f10x_cec.c
│ ├── stm32f10x_crc.c
│ ├── stm32f10x_dac.c
│ ├── stm32f10x_dbgmcu.c
│ ├── stm32f10x_dma.c
│ ├── stm32f10x_exti.c
│ ├── stm32f10x_flash.c
│ ├── stm32f10x_fsmc.c
│ ├── stm32f10x_gpio.c
│ ├── stm32f10x_i2c.c
│ ├── stm32f10x_iwdg.c
│ ├── stm32f10x_pwr.c
│ ├── stm32f10x_rcc.c
│ ├── stm32f10x_rtc.c
│ ├── stm32f10x_sdio.c
│ ├── stm32f10x_spi.c
│ ├── stm32f10x_tim.c
│ ├── stm32f10x_usart.c
│ └── stm32f10x_wwdg.c
├── Listing
│ ├── startup_stm32f10x_hd.lst
│ └── STM32-DEMO.map
├── Output
│ ├── bsp_usart1.crf
│ ├── bsp_usart1.d
│ ├── bsp_usart1.__i
│ ├── bsp_usart1.o
│ ├── core_cm3.crf
│ ├── core_cm3.d
│ ├── core_cm3.__i
│ ├── core_cm3.o
│ ├── dfu_mal.crf
│ ├── dfu_mal.d
│ ├── dfu_mal.__i
│ ├── dfu_mal.o
│ ├── flash_if.crf
│ ├── flash_if.d
│ ├── flash_if.__i
│ ├── flash_if.o
│ ├── fsmc_nor.crf
│ ├── fsmc_nor.d
│ ├── fsmc_nor.__i
│ ├── fsmc_nor.o
│ ├── hw_config.crf
│ ├── hw_config.d
│ ├── hw_config.__i
│ ├── hw_config.o
│ ├── main.crf
│ ├── main.d
│ ├── main.__i
│ ├── main.o
│ ├── misc.crf
│ ├── misc.d
│ ├── misc.__i
│ ├── misc.o
│ ├── nor_if.crf
│ ├── nor_if.d
│ ├── nor_if.__i
│ ├── nor_if.o
│ ├── spi_if.crf
│ ├── spi_if.d
│ ├── spi_if.__i
│ ├── spi_if.o
│ ├── startup_stm32f10x_hd.d
│ ├── startup_stm32f10x_hd.o
│ ├── stm3210e_eval.crf
│ ├── stm3210e_eval.d
│ ├── stm3210e_eval.__i
│ ├── stm3210e_eval.o
│ ├── stm3210e_eval_spi_flash.crf
│ ├── stm3210e_eval_spi_flash.d
│ ├── stm3210e_eval_spi_flash.__i
│ ├── stm3210e_eval_spi_flash.o
│ ├── STM32-DEMO.axf
│ ├── STM32-DEMO.hex
│ ├── STM32-DEMO.htm
│ ├── STM32-DEMO.lnp
│ ├── STM32-DEMO.plg
│ ├── STM32-DEMO.sct
│ ├── STM32-DEMO_sct.Bak
│ ├── STM32-DEMO.tra
│ ├── stm32f10x_adc.crf
│ ├── stm32f10x_adc.d
│ ├── stm32f10x_adc.__i
│ ├── stm32f10x_adc.o
│ ├── stm32f10x_bkp.crf
│ ├── stm32f10x_bkp.d
│ ├── stm32f10x_bkp.__i
│ ├── stm32f10x_bkp.o
│ ├── stm32f10x_can.crf
│ ├── stm32f10x_can.d
│ ├── stm32f10x_can.__i
│ ├── stm32f10x_can.o
│ ├── stm32f10x_cec.crf
│ ├── stm32f10x_cec.d
│ ├── stm32f10x_cec.__i
│ ├── stm32f10x_cec.o
│ ├── stm32f10x_crc.crf
│ ├── stm32f10x_crc.d
│ ├── stm32f10x_crc.__i
│ ├── stm32f10x_crc.o
│ ├── stm32f10x_dac.crf
│ ├── stm32f10x_dac.d
│ ├── stm32f10x_dac.__i
│ ├── stm32f10x_dac.o
│ ├── stm32f10x_dbgmcu.crf
│ ├── stm32f10x_dbgmcu.d
│ ├── stm32f10x_dbgmcu.__i
│ ├── stm32f10x_dbgmcu.o
│ ├── stm32f10x_dma.crf
│ ├── stm32f10x_dma.d
│ ├── stm32f10x_dma.__i
│ ├── stm32f10x_dma.o
│ ├── stm32f10x_exti.crf
│ ├── stm32f10x_exti.d
│ ├── stm32f10x_exti.__i
│ ├── stm32f10x_exti.o
│ ├── stm32f10x_flash.crf
│ ├── stm32f10x_flash.d
│ ├── stm32f10x_flash.__i
│ ├── stm32f10x_flash.o
│ ├── stm32f10x_fsmc.crf
│ ├── stm32f10x_fsmc.d
│ ├── stm32f10x_fsmc.__i
│ ├── stm32f10x_fsmc.o
│ ├── stm32f10x_gpio.crf
│ ├── stm32f10x_gpio.d
│ ├── stm32f10x_gpio.__i
│ ├── stm32f10x_gpio.o
│ ├── stm32f10x_i2c.crf
│ ├── stm32f10x_i2c.d
│ ├── stm32f10x_i2c.__i
│ ├── stm32f10x_i2c.o
│ ├── stm32f10x_it.crf
│ ├── stm32f10x_it.d
│ ├── stm32f10x_it.__i
│ ├── stm32f10x_it.o
│ ├── stm32f10x_iwdg.crf
│ ├── stm32f10x_iwdg.d
│ ├── stm32f10x_iwdg.__i
│ ├── stm32f10x_iwdg.o
│ ├── stm32f10x_pwr.crf
│ ├── stm32f10x_pwr.d
│ ├── stm32f10x_pwr.__i
│ ├── stm32f10x_pwr.o
│ ├── stm32f10x_rcc.crf
│ ├── stm32f10x_rcc.d
│ ├── stm32f10x_rcc.__i
│ ├── stm32f10x_rcc.o
│ ├── stm32f10x_rtc.crf
│ ├── stm32f10x_rtc.d
│ ├── stm32f10x_rtc.__i
│ ├── stm32f10x_rtc.o
│ ├── stm32f10x_sdio.crf
│ ├── stm32f10x_sdio.d
│ ├── stm32f10x_sdio.__i
│ ├── stm32f10x_sdio.o
│ ├── stm32f10x_spi.crf
│ ├── stm32f10x_spi.d
│ ├── stm32f10x_spi.__i
│ ├── stm32f10x_spi.o
│ ├── stm32f10x_tim.crf
│ ├── stm32f10x_tim.d
│ ├── stm32f10x_tim.__i
│ ├── stm32f10x_tim.o
│ ├── stm32f10x_usart.crf
│ ├── stm32f10x_usart.d
│ ├── stm32f10x_usart.__i
│ ├── stm32f10x_usart.o
│ ├── stm32f10x_wwdg.crf
│ ├── stm32f10x_wwdg.d
│ ├── stm32f10x_wwdg.__i
│ ├── stm32f10x_wwdg.o
│ ├── stm32_it.crf
│ ├── stm32_it.d
│ ├── stm32_it.__i
│ ├── stm32_it.o
│ ├── system_stm32f10x.crf
│ ├── system_stm32f10x.d
│ ├── system_stm32f10x.__i
│ ├── system_stm32f10x.o
│ ├── system_stm32f30x.d
│ ├── system_stm32f30x.__i
│ ├── system_stm32f37x.d
│ ├── system_stm32f37x.__i
│ ├── system_stm32l1xx.d
│ ├── system_stm32l1xx.__i
│ ├── usb_core.crf
│ ├── usb_core.d
│ ├── usb_core.__i
│ ├── usb_core.o
│ ├── usb_desc.crf
│ ├── usb_desc.d
│ ├── usb_desc.__i
│ ├── usb_desc.o
│ ├── usb_init.crf
│ ├── usb_init.d
│ ├── usb_init.__i
│ ├── usb_init.o
│ ├── usb_int.crf
│ ├── usb_int.d
│ ├── usb_int.__i
│ ├── usb_int.o
│ ├── usb_istr.crf
│ ├── usb_istr.d
│ ├── usb_istr.__i
│ ├── usb_istr.o
│ ├── usb_mem.crf
│ ├── usb_mem.d
│ ├── usb_mem.__i
│ ├── usb_mem.o
│ ├── usb_prop.crf
│ ├── usb_prop.d
│ ├── usb_prop.__i
│ ├── usb_prop.o
│ ├── usb_pwr.crf
│ ├── usb_pwr.d
│ ├── usb_pwr.__i
│ ├── usb_pwr.o
│ ├── usb_regs.crf
│ ├── usb_regs.d
│ ├── usb_regs.__i
│ ├── usb_regs.o
│ ├── usb_sil.crf
│ ├── usb_sil.d
│ ├── usb_sil.__i
│ └── usb_sil.o
├── usb-fs-device-driver
│ ├── usb_core.c
│ ├── usb_core.h
│ ├── usb_def.h
│ ├── usb_init.c
│ ├── usb_init.h
│ ├── usb_int.c
│ ├── usb_int.h
│ ├── usb_lib.h
│ ├── usb_mem.c
│ ├── usb_mem.h
│ ├── usb_regs.c
│ ├── usb_regs.h
│ ├── usb_sil.c
│ ├── usb_sil.h
│ └── usb_type.h
└── USER
├── bsp_usart1.c
├── bsp_usart1.h
├── JLinkLog.txt
├── JLinkSettings.ini
├── main.c
├── stm3210e_eval.c
├── stm3210e_eval.h
├── stm3210e_eval_spi_flash.c
├── stm3210e_eval_spi_flash.h
├── STM32-DEMO_3.5-Template.dep
├── STM32-DEMO.plg
├── STM32-DEMO_Target 1.dep
├── STM32-DEMO.uvgui.Administrator
├── STM32-DEMO.uvgui_Administrator.bak
├── STM32-DEMO.uvgui.flyleaf
├── STM32-DEMO.uvgui_flyleaf.bak
├── STM32-DEMO.uvgui.Jing Bo
├── STM32-DEMO.uvgui_Jing Bo.bak
├── STM32-DEMO.uvopt
├── STM32-DEMO_uvopt.bak
├── STM32-DEMO.uvproj
├── STM32-DEMO_uvproj.bak
├── stm32_eval_legacy.h
├── stm32f10x_conf.h
├── stm32f10x_it.c
└── stm32f10x_it.h
11 directories, 339 files
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论