实例介绍
atsamd21e17通过uart进行代码更新,你需要在你的MCU的20K开始存放用户程序(可以根据情况调整),每次更新1K,这只是个例程,你可以根据情况添加校验等
【实例截图】
【核心代码】
bfc0f99c-cd1a-422c-96a5-a1d179e16c98
└── atsamd21e17_bootloader(通过串口进行更新程序代码例程)
└── GccBoardProject1
├── GccBoardProject1
│ ├── Debug
│ │ ├── GccBoardProject1.bin
│ │ ├── GccBoardProject1.eep
│ │ ├── GccBoardProject1.elf
│ │ ├── GccBoardProject1.hex
│ │ ├── GccBoardProject1.lss
│ │ ├── GccBoardProject1.map
│ │ ├── GccBoardProject1.srec
│ │ ├── makedep.mk
│ │ ├── Makefile
│ │ └── src
│ │ ├── ASF
│ │ │ ├── common
│ │ │ │ └── utils
│ │ │ │ └── interrupt
│ │ │ │ ├── interrupt_sam_nvic.d
│ │ │ │ └── interrupt_sam_nvic.o
│ │ │ ├── common2
│ │ │ │ └── boards
│ │ │ │ └── user_board
│ │ │ │ ├── init.d
│ │ │ │ └── init.o
│ │ │ └── sam0
│ │ │ ├── drivers
│ │ │ │ ├── nvm
│ │ │ │ │ ├── nvm.d
│ │ │ │ │ └── nvm.o
│ │ │ │ ├── port
│ │ │ │ │ ├── port.d
│ │ │ │ │ └── port.o
│ │ │ │ ├── sercom
│ │ │ │ │ ├── sercom.d
│ │ │ │ │ ├── sercom.o
│ │ │ │ │ └── usart
│ │ │ │ │ ├── usart.d
│ │ │ │ │ └── usart.o
│ │ │ │ └── system
│ │ │ │ ├── clock
│ │ │ │ │ └── clock_samd21_r21_da_ha1
│ │ │ │ │ ├── clock.d
│ │ │ │ │ ├── clock.o
│ │ │ │ │ ├── gclk.d
│ │ │ │ │ └── gclk.o
│ │ │ │ ├── interrupt
│ │ │ │ │ ├── system_interrupt.d
│ │ │ │ │ └── system_interrupt.o
│ │ │ │ ├── pinmux
│ │ │ │ │ ├── pinmux.d
│ │ │ │ │ └── pinmux.o
│ │ │ │ ├── system.d
│ │ │ │ └── system.o
│ │ │ └── utils
│ │ │ ├── cmsis
│ │ │ │ └── samd21
│ │ │ │ └── source
│ │ │ │ ├── gcc
│ │ │ │ │ ├── startup_samd21.d
│ │ │ │ │ └── startup_samd21.o
│ │ │ │ ├── system_samd21.d
│ │ │ │ └── system_samd21.o
│ │ │ ├── stdio
│ │ │ │ ├── read.d
│ │ │ │ ├── read.o
│ │ │ │ ├── write.d
│ │ │ │ └── write.o
│ │ │ └── syscalls
│ │ │ └── gcc
│ │ │ ├── syscalls.d
│ │ │ └── syscalls.o
│ │ ├── main.d
│ │ ├── main.o
│ │ ├── misc.d
│ │ └── misc.o
│ ├── GccBoardProject1.componentinfo.xml
│ ├── GccBoardProject1.cproj
│ ├── jlink.config
│ ├── jlink.log
│ └── src
│ ├── ASF
│ │ ├── common
│ │ │ ├── boards
│ │ │ │ └── board.h
│ │ │ ├── services
│ │ │ │ └── serial
│ │ │ │ ├── sam0_usart
│ │ │ │ │ └── usart_serial.h
│ │ │ │ └── serial.h
│ │ │ └── utils
│ │ │ ├── interrupt
│ │ │ │ ├── interrupt_sam_nvic.c
│ │ │ │ └── interrupt_sam_nvic.h
│ │ │ ├── interrupt.h
│ │ │ └── parts.h
│ │ ├── common2
│ │ │ └── boards
│ │ │ └── user_board
│ │ │ ├── init.c
│ │ │ └── user_board.h
│ │ ├── sam0
│ │ │ ├── drivers
│ │ │ │ ├── nvm
│ │ │ │ │ ├── nvm.c
│ │ │ │ │ ├── nvm.h
│ │ │ │ │ └── quick_start_basic
│ │ │ │ │ └── qs_nvm_basic.h
│ │ │ │ ├── port
│ │ │ │ │ ├── port.c
│ │ │ │ │ ├── port.h
│ │ │ │ │ └── quick_start
│ │ │ │ │ └── qs_port_basic.h
│ │ │ │ ├── sercom
│ │ │ │ │ ├── sercom.c
│ │ │ │ │ ├── sercom.h
│ │ │ │ │ ├── sercom_pinout.h
│ │ │ │ │ └── usart
│ │ │ │ │ ├── quick_start
│ │ │ │ │ │ └── qs_usart_basic_use.h
│ │ │ │ │ ├── quick_start_dma
│ │ │ │ │ │ └── qs_usart_dma_use.h
│ │ │ │ │ ├── usart.c
│ │ │ │ │ └── usart.h
│ │ │ │ └── system
│ │ │ │ ├── clock
│ │ │ │ │ ├── clock.h
│ │ │ │ │ ├── clock_samd21_r21_da_ha1
│ │ │ │ │ │ ├── clock.c
│ │ │ │ │ │ ├── clock_config_check.h
│ │ │ │ │ │ ├── clock_feature.h
│ │ │ │ │ │ └── gclk.c
│ │ │ │ │ └── gclk.h
│ │ │ │ ├── interrupt
│ │ │ │ │ ├── system_interrupt.c
│ │ │ │ │ ├── system_interrupt.h
│ │ │ │ │ └── system_interrupt_samd21
│ │ │ │ │ └── system_interrupt_features.h
│ │ │ │ ├── pinmux
│ │ │ │ │ ├── pinmux.c
│ │ │ │ │ ├── pinmux.h
│ │ │ │ │ └── quick_start
│ │ │ │ │ └── qs_pinmux_basic.h
│ │ │ │ ├── power
│ │ │ │ │ └── power_sam_d_r_h
│ │ │ │ │ └── power.h
│ │ │ │ ├── reset
│ │ │ │ │ └── reset_sam_d_r_h
│ │ │ │ │ └── reset.h
│ │ │ │ ├── system.c
│ │ │ │ └── system.h
│ │ │ └── utils
│ │ │ ├── cmsis
│ │ │ │ └── samd21
│ │ │ │ ├── include
│ │ │ │ │ ├── component
│ │ │ │ │ │ ├── ac.h
│ │ │ │ │ │ ├── adc.h
│ │ │ │ │ │ ├── dac.h
│ │ │ │ │ │ ├── dmac.h
│ │ │ │ │ │ ├── dsu.h
│ │ │ │ │ │ ├── eic.h
│ │ │ │ │ │ ├── evsys.h
│ │ │ │ │ │ ├── gclk.h
│ │ │ │ │ │ ├── hmatrixb.h
│ │ │ │ │ │ ├── i2s.h
│ │ │ │ │ │ ├── mtb.h
│ │ │ │ │ │ ├── nvmctrl.h
│ │ │ │ │ │ ├── pac.h
│ │ │ │ │ │ ├── pm.h
│ │ │ │ │ │ ├── port.h
│ │ │ │ │ │ ├── rtc.h
│ │ │ │ │ │ ├── sercom.h
│ │ │ │ │ │ ├── sysctrl.h
│ │ │ │ │ │ ├── tcc.h
│ │ │ │ │ │ ├── tcc_lighting.h
│ │ │ │ │ │ ├── tc.h
│ │ │ │ │ │ ├── usb.h
│ │ │ │ │ │ └── wdt.h
│ │ │ │ │ ├── instance
│ │ │ │ │ │ ├── ac1.h
│ │ │ │ │ │ ├── ac.h
│ │ │ │ │ │ ├── adc.h
│ │ │ │ │ │ ├── dac.h
│ │ │ │ │ │ ├── dmac.h
│ │ │ │ │ │ ├── dsu.h
│ │ │ │ │ │ ├── eic.h
│ │ │ │ │ │ ├── evsys.h
│ │ │ │ │ │ ├── gclk.h
│ │ │ │ │ │ ├── i2s.h
│ │ │ │ │ │ ├── mtb.h
│ │ │ │ │ │ ├── nvmctrl.h
│ │ │ │ │ │ ├── pac0.h
│ │ │ │ │ │ ├── pac1.h
│ │ │ │ │ │ ├── pac2.h
│ │ │ │ │ │ ├── pm.h
│ │ │ │ │ │ ├── port.h
│ │ │ │ │ │ ├── rtc.h
│ │ │ │ │ │ ├── sbmatrix.h
│ │ │ │ │ │ ├── sercom0.h
│ │ │ │ │ │ ├── sercom1.h
│ │ │ │ │ │ ├── sercom2.h
│ │ │ │ │ │ ├── sercom3.h
│ │ │ │ │ │ ├── sercom4.h
│ │ │ │ │ │ ├── sercom5.h
│ │ │ │ │ │ ├── sysctrl.h
│ │ │ │ │ │ ├── tc3.h
│ │ │ │ │ │ ├── tc4.h
│ │ │ │ │ │ ├── tc5.h
│ │ │ │ │ │ ├── tc6.h
│ │ │ │ │ │ ├── tc7.h
│ │ │ │ │ │ ├── tcc0.h
│ │ │ │ │ │ ├── tcc1.h
│ │ │ │ │ │ ├── tcc2.h
│ │ │ │ │ │ ├── usb.h
│ │ │ │ │ │ └── wdt.h
│ │ │ │ │ ├── pio
│ │ │ │ │ │ ├── samd21e15a.h
│ │ │ │ │ │ ├── samd21e15b.h
│ │ │ │ │ │ ├── samd21e15bu.h
│ │ │ │ │ │ ├── samd21e15l.h
│ │ │ │ │ │ ├── samd21e16a.h
│ │ │ │ │ │ ├── samd21e16b.h
│ │ │ │ │ │ ├── samd21e16bu.h
│ │ │ │ │ │ ├── samd21e16l.h
│ │ │ │ │ │ ├── samd21e17a.h
│ │ │ │ │ │ ├── samd21e18a.h
│ │ │ │ │ │ ├── samd21g15a.h
│ │ │ │ │ │ ├── samd21g15b.h
│ │ │ │ │ │ ├── samd21g15l.h
│ │ │ │ │ │ ├── samd21g16a.h
│ │ │ │ │ │ ├── samd21g16b.h
│ │ │ │ │ │ ├── samd21g16l.h
│ │ │ │ │ │ ├── samd21g17a.h
│ │ │ │ │ │ ├── samd21g17au.h
│ │ │ │ │ │ ├── samd21g18a.h
│ │ │ │ │ │ ├── samd21g18au.h
│ │ │ │ │ │ ├── samd21j15a.h
│ │ │ │ │ │ ├── samd21j15b.h
│ │ │ │ │ │ ├── samd21j16a.h
│ │ │ │ │ │ ├── samd21j16b.h
│ │ │ │ │ │ ├── samd21j17a.h
│ │ │ │ │ │ └── samd21j18a.h
│ │ │ │ │ ├── samd21e15a.h
│ │ │ │ │ ├── samd21e15b.h
│ │ │ │ │ ├── samd21e15bu.h
│ │ │ │ │ ├── samd21e15l.h
│ │ │ │ │ ├── samd21e16a.h
│ │ │ │ │ ├── samd21e16b.h
│ │ │ │ │ ├── samd21e16bu.h
│ │ │ │ │ ├── samd21e16l.h
│ │ │ │ │ ├── samd21e17a.h
│ │ │ │ │ ├── samd21e18a.h
│ │ │ │ │ ├── samd21g15a.h
│ │ │ │ │ ├── samd21g15b.h
│ │ │ │ │ ├── samd21g15l.h
│ │ │ │ │ ├── samd21g16a.h
│ │ │ │ │ ├── samd21g16b.h
│ │ │ │ │ ├── samd21g16l.h
│ │ │ │ │ ├── samd21g17a.h
│ │ │ │ │ ├── samd21g17au.h
│ │ │ │ │ ├── samd21g18a.h
│ │ │ │ │ ├── samd21g18au.h
│ │ │ │ │ ├── samd21.h
│ │ │ │ │ ├── samd21j15a.h
│ │ │ │ │ ├── samd21j15b.h
│ │ │ │ │ ├── samd21j16a.h
│ │ │ │ │ ├── samd21j16b.h
│ │ │ │ │ ├── samd21j17a.h
│ │ │ │ │ └── samd21j18a.h
│ │ │ │ └── source
│ │ │ │ ├── gcc
│ │ │ │ │ └── startup_samd21.c
│ │ │ │ ├── system_samd21.c
│ │ │ │ └── system_samd21.h
│ │ │ ├── compiler.h
│ │ │ ├── header_files
│ │ │ │ └── io.h
│ │ │ ├── linker_scripts
│ │ │ │ └── samd21
│ │ │ │ └── gcc
│ │ │ │ └── samd21e17a_flash.ld
│ │ │ ├── make
│ │ │ │ └── Makefile.sam.in
│ │ │ ├── preprocessor
│ │ │ │ ├── mrecursion.h
│ │ │ │ ├── mrepeat.h
│ │ │ │ ├── preprocessor.h
│ │ │ │ ├── stringz.h
│ │ │ │ └── tpaste.h
│ │ │ ├── status_codes.h
│ │ │ ├── stdio
│ │ │ │ ├── read.c
│ │ │ │ ├── stdio_serial
│ │ │ │ │ └── stdio_serial.h
│ │ │ │ └── write.c
│ │ │ └── syscalls
│ │ │ └── gcc
│ │ │ └── syscalls.c
│ │ └── thirdparty
│ │ └── CMSIS
│ │ ├── ATMEL-disclaimer.txt
│ │ ├── CMSIS_END_USER_LICENCE_AGREEMENT.pdf
│ │ ├── Include
│ │ │ ├── arm_math.h
│ │ │ ├── core_cm0plus.h
│ │ │ ├── core_cmFunc.h
│ │ │ └── core_cmInstr.h
│ │ ├── Lib
│ │ │ ├── GCC
│ │ │ │ └── libarm_cortexM0l_math.a
│ │ │ └── license.txt
│ │ └── README.txt
│ ├── asf.h
│ ├── config
│ │ ├── conf_board.h
│ │ ├── conf_clocks.h
│ │ └── conf_uart_serial.h
│ ├── main.c
│ ├── misc.c
│ └── misc.h
└── GccBoardProject1.atsln
89 directories, 233 files
标签:
相关软件
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论