├── .github └── workflows │ ├── compile-examples.yml │ ├── release.yaml │ └── report-size-deltas.yml ├── .gitignore ├── CHANGELOG ├── LICENSE ├── README.md ├── VARIANT_COMPLIANCE_CHANGELOG ├── boards.txt ├── bootloaders ├── circuitplay │ └── circuitplay_m0_samd21g18_sam_ba.bin ├── mkr1000 │ ├── README.md │ ├── samd21_sam_ba_arduino_mkr1000.bin │ └── samd21_sam_ba_arduino_mkr1000.hex ├── mkrfox1200 │ ├── samd21_sam_ba_arduino_mkrfox1200.bin │ └── samd21_sam_ba_arduino_mkrfox1200.hex ├── mkrgsm1400 │ ├── samd21_sam_ba_arduino_mkrgsm1400.bin │ └── samd21_sam_ba_arduino_mkrgsm1400.hex ├── mkrnb1500 │ ├── samd21_sam_ba_arduino_mkrnb1500.bin │ └── samd21_sam_ba_arduino_mkrnb1500.hex ├── mkrvidor4000 │ ├── samd21_sam_ba_arduino_mkrvidor4000.bin │ ├── samd21_sam_ba_arduino_mkrvidor4000.elf.ltrans.out │ └── samd21_sam_ba_arduino_mkrvidor4000.hex ├── mkrwan1300 │ ├── samd21_sam_ba_arduino_mkrwan1300.bin │ ├── samd21_sam_ba_arduino_mkrwan1300.hex │ ├── samd21_sam_ba_arduino_mkrwan1310.bin │ └── samd21_sam_ba_arduino_mkrwan1310.hex ├── mkrwifi1010 │ ├── samd21_sam_ba_arduino_mkrwifi1010.bin │ └── samd21_sam_ba_arduino_mkrwifi1010.hex ├── mkrzero │ ├── samd21_sam_ba_arduino_mkrzero.bin │ └── samd21_sam_ba_arduino_mkrzero.hex ├── mzero │ ├── Bootloader_D21 │ │ ├── Bootloader_D21.atsln │ │ ├── Bootloader_D21.atsuo │ │ ├── Bootloader_D21.cproj │ │ ├── atmel_devices_cdc.cat │ │ ├── atmel_devices_cdc.inf │ │ └── src │ │ │ ├── ASF │ │ │ ├── common │ │ │ │ ├── boards │ │ │ │ │ └── board.h │ │ │ │ ├── services │ │ │ │ │ ├── sleepmgr │ │ │ │ │ │ ├── samd │ │ │ │ │ │ │ ├── sleepmgr.c │ │ │ │ │ │ │ └── sleepmgr.h │ │ │ │ │ │ └── sleepmgr.h │ │ │ │ │ └── usb │ │ │ │ │ │ ├── class │ │ │ │ │ │ └── cdc │ │ │ │ │ │ │ ├── device │ │ │ │ │ │ │ ├── udi_cdc.c │ │ │ │ │ │ │ ├── udi_cdc.h │ │ │ │ │ │ │ ├── udi_cdc_conf.h │ │ │ │ │ │ │ └── udi_cdc_desc.c │ │ │ │ │ │ │ └── usb_protocol_cdc.h │ │ │ │ │ │ ├── udc │ │ │ │ │ │ ├── udc.c │ │ │ │ │ │ ├── udc.h │ │ │ │ │ │ ├── udc_desc.h │ │ │ │ │ │ ├── udd.h │ │ │ │ │ │ └── udi.h │ │ │ │ │ │ ├── usb_atmel.h │ │ │ │ │ │ └── usb_protocol.h │ │ │ │ └── utils │ │ │ │ │ ├── interrupt.h │ │ │ │ │ ├── interrupt │ │ │ │ │ ├── interrupt_sam_nvic.c │ │ │ │ │ └── interrupt_sam_nvic.h │ │ │ │ │ └── parts.h │ │ │ ├── sam0 │ │ │ │ ├── boards │ │ │ │ │ └── samd21_xplained_pro │ │ │ │ │ │ ├── board_init.c │ │ │ │ │ │ └── samd21_xplained_pro.h │ │ │ │ ├── drivers │ │ │ │ │ ├── port │ │ │ │ │ │ ├── port.c │ │ │ │ │ │ ├── port.h │ │ │ │ │ │ └── quick_start │ │ │ │ │ │ │ └── qs_port_basic.h │ │ │ │ │ ├── rtc │ │ │ │ │ │ ├── quick_start_count │ │ │ │ │ │ │ └── qs_rtc_count_basic.h │ │ │ │ │ │ ├── quick_start_count_callback │ │ │ │ │ │ │ └── qs_rtc_count_callback.h │ │ │ │ │ │ ├── rtc_count.c │ │ │ │ │ │ ├── rtc_count.h │ │ │ │ │ │ ├── rtc_count_interrupt.c │ │ │ │ │ │ └── rtc_count_interrupt.h │ │ │ │ │ ├── system │ │ │ │ │ │ ├── clock │ │ │ │ │ │ │ ├── clock.h │ │ │ │ │ │ │ ├── clock_samd21_r21 │ │ │ │ │ │ │ │ ├── clock.c │ │ │ │ │ │ │ │ ├── clock_config_check.h │ │ │ │ │ │ │ │ └── gclk.c │ │ │ │ │ │ │ ├── gclk.h │ │ │ │ │ │ │ ├── quick_start_clock │ │ │ │ │ │ │ │ └── qs_clock_source.h │ │ │ │ │ │ │ └── quick_start_gclk │ │ │ │ │ │ │ │ └── qs_gclk_basic.h │ │ │ │ │ │ ├── interrupt │ │ │ │ │ │ │ ├── quick_start │ │ │ │ │ │ │ │ └── qs_system_interrupt.h │ │ │ │ │ │ │ ├── system_interrupt.c │ │ │ │ │ │ │ ├── system_interrupt.h │ │ │ │ │ │ │ └── system_interrupt_samd21 │ │ │ │ │ │ │ │ └── system_interrupt_features.h │ │ │ │ │ │ ├── pinmux │ │ │ │ │ │ │ ├── pinmux.c │ │ │ │ │ │ │ ├── pinmux.h │ │ │ │ │ │ │ └── quick_start │ │ │ │ │ │ │ │ └── qs_pinmux_basic.h │ │ │ │ │ │ ├── system.c │ │ │ │ │ │ └── system.h │ │ │ │ │ └── usb │ │ │ │ │ │ ├── stack_interface │ │ │ │ │ │ ├── usb_device_udd.c │ │ │ │ │ │ ├── usb_dual.c │ │ │ │ │ │ └── usb_dual.h │ │ │ │ │ │ ├── usb.c │ │ │ │ │ │ └── usb.h │ │ │ │ └── utils │ │ │ │ │ ├── cmsis │ │ │ │ │ └── samd21 │ │ │ │ │ │ ├── include │ │ │ │ │ │ ├── component │ │ │ │ │ │ │ ├── ac.h │ │ │ │ │ │ │ ├── adc.h │ │ │ │ │ │ │ ├── dac.h │ │ │ │ │ │ │ ├── dmac.h │ │ │ │ │ │ │ ├── dsu.h │ │ │ │ │ │ │ ├── eic.h │ │ │ │ │ │ │ ├── evsys.h │ │ │ │ │ │ │ ├── gclk.h │ │ │ │ │ │ │ ├── i2s.h │ │ │ │ │ │ │ ├── mtb.h │ │ │ │ │ │ │ ├── nvmctrl.h │ │ │ │ │ │ │ ├── pac.h │ │ │ │ │ │ │ ├── pm.h │ │ │ │ │ │ │ ├── port.h │ │ │ │ │ │ │ ├── rtc.h │ │ │ │ │ │ │ ├── sercom.h │ │ │ │ │ │ │ ├── sysctrl.h │ │ │ │ │ │ │ ├── tc.h │ │ │ │ │ │ │ ├── tcc.h │ │ │ │ │ │ │ ├── usb.h │ │ │ │ │ │ │ └── wdt.h │ │ │ │ │ │ ├── instance │ │ │ │ │ │ │ ├── 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 │ │ │ │ │ │ │ ├── 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 │ │ │ │ │ │ │ ├── samd21e16a.h │ │ │ │ │ │ │ ├── samd21e17a.h │ │ │ │ │ │ │ ├── samd21e18a.h │ │ │ │ │ │ │ ├── samd21g15a.h │ │ │ │ │ │ │ ├── samd21g16a.h │ │ │ │ │ │ │ ├── samd21g17a.h │ │ │ │ │ │ │ ├── samd21g18a.h │ │ │ │ │ │ │ ├── samd21j15a.h │ │ │ │ │ │ │ ├── samd21j16a.h │ │ │ │ │ │ │ ├── samd21j17a.h │ │ │ │ │ │ │ └── samd21j18a.h │ │ │ │ │ │ ├── samd21.h │ │ │ │ │ │ ├── samd21e15a.h │ │ │ │ │ │ ├── samd21e16a.h │ │ │ │ │ │ ├── samd21e17a.h │ │ │ │ │ │ ├── samd21e18a.h │ │ │ │ │ │ ├── samd21g15a.h │ │ │ │ │ │ ├── samd21g16a.h │ │ │ │ │ │ ├── samd21g17a.h │ │ │ │ │ │ ├── samd21g18a.h │ │ │ │ │ │ ├── samd21j15a.h │ │ │ │ │ │ ├── samd21j16a.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 │ │ │ │ │ │ └── samd21j18a_flash.ld │ │ │ │ │ ├── make │ │ │ │ │ └── Makefile.sam.in │ │ │ │ │ ├── preprocessor │ │ │ │ │ ├── mrecursion.h │ │ │ │ │ ├── mrepeat.h │ │ │ │ │ ├── preprocessor.h │ │ │ │ │ ├── stringz.h │ │ │ │ │ └── tpaste.h │ │ │ │ │ ├── status_codes.h │ │ │ │ │ └── syscalls │ │ │ │ │ └── gcc │ │ │ │ │ └── syscalls.c │ │ │ └── thirdparty │ │ │ │ └── CMSIS │ │ │ │ ├── CMSIS END USER LICENCE AGREEMENT.pdf │ │ │ │ ├── Include │ │ │ │ ├── arm_math.h │ │ │ │ ├── core_cm0plus.h │ │ │ │ ├── core_cmFunc.h │ │ │ │ └── core_cmInstr.h │ │ │ │ ├── Lib │ │ │ │ └── GCC │ │ │ │ │ ├── .gitignore │ │ │ │ │ └── libarm_cortexM0l_math.a │ │ │ │ └── README.txt │ │ │ ├── asf.h │ │ │ ├── command.h │ │ │ ├── config │ │ │ ├── conf_board.h │ │ │ ├── conf_clocks.h │ │ │ ├── conf_extint.h │ │ │ ├── conf_sleepmgr.h │ │ │ └── conf_usb.h │ │ │ ├── main.c │ │ │ ├── main.h │ │ │ └── stk500v2.h │ ├── Bootloader_D21_M0_150515.hex │ └── Bootloader_D21_M0_Pro_150427.hex ├── nano_33_iot │ ├── samd21_sam_ba_arduino_nano_33_iot.bin │ └── samd21_sam_ba_arduino_nano_33_iot.hex ├── sofia │ ├── Bootloader_D21_Sofia_V2.1 │ │ ├── .DS_Store │ │ ├── Bootloader_Sofia.atsln │ │ ├── Bootloader_Sofia.atsuo │ │ ├── Bootloader_Sofia.cproj │ │ ├── atmel_devices_cdc.cat │ │ ├── atmel_devices_cdc.inf │ │ └── src │ │ │ ├── .DS_Store │ │ │ ├── ASF │ │ │ ├── common │ │ │ │ ├── boards │ │ │ │ │ └── board.h │ │ │ │ ├── services │ │ │ │ │ ├── sleepmgr │ │ │ │ │ │ ├── samd │ │ │ │ │ │ │ ├── sleepmgr.c │ │ │ │ │ │ │ └── sleepmgr.h │ │ │ │ │ │ └── sleepmgr.h │ │ │ │ │ └── usb │ │ │ │ │ │ ├── class │ │ │ │ │ │ └── cdc │ │ │ │ │ │ │ ├── device │ │ │ │ │ │ │ ├── udi_cdc.c │ │ │ │ │ │ │ ├── udi_cdc.h │ │ │ │ │ │ │ ├── udi_cdc_conf.h │ │ │ │ │ │ │ └── udi_cdc_desc.c │ │ │ │ │ │ │ └── usb_protocol_cdc.h │ │ │ │ │ │ ├── udc │ │ │ │ │ │ ├── udc.c │ │ │ │ │ │ ├── udc.h │ │ │ │ │ │ ├── udc_desc.h │ │ │ │ │ │ ├── udd.h │ │ │ │ │ │ └── udi.h │ │ │ │ │ │ ├── usb_atmel.h │ │ │ │ │ │ └── usb_protocol.h │ │ │ │ └── utils │ │ │ │ │ ├── interrupt.h │ │ │ │ │ ├── interrupt │ │ │ │ │ ├── interrupt_sam_nvic.c │ │ │ │ │ └── interrupt_sam_nvic.h │ │ │ │ │ └── parts.h │ │ │ ├── sam0 │ │ │ │ ├── boards │ │ │ │ │ └── samd21_xplained_pro │ │ │ │ │ │ ├── board_init.c │ │ │ │ │ │ └── samd21_xplained_pro.h │ │ │ │ ├── drivers │ │ │ │ │ ├── port │ │ │ │ │ │ ├── port.c │ │ │ │ │ │ ├── port.h │ │ │ │ │ │ └── quick_start │ │ │ │ │ │ │ └── qs_port_basic.h │ │ │ │ │ ├── rtc │ │ │ │ │ │ ├── quick_start_count │ │ │ │ │ │ │ └── qs_rtc_count_basic.h │ │ │ │ │ │ ├── quick_start_count_callback │ │ │ │ │ │ │ └── qs_rtc_count_callback.h │ │ │ │ │ │ ├── rtc_count.c │ │ │ │ │ │ ├── rtc_count.h │ │ │ │ │ │ ├── rtc_count_interrupt.c │ │ │ │ │ │ └── rtc_count_interrupt.h │ │ │ │ │ ├── sercom │ │ │ │ │ │ ├── sercom.c │ │ │ │ │ │ ├── sercom.h │ │ │ │ │ │ ├── sercom_interrupt.c │ │ │ │ │ │ ├── sercom_interrupt.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 │ │ │ │ │ │ │ │ ├── clock.c │ │ │ │ │ │ │ │ ├── clock_config_check.h │ │ │ │ │ │ │ │ └── gclk.c │ │ │ │ │ │ │ ├── gclk.h │ │ │ │ │ │ │ ├── quick_start_clock │ │ │ │ │ │ │ │ └── qs_clock_source.h │ │ │ │ │ │ │ └── quick_start_gclk │ │ │ │ │ │ │ │ └── qs_gclk_basic.h │ │ │ │ │ │ ├── interrupt │ │ │ │ │ │ │ ├── quick_start │ │ │ │ │ │ │ │ └── qs_system_interrupt.h │ │ │ │ │ │ │ ├── system_interrupt.c │ │ │ │ │ │ │ ├── system_interrupt.h │ │ │ │ │ │ │ └── system_interrupt_samd21 │ │ │ │ │ │ │ │ └── system_interrupt_features.h │ │ │ │ │ │ ├── pinmux │ │ │ │ │ │ │ ├── pinmux.c │ │ │ │ │ │ │ ├── pinmux.h │ │ │ │ │ │ │ └── quick_start │ │ │ │ │ │ │ │ └── qs_pinmux_basic.h │ │ │ │ │ │ ├── system.c │ │ │ │ │ │ └── system.h │ │ │ │ │ └── usb │ │ │ │ │ │ ├── stack_interface │ │ │ │ │ │ ├── usb_device_udd.c │ │ │ │ │ │ ├── usb_dual.c │ │ │ │ │ │ └── usb_dual.h │ │ │ │ │ │ ├── usb.c │ │ │ │ │ │ └── usb.h │ │ │ │ └── utils │ │ │ │ │ ├── cmsis │ │ │ │ │ └── samd21 │ │ │ │ │ │ ├── include │ │ │ │ │ │ ├── component │ │ │ │ │ │ │ ├── ac.h │ │ │ │ │ │ │ ├── adc.h │ │ │ │ │ │ │ ├── dac.h │ │ │ │ │ │ │ ├── dmac.h │ │ │ │ │ │ │ ├── dsu.h │ │ │ │ │ │ │ ├── eic.h │ │ │ │ │ │ │ ├── evsys.h │ │ │ │ │ │ │ ├── gclk.h │ │ │ │ │ │ │ ├── i2s.h │ │ │ │ │ │ │ ├── mtb.h │ │ │ │ │ │ │ ├── nvmctrl.h │ │ │ │ │ │ │ ├── pac.h │ │ │ │ │ │ │ ├── pm.h │ │ │ │ │ │ │ ├── port.h │ │ │ │ │ │ │ ├── rtc.h │ │ │ │ │ │ │ ├── sercom.h │ │ │ │ │ │ │ ├── sysctrl.h │ │ │ │ │ │ │ ├── tc.h │ │ │ │ │ │ │ ├── tcc.h │ │ │ │ │ │ │ ├── usb.h │ │ │ │ │ │ │ └── wdt.h │ │ │ │ │ │ ├── instance │ │ │ │ │ │ │ ├── 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 │ │ │ │ │ │ │ ├── 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 │ │ │ │ │ │ │ ├── samd21e16a.h │ │ │ │ │ │ │ ├── samd21e17a.h │ │ │ │ │ │ │ ├── samd21e18a.h │ │ │ │ │ │ │ ├── samd21g15a.h │ │ │ │ │ │ │ ├── samd21g16a.h │ │ │ │ │ │ │ ├── samd21g17a.h │ │ │ │ │ │ │ ├── samd21g18a.h │ │ │ │ │ │ │ ├── samd21j15a.h │ │ │ │ │ │ │ ├── samd21j16a.h │ │ │ │ │ │ │ ├── samd21j17a.h │ │ │ │ │ │ │ └── samd21j18a.h │ │ │ │ │ │ ├── samd21.h │ │ │ │ │ │ ├── samd21e15a.h │ │ │ │ │ │ ├── samd21e16a.h │ │ │ │ │ │ ├── samd21e17a.h │ │ │ │ │ │ ├── samd21e18a.h │ │ │ │ │ │ ├── samd21g15a.h │ │ │ │ │ │ ├── samd21g16a.h │ │ │ │ │ │ ├── samd21g17a.h │ │ │ │ │ │ ├── samd21g18a.h │ │ │ │ │ │ ├── samd21j15a.h │ │ │ │ │ │ ├── samd21j16a.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 │ │ │ │ │ │ └── samd21j18a_flash.ld │ │ │ │ │ ├── make │ │ │ │ │ └── Makefile.sam.in │ │ │ │ │ ├── preprocessor │ │ │ │ │ ├── mrecursion.h │ │ │ │ │ ├── mrepeat.h │ │ │ │ │ ├── preprocessor.h │ │ │ │ │ ├── stringz.h │ │ │ │ │ └── tpaste.h │ │ │ │ │ ├── status_codes.h │ │ │ │ │ └── syscalls │ │ │ │ │ └── gcc │ │ │ │ │ └── syscalls.c │ │ │ └── thirdparty │ │ │ │ └── CMSIS │ │ │ │ ├── CMSIS END USER LICENCE AGREEMENT.pdf │ │ │ │ ├── Include │ │ │ │ ├── arm_math.h │ │ │ │ ├── core_cm0plus.h │ │ │ │ ├── core_cmFunc.h │ │ │ │ └── core_cmInstr.h │ │ │ │ ├── Lib │ │ │ │ └── GCC │ │ │ │ │ ├── .gitignore │ │ │ │ │ └── libarm_cortexM0l_math.a │ │ │ │ └── README.txt │ │ │ ├── asf.h │ │ │ ├── command.h │ │ │ ├── config │ │ │ ├── conf_board.h │ │ │ ├── conf_clocks.h │ │ │ ├── conf_extint.h │ │ │ ├── conf_sleepmgr.h │ │ │ └── conf_usb.h │ │ │ ├── main.c │ │ │ ├── main.h │ │ │ ├── stk500v2.h │ │ │ └── usart_setup.h │ └── Sofia_Tian_151118.hex └── zero │ ├── Makefile │ ├── README.md │ ├── board_definitions.h │ ├── board_definitions_arduino_mkr1000.h │ ├── board_definitions_arduino_mkrfox1200.h │ ├── board_definitions_arduino_mkrgsm1400.h │ ├── board_definitions_arduino_mkrnb1500.h │ ├── board_definitions_arduino_mkrvidor4000.h │ ├── board_definitions_arduino_mkrwan1300.h │ ├── board_definitions_arduino_mkrwan1310.h │ ├── board_definitions_arduino_mkrwifi1010.h │ ├── board_definitions_arduino_mkrzero.h │ ├── board_definitions_arduino_nano_33_iot.h │ ├── board_definitions_arduino_zero.h │ ├── board_driver_i2c.c │ ├── board_driver_i2c.h │ ├── board_driver_jtag.c │ ├── board_driver_jtag.h │ ├── board_driver_led.c │ ├── board_driver_led.h │ ├── board_driver_pmic.c │ ├── board_driver_pmic.h │ ├── board_driver_serial.c │ ├── board_driver_serial.h │ ├── board_driver_usb.c │ ├── board_driver_usb.h │ ├── board_init.c │ ├── board_startup.c │ ├── bootloader_samd21x18.ld │ ├── build_all_bootloaders.sh │ ├── main.c │ ├── sam_ba_cdc.c │ ├── sam_ba_cdc.h │ ├── sam_ba_monitor.c │ ├── sam_ba_monitor.h │ ├── sam_ba_serial.c │ ├── sam_ba_serial.h │ ├── sam_ba_usb.c │ ├── sam_ba_usb.h │ ├── samd21_sam_ba.atsln │ ├── samd21_sam_ba.bin │ ├── samd21_sam_ba.cproj │ └── samd21_sam_ba.hex ├── cores └── arduino │ ├── Arduino.h │ ├── Reset.cpp │ ├── Reset.h │ ├── RingBuffer.h │ ├── SERCOM.cpp │ ├── SERCOM.h │ ├── SafeRingBuffer.h │ ├── Tone.cpp │ ├── USB │ ├── CDC.cpp │ ├── CDC.h │ ├── SAMD21_USBDevice.h │ ├── USBAPI.h │ ├── USBCore.cpp │ ├── USBCore.h │ ├── USBDesc.h │ ├── USB_host.h │ ├── samd21_host.c │ └── samd21_host.h │ ├── Uart.cpp │ ├── Uart.h │ ├── Udp.h │ ├── WInterrupts.c │ ├── WMath.cpp │ ├── WVariant.h │ ├── abi.cpp │ ├── compact │ └── dtostrf.c │ ├── cortex_handlers.c │ ├── delay.c │ ├── hooks.c │ ├── itoa.c │ ├── main.cpp │ ├── new.cpp │ ├── pulse.c │ ├── pulse_asm.S │ ├── startup.c │ ├── sync.h │ ├── wiring.c │ ├── wiring_analog.c │ ├── wiring_digital.c │ ├── wiring_private.c │ ├── wiring_private.h │ └── wiring_shift.c ├── drivers ├── arduino-samd.cat ├── arduino-samd.inf ├── dpinst-amd64.exe ├── dpinst-x86.exe ├── genuino-samd.cat ├── genuino-samd.inf └── prewin10 │ ├── adafruit_circuit_playground_express.cat │ └── adafruit_circuit_playground_express.inf ├── extras ├── pack.hourlybuild.bash ├── pack.pullrequest.bash ├── pack.release.bash ├── package_index.json.Hourly.template ├── package_index.json.NewTag.template └── package_index.json.PR.template ├── keywords.txt ├── libraries ├── HID │ ├── HID.cpp │ ├── HID.h │ ├── keywords.txt │ └── library.properties ├── I2S │ ├── examples │ │ ├── InputSerialPlotter │ │ │ └── InputSerialPlotter.ino │ │ └── SimpleTone │ │ │ └── SimpleTone.ino │ ├── keywords.txt │ ├── library.properties │ └── src │ │ ├── I2S.cpp │ │ ├── I2S.h │ │ └── utility │ │ ├── DMA.cpp │ │ ├── DMA.h │ │ ├── I2SDoubleBuffer.cpp │ │ ├── I2SDoubleBuffer.h │ │ └── SAMD21_I2SDevice.h ├── SAMD_AnalogCorrection │ ├── examples │ │ └── CorrectADCResponse │ │ │ └── CorrectADCResponse.ino │ ├── library.properties │ └── src │ │ ├── SAMD_AnalogCorrection.cpp │ │ └── SAMD_AnalogCorrection.h ├── SAMD_BootloaderUpdater │ ├── examples │ │ └── UpdateBootloader │ │ │ └── UpdateBootloader.ino │ ├── extras │ │ └── build.sh │ ├── keywords.txt │ ├── library.properties │ └── src │ │ ├── SAMD_BootloaderUpdater.cpp │ │ ├── SAMD_BootloaderUpdater.h │ │ └── bootloaders │ │ └── mkrvidor4000.h ├── SBU │ ├── examples │ │ ├── SBU_LoadBinary │ │ │ └── SBU_LoadBinary.ino │ │ ├── SBU_LoadLZSS │ │ │ ├── SBU_LoadLZSS.ino │ │ │ ├── lzssEncode.cpp │ │ │ └── lzssEncode.h │ │ └── SBU_Usage │ │ │ └── SBU_Usage.ino │ ├── extras │ │ └── SBUBoot │ │ │ ├── SBUBoot.ino │ │ │ ├── build.sh │ │ │ ├── lzss.cpp │ │ │ └── lzss.h │ ├── keywords.txt │ ├── library.properties │ └── src │ │ ├── SBU.cpp │ │ ├── SBU.h │ │ └── boot │ │ └── mkrnb1500.h ├── SDU │ ├── examples │ │ └── Usage │ │ │ └── Usage.ino │ ├── extras │ │ └── SDUBoot │ │ │ ├── SDUBoot.ino │ │ │ └── build.sh │ ├── keywords.txt │ ├── library.properties │ └── src │ │ ├── SDU.cpp │ │ ├── SDU.h │ │ └── boot │ │ ├── mkr1000.h │ │ ├── mkrfox1200.h │ │ ├── mkrgsm1400.h │ │ ├── mkrnb1500.h │ │ ├── mkrwan1300.h │ │ ├── mkrwifi1010.h │ │ ├── mkrzero.h │ │ ├── mzero.h │ │ └── zero.h ├── SFU │ ├── examples │ │ ├── SFU_LoadBinary │ │ │ ├── Binary.h │ │ │ └── SFU_LoadBinary.ino │ │ └── SFU_Usage │ │ │ └── SFU_Usage.ino │ ├── extras │ │ └── SFUBoot │ │ │ ├── SFUBoot.ino │ │ │ └── build.sh │ ├── keywords.txt │ ├── library.properties │ └── src │ │ ├── SFU.cpp │ │ ├── SFU.h │ │ └── boot │ │ ├── mkr1000.h │ │ ├── mkrfox1200.h │ │ ├── mkrgsm1400.h │ │ ├── mkrnb1500.h │ │ ├── mkrvidor4000.h │ │ ├── mkrwan1310.h │ │ ├── mkrwifi1010.h │ │ └── mkrzero.h ├── SNU │ ├── examples │ │ └── Usage │ │ │ ├── Usage.ino │ │ │ └── arduino_secrets.h │ ├── extras │ │ └── NiNaBoot │ │ │ ├── NiNaBoot.ino │ │ │ ├── build.sh │ │ │ ├── lzss.cpp │ │ │ └── lzss.h │ ├── keywords.txt │ ├── library.properties │ └── src │ │ ├── SNU.cpp │ │ ├── SNU.h │ │ └── boot │ │ ├── mkrvidor4000.h │ │ ├── mkrwifi1010.h │ │ └── nano33iot.h ├── SPI │ ├── SPI.cpp │ ├── SPI.h │ ├── examples │ │ ├── BarometricPressureSensor │ │ │ └── BarometricPressureSensor.ino │ │ └── DigitalPotControl │ │ │ └── DigitalPotControl.ino │ ├── keywords.txt │ └── library.properties ├── SSU │ ├── examples │ │ ├── SSU_HttpOta │ │ │ ├── SSU_HttpOta.ino │ │ │ └── arduino_secrets.h │ │ ├── SSU_LZSS_HttpOta │ │ │ ├── SSU_LZSS_HttpOta.ino │ │ │ └── arduino_secrets.h │ │ ├── SSU_LoadBinary │ │ │ ├── Binary.h │ │ │ └── SSU_LoadBinary.ino │ │ └── SSU_Usage │ │ │ └── SSU_Usage.ino │ ├── extras │ │ └── SSUBoot │ │ │ ├── SSUBoot.ino │ │ │ ├── build.sh │ │ │ ├── lzss.cpp │ │ │ └── lzss.h │ ├── keywords.txt │ ├── library.properties │ └── src │ │ ├── SSU.cpp │ │ ├── SSU.h │ │ └── boot │ │ └── mkrgsm1400.h ├── USBHost │ ├── examples │ │ ├── ADKTerminalTest │ │ │ └── ADKTerminalTest.ino │ │ ├── KeyboardController │ │ │ └── KeyboardController.ino │ │ ├── MouseController │ │ │ └── MouseController.ino │ │ └── USB_desc │ │ │ ├── USB_desc.ino │ │ │ └── pgmstrings.h │ ├── keywords.txt │ ├── library.properties │ └── src │ │ ├── KeyboardController.cpp │ │ ├── KeyboardController.h │ │ ├── MouseController.cpp │ │ ├── MouseController.h │ │ ├── Usb.cpp │ │ ├── Usb.h │ │ ├── UsbCore.h │ │ ├── address.h │ │ ├── adk.cpp │ │ ├── adk.h │ │ ├── confdescparser.h │ │ ├── hexdump.h │ │ ├── hid.cpp │ │ ├── hid.h │ │ ├── hidboot.cpp │ │ ├── hidboot.h │ │ ├── hidescriptorparser.cpp │ │ ├── hidescriptorparser.h │ │ ├── hiduniversal.cpp │ │ ├── hiduniversal.h │ │ ├── hidusagestr.h │ │ ├── macros.h │ │ ├── message.cpp │ │ ├── message.h │ │ ├── parsetools.cpp │ │ ├── parsetools.h │ │ ├── printhex.h │ │ ├── sink_parser.h │ │ ├── usb_ch9.h │ │ ├── usbhub.cpp │ │ └── usbhub.h └── Wire │ ├── Wire.cpp │ ├── Wire.h │ ├── examples │ ├── SFRRanger_reader │ │ └── SFRRanger_reader.ino │ ├── digital_potentiometer │ │ └── digital_potentiometer.ino │ ├── master_reader │ │ └── master_reader.ino │ ├── master_writer │ │ └── master_writer.ino │ ├── slave_receiver │ │ └── slave_receiver.ino │ └── slave_sender │ │ └── slave_sender.ino │ ├── keywords.txt │ └── library.properties ├── platform.txt ├── post_install.bat ├── programmers.txt └── variants ├── arduino_mzero ├── debug_scripts │ └── variant.gdb ├── linker_scripts │ └── gcc │ │ ├── flash_with_bootloader.ld │ │ └── flash_without_bootloader.ld ├── openocd_scripts │ └── arduino_zero.cfg ├── pins_arduino.h ├── variant.cpp └── variant.h ├── arduino_zero ├── debug_scripts │ └── variant.gdb ├── linker_scripts │ └── gcc │ │ ├── flash_with_bootloader.ld │ │ └── flash_without_bootloader.ld ├── openocd_scripts │ └── arduino_zero.cfg ├── pins_arduino.h ├── variant.cpp └── variant.h ├── circuitplay ├── debug_scripts │ └── variant.gdb ├── linker_scripts │ └── gcc │ │ ├── flash_with_bootloader.ld │ │ └── flash_without_bootloader.ld ├── openocd_scripts │ └── arduino_zero.cfg ├── pins_arduino.h ├── variant.cpp └── variant.h ├── mkr1000 ├── debug_scripts │ └── variant.gdb ├── linker_scripts │ └── gcc │ │ ├── flash_with_bootloader.ld │ │ └── flash_without_bootloader.ld ├── openocd_scripts │ └── arduino_zero.cfg ├── pins_arduino.h ├── variant.cpp └── variant.h ├── mkrfox1200 ├── debug_scripts │ └── variant.gdb ├── linker_scripts │ └── gcc │ │ ├── flash_with_bootloader.ld │ │ └── flash_without_bootloader.ld ├── openocd_scripts │ └── arduino_zero.cfg ├── pins_arduino.h ├── variant.cpp └── variant.h ├── mkrgsm1400 ├── debug_scripts │ └── variant.gdb ├── linker_scripts │ └── gcc │ │ ├── flash_with_bootloader.ld │ │ └── flash_without_bootloader.ld ├── openocd_scripts │ └── arduino_zero.cfg ├── pins_arduino.h ├── variant.cpp └── variant.h ├── mkrnb1500 ├── debug_scripts │ └── variant.gdb ├── linker_scripts │ └── gcc │ │ ├── flash_with_bootloader.ld │ │ └── flash_without_bootloader.ld ├── openocd_scripts │ └── arduino_zero.cfg ├── pins_arduino.h ├── variant.cpp └── variant.h ├── mkrvidor4000 ├── clockout.c ├── debug_scripts │ └── variant.gdb ├── linker_scripts │ └── gcc │ │ ├── flash_with_bootloader.ld │ │ └── flash_without_bootloader.ld ├── openocd_scripts │ └── arduino_zero.cfg ├── pins_arduino.h ├── variant.cpp └── variant.h ├── mkrwan1300 ├── debug_scripts │ └── variant.gdb ├── linker_scripts │ └── gcc │ │ ├── flash_with_bootloader.ld │ │ └── flash_without_bootloader.ld ├── openocd_scripts │ └── arduino_zero.cfg ├── pins_arduino.h ├── variant.cpp └── variant.h ├── mkrwifi1010 ├── debug_scripts │ └── variant.gdb ├── linker_scripts │ └── gcc │ │ ├── flash_with_bootloader.ld │ │ └── flash_without_bootloader.ld ├── openocd_scripts │ └── arduino_zero.cfg ├── pins_arduino.h ├── variant.cpp └── variant.h ├── mkrzero ├── debug_scripts │ └── variant.gdb ├── linker_scripts │ └── gcc │ │ ├── flash_with_bootloader.ld │ │ └── flash_without_bootloader.ld ├── openocd_scripts │ └── arduino_zero.cfg ├── pins_arduino.h ├── variant.cpp └── variant.h └── nano_33_iot ├── debug_scripts └── variant.gdb ├── linker_scripts └── gcc │ ├── flash_with_bootloader.ld │ └── flash_without_bootloader.ld ├── openocd_scripts └── arduino_zero.cfg ├── pins_arduino.h ├── variant.cpp └── variant.h /.github/workflows/report-size-deltas.yml: -------------------------------------------------------------------------------- 1 | name: Report PR Size Deltas 2 | 3 | on: 4 | schedule: 5 | - cron: '*/5 * * * *' 6 | 7 | jobs: 8 | report: 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | - name: Comment size deltas reports to PRs 13 | uses: arduino/report-size-deltas@main 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.bz2 2 | 3 | bootloaders/*/build/ 4 | -------------------------------------------------------------------------------- /VARIANT_COMPLIANCE_CHANGELOG: -------------------------------------------------------------------------------- 1 | SAMD CORE 1.6.10 2 | 3 | * The linker script must define `__text_start__` symbol at the beginning of .text section. 4 | This symbol is used to automatically determine the bootloader size. 5 | 6 | SAMD CORE 1.6.6 7 | 8 | * `digitalPinToInterrupt` #define moved to Arduino.h, variant.h must no longer define it. 9 | 10 | SAMD CORE 1.6.3 11 | 12 | * Timer for pin PWM selected based on value of `PIN_ATTR_TIMER_ALT` or `PIN_ATTR_TIMER`. 13 | Prior to this "pin type" (ulPinType) was used. 14 | -------------------------------------------------------------------------------- /bootloaders/circuitplay/circuitplay_m0_samd21g18_sam_ba.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/circuitplay/circuitplay_m0_samd21g18_sam_ba.bin -------------------------------------------------------------------------------- /bootloaders/mkr1000/README.md: -------------------------------------------------------------------------------- 1 | 2 | The source code of the bootloader is in the folder: 3 | 4 | bootloader/zero/ 5 | 6 | 7 | -------------------------------------------------------------------------------- /bootloaders/mkr1000/samd21_sam_ba_arduino_mkr1000.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/mkr1000/samd21_sam_ba_arduino_mkr1000.bin -------------------------------------------------------------------------------- /bootloaders/mkrfox1200/samd21_sam_ba_arduino_mkrfox1200.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/mkrfox1200/samd21_sam_ba_arduino_mkrfox1200.bin -------------------------------------------------------------------------------- /bootloaders/mkrgsm1400/samd21_sam_ba_arduino_mkrgsm1400.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/mkrgsm1400/samd21_sam_ba_arduino_mkrgsm1400.bin -------------------------------------------------------------------------------- /bootloaders/mkrnb1500/samd21_sam_ba_arduino_mkrnb1500.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/mkrnb1500/samd21_sam_ba_arduino_mkrnb1500.bin -------------------------------------------------------------------------------- /bootloaders/mkrvidor4000/samd21_sam_ba_arduino_mkrvidor4000.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/mkrvidor4000/samd21_sam_ba_arduino_mkrvidor4000.bin -------------------------------------------------------------------------------- /bootloaders/mkrvidor4000/samd21_sam_ba_arduino_mkrvidor4000.elf.ltrans.out: -------------------------------------------------------------------------------- 1 | samd21_sam_ba_arduino_mkrvidor4000.elf.ltrans0.o 2 | -------------------------------------------------------------------------------- /bootloaders/mkrwan1300/samd21_sam_ba_arduino_mkrwan1300.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/mkrwan1300/samd21_sam_ba_arduino_mkrwan1300.bin -------------------------------------------------------------------------------- /bootloaders/mkrwan1300/samd21_sam_ba_arduino_mkrwan1310.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/mkrwan1300/samd21_sam_ba_arduino_mkrwan1310.bin -------------------------------------------------------------------------------- /bootloaders/mkrwifi1010/samd21_sam_ba_arduino_mkrwifi1010.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/mkrwifi1010/samd21_sam_ba_arduino_mkrwifi1010.bin -------------------------------------------------------------------------------- /bootloaders/mkrzero/samd21_sam_ba_arduino_mkrzero.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/mkrzero/samd21_sam_ba_arduino_mkrzero.bin -------------------------------------------------------------------------------- /bootloaders/mzero/Bootloader_D21/Bootloader_D21.atsln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Atmel Studio Solution File, Format Version 11.00 4 | Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "Bootloader_D21", "Bootloader_D21.cproj", "{7ABD2862-543D-4184-845E-8DC3E340E2CC}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|ARM = Debug|ARM 9 | Release|ARM = Release|ARM 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {7ABD2862-543D-4184-845E-8DC3E340E2CC}.Debug|ARM.ActiveCfg = Debug|ARM 13 | {7ABD2862-543D-4184-845E-8DC3E340E2CC}.Debug|ARM.Build.0 = Debug|ARM 14 | {7ABD2862-543D-4184-845E-8DC3E340E2CC}.Release|ARM.ActiveCfg = Release|ARM 15 | {7ABD2862-543D-4184-845E-8DC3E340E2CC}.Release|ARM.Build.0 = Release|ARM 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /bootloaders/mzero/Bootloader_D21/Bootloader_D21.atsuo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/mzero/Bootloader_D21/Bootloader_D21.atsuo -------------------------------------------------------------------------------- /bootloaders/mzero/Bootloader_D21/atmel_devices_cdc.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/mzero/Bootloader_D21/atmel_devices_cdc.cat -------------------------------------------------------------------------------- /bootloaders/mzero/Bootloader_D21/src/ASF/common/services/sleepmgr/samd/sleepmgr.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Chip-specific sleep manager configuration 5 | * 6 | * Copyright (c) 2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | #include 44 | #include 45 | 46 | #if defined(CONFIG_SLEEPMGR_ENABLE) || defined(__DOXYGEN__) 47 | 48 | uint8_t sleepmgr_locks[SLEEPMGR_NR_OF_MODES]; 49 | 50 | #endif /* CONFIG_SLEEPMGR_ENABLE */ 51 | -------------------------------------------------------------------------------- /bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/preprocessor/preprocessor.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Preprocessor utils. 5 | * 6 | * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #ifndef _PREPROCESSOR_H_ 45 | #define _PREPROCESSOR_H_ 46 | 47 | #include "tpaste.h" 48 | #include "stringz.h" 49 | #include "mrepeat.h" 50 | #include "mrecursion.h" 51 | 52 | #endif // _PREPROCESSOR_H_ 53 | -------------------------------------------------------------------------------- /bootloaders/mzero/Bootloader_D21/src/ASF/thirdparty/CMSIS/CMSIS END USER LICENCE AGREEMENT.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/mzero/Bootloader_D21/src/ASF/thirdparty/CMSIS/CMSIS END USER LICENCE AGREEMENT.pdf -------------------------------------------------------------------------------- /bootloaders/mzero/Bootloader_D21/src/ASF/thirdparty/CMSIS/Lib/GCC/.gitignore: -------------------------------------------------------------------------------- 1 | # Libraries 2 | 3 | !*.a 4 | 5 | -------------------------------------------------------------------------------- /bootloaders/mzero/Bootloader_D21/src/ASF/thirdparty/CMSIS/Lib/GCC/libarm_cortexM0l_math.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/mzero/Bootloader_D21/src/ASF/thirdparty/CMSIS/Lib/GCC/libarm_cortexM0l_math.a -------------------------------------------------------------------------------- /bootloaders/mzero/Bootloader_D21/src/ASF/thirdparty/CMSIS/README.txt: -------------------------------------------------------------------------------- 1 | * ------------------------------------------------------------------- 2 | * Copyright (C) 2011 ARM Limited. All rights reserved. 3 | * 4 | * Date: 11 October 2011 5 | * Revision: V3.00 6 | * 7 | * Project: Cortex Microcontroller Software Interface Standard (CMSIS) 8 | * Title: Release Note for CMSIS 9 | * 10 | * ------------------------------------------------------------------- 11 | 12 | 13 | NOTE - Open the index.html file to access CMSIS documentation 14 | 15 | 16 | The Cortex Microcontroller Software Interface Standard (CMSIS) provides a single standard across all 17 | Cortex-Mx processor series vendors. It enables code re-use and code sharing across software projects 18 | and reduces time-to-market for new embedded applications. 19 | 20 | CMSIS is released under the terms of the end user license agreement ("CMSIS END USER LICENCE AGREEMENT.pdf"). 21 | Any user of the software package is bound to the terms and conditions of the end user license agreement. 22 | 23 | 24 | You will find the following sub-directories: 25 | 26 | Documentation - Contains CMSIS documentation. 27 | 28 | DSP_Lib - MDK project files, Examples and source files etc.. to build the 29 | CMSIS DSP Software Library for Cortex-M0, Cortex-M3, Cortex-M4 processors. 30 | 31 | Include - CMSIS Core Support and CMSIS DSP Include Files. 32 | 33 | Lib - CMSIS DSP Libraries. 34 | 35 | RTOS - CMSIS RTOS API template header file. 36 | 37 | SVD - CMSIS SVD Schema files and Conversion Utility. 38 | -------------------------------------------------------------------------------- /bootloaders/mzero/Bootloader_D21/src/config/conf_board.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAM D21 Xplained Pro board configuration. 5 | * 6 | * Copyright (c) 2013-2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #ifndef CONF_BOARD_H_INCLUDED 45 | #define CONF_BOARD_H_INCLUDED 46 | 47 | #endif /* CONF_BOARD_H_INCLUDED */ 48 | -------------------------------------------------------------------------------- /bootloaders/mzero/Bootloader_D21/src/config/conf_extint.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAM External Interrupt Driver Configuration Header 5 | * 6 | * Copyright (C) 2013-2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | #ifndef CONF_EXTINT_H_INCLUDED 44 | #define CONF_EXTINT_H_INCLUDED 45 | 46 | # define EXTINT_CLOCK_SOURCE GCLK_GENERATOR_0 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /bootloaders/mzero/Bootloader_D21/src/config/conf_sleepmgr.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Chip-specific sleep manager configuration 5 | * 6 | * Copyright (c) 2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | #ifndef CONF_SLEEPMGR_INCLUDED 44 | #define CONF_SLEEPMGR_INCLUDED 45 | 46 | // Sleep manager options 47 | #define CONFIG_SLEEPMGR_ENABLE 48 | 49 | #endif /* CONF_SLEEPMGR_INCLUDED */ 50 | -------------------------------------------------------------------------------- /bootloaders/mzero/Bootloader_D21/src/main.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Main functions 5 | * 6 | * Copyright (c) 2009-2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #ifndef _MAIN_H_ 45 | #define _MAIN_H_ 46 | 47 | #include "usb_protocol_cdc.h" 48 | 49 | void main_cdc_config(uint8_t port,usb_cdc_line_coding_t *cfg); 50 | 51 | #endif // _MAIN_H_ 52 | -------------------------------------------------------------------------------- /bootloaders/nano_33_iot/samd21_sam_ba_arduino_nano_33_iot.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/nano_33_iot/samd21_sam_ba_arduino_nano_33_iot.bin -------------------------------------------------------------------------------- /bootloaders/sofia/Bootloader_D21_Sofia_V2.1/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/sofia/Bootloader_D21_Sofia_V2.1/.DS_Store -------------------------------------------------------------------------------- /bootloaders/sofia/Bootloader_D21_Sofia_V2.1/Bootloader_Sofia.atsln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Atmel Studio Solution File, Format Version 11.00 4 | Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "Bootloader_Sofia", "Bootloader_Sofia.cproj", "{7ABD2862-543D-4184-845E-8DC3E340E2CC}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|ARM = Debug|ARM 9 | Release|ARM = Release|ARM 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {7ABD2862-543D-4184-845E-8DC3E340E2CC}.Debug|ARM.ActiveCfg = Debug|ARM 13 | {7ABD2862-543D-4184-845E-8DC3E340E2CC}.Debug|ARM.Build.0 = Debug|ARM 14 | {7ABD2862-543D-4184-845E-8DC3E340E2CC}.Release|ARM.ActiveCfg = Release|ARM 15 | {7ABD2862-543D-4184-845E-8DC3E340E2CC}.Release|ARM.Build.0 = Release|ARM 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /bootloaders/sofia/Bootloader_D21_Sofia_V2.1/Bootloader_Sofia.atsuo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/sofia/Bootloader_D21_Sofia_V2.1/Bootloader_Sofia.atsuo -------------------------------------------------------------------------------- /bootloaders/sofia/Bootloader_D21_Sofia_V2.1/atmel_devices_cdc.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/sofia/Bootloader_D21_Sofia_V2.1/atmel_devices_cdc.cat -------------------------------------------------------------------------------- /bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/.DS_Store -------------------------------------------------------------------------------- /bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/ASF/common/services/sleepmgr/samd/sleepmgr.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Chip-specific sleep manager configuration 5 | * 6 | * Copyright (c) 2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | #include 44 | #include 45 | 46 | #if defined(CONFIG_SLEEPMGR_ENABLE) || defined(__DOXYGEN__) 47 | 48 | uint8_t sleepmgr_locks[SLEEPMGR_NR_OF_MODES]; 49 | 50 | #endif /* CONFIG_SLEEPMGR_ENABLE */ 51 | -------------------------------------------------------------------------------- /bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/ASF/sam0/utils/preprocessor/preprocessor.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Preprocessor utils. 5 | * 6 | * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #ifndef _PREPROCESSOR_H_ 45 | #define _PREPROCESSOR_H_ 46 | 47 | #include "tpaste.h" 48 | #include "stringz.h" 49 | #include "mrepeat.h" 50 | #include "mrecursion.h" 51 | 52 | #endif // _PREPROCESSOR_H_ 53 | -------------------------------------------------------------------------------- /bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/ASF/thirdparty/CMSIS/CMSIS END USER LICENCE AGREEMENT.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/ASF/thirdparty/CMSIS/CMSIS END USER LICENCE AGREEMENT.pdf -------------------------------------------------------------------------------- /bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/ASF/thirdparty/CMSIS/Lib/GCC/.gitignore: -------------------------------------------------------------------------------- 1 | # Libraries 2 | 3 | !*.a 4 | 5 | -------------------------------------------------------------------------------- /bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/ASF/thirdparty/CMSIS/Lib/GCC/libarm_cortexM0l_math.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/ASF/thirdparty/CMSIS/Lib/GCC/libarm_cortexM0l_math.a -------------------------------------------------------------------------------- /bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/ASF/thirdparty/CMSIS/README.txt: -------------------------------------------------------------------------------- 1 | * ------------------------------------------------------------------- 2 | * Copyright (C) 2011 ARM Limited. All rights reserved. 3 | * 4 | * Date: 11 October 2011 5 | * Revision: V3.00 6 | * 7 | * Project: Cortex Microcontroller Software Interface Standard (CMSIS) 8 | * Title: Release Note for CMSIS 9 | * 10 | * ------------------------------------------------------------------- 11 | 12 | 13 | NOTE - Open the index.html file to access CMSIS documentation 14 | 15 | 16 | The Cortex Microcontroller Software Interface Standard (CMSIS) provides a single standard across all 17 | Cortex-Mx processor series vendors. It enables code re-use and code sharing across software projects 18 | and reduces time-to-market for new embedded applications. 19 | 20 | CMSIS is released under the terms of the end user license agreement ("CMSIS END USER LICENCE AGREEMENT.pdf"). 21 | Any user of the software package is bound to the terms and conditions of the end user license agreement. 22 | 23 | 24 | You will find the following sub-directories: 25 | 26 | Documentation - Contains CMSIS documentation. 27 | 28 | DSP_Lib - MDK project files, Examples and source files etc.. to build the 29 | CMSIS DSP Software Library for Cortex-M0, Cortex-M3, Cortex-M4 processors. 30 | 31 | Include - CMSIS Core Support and CMSIS DSP Include Files. 32 | 33 | Lib - CMSIS DSP Libraries. 34 | 35 | RTOS - CMSIS RTOS API template header file. 36 | 37 | SVD - CMSIS SVD Schema files and Conversion Utility. 38 | -------------------------------------------------------------------------------- /bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/config/conf_board.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAM D21 Xplained Pro board configuration. 5 | * 6 | * Copyright (c) 2013-2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #ifndef CONF_BOARD_H_INCLUDED 45 | #define CONF_BOARD_H_INCLUDED 46 | 47 | #endif /* CONF_BOARD_H_INCLUDED */ 48 | -------------------------------------------------------------------------------- /bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/config/conf_extint.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief SAM External Interrupt Driver Configuration Header 5 | * 6 | * Copyright (C) 2013-2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | #ifndef CONF_EXTINT_H_INCLUDED 44 | #define CONF_EXTINT_H_INCLUDED 45 | 46 | # define EXTINT_CLOCK_SOURCE GCLK_GENERATOR_0 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/config/conf_sleepmgr.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Chip-specific sleep manager configuration 5 | * 6 | * Copyright (c) 2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | #ifndef CONF_SLEEPMGR_INCLUDED 44 | #define CONF_SLEEPMGR_INCLUDED 45 | 46 | // Sleep manager options 47 | #define CONFIG_SLEEPMGR_ENABLE 48 | 49 | #endif /* CONF_SLEEPMGR_INCLUDED */ 50 | -------------------------------------------------------------------------------- /bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/main.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * \brief Main functions 5 | * 6 | * Copyright (c) 2009-2014 Atmel Corporation. All rights reserved. 7 | * 8 | * \asf_license_start 9 | * 10 | * \page License 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 22 | * 3. The name of Atmel may not be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * 4. This software may only be redistributed and used in connection with an 26 | * Atmel microcontroller product. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * \asf_license_stop 41 | * 42 | */ 43 | 44 | #ifndef _MAIN_H_ 45 | #define _MAIN_H_ 46 | 47 | #include "usb_protocol_cdc.h" 48 | 49 | void main_cdc_config(uint8_t port,usb_cdc_line_coding_t *cfg); 50 | 51 | #endif // _MAIN_H_ 52 | -------------------------------------------------------------------------------- /bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/usart_setup.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #ifndef USART_SETUP_H_ 5 | #define USART_SETUP_H_ 6 | /** \name Embedded debugger SOFIA SERCOM interface definitions 7 | * @{ 8 | */ 9 | #define EDBG_SOFIA_MODULE SERCOM5 10 | #define EDBG_SOFIA_SERCOM_MUX_SETTING USART_RX_3_TX_2_XCK_3//USART_RX_3_TX_2_XCK_3 11 | #define EDBG_SOFIA_SERCOM_PINMUX_PAD0 PINMUX_UNUSED 12 | #define EDBG_SOFIA_SERCOM_PINMUX_PAD1 PINMUX_UNUSED 13 | #define EDBG_SOFIA_SERCOM_PINMUX_PAD2 PINMUX_PB22D_SERCOM5_PAD2 14 | #define EDBG_SOFIA_SERCOM_PINMUX_PAD3 PINMUX_PB23D_SERCOM5_PAD3 15 | #define EDBG_SOFIA_SERCOM_DMAC_ID_TX SERCOM5_DMAC_ID_TX 16 | #define EDBG_SOFIA_SERCOM_DMAC_ID_RX SERCOM5_DMAC_ID_RX 17 | /** @} */ 18 | 19 | 20 | 21 | 22 | 23 | 24 | struct usart_module usart_instance; 25 | void configure_usart(void) 26 | { 27 | struct usart_config config_usart; 28 | usart_get_config_defaults(&config_usart); 29 | //! [setup_change_config] 30 | config_usart.baudrate = 57600; 31 | config_usart.mux_setting = EDBG_SOFIA_SERCOM_MUX_SETTING; 32 | config_usart.pinmux_pad0 = EDBG_SOFIA_SERCOM_PINMUX_PAD0; 33 | config_usart.pinmux_pad1 = EDBG_SOFIA_SERCOM_PINMUX_PAD1; 34 | config_usart.pinmux_pad2 = EDBG_SOFIA_SERCOM_PINMUX_PAD2; 35 | config_usart.pinmux_pad3 = EDBG_SOFIA_SERCOM_PINMUX_PAD3; 36 | //config_usart.start_frame_detection_enable = true; 37 | //! [setup_change_config] 38 | while (usart_init(&usart_instance, SERCOM5, &config_usart) != STATUS_OK) { 39 | 40 | } 41 | usart_enable(&usart_instance); 42 | } 43 | 44 | #endif /* USART_SETUP_H_ */ 45 | 46 | 47 | -------------------------------------------------------------------------------- /bootloaders/zero/board_definitions.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2015 Atmel Corporation/Thibaut VIARD. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | See the GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #if defined(BOARD_ID_arduino_zero) 21 | #include "board_definitions_arduino_zero.h" 22 | #elif defined(BOARD_ID_arduino_mkr1000) 23 | #include "board_definitions_arduino_mkr1000.h" 24 | #elif defined(BOARD_ID_arduino_mkrzero) 25 | #include "board_definitions_arduino_mkrzero.h" 26 | #elif defined(BOARD_ID_arduino_mkrfox1200) 27 | #include "board_definitions_arduino_mkrfox1200.h" 28 | #elif defined(BOARD_ID_arduino_mkrgsm1400) 29 | #include "board_definitions_arduino_mkrgsm1400.h" 30 | #elif defined(BOARD_ID_arduino_mkrwan1300) 31 | #include "board_definitions_arduino_mkrwan1300.h" 32 | #elif defined(BOARD_ID_arduino_mkrwan1310) 33 | #include "board_definitions_arduino_mkrwan1310.h" 34 | #elif defined(BOARD_ID_arduino_mkrwifi1010) 35 | #include "board_definitions_arduino_mkrwifi1010.h" 36 | #elif defined(BOARD_ID_arduino_mkrvidor4000) 37 | #include "board_definitions_arduino_mkrvidor4000.h" 38 | #elif defined(BOARD_ID_arduino_mkrnb1500) 39 | #include "board_definitions_arduino_mkrnb1500.h" 40 | #elif defined(BOARD_ID_arduino_nano_33_iot) 41 | #include "board_definitions_arduino_nano_33_iot.h" 42 | #else 43 | #error You must define a BOARD_ID and add the corresponding definitions in board_definitions.h 44 | #endif 45 | 46 | // Common definitions 47 | // ------------------ 48 | 49 | #define BOOT_PIN_MASK (1U << (BOOT_LOAD_PIN & 0x1f)) 50 | 51 | -------------------------------------------------------------------------------- /bootloaders/zero/board_driver_i2c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2015 Atmel Corporation/Thibaut VIARD. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | See the GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef _BOARD_DRIVER_I2C_ 21 | #define _BOARD_DRIVER_I2C_ 22 | 23 | #include 24 | #include 25 | #include "board_definitions.h" 26 | 27 | void i2c_init(uint32_t baud); 28 | void i2c_end(); 29 | uint8_t i2c_requestFrom(uint8_t address, uint8_t quantity, bool stopBit); 30 | void i2c_beginTransmission(uint8_t address); 31 | uint8_t i2c_endTransmission(bool stopBit); 32 | uint8_t i2c_write(uint8_t ucData); 33 | 34 | 35 | #endif // _BOARD_DRIVER_I2C_ 36 | -------------------------------------------------------------------------------- /bootloaders/zero/board_driver_led.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2015 Atmel Corporation/Thibaut VIARD. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | See the GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #include "board_driver_led.h" 21 | 22 | volatile uint8_t ledKeepValue = 0; 23 | volatile uint8_t ledTargetValue = 20; 24 | volatile int8_t ledDirection = 1; 25 | 26 | inline void LED_pulse() 27 | { 28 | if (ledKeepValue == 0) { 29 | ledTargetValue += ledDirection; 30 | LED_toggle(); 31 | } 32 | ledKeepValue ++; 33 | 34 | if (ledTargetValue > 240 || ledTargetValue < 10) { 35 | ledDirection = -ledDirection; 36 | ledTargetValue += ledDirection; 37 | } 38 | 39 | if (ledKeepValue == ledTargetValue) { 40 | LED_toggle(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /bootloaders/zero/board_driver_pmic.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2015 Atmel Corporation/Thibaut VIARD. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | See the GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef _BOARD_DRIVER_PMIC_ 21 | #define _BOARD_DRIVER_PMIC_ 22 | 23 | #include 24 | #include 25 | #include "board_definitions.h" 26 | 27 | //Default PMIC (BQ24195) I2C address 28 | #define PMIC_ADDRESS 0x6B 29 | 30 | // Register address definitions 31 | #define INPUT_SOURCE_REGISTER 0x00 32 | #define POWERON_CONFIG_REGISTER 0x01 33 | #define CHARGE_CURRENT_CONTROL_REGISTER 0x02 34 | #define PRECHARGE_CURRENT_CONTROL_REGISTER 0x03 35 | #define CHARGE_VOLTAGE_CONTROL_REGISTER 0x04 36 | #define CHARGE_TIMER_CONTROL_REGISTER 0x05 37 | #define THERMAL_REG_CONTROL_REGISTER 0x06 38 | #define MISC_CONTROL_REGISTER 0x07 39 | #define SYSTEM_STATUS_REGISTER 0x08 40 | #define FAULT_REGISTER 0x09 41 | #define PMIC_VERSION_REGISTER 0x0A 42 | 43 | int configure_pmic(); 44 | 45 | #endif // _BOARD_DRIVER_PMIC_ 46 | -------------------------------------------------------------------------------- /bootloaders/zero/board_driver_usb.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2015 Atmel Corporation/Thibaut VIARD. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | See the GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef _BOARD_DRIVER_USB_H_ 21 | #define _BOARD_DRIVER_USB_H_ 22 | 23 | #include "sam_ba_cdc.h" 24 | 25 | extern UsbDeviceDescriptor usb_endpoint_table[MAX_EP]; 26 | extern uint8_t udd_ep_out_cache_buffer[2][64]; //1 for CTRL, 1 for BULK 27 | extern uint8_t udd_ep_in_cache_buffer[2][64]; //1 for CTRL, 1 for BULK 28 | 29 | P_USB_CDC USB_Open(P_USB_CDC pCdc, Usb *pUsb); 30 | 31 | void USB_Init(void); 32 | 33 | uint32_t USB_Write(Usb *pUsb, const char *pData, uint32_t length, uint8_t ep_num); 34 | uint32_t USB_Read(Usb *pUsb, char *pData, uint32_t length); 35 | uint32_t USB_Read_blocking(Usb *pUsb, char *pData, uint32_t length); 36 | 37 | uint8_t USB_IsConfigured(P_USB_CDC pCdc); 38 | 39 | void USB_SendStall(Usb *pUsb, bool direction_in); 40 | void USB_SendZlp(Usb *pUsb); 41 | 42 | void USB_SetAddress(Usb *pUsb, uint16_t wValue); 43 | void USB_Configure(Usb *pUsb); 44 | 45 | #endif // _BOARD_DRIVER_USB_H_ 46 | -------------------------------------------------------------------------------- /bootloaders/zero/build_all_bootloaders.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | BOARD_ID=arduino_zero NAME=samd21_sam_ba make clean all 4 | 5 | BOARD_ID=arduino_mkr1000 NAME=samd21_sam_ba_arduino_mkr1000 make clean all 6 | mv -v samd21_sam_ba_arduino_mkr1000.* ../mkr1000/ 7 | 8 | BOARD_ID=arduino_mkrzero NAME=samd21_sam_ba_arduino_mkrzero make clean all 9 | mv -v samd21_sam_ba_arduino_mkrzero.* ../mkrzero/ 10 | 11 | BOARD_ID=arduino_mkrfox1200 NAME=samd21_sam_ba_arduino_mkrfox1200 make clean all 12 | mv -v samd21_sam_ba_arduino_mkrfox1200.* ../mkrfox1200/ 13 | 14 | BOARD_ID=arduino_mkrgsm1400 NAME=samd21_sam_ba_arduino_mkrgsm1400 make clean all 15 | mv -v samd21_sam_ba_arduino_mkrgsm1400.* ../mkrgsm1400/ 16 | 17 | BOARD_ID=arduino_mkrwan1300 NAME=samd21_sam_ba_arduino_mkrwan1300 make clean all 18 | mv -v samd21_sam_ba_arduino_mkrwan1300.* ../mkrwan1300/ 19 | 20 | BOARD_ID=arduino_mkrwan1310 NAME=samd21_sam_ba_arduino_mkrwan1310 make clean all 21 | mv -v samd21_sam_ba_arduino_mkrwan1310.* ../mkrwan1300/ 22 | 23 | BOARD_ID=arduino_mkrwifi1010 NAME=samd21_sam_ba_arduino_mkrwifi1010 make clean all 24 | mv -v samd21_sam_ba_arduino_mkrwifi1010.* ../mkrwifi1010/ 25 | 26 | BOARD_ID=arduino_mkrvidor4000 SAM_BA_INTERFACES=SAM_BA_USBCDC_ONLY NAME=samd21_sam_ba_arduino_mkrvidor4000 make clean all 27 | mv -v samd21_sam_ba_arduino_mkrvidor4000.* ../mkrvidor4000/ 28 | 29 | BOARD_ID=arduino_mkrnb1500 NAME=samd21_sam_ba_arduino_mkrnb1500 make clean all 30 | mv -v samd21_sam_ba_arduino_mkrnb1500.* ../mkrnb1500/ 31 | 32 | BOARD_ID=arduino_nano_33_iot NAME=samd21_sam_ba_arduino_nano_33_iot make clean all 33 | mv -v samd21_sam_ba_arduino_nano_33_iot.* ../nano_33_iot/ 34 | 35 | echo Done building bootloaders! 36 | 37 | -------------------------------------------------------------------------------- /bootloaders/zero/sam_ba_monitor.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2015 Atmel Corporation/Thibaut VIARD. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | See the GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef _MONITOR_SAM_BA_H_ 21 | #define _MONITOR_SAM_BA_H_ 22 | 23 | #include "board_definitions.h" 24 | 25 | #define SAM_BA_VERSION "2.0" 26 | 27 | #if !defined(SAM_BA_BOTH_INTERFACES) && !defined(SAM_BA_UART_ONLY) && !defined(SAM_BA_USBCDC_ONLY) 28 | #define SAM_BA_BOTH_INTERFACES 29 | #endif 30 | 31 | /* Selects USB as the communication interface of the monitor */ 32 | #define SAM_BA_INTERFACE_USBCDC 0 33 | /* Selects USART as the communication interface of the monitor */ 34 | #define SAM_BA_INTERFACE_USART 1 35 | 36 | /* Selects USB as the communication interface of the monitor */ 37 | #define SIZEBUFMAX 64 38 | 39 | // Set this flag to let the bootloader enforce read restrictions of flash memory, even if security bit is not set 40 | //#define SECURE_BY_DEFAULT 41 | 42 | /** 43 | * \brief Initialize the monitor 44 | * 45 | */ 46 | void sam_ba_monitor_init(uint8_t com_interface); 47 | 48 | /** 49 | * \brief System tick function of the SAM-BA Monitor 50 | * 51 | */ 52 | void sam_ba_monitor_sys_tick(void); 53 | 54 | /** 55 | * \brief Main function of the SAM-BA Monitor 56 | * 57 | */ 58 | void sam_ba_monitor_run(void); 59 | 60 | /** 61 | * \brief 62 | * 63 | */ 64 | void sam_ba_putdata_term(uint8_t* data, uint32_t length); 65 | 66 | /** 67 | * \brief 68 | * 69 | */ 70 | void call_applet(uint32_t address); 71 | 72 | #endif // _MONITOR_SAM_BA_H_ 73 | -------------------------------------------------------------------------------- /bootloaders/zero/samd21_sam_ba.atsln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Atmel Studio Solution File, Format Version 11.00 4 | VisualStudioVersion = 14.0.23107.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "samd21_sam_ba", "samd21_sam_ba.cproj", "{DCE6C7E3-EE26-4D79-826B-08594B9AD897}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|ARM = Debug|ARM 11 | Release|ARM = Release|ARM 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|ARM.ActiveCfg = Debug|ARM 15 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|ARM.Build.0 = Debug|ARM 16 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|ARM.ActiveCfg = Release|ARM 17 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|ARM.Build.0 = Release|ARM 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /bootloaders/zero/samd21_sam_ba.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/bootloaders/zero/samd21_sam_ba.bin -------------------------------------------------------------------------------- /cores/arduino/Reset.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #pragma once 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | void initiateReset(int ms); 26 | void tickReset(); 27 | void cancelReset(); 28 | 29 | __attribute__ ((weak)) void resetExternalChip() {}; 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | -------------------------------------------------------------------------------- /cores/arduino/SafeRingBuffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2020 Arduino. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifdef __cplusplus 20 | 21 | #ifndef _SAFE_RING_BUFFER_ 22 | #define _SAFE_RING_BUFFER_ 23 | 24 | #include 25 | #include "sync.h" 26 | 27 | namespace arduino { 28 | 29 | template 30 | class SafeRingBufferN : public RingBufferN 31 | { 32 | public: 33 | int read_char(); 34 | void store_char( uint8_t c ) ; 35 | }; 36 | 37 | typedef SafeRingBufferN SafeRingBuffer; 38 | 39 | template 40 | int SafeRingBufferN::read_char() { 41 | synchronized { 42 | return RingBufferN::read_char(); 43 | } 44 | 45 | // We should never reached this line because the synchronized {} block gets 46 | // executed at least once. However the compiler gets confused and prints a 47 | // warning about control reaching the end of a non-void function. This 48 | // silences that warning. 49 | return -1; 50 | } 51 | 52 | template 53 | void SafeRingBufferN::store_char(uint8_t c) { 54 | synchronized { 55 | RingBufferN::store_char(c); 56 | } 57 | } 58 | 59 | } 60 | 61 | #endif /* _SAFE_RING_BUFFER_ */ 62 | #endif /* __cplusplus */ 63 | -------------------------------------------------------------------------------- /cores/arduino/USB/CDC.h: -------------------------------------------------------------------------------- 1 | #ifndef __CDC_H__ 2 | #define __CDC_H__ 3 | 4 | #ifdef CDC_ENABLED 5 | 6 | #include "USBDesc.h" 7 | #include "USBAPI.h" 8 | #include "api/PluggableUSB.h" 9 | 10 | 11 | #define CDC_V1_10 0x0110 12 | #define CDC_COMMUNICATION_INTERFACE_CLASS 0x02 13 | 14 | #define CDC_CALL_MANAGEMENT 0x01 15 | #define CDC_ABSTRACT_CONTROL_MODEL 0x02 16 | #define CDC_HEADER 0x00 17 | #define CDC_ABSTRACT_CONTROL_MANAGEMENT 0x02 18 | #define CDC_UNION 0x06 19 | #define CDC_CS_INTERFACE 0x24 20 | #define CDC_CS_ENDPOINT 0x25 21 | #define CDC_DATA_INTERFACE_CLASS 0x0A 22 | 23 | // CDC CS interface descriptor 24 | typedef struct 25 | { 26 | uint8_t len; // 5 27 | uint8_t dtype; // 0x24 28 | uint8_t subtype; 29 | uint8_t d0; 30 | uint8_t d1; 31 | } CDCCSInterfaceDescriptor; 32 | 33 | typedef struct 34 | { 35 | uint8_t len; // 4 36 | uint8_t dtype; // 0x24 37 | uint8_t subtype; 38 | uint8_t d0; 39 | } CDCCSInterfaceDescriptor4; 40 | 41 | typedef struct 42 | { 43 | uint8_t len; 44 | uint8_t dtype; // 0x24 45 | uint8_t subtype; // 1 46 | uint8_t bmCapabilities; 47 | uint8_t bDataInterface; 48 | } CMFunctionalDescriptor; 49 | 50 | typedef struct 51 | { 52 | uint8_t len; 53 | uint8_t dtype; // 0x24 54 | uint8_t subtype; // 1 55 | uint8_t bmCapabilities; 56 | } ACMFunctionalDescriptor; 57 | 58 | typedef struct 59 | { 60 | // IAD 61 | IADDescriptor iad; // Only needed on compound device 62 | // Control 63 | InterfaceDescriptor cif; 64 | CDCCSInterfaceDescriptor header; 65 | ACMFunctionalDescriptor controlManagement; // ACM 66 | CDCCSInterfaceDescriptor functionalDescriptor; // CDC_UNION 67 | CMFunctionalDescriptor callManagement; // Call Management 68 | EndpointDescriptor cifin; 69 | 70 | // Data 71 | InterfaceDescriptor dif; 72 | EndpointDescriptor in; 73 | EndpointDescriptor out; 74 | } CDCDescriptor; 75 | 76 | typedef struct { 77 | uint32_t dwDTERate; 78 | uint8_t bCharFormat; 79 | uint8_t bParityType; 80 | uint8_t bDataBits; 81 | uint8_t lineState; 82 | } LineInfo; 83 | 84 | 85 | #endif 86 | #endif -------------------------------------------------------------------------------- /cores/arduino/USB/USBDesc.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef __USBDESC_H__ 20 | #define __USBDESC_H__ 21 | 22 | #ifdef USBCON 23 | 24 | // CDC or HID can be enabled together. 25 | #ifndef CDC_DISABLED 26 | #define CDC_ENABLED 27 | #endif 28 | 29 | #ifndef PLUGGABLE_USB_DISABLED 30 | #define PLUGGABLE_USB_ENABLED 31 | #endif 32 | 33 | #define ISERIAL_MAX_LEN 65 34 | 35 | // Defined string description 36 | #define IMANUFACTURER 1 37 | #define IPRODUCT 2 38 | #define ISERIAL 3 39 | 40 | #endif /* USBCON */ 41 | 42 | #endif /* __USBDESC_H__ */ 43 | -------------------------------------------------------------------------------- /cores/arduino/WMath.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014 Arduino. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | extern "C" { 20 | #include "stdlib.h" 21 | #include "stdint.h" 22 | } 23 | 24 | void randomSeed( uint32_t dwSeed ) 25 | { 26 | if ( dwSeed != 0 ) 27 | { 28 | srand( dwSeed ) ; 29 | } 30 | } 31 | 32 | long random( long howbig ) 33 | { 34 | if ( howbig == 0 ) 35 | { 36 | return 0 ; 37 | } 38 | 39 | return rand() % howbig; 40 | } 41 | 42 | long random( long howsmall, long howbig ) 43 | { 44 | if (howsmall >= howbig) 45 | { 46 | return howsmall; 47 | } 48 | 49 | long diff = howbig - howsmall; 50 | 51 | return random(diff) + howsmall; 52 | } 53 | -------------------------------------------------------------------------------- /cores/arduino/abi.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #include 20 | 21 | extern "C" void __cxa_pure_virtual(void) __attribute__ ((__noreturn__)); 22 | extern "C" void __cxa_deleted_virtual(void) __attribute__ ((__noreturn__)); 23 | 24 | void __cxa_pure_virtual(void) { 25 | // We might want to write some diagnostics to uart in this case 26 | //std::terminate(); 27 | while (1) 28 | ; 29 | } 30 | 31 | void __cxa_deleted_virtual(void) { 32 | // We might want to write some diagnostics to uart in this case 33 | //std::terminate(); 34 | while (1) 35 | ; 36 | } 37 | 38 | -------------------------------------------------------------------------------- /cores/arduino/compact/dtostrf.c: -------------------------------------------------------------------------------- 1 | #include "../api/deprecated-avr-comp/avr/dtostrf.c.impl" -------------------------------------------------------------------------------- /cores/arduino/hooks.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | /** 20 | * Empty yield() hook. 21 | * 22 | * This function is intended to be used by library writers to build 23 | * libraries or sketches that supports cooperative threads. 24 | * 25 | * Its defined as a weak symbol and it can be redefined to implement a 26 | * real cooperative scheduler. 27 | */ 28 | static void __empty() { 29 | // Empty 30 | } 31 | void yield(void) __attribute__ ((weak, alias("__empty"))); 32 | 33 | /** 34 | * SysTick hook 35 | * 36 | * This function is called from SysTick handler, before the default 37 | * handler provided by Arduino. 38 | */ 39 | static int __false() { 40 | // Return false 41 | return 0; 42 | } 43 | int sysTickHook(void) __attribute__ ((weak, alias("__false"))); 44 | 45 | /** 46 | * SVC hook 47 | * PendSV hook 48 | * 49 | * These functions are called from SVC handler, and PensSV handler. 50 | * Default action is halting. 51 | */ 52 | static void __halt() { 53 | // Halts 54 | while (1) 55 | ; 56 | } 57 | void svcHook(void) __attribute__ ((weak, alias("__halt"))); 58 | void pendSVHook(void) __attribute__ ((weak, alias("__halt"))); 59 | -------------------------------------------------------------------------------- /cores/arduino/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #define ARDUINO_MAIN 20 | #include "Arduino.h" 21 | 22 | // Weak empty variant initialization function. 23 | // May be redefined by variant files. 24 | void initVariant() __attribute__((weak)); 25 | void initVariant() { } 26 | 27 | extern USBDeviceClass USBDevice; 28 | 29 | // Initialize C library 30 | extern "C" void __libc_init_array(void); 31 | 32 | /* 33 | * \brief Main entry point of Arduino application 34 | */ 35 | int main( void ) 36 | { 37 | init(); 38 | 39 | __libc_init_array(); 40 | 41 | initVariant(); 42 | 43 | delay(1); 44 | #if defined(USBCON) 45 | USBDevice.init(); 46 | USBDevice.attach(); 47 | #endif 48 | 49 | setup(); 50 | 51 | for (;;) 52 | { 53 | loop(); 54 | if (arduino::serialEventRun) arduino::serialEventRun(); 55 | } 56 | 57 | return 0; 58 | } 59 | -------------------------------------------------------------------------------- /cores/arduino/new.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014 Arduino. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #include 20 | 21 | void *operator new(size_t size) { 22 | return malloc(size); 23 | } 24 | 25 | void *operator new[](size_t size) { 26 | return malloc(size); 27 | } 28 | 29 | void operator delete(void * ptr) { 30 | free(ptr); 31 | } 32 | 33 | void operator delete[](void * ptr) { 34 | free(ptr); 35 | } 36 | 37 | -------------------------------------------------------------------------------- /cores/arduino/sync.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef _SYNC_H_ 4 | #define _SYNC_H_ 5 | /* 6 | * Synchronization primitives. 7 | * TODO: Move into a separate header file and make an API out of it 8 | */ 9 | 10 | class __Guard { 11 | public: 12 | __Guard() : primask(__get_PRIMASK()), loops(1) { 13 | __disable_irq(); 14 | } 15 | ~__Guard() { 16 | if (primask == 0) { 17 | __enable_irq(); 18 | // http://infocenter.arm.com/help/topic/com.arm.doc.dai0321a/BIHBFEIB.html 19 | __ISB(); 20 | } 21 | } 22 | uint32_t enter() { return loops--; } 23 | private: 24 | uint32_t primask; 25 | uint32_t loops; 26 | }; 27 | 28 | #define synchronized for (__Guard __guard; __guard.enter(); ) 29 | 30 | #endif -------------------------------------------------------------------------------- /cores/arduino/wiring_private.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | // Includes Atmel CMSIS 30 | #include 31 | 32 | int pinPeripheral( uint32_t ulPin, EPioType ulPeripheral ); 33 | 34 | #ifdef __cplusplus 35 | } // extern "C" 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /cores/arduino/wiring_shift.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014 Arduino. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #include 20 | #include 21 | #include "wiring_private.h" 22 | 23 | #ifdef __cplusplus 24 | extern "C"{ 25 | #endif 26 | 27 | uint8_t shiftIn( pin_size_t ulDataPin, pin_size_t ulClockPin, BitOrder ulBitOrder ) 28 | { 29 | uint8_t value = 0 ; 30 | uint8_t i ; 31 | 32 | for ( i=0 ; i < 8 ; ++i ) 33 | { 34 | digitalWrite( ulClockPin, HIGH ) ; 35 | 36 | if ( ulBitOrder == LSBFIRST ) 37 | { 38 | value |= digitalRead( ulDataPin ) << i ; 39 | } 40 | else 41 | { 42 | value |= digitalRead( ulDataPin ) << (7 - i) ; 43 | } 44 | 45 | digitalWrite( ulClockPin, LOW ) ; 46 | } 47 | 48 | return value ; 49 | } 50 | 51 | void shiftOut( pin_size_t ulDataPin, pin_size_t ulClockPin, BitOrder ulBitOrder, uint8_t ulVal ) 52 | { 53 | uint8_t i ; 54 | 55 | for ( i=0 ; i < 8 ; i++ ) 56 | { 57 | if ( ulBitOrder == LSBFIRST ) 58 | { 59 | digitalWrite( ulDataPin, !!(ulVal & (1 << i)) ) ; 60 | } 61 | else 62 | { 63 | digitalWrite( ulDataPin, !!(ulVal & (1 << (7 - i))) ) ; 64 | } 65 | 66 | digitalWrite( ulClockPin, HIGH ) ; 67 | digitalWrite( ulClockPin, LOW ) ; 68 | } 69 | } 70 | 71 | #ifdef __cplusplus 72 | } // extern "C" 73 | #endif 74 | -------------------------------------------------------------------------------- /drivers/arduino-samd.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/drivers/arduino-samd.cat -------------------------------------------------------------------------------- /drivers/dpinst-amd64.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/drivers/dpinst-amd64.exe -------------------------------------------------------------------------------- /drivers/dpinst-x86.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/drivers/dpinst-x86.exe -------------------------------------------------------------------------------- /drivers/genuino-samd.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/drivers/genuino-samd.cat -------------------------------------------------------------------------------- /drivers/prewin10/adafruit_circuit_playground_express.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/drivers/prewin10/adafruit_circuit_playground_express.cat -------------------------------------------------------------------------------- /extras/pack.hourlybuild.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | # pack.*.bash - Bash script to help packaging samd core releases. 4 | # Copyright (c) 2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | 20 | BUILD_NUMBER=$1 21 | CURR_TIME=`date "+%Y-%m-%d %H:%M"` 22 | CURR_TIME_SED=`date "+%Y\\-%m\\-%d %H:%M"` 23 | VERSION=9.9.9-Hourly 24 | 25 | PWD=`pwd` 26 | FOLDERNAME=`basename $PWD` 27 | THIS_SCRIPT_NAME=`basename $0` 28 | FILENAME=package_samd-hourly-b${BUILD_NUMBER}.tar.bz2 29 | 30 | rm -f $FILENAME 31 | 32 | # Change name in platform.txt 33 | sed -i "s/name=.*/name=SAMD Hourly Build ${BUILD_NUMBER} (${CURR_TIME})/" platform.txt 34 | 35 | cd .. 36 | tar --transform "s|$FOLDERNAME|samd-hourly_b${BUILD_NUMBER}|g" --exclude=extras/** --exclude=.git* --exclude=.idea -cjf $FILENAME $FOLDERNAME 37 | cd - 38 | 39 | mv ../$FILENAME . 40 | 41 | CHKSUM=`sha256sum $FILENAME | awk '{ print $1 }'` 42 | SIZE=`wc -c $FILENAME | awk '{ print $1 }'` 43 | 44 | cat extras/package_index.json.Hourly.template | 45 | sed "s/%%BUILD_NUMBER%%/${BUILD_NUMBER}/" | 46 | sed "s/%%CURR_TIME%%/${CURR_TIME_SED}/" | 47 | sed "s/%%VERSION%%/${VERSION}/" | 48 | sed "s/%%FILENAME%%/${FILENAME}/" | 49 | sed "s/%%CHECKSUM%%/${CHKSUM}/" | 50 | sed "s/%%SIZE%%/${SIZE}/" > package_samd-hourly-build_index.json 51 | 52 | -------------------------------------------------------------------------------- /extras/pack.pullrequest.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | # pack.*.bash - Bash script to help packaging samd core releases. 4 | # Copyright (c) 2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | 20 | PR_NUMBER=$1 21 | BUILD_NUMBER=$2 22 | VERSION=`grep version= platform.txt | sed 's/version=//g'` 23 | 24 | PWD=`pwd` 25 | FOLDERNAME=`basename $PWD` 26 | THIS_SCRIPT_NAME=`basename $0` 27 | FILENAME=package_samd-b${BUILD_NUMBER}.tar.bz2 28 | 29 | rm -f $FILENAME 30 | 31 | # Change name in platform.txt 32 | sed -i "s/name=.*/name=SAMD Pull request #${PR_NUMBER} (Build ${BUILD_NUMBER})/" platform.txt 33 | 34 | cd .. 35 | tar --transform "s|$FOLDERNAME|samd-PR${PR_NUMBER}_b${BUILD_NUMBER}|g" --exclude=extras/** --exclude=.git* --exclude=.idea -cjf $FILENAME $FOLDERNAME 36 | cd - 37 | 38 | mv ../$FILENAME . 39 | 40 | CHKSUM=`sha256sum $FILENAME | awk '{ print $1 }'` 41 | SIZE=`wc -c $FILENAME | awk '{ print $1 }'` 42 | 43 | cat extras/package_index.json.PR.template | 44 | sed s/%%PR_NUMBER%%/${PR_NUMBER}/ | 45 | sed s/%%BUILD_NUMBER%%/${BUILD_NUMBER}/ | 46 | sed s/%%VERSION%%/${VERSION}-build-${BUILD_NUMBER}/ | 47 | sed s/%%FILENAME%%/${FILENAME}/ | 48 | sed s/%%CHECKSUM%%/${CHKSUM}/ | 49 | sed s/%%SIZE%%/${SIZE}/ > package_samd-b${BUILD_NUMBER}_index.json 50 | 51 | -------------------------------------------------------------------------------- /extras/pack.release.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | # pack.*.bash - Bash script to help packaging samd core releases. 4 | # Copyright (c) 2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | 20 | # Version check removed because version string passed from jenkins was incorrect 21 | VERSION_FROM_TAG=$1 22 | CORE_NAME=$2 23 | echo $VERSION_FROM_TAG 24 | echo $CORE_NAME 25 | VERSION=`grep version= platform.txt | sed 's/version=//g'` 26 | echo $VERSION 27 | 28 | if [ $VERSION != $VERSION_FROM_TAG ]; then 29 | exit 0 30 | fi 31 | 32 | PWD=`pwd` 33 | FOLDERNAME=`basename $PWD` 34 | THIS_SCRIPT_NAME=`basename $0` 35 | FILENAME=core-$CORE_NAME-$VERSION.tar.bz2 36 | echo $FILENAME 37 | 38 | rm -f *.tar.bz2 39 | rm -f *.json 40 | 41 | cd .. 42 | tar --exclude=extras/** --exclude=.git* --exclude=.idea -cjhf $FILENAME $FOLDERNAME 43 | cd - 44 | 45 | mv ../$FILENAME . 46 | 47 | CHKSUM=`sha256sum $FILENAME | awk '{ print $1 }'` 48 | SIZE=`wc -c $FILENAME | awk '{ print $1 }'` 49 | 50 | cat extras/package_index.json.NewTag.template | 51 | # sed "s/%%BUILD_NUMBER%%/${BUILD_NUMBER}/" | 52 | # sed "s/%%CURR_TIME%%/${CURR_TIME_SED}/" | 53 | sed "s/%%VERSION%%/${VERSION}/" | 54 | sed "s/%%FILENAME%%/${FILENAME}/" | 55 | sed "s/%%CHECKSUM%%/${CHKSUM}/" | 56 | sed "s/%%SIZE%%/${SIZE}/" > package_${CORE_NAME}_${VERSION}_index.json -------------------------------------------------------------------------------- /extras/package_index.json.Hourly.template: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | { 4 | "name": "arduino-beta", 5 | "maintainer": "Arduino Betatesting", 6 | "websiteURL": "http://www.arduino.cc/", 7 | "email": "packages@arduino.cc", 8 | "help": { 9 | "online": "http://www.arduino.cc/en/Reference/HomePage" 10 | }, 11 | "platforms": [ 12 | { 13 | "name": "Arduino SAMD core - Hourly build", 14 | "architecture": "samd", 15 | "version": "%%VERSION%%", 16 | "category": "Arduino", 17 | "url": "http://downloads.arduino.cc/Hourly/samd/%%FILENAME%%", 18 | "archiveFileName": "%%FILENAME%%", 19 | "checksum": "SHA-256:%%CHECKSUM%%", 20 | "size": "%%SIZE%%", 21 | "boards": [ 22 | { 23 | "name": "Arduino Zero" 24 | } 25 | ], 26 | "toolsDependencies": [ 27 | { 28 | "packager": "arduino", 29 | "name": "arm-none-eabi-gcc", 30 | "version": "4.8.3-2014q1" 31 | }, 32 | { 33 | "packager": "arduino", 34 | "name": "bossac", 35 | "version": "1.7.0" 36 | }, 37 | { 38 | "packager": "arduino", 39 | "name": "openocd", 40 | "version": "0.9.0-arduino6-static" 41 | }, 42 | { 43 | "packager": "arduino", 44 | "name": "CMSIS", 45 | "version": "4.5.0" 46 | }, 47 | { 48 | "packager": "arduino", 49 | "name": "CMSIS-Atmel", 50 | "version": "1.1.0" 51 | }, 52 | { 53 | "packager": "arduino", 54 | "name": "arduinoOTA", 55 | "version": "1.2.0" 56 | } 57 | ] 58 | } 59 | ], 60 | "tools": [ 61 | ] 62 | } 63 | ] 64 | } 65 | -------------------------------------------------------------------------------- /extras/package_index.json.PR.template: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | { 4 | "name": "arduino-beta", 5 | "maintainer": "Arduino Betatesting", 6 | "websiteURL": "http://www.arduino.cc/", 7 | "email": "packages@arduino.cc", 8 | "help": { 9 | "online": "http://www.arduino.cc/en/Reference/HomePage" 10 | }, 11 | "platforms": [ 12 | { 13 | "name": "Arduino SAMD core - Pull request #%%PR_NUMBER%% (build %%BUILD_NUMBER%%)", 14 | "architecture": "samd", 15 | "version": "%%VERSION%%", 16 | "category": "Arduino", 17 | "url": "http://downloads.arduino.cc/PR/samd/%%FILENAME%%", 18 | "archiveFileName": "%%FILENAME%%", 19 | "checksum": "SHA-256:%%CHECKSUM%%", 20 | "size": "%%SIZE%%", 21 | "boards": [ 22 | { 23 | "name": "Arduino Zero" 24 | } 25 | ], 26 | "toolsDependencies": [ 27 | { 28 | "packager": "arduino", 29 | "name": "arm-none-eabi-gcc", 30 | "version": "4.8.3-2014q1" 31 | }, 32 | { 33 | "packager": "arduino", 34 | "name": "bossac", 35 | "version": "1.7.0" 36 | }, 37 | { 38 | "packager": "arduino", 39 | "name": "openocd", 40 | "version": "0.9.0-arduino6-static" 41 | }, 42 | { 43 | "packager": "arduino", 44 | "name": "CMSIS", 45 | "version": "4.5.0" 46 | }, 47 | { 48 | "packager": "arduino", 49 | "name": "CMSIS-Atmel", 50 | "version": "1.1.0" 51 | }, 52 | { 53 | "packager": "arduino", 54 | "name": "arduinoOTA", 55 | "version": "1.2.0" 56 | } 57 | ] 58 | } 59 | ], 60 | "tools": [ 61 | ] 62 | } 63 | ] 64 | } 65 | -------------------------------------------------------------------------------- /keywords.txt: -------------------------------------------------------------------------------- 1 | SerialGSM KEYWORD1 2 | SerialSARA KEYWORD1 3 | INPUT_PULLDOWN LITERAL1 Constants RESERVED_WORD_2 4 | -------------------------------------------------------------------------------- /libraries/HID/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map HID 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | HID KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | begin KEYWORD2 15 | SendReport KEYWORD2 16 | AppendDescriptor KEYWORD2 17 | 18 | ####################################### 19 | # Constants (LITERAL1) 20 | ####################################### 21 | HID_TX LITERAL1 -------------------------------------------------------------------------------- /libraries/HID/library.properties: -------------------------------------------------------------------------------- 1 | name=HID 2 | version=1.0 3 | author=Arduino 4 | maintainer=Arduino 5 | sentence=Module for PluggableUSB infrastructure. Exposes an API for devices like Keyboards, Mice and Gamepads 6 | paragraph= 7 | category=Other 8 | url=http://www.arduino.cc/en/Reference/HID 9 | architectures=samd 10 | -------------------------------------------------------------------------------- /libraries/I2S/examples/InputSerialPlotter/InputSerialPlotter.ino: -------------------------------------------------------------------------------- 1 | /* 2 | This example reads audio data from an Invensense's ICS43432 I2S microphone 3 | breakout board, and prints out the samples to the Serial console. The 4 | Serial Plotter built into the Arduino IDE can be used to plot the audio 5 | data (Tools -> Serial Plotter) 6 | 7 | Circuit: 8 | * Arduino/Genuino Zero, MKR family and Nano 33 IoT 9 | * ICS43432: 10 | * GND connected GND 11 | * 3.3V connected to 3.3V (Zero, Nano) or VCC (MKR) 12 | * WS connected to pin 0 (Zero) or 3 (MKR) or A2 (Nano) 13 | * CLK connected to pin 1 (Zero) or 2 (MKR) or A3 (Nano) 14 | * SD connected to pin 9 (Zero) or A6 (MKR) or 4 (Nano) 15 | 16 | created 17 November 2016 17 | by Sandeep Mistry 18 | */ 19 | 20 | #include 21 | 22 | void setup() { 23 | // Open serial communications and wait for port to open: 24 | // A baud rate of 115200 is used instead of 9600 for a faster data rate 25 | // on non-native USB ports 26 | Serial.begin(115200); 27 | while (!Serial) { 28 | ; // wait for serial port to connect. Needed for native USB port only 29 | } 30 | 31 | // start I2S at 8 kHz with 32-bits per sample 32 | if (!I2S.begin(I2S_PHILIPS_MODE, 8000, 32)) { 33 | Serial.println("Failed to initialize I2S!"); 34 | while (1); // do nothing 35 | } 36 | } 37 | 38 | void loop() { 39 | // read a sample 40 | int sample = I2S.read(); 41 | 42 | if (sample) { 43 | // if it's non-zero print value to serial 44 | Serial.println(sample); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /libraries/I2S/examples/SimpleTone/SimpleTone.ino: -------------------------------------------------------------------------------- 1 | /* 2 | This example generates a square wave based tone at a specified frequency 3 | and sample rate. Then outputs the data using the I2S interface to a 4 | MAX08357 I2S Amp Breakout board. 5 | 6 | Circuit: 7 | * Arduino/Genuino Zero, MKR family and Nano 33 IoT 8 | * MAX08357: 9 | * GND connected GND 10 | * VIN connected 5V 11 | * LRC connected to pin 0 (Zero) or 3 (MKR) or A2 (Nano) 12 | * BCLK connected to pin 1 (Zero) or 2 (MKR) or A3 (Nano) 13 | * DIN connected to pin 9 (Zero) or A6 (MKR) or 4 (Nano) 14 | 15 | created 17 November 2016 16 | by Sandeep Mistry 17 | */ 18 | 19 | #include 20 | 21 | const int frequency = 440; // frequency of square wave in Hz 22 | const int amplitude = 500; // amplitude of square wave 23 | const int sampleRate = 8000; // sample rate in Hz 24 | 25 | const int halfWavelength = (sampleRate / frequency); // half wavelength of square wave 26 | 27 | short sample = amplitude; // current sample value 28 | int count = 0; 29 | 30 | void setup() { 31 | Serial.begin(9600); 32 | Serial.println("I2S simple tone"); 33 | 34 | // start I2S at the sample rate with 16-bits per sample 35 | if (!I2S.begin(I2S_PHILIPS_MODE, sampleRate, 16)) { 36 | Serial.println("Failed to initialize I2S!"); 37 | while (1); // do nothing 38 | } 39 | } 40 | 41 | void loop() { 42 | if (count % halfWavelength == 0) { 43 | // invert the sample every half wavelength count multiple to generate square wave 44 | sample = -1 * sample; 45 | } 46 | 47 | // write the same sample twice, once for left and once for the right channel 48 | I2S.write(sample); 49 | I2S.write(sample); 50 | 51 | // increment the counter for the next sample 52 | count++; 53 | } 54 | -------------------------------------------------------------------------------- /libraries/I2S/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map I2S 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | I2S KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | begin KEYWORD2 15 | end KEYWORD2 16 | 17 | onReceive KEYWORD2 18 | onTransmit KEYWORD2 19 | 20 | setBufferSize KEYWORD2 21 | 22 | ####################################### 23 | # Constants (LITERAL1) 24 | ####################################### 25 | I2S_PHILIPS_MODE LITERAL1 26 | I2S_RIGHT_JUSTIFIED_MODE LITERAL1 27 | I2S_LEFT_JUSTIFIED_MODE LITERAL1 28 | -------------------------------------------------------------------------------- /libraries/I2S/library.properties: -------------------------------------------------------------------------------- 1 | name=I2S 2 | version=1.0 3 | author=Arduino 4 | maintainer=Arduino 5 | sentence=Enables the communication with devices that use the Inter-IC Sound (I2S) Bus. Specific implementation for Arduino Zero. 6 | paragraph= 7 | category=Communication 8 | url=http://www.arduino.cc/en/Reference/I2S 9 | architectures=samd 10 | -------------------------------------------------------------------------------- /libraries/I2S/src/utility/DMA.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #pragma once 19 | 20 | #define NUM_DMA_CHANNELS 1 21 | 22 | /* 23 | WARNING: The API for this class may change and it's not intended for public use! 24 | */ 25 | class DMAClass 26 | { 27 | public: 28 | DMAClass(); 29 | virtual ~DMAClass(); 30 | 31 | void begin(); 32 | void end(); 33 | 34 | int allocateChannel(); 35 | void freeChannel(int channel); 36 | 37 | void setPriorityLevel(int channel, int level); 38 | void setTriggerSource(int channel, int source); 39 | void setTransferWidth(int channel, int transferWidth); 40 | void incSrc(int channel); 41 | void incDst(int channel); 42 | int transfer(int channel, void* src, void* dst, uint16_t size); 43 | 44 | void onTransferComplete(int channel, void(*function)(int)); 45 | void onTransferError(int channel, void(*function)(int)); 46 | 47 | void onService(); 48 | 49 | private: 50 | static int _beginCount; 51 | uint32_t _channelMask; 52 | 53 | void (*_transferCompleteCallbacks[NUM_DMA_CHANNELS])(int); 54 | void (*_transferErrorCallbacks[NUM_DMA_CHANNELS])(int); 55 | 56 | DmacDescriptor _descriptors[NUM_DMA_CHANNELS] __attribute__ ((aligned (16))); 57 | DmacDescriptor _descriptorsWriteBack[NUM_DMA_CHANNELS] __attribute__ ((aligned (16))); 58 | }; 59 | 60 | extern DMAClass DMA; 61 | -------------------------------------------------------------------------------- /libraries/I2S/src/utility/I2SDoubleBuffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef _I2S_DOUBLE_BUFFER_H_INCLUDED 20 | #define _I2S_DOUBLE_BUFFER_H_INCLUDED 21 | 22 | #include 23 | #include 24 | 25 | #define DEFAULT_I2S_BUFFER_SIZE 512 26 | 27 | class I2SDoubleBuffer 28 | { 29 | public: 30 | I2SDoubleBuffer(); 31 | virtual ~I2SDoubleBuffer(); 32 | 33 | void setSize(int size); 34 | 35 | void reset(); 36 | 37 | size_t availableForWrite(); 38 | size_t write(const void *buffer, size_t size); 39 | size_t read(void *buffer, size_t size); 40 | size_t peek(void *buffer, size_t size); 41 | void* data(); 42 | size_t available(); 43 | void swap(int length = 0); 44 | 45 | private: 46 | uint8_t* _buffer[2]; 47 | int _size; 48 | volatile int _length[2]; 49 | volatile int _readOffset[2]; 50 | volatile int _index; 51 | }; 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /libraries/SAMD_AnalogCorrection/library.properties: -------------------------------------------------------------------------------- 1 | name=SAMD_AnalogCorrection 2 | version=1.0 3 | author=Arduino 4 | maintainer=Arduino 5 | sentence=Sets and enables the digital correction logic of the SAMD ADC. 6 | paragraph=Useful to correct the values returned by the ADC. 7 | category=Other 8 | url= 9 | architectures=samd 10 | -------------------------------------------------------------------------------- /libraries/SAMD_AnalogCorrection/src/SAMD_AnalogCorrection.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #include "SAMD_AnalogCorrection.h" 20 | 21 | void analogReadCorrection (int offset, uint16_t gain) 22 | { 23 | // Set correction values 24 | ADC->OFFSETCORR.reg = ADC_OFFSETCORR_OFFSETCORR(offset); 25 | ADC->GAINCORR.reg = ADC_GAINCORR_GAINCORR(gain); 26 | 27 | // Enable digital correction logic 28 | ADC->CTRLB.bit.CORREN = 1; 29 | while(ADC->STATUS.bit.SYNCBUSY); 30 | } 31 | 32 | -------------------------------------------------------------------------------- /libraries/SAMD_AnalogCorrection/src/SAMD_AnalogCorrection.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | void analogReadCorrection (int offset, uint16_t gain); 24 | 25 | -------------------------------------------------------------------------------- /libraries/SAMD_BootloaderUpdater/examples/UpdateBootloader/UpdateBootloader.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Update Bootloader 3 | 4 | This sketch checks if your Arduino SAMD board is running the latest bootloader. 5 | 6 | If it is not, it prompts you to update it. 7 | 8 | Circuit: 9 | - MKR Vidor 4000 10 | 11 | This example code is in the public domain. 12 | */ 13 | 14 | 15 | #include 16 | 17 | void setup() { 18 | 19 | Serial.begin(9600); 20 | while (!Serial); 21 | 22 | Serial.println("Welcome to the Arduino SAMD bootloader updater"); 23 | Serial.println("----------------------------------------------"); 24 | Serial.println(); 25 | 26 | retry: 27 | Serial.print("Checking if bootloader requires an update ... "); 28 | if (SAMD_BootloaderUpdater.needsUpdate()) { 29 | Serial.println("bootloader is already the latest version"); 30 | Serial.println(); 31 | Serial.println("Update is not required :)"); 32 | 33 | while (1); 34 | } 35 | 36 | Serial.println("bootloader is NOT running the latest"); 37 | Serial.println(); 38 | Serial.println(); 39 | Serial.println("Would you like to proceed with updating it? (y/N)"); 40 | Serial.println(); 41 | 42 | 43 | while (Serial.available() == 0) { 44 | delay(100); 45 | } 46 | char in = Serial.read(); 47 | if (in != 'y' && in != 'Y') { 48 | Serial.println("That's all folks!"); 49 | while (1); 50 | } 51 | 52 | pinMode(LED_BUILTIN, OUTPUT); 53 | 54 | Serial.println("WARNING: DO NOT UNPLUG the USB cable during the update!!!"); 55 | Serial.println(); 56 | Serial.println("Updating bootloader ..."); 57 | Serial.println(); 58 | 59 | if (!SAMD_BootloaderUpdater.update(onUpdateProgress)) { 60 | Serial.println("oh no! the bootloader failed to update :("); 61 | Serial.println(); 62 | goto retry; 63 | } 64 | 65 | Serial.println(); 66 | Serial.println("The bootloader was successfully updated \\o/"); 67 | Serial.println(); 68 | Serial.println("Your board will now start blinking in joy :)"); 69 | } 70 | 71 | void onUpdateProgress(float percentage) 72 | { 73 | // toggle the LED 74 | digitalWrite(LED_BUILTIN, digitalRead(LED_BUILTIN) ? LOW : HIGH); 75 | 76 | // print out the percentage 77 | Serial.print(percentage); 78 | Serial.println("%"); 79 | } 80 | 81 | void loop() { 82 | digitalWrite(LED_BUILTIN, HIGH); 83 | delay(100); 84 | 85 | digitalWrite(LED_BUILTIN, LOW); 86 | delay(100); 87 | } 88 | 89 | -------------------------------------------------------------------------------- /libraries/SAMD_BootloaderUpdater/extras/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -x 2 | 3 | ARDUINO=arduino 4 | BOOTLOADER_DIR=" ../../../bootloaders" 5 | OUTPUT_PATH="../src/bootloaders" 6 | 7 | if [[ "$OSTYPE" == "darwin"* ]]; then 8 | ARDUINO="/Applications/Arduino.app/Contents/MacOS/Arduino" 9 | fi 10 | 11 | ls $BOOTLOADER_DIR/mkrvidor4000 12 | cat $BOOTLOADER_DIR/mkrvidor4000/samd21_sam_ba_arduino_mkrvidor4000.bin | xxd -i > $OUTPUT_PATH/mkrvidor4000.h 13 | -------------------------------------------------------------------------------- /libraries/SAMD_BootloaderUpdater/keywords.txt: -------------------------------------------------------------------------------- 1 | ################################################ 2 | # Syntax Coloring Map For SAMD_BootloaderUpdater 3 | ################################################ 4 | 5 | ################################################ 6 | # Datatypes (KEYWORD1) 7 | ################################################ 8 | 9 | SAMD_BootloaderUpdater KEYWORD2 10 | 11 | ################################################ 12 | # Methods and Functions (KEYWORD2) 13 | ################################################ 14 | 15 | needsUpdate KEYWORD2 16 | update KEYWORD2 17 | 18 | ####################################### 19 | # Constants (LITERAL1) 20 | ####################################### 21 | 22 | -------------------------------------------------------------------------------- /libraries/SAMD_BootloaderUpdater/library.properties: -------------------------------------------------------------------------------- 1 | name=SAMD_BootloaderUpdater 2 | version=1.0 3 | author=Arduino 4 | maintainer=Arduino 5 | sentence=Update the bootloader running on your Arduino SAMD board to the latest. 6 | paragraph= 7 | category=Other 8 | url= 9 | architectures=samd_beta 10 | -------------------------------------------------------------------------------- /libraries/SAMD_BootloaderUpdater/src/SAMD_BootloaderUpdater.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of the SAMD Bootloader Updater library. 3 | Copyright (c) 2018 Arduino SA. All rights reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef _SAMD_BOOTLOADER_UPDATER_H_ 21 | #define _SAMD_BOOTLOADER_UPDATER_H_ 22 | 23 | #include 24 | 25 | class SAMD_BootloaderUpdaterClass { 26 | public: 27 | bool needsUpdate(); 28 | 29 | int update(void(*progressCallback)(float)); 30 | }; 31 | 32 | extern SAMD_BootloaderUpdaterClass SAMD_BootloaderUpdater; 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /libraries/SBU/examples/SBU_LoadLZSS/SBU_LoadLZSS.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "lzssEncode.h" 5 | 6 | static char const BINARY[] = 7 | { 8 | #include "Binary.h" 9 | }; 10 | 11 | static char const CHECK_FILE[] = 12 | { 13 | "OK" 14 | }; 15 | 16 | static constexpr char CHECK_FILE_NAME[] = "UPDATE.OK"; 17 | const char * UPDATE_FILE_NAME_LZSS = "UPDATE.BIN.LZSS"; 18 | 19 | NBFileUtils fileUtils; 20 | bool update_available = false; 21 | 22 | void setup() { 23 | Serial.begin(9600); 24 | while (!Serial) { } 25 | 26 | unsigned long const start = millis(); 27 | for (unsigned long now = millis(); !Serial && ((now - start) < 5000); now = millis()) { }; 28 | 29 | Serial.print("Accessing SARA Filesystem... "); 30 | if (!fileUtils.begin(false)) { 31 | Serial.println("failed."); 32 | return; 33 | 34 | } 35 | Serial.println("OK"); 36 | 37 | uint32_t bytes_to_write = sizeof(BINARY); 38 | Serial.print("Size of BINARY.H: "); 39 | Serial.println(bytes_to_write); 40 | 41 | Serial.print("Encoding \"BINARY.H\" into \"UPDATE.BIN.LZSS\" and writing it into the Sara-R410M module ... "); 42 | 43 | //Encode into .lzss and write to the Sara modem 44 | int bytes_written = lzss_encode(BINARY, bytes_to_write); 45 | 46 | if (bytes_written == 0) { 47 | Serial.println("something went wrong!"); 48 | } else { 49 | Serial.println("OK!"); 50 | } 51 | 52 | Serial.print("Size of UPDATE.BIN.LZSS: "); 53 | Serial.println(bytes_written); 54 | 55 | auto status = 0; 56 | while (status != 2) { 57 | status = fileUtils.createFile(CHECK_FILE_NAME, CHECK_FILE, 2); 58 | delay(100); 59 | } 60 | 61 | Serial.println("Please type \"restart\" to apply the update"); 62 | update_available = true; 63 | } 64 | 65 | 66 | void loop() { 67 | if (update_available == true) { 68 | String command = Serial.readStringUntil('\n'); 69 | if (command.indexOf("restart") >= 0) { 70 | NVIC_SystemReset(); 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /libraries/SBU/examples/SBU_LoadLZSS/lzssEncode.h: -------------------------------------------------------------------------------- 1 | #ifndef SBU_LZSS_H_ 2 | #define SBU_LZSS_H_ 3 | 4 | /************************************************************************************** 5 | INCLUDE 6 | **************************************************************************************/ 7 | 8 | #include 9 | 10 | /************************************************************************************** 11 | FUNCTION DEFINITION 12 | **************************************************************************************/ 13 | 14 | void lzss_flush(); 15 | int lzss_encode(const char buf_in[], uint32_t size); 16 | 17 | #endif /* SBU_LZSS_H_ */ -------------------------------------------------------------------------------- /libraries/SBU/examples/SBU_Usage/SBU_Usage.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Usage 3 | This example demonstrates how to use the SAMD SBU library to update a 4 | sketch on any Arduino MKR board via the storage on the SARA-R410M module. 5 | This sketch prints out the current date and time. 6 | Steps to update sketch: 7 | 1) Upload this sketch or another sketch that includes the SBU library 8 | 2) Update the sketch as desired. For this example the sketch prints out 9 | the compiled date and time. 10 | 3) In the IDE select: Sketch -> Export compiled Binary 11 | 4) Open the location of the sketch and convert the .bin file to a C byte array. 12 | cat SKETCH.bin | xxd --include > Binary.h 13 | 5) Copy Binary.h file from the sketch's folder to the SBU_LoadBinary sketch 14 | and load it to the SARA-R410M via SBU_LoadBinary sketch. 15 | */ 16 | 17 | /* 18 | Include the SBU library 19 | 20 | This will add some code to the sketch before setup() is called 21 | to check if UPDATE.BIN and UPDATE.OK are present on the storage of 22 | the SARA-R410M module. If this check is positive UPDATE.BIN is used to update 23 | the sketch running on the board. 24 | After this UPDATE.BIN and UPDATE.OK are deleted from the flash. 25 | */ 26 | 27 | 28 | #include 29 | 30 | void setup() 31 | { 32 | Serial.begin(9600); 33 | while (!Serial) { } 34 | // wait a bit 35 | delay(1000); 36 | String message; 37 | message += "Sketch compile date and time: "; 38 | message += __DATE__; 39 | message += " "; 40 | message += __TIME__; 41 | // print out the sketch compile date and time on the serial port 42 | Serial.println(message); 43 | } 44 | 45 | void loop() 46 | { 47 | // add you own code here 48 | } 49 | -------------------------------------------------------------------------------- /libraries/SBU/extras/SBUBoot/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -x 2 | 3 | #Sara R410M 4 | ARDUINO=arduino 5 | SKETCH_NAME="SBUBoot.ino" 6 | SKETCH="$PWD/$SKETCH_NAME" 7 | BUILD_PATH="$PWD/build" 8 | OUTPUT_PATH="../../src/boot" 9 | 10 | if [[ "$OSTYPE" == "darwin"* ]]; then 11 | ARDUINO="/Applications/Arduino.app/Contents/MacOS/Arduino" 12 | fi 13 | 14 | buildSBUBootSketch() { 15 | BOARD=$1 16 | DESTINATION=$2 17 | 18 | $ARDUINO --verify --board $BOARD --preserve-temp-files --pref build.path="$BUILD_PATH" $SKETCH 19 | cat "$BUILD_PATH/$SKETCH_NAME.bin" | xxd -include > $DESTINATION 20 | rm -rf "$BUILD_PATH" 21 | } 22 | 23 | buildSBUBootSketch "arduino:samd:mkrnb1500" "$OUTPUT_PATH/mkrnb1500.h" 24 | -------------------------------------------------------------------------------- /libraries/SBU/extras/SBUBoot/lzss.h: -------------------------------------------------------------------------------- 1 | #ifndef SBU_LZSS_H_ 2 | #define SBU_LZSS_H_ 3 | 4 | /************************************************************************************** 5 | INCLUDE 6 | **************************************************************************************/ 7 | 8 | #include 9 | 10 | /************************************************************************************** 11 | FUNCTION DEFINITION 12 | **************************************************************************************/ 13 | 14 | void lzss_init(uint32_t const sketch_start); 15 | void lzss_decode(); 16 | void lzss_flush(); 17 | 18 | #endif /* SBU_LZSS_H_ */ -------------------------------------------------------------------------------- /libraries/SBU/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For SBU 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | SBU KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | ####################################### 16 | # Constants (LITERAL1) 17 | ####################################### 18 | -------------------------------------------------------------------------------- /libraries/SBU/library.properties: -------------------------------------------------------------------------------- 1 | name=SBU 2 | version=1.0.0 3 | author=Arduino 4 | maintainer=Arduino 5 | sentence=Update the sketch on your Arduino MKRNB1500 from SARA-R410M flash. 6 | paragraph= 7 | category=Other 8 | url= 9 | architectures=samd 10 | -------------------------------------------------------------------------------- /libraries/SBU/src/SBU.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2020 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #include 20 | 21 | #include "SBU.h" 22 | 23 | __attribute__ ((section(".sketch_boot"))) 24 | unsigned char SBU_BOOT[0x8000] = { 25 | #if defined(ARDUINO_SAMD_MKRNB1500) 26 | #include "boot/mkrnb1500.h" 27 | #else 28 | #error "Unsupported board!" 29 | #endif 30 | }; 31 | -------------------------------------------------------------------------------- /libraries/SBU/src/SBU.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2020 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef _SBU_H_INCLUDED 20 | #define _SBU_H_INCLUDED 21 | 22 | /* Nothing to do */ 23 | 24 | #endif /* _SBU_H_INCLUDED */ 25 | -------------------------------------------------------------------------------- /libraries/SDU/examples/Usage/Usage.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Usage 3 | This example demonstrates how to use the SAMD SDU library to update a 4 | sketch on an Arduino/Genuino Zero, MKRZero or MKR1000 board using an 5 | SD card. It prints out the date and time the sketch was compiled at 6 | to both Serial and Serial1. 7 | 8 | Circuit: 9 | * Arduino MKRZero board with SD card 10 | OR 11 | * Arduino/Genuino Zero or MKR1000 board 12 | * SD shield or breakout connected with CS pin of 4 13 | * SD card 14 | 15 | Non-Arduino/Genuino Zero, MKRZero or MKR1000 board are NOT supported. 16 | 17 | Steps to update sketch via SD card: 18 | 19 | 1) Upload this sketch or another sketch that includes the SDU library 20 | via #include 21 | 22 | 2) Update the sketch as desired. For this example the sketch prints out 23 | the compiled date and time so no updates are needed. 24 | 25 | 3) In the IDE select: Sketch -> Export compiled Binary 26 | 27 | 4) Copy the .bin file from the sketch's folder to the SD card and rename 28 | the file to UPDATE.bin. Eject the SD card from your PC. 29 | 30 | 5) Insert the SD card into the board, shield or breakout and press the 31 | reset button or power cycle the board. The SDU library will then update 32 | the sketch on the board with the contents of UPDATE.bin 33 | 34 | created 23 March 2017 35 | by Sandeep Mistry 36 | */ 37 | 38 | /* 39 | Include the SDU library 40 | 41 | This will add some code to the sketch before setup() is called 42 | to check if an SD card is present and UPDATE.bin exists on the 43 | SD card. 44 | 45 | If UPDATE.bin is present, the file is used to update the sketch 46 | running on the board. After this UPDATE.bin is deleted from the 47 | SD card. 48 | */ 49 | #include 50 | 51 | String message; 52 | 53 | void setup() { 54 | Serial.begin(9600); 55 | Serial1.begin(9600); 56 | 57 | // wait a bit 58 | delay(1000); 59 | 60 | message += "Sketch compile date and time: "; 61 | message += __DATE__; 62 | message += " "; 63 | message += __TIME__; 64 | 65 | // print out the sketch compile date and time on the serial port 66 | Serial.println(message); 67 | Serial1.println(message); 68 | } 69 | 70 | void loop() { 71 | // add you own code here 72 | } 73 | 74 | -------------------------------------------------------------------------------- /libraries/SDU/extras/SDUBoot/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -x 2 | 3 | ARDUINO=arduino 4 | SKETCH_NAME="SDUBoot.ino" 5 | SKETCH="$PWD/$SKETCH_NAME" 6 | BUILD_PATH="$PWD/build" 7 | OUTPUT_PATH="../../src/boot" 8 | 9 | if [[ "$OSTYPE" == "darwin"* ]]; then 10 | ARDUINO="/Applications/Arduino.app/Contents/MacOS/Arduino" 11 | fi 12 | 13 | buildSDUBootSketch() { 14 | BOARD=$1 15 | DESTINATION=$2 16 | 17 | $ARDUINO --verify --board $BOARD --preserve-temp-files --pref build.path="$BUILD_PATH" $SKETCH 18 | cat "$BUILD_PATH/$SKETCH_NAME.bin" | xxd -i > $DESTINATION 19 | rm -rf "$BUILD_PATH" 20 | } 21 | 22 | mkdir -p "$OUTPUT_PATH" 23 | 24 | buildSDUBootSketch "arduino:samd:arduino_zero_edbg" "$OUTPUT_PATH/zero.h" 25 | buildSDUBootSketch "arduino:samd:mkr1000" "$OUTPUT_PATH/mkr1000.h" 26 | buildSDUBootSketch "arduino:samd:mkrzero" "$OUTPUT_PATH/mkrzero.h" 27 | buildSDUBootSketch "arduino:samd:mkrfox1200" "$OUTPUT_PATH/mkrfox1200.h" 28 | buildSDUBootSketch "arduino:samd:mkrgsm1400" "$OUTPUT_PATH/mkrgsm1400.h" 29 | buildSDUBootSketch "arduino:samd:mkrwan1300" "$OUTPUT_PATH/mkrwan1300.h" 30 | buildSDUBootSketch "arduino:samd:mkrwifi1010" "$OUTPUT_PATH/mkrwifi1010.h" 31 | buildSDUBootSketch "arduino:samd:mkrnb1500" "$OUTPUT_PATH/mkrnb1500.h" 32 | buildSDUBootSketch "arduino:samd:mzero_bl" "$OUTPUT_PATH/mzero.h" 33 | -------------------------------------------------------------------------------- /libraries/SDU/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For SDU 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | SDU KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | ####################################### 16 | # Constants (LITERAL1) 17 | ####################################### 18 | -------------------------------------------------------------------------------- /libraries/SDU/library.properties: -------------------------------------------------------------------------------- 1 | name=SDU 2 | version=1.0.0 3 | author=Arduino 4 | maintainer=Arduino 5 | sentence=Update the sketch on your board from an SD card 6 | paragraph=Requires an SD card 7 | category=Other 8 | url=http://www.arduino.cc/en/Reference/SDU 9 | architectures=samd 10 | -------------------------------------------------------------------------------- /libraries/SDU/src/SDU.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2017 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #include 20 | 21 | #include "SDU.h" 22 | 23 | __attribute__ ((section(".sketch_boot"))) 24 | unsigned char sduBoot[0x4000] = { 25 | #if defined(ARDUINO_SAMD_ZERO) 26 | #include "boot/zero.h" 27 | #elif defined(ARDUINO_SAMD_MKR1000) 28 | #include "boot/mkr1000.h" 29 | #elif defined(ARDUINO_SAMD_MKRZERO) 30 | #include "boot/mkrzero.h" 31 | #elif defined(ARDUINO_SAMD_MKRFox1200) 32 | #include "boot/mkrfox1200.h" 33 | #elif defined(ARDUINO_SAMD_MKRGSM1400) 34 | #include "boot/mkrgsm1400.h" 35 | #elif defined(ARDUINO_SAMD_MKRWAN1300) 36 | #include "boot/mkrwan1300.h" 37 | #elif defined(ARDUINO_SAMD_MKRWIFI1010) 38 | #include "boot/mkrwifi1010.h" 39 | #elif defined(ARDUINO_SAMD_MKRNB1500) 40 | #include "boot/mkrnb1500.h" 41 | #elif defined(ARDUINO_SAM_ZERO) 42 | #include "boot/mzero.h" 43 | #else 44 | #error "Unsupported board!" 45 | #endif 46 | }; 47 | -------------------------------------------------------------------------------- /libraries/SDU/src/SDU.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2017 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef _SDU_H_INCLUDED 20 | #define _SDU_H_INCLUDED 21 | 22 | // nothing for now 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /libraries/SFU/examples/SFU_LoadBinary/Binary.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/libraries/SFU/examples/SFU_LoadBinary/Binary.h -------------------------------------------------------------------------------- /libraries/SFU/examples/SFU_LoadBinary/SFU_LoadBinary.ino: -------------------------------------------------------------------------------- 1 | /************************************************************************************** 2 | * INCLUDE 3 | **************************************************************************************/ 4 | 5 | #include 6 | 7 | /************************************************************************************** 8 | * CONSTANTS 9 | **************************************************************************************/ 10 | 11 | static uint8_t const BINARY[] = 12 | { 13 | #include "Binary.h" 14 | }; 15 | 16 | /************************************************************************************** 17 | * SETUP/LOOP 18 | **************************************************************************************/ 19 | 20 | void setup() { 21 | Serial.begin(9600); 22 | 23 | unsigned long const start = millis(); 24 | for(unsigned long now = millis(); !Serial && ((now - start) < 5000); now = millis()) { }; 25 | 26 | flash.begin(); 27 | 28 | Serial.print("Mounting ... "); 29 | if(SPIFFS_OK != filesystem.mount()) { 30 | Serial.println("mount() failed with error code "); Serial.println(filesystem.err()); return; 31 | } 32 | Serial.println("OK"); 33 | 34 | 35 | Serial.print("Checking ... "); 36 | if(SPIFFS_OK != filesystem.check()) { 37 | Serial.println("check() failed with error code "); Serial.println(filesystem.err()); return; 38 | } 39 | Serial.println("OK"); 40 | 41 | 42 | Serial.print("Writing \"UPDATE.BIN\" ... "); 43 | File file = filesystem.open("UPDATE.BIN", CREATE | READ_WRITE| TRUNCATE); 44 | 45 | int const bytes_to_write = sizeof(BINARY); 46 | int const bytes_written = file.write((void *)BINARY, bytes_to_write); 47 | 48 | if(bytes_written != bytes_to_write) { 49 | Serial.println("write() failed with error code "); Serial.println(filesystem.err()); return; 50 | } else { 51 | Serial.print("OK ("); 52 | Serial.print(bytes_written); 53 | Serial.println(" bytes written)"); 54 | } 55 | 56 | Serial.print("Unmounting ... "); 57 | filesystem.unmount(); 58 | Serial.println("OK"); 59 | } 60 | 61 | void loop() { 62 | 63 | } 64 | -------------------------------------------------------------------------------- /libraries/SFU/examples/SFU_Usage/SFU_Usage.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Usage 3 | This example demonstrates how to use the SAMD SFU library to update a 4 | sketch on any Arduino MKR board connected to a MKRMEM Shield. This sketch 5 | prints out the date and time the sketch was compiled. 6 | 7 | Steps to update sketch via MKRMEM shield: 8 | 9 | 1) Upload this sketch or another sketch that includes the SFU library 10 | via #include 11 | 12 | 2) Update the sketch as desired. For this example the sketch prints out 13 | the compiled date and time so no updates are needed. 14 | 15 | 3) In the IDE select: Sketch -> Export compiled Binary 16 | 17 | 4) Open the location of the sketch and convert the .bin file to a C byte array. 18 | cat SKETCH.bin | xxd --include > Binary.h 19 | 20 | 5) Copy Binary.h file from the sketch's folder to the SFU_LoadBinary sketch 21 | and load it to the MKRMEM via SFU_LoadBinary sketch. 22 | */ 23 | 24 | /* 25 | Include the SFU library 26 | 27 | This will add some code to the sketch before setup() is called 28 | to check if UPDATE.bin is present on the flash chip of the MKRMEM 29 | shield. If this theck is positive the file is used to update the sketch 30 | running on the board. After this UPDATE.BIN is deleted from the flash. 31 | */ 32 | 33 | #include 34 | 35 | void setup() { 36 | Serial.begin(9600); 37 | while(!Serial) { } 38 | 39 | // wait a bit 40 | delay(1000); 41 | 42 | String message; 43 | message += "Sketch compile date and time: "; 44 | message += __DATE__; 45 | message += " "; 46 | message += __TIME__; 47 | 48 | // print out the sketch compile date and time on the serial port 49 | Serial.println(message); 50 | } 51 | 52 | void loop() { 53 | // add you own code here 54 | } 55 | -------------------------------------------------------------------------------- /libraries/SFU/extras/SFUBoot/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -x 2 | 3 | ARDUINO=arduino 4 | SKETCH_NAME="SFUBoot.ino" 5 | SKETCH="$PWD/$SKETCH_NAME" 6 | BUILD_PATH="$PWD/build" 7 | OUTPUT_PATH="../../src/boot" 8 | 9 | if [[ "$OSTYPE" == "darwin"* ]]; then 10 | ARDUINO="/Applications/Arduino.app/Contents/MacOS/Arduino" 11 | fi 12 | 13 | buildSFUBootSketch() { 14 | BOARD=$1 15 | DESTINATION=$2 16 | 17 | $ARDUINO --verify --board $BOARD --preserve-temp-files --pref build.path="$BUILD_PATH" $SKETCH 18 | cat "$BUILD_PATH/$SKETCH_NAME.bin" | xxd -include > $DESTINATION 19 | rm -rf "$BUILD_PATH" 20 | } 21 | 22 | mkdir -p "$OUTPUT_PATH" 23 | 24 | buildSFUBootSketch "arduino:samd:mkrzero" "$OUTPUT_PATH/mkrzero.h" 25 | buildSFUBootSketch "arduino:samd:mkr1000" "$OUTPUT_PATH/mkr1000.h" 26 | buildSFUBootSketch "arduino:samd:mkrwifi1010" "$OUTPUT_PATH/mkrwifi1010.h" 27 | buildSFUBootSketch "arduino:samd:mkrgsm1400" "$OUTPUT_PATH/mkrgsm1400.h" 28 | buildSFUBootSketch "arduino:samd:mkrnb1500" "$OUTPUT_PATH/mkrnb1500.h" 29 | buildSFUBootSketch "arduino:samd:mkrvidor4000" "$OUTPUT_PATH/mkrvidor4000.h" 30 | buildSFUBootSketch "arduino:samd:mkrwan1310" "$OUTPUT_PATH/mkrwan1310.h" 31 | buildSFUBootSketch "arduino:samd:mkrfox1200" "$OUTPUT_PATH/mkrfox1200.h" 32 | -------------------------------------------------------------------------------- /libraries/SFU/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For SDU 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | SFU KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | ####################################### 16 | # Constants (LITERAL1) 17 | ####################################### 18 | -------------------------------------------------------------------------------- /libraries/SFU/library.properties: -------------------------------------------------------------------------------- 1 | name=SFU 2 | version=1.0.0 3 | author=Arduino 4 | maintainer=Arduino 5 | sentence=Update the sketch on your board from a Arduino MKRMEM Shield. 6 | paragraph=Requires a Arduino MKRMEM Shield. 7 | category=Other 8 | url=https://www.arduino.cc/en/Reference/SFU 9 | architectures=samd 10 | -------------------------------------------------------------------------------- /libraries/SFU/src/SFU.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2020 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #include 20 | 21 | #include "SFU.h" 22 | 23 | __attribute__ ((section(".sketch_boot"))) 24 | unsigned char SFU_BOOT[0x8000] = { 25 | #if defined(ARDUINO_SAMD_MKRZERO) 26 | #include "boot/mkrzero.h" 27 | #elif defined(ARDUINO_SAMD_MKR1000) 28 | #include "boot/mkr1000.h" 29 | #elif defined(ARDUINO_SAMD_MKRWIFI1010) 30 | #include "boot/mkrwifi1010.h" 31 | #elif defined(ARDUINO_SAMD_MKRGSM1400) 32 | #include "boot/mkrgsm1400.h" 33 | #elif defined(ARDUINO_SAMD_MKRNB1500) 34 | #include "boot/mkrnb1500.h" 35 | #elif defined(ARDUINO_SAMD_MKRVIDOR4000) 36 | #include "boot/mkrvidor4000.h" 37 | #elif defined(ARDUINO_SAMD_MKRWAN1310) 38 | #include "boot/mkrwan1310.h" 39 | #elif defined(ARDUINO_SAMD_MKRFOX1200) 40 | #include "boot/mkrfox1200.h" 41 | #else 42 | #error "Unsupported board!" 43 | #endif 44 | }; 45 | -------------------------------------------------------------------------------- /libraries/SFU/src/SFU.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2020 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef _SFU_H_INCLUDED 20 | #define _SFU_H_INCLUDED 21 | 22 | /* Nothing to do */ 23 | 24 | #endif /* _SFU_H_INCLUDED */ 25 | -------------------------------------------------------------------------------- /libraries/SFU/src/boot/mkrwan1310.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/libraries/SFU/src/boot/mkrwan1310.h -------------------------------------------------------------------------------- /libraries/SNU/examples/Usage/arduino_secrets.h: -------------------------------------------------------------------------------- 1 | #define SECRET_SSID "" 2 | #define SECRET_PASS "" 3 | #define SECRET_OTA_URL "http://downloads.arduino.cc/misc/WiFi1010_blinkRBG.bin" 4 | -------------------------------------------------------------------------------- /libraries/SNU/extras/NiNaBoot/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -x 2 | 3 | ARDUINO=arduino 4 | SKETCH_NAME="NiNaBoot.ino" 5 | SKETCH="$PWD/$SKETCH_NAME" 6 | BUILD_PATH="$PWD/build" 7 | OUTPUT_PATH="../../src/boot" 8 | 9 | if [[ "$OSTYPE" == "darwin"* ]]; then 10 | ARDUINO="/Applications/Arduino.app/Contents/MacOS/Arduino" 11 | fi 12 | 13 | buildSDUBootSketch() { 14 | BOARD=$1 15 | DESTINATION=$2 16 | 17 | $ARDUINO --verify --board $BOARD --preserve-temp-files --pref build.path="$BUILD_PATH" $SKETCH 18 | cat "$BUILD_PATH/$SKETCH_NAME.bin" | xxd -include -len 0x4000 > $DESTINATION 19 | rm -rf "$BUILD_PATH" 20 | } 21 | 22 | mkdir -p "$OUTPUT_PATH" 23 | 24 | buildSDUBootSketch "arduino:samd:mkrwifi1010" "$OUTPUT_PATH/mkrwifi1010.h" 25 | buildSDUBootSketch "arduino:samd:mkrvidor4000" "$OUTPUT_PATH/mkrvidor4000.h" 26 | buildSDUBootSketch "arduino:samd:nano_33_iot" "$OUTPUT_PATH/nano33iot.h" 27 | -------------------------------------------------------------------------------- /libraries/SNU/extras/NiNaBoot/lzss.h: -------------------------------------------------------------------------------- 1 | #ifndef SSU_LZSS_H_ 2 | #define SSU_LZSS_H_ 3 | 4 | /************************************************************************************** 5 | INCLUDE 6 | **************************************************************************************/ 7 | 8 | #include 9 | 10 | #include 11 | 12 | /************************************************************************************** 13 | FUNCTION DEFINITION 14 | **************************************************************************************/ 15 | 16 | void lzss_init(WiFiStorageFile * update_file_ptr, uint32_t const sketch_start, uint32_t const lzss_file_size); 17 | void lzss_decode(); 18 | void lzss_flush(); 19 | 20 | #endif /* SSU_LZSS_H_ */ 21 | -------------------------------------------------------------------------------- /libraries/SNU/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For SNU 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | SNU KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | ####################################### 16 | # Constants (LITERAL1) 17 | ####################################### 18 | -------------------------------------------------------------------------------- /libraries/SNU/library.properties: -------------------------------------------------------------------------------- 1 | name=SNU 2 | version=1.0.2 3 | author=Arduino 4 | maintainer=Arduino 5 | sentence=Update the sketch on your board with NiNa W10 wifi module 6 | paragraph=Requires a board with NiNa W10 module onboard 7 | category=Other 8 | url=http://www.arduino.cc/en/Reference/SNU 9 | architectures=megaAVR, samd 10 | -------------------------------------------------------------------------------- /libraries/SNU/src/SNU.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2017 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #include 20 | 21 | #include "SNU.h" 22 | 23 | __attribute__ ((section(".sketch_boot"))) 24 | unsigned char sduBoot[0x4000] = { 25 | #if defined(ARDUINO_SAMD_MKRWIFI1010) 26 | #include "boot/mkrwifi1010.h" 27 | #elif defined(ARDUINO_SAMD_MKRVIDOR4000) 28 | #include "boot/mkrvidor4000.h" 29 | #elif defined(ARDUINO_SAMD_NANO_33_IOT) 30 | #include "boot/nano33iot.h" 31 | #else 32 | #error "Unsupported board!" 33 | #endif 34 | }; 35 | -------------------------------------------------------------------------------- /libraries/SNU/src/SNU.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2017 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef _SFU_H_INCLUDED 20 | #define _SFU_H_INCLUDED 21 | 22 | // nothing for now 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /libraries/SPI/examples/DigitalPotControl/DigitalPotControl.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Digital Pot Control 3 | 4 | This example controls an Analog Devices AD5206 digital potentiometer. 5 | The AD5206 has 6 potentiometer channels. Each channel's pins are labeled 6 | A - connect this to voltage 7 | W - this is the pot's wiper, which changes when you set it 8 | B - connect this to ground. 9 | 10 | The AD5206 is SPI-compatible,and to command it, you send two bytes, 11 | one with the channel number (0 - 5) and one with the resistance value for the 12 | channel (0 - 255). 13 | 14 | The circuit: 15 | * All A pins of AD5206 connected to +5V 16 | * All B pins of AD5206 connected to ground 17 | * An LED and a 220-ohm resisor in series connected from each W pin to ground 18 | * CS - to digital pin 10 (SS pin) 19 | * SDI - to digital pin 11 (MOSI pin) 20 | * CLK - to digital pin 13 (SCK pin) 21 | 22 | created 10 Aug 2010 23 | by Tom Igoe 24 | 25 | Thanks to Heather Dewey-Hagborg for the original tutorial, 2005 26 | 27 | */ 28 | 29 | 30 | // inslude the SPI library: 31 | #include 32 | 33 | 34 | // set pin 10 as the slave select for the digital pot: 35 | const int slaveSelectPin = 10; 36 | 37 | void setup() { 38 | // set the slaveSelectPin as an output: 39 | pinMode (slaveSelectPin, OUTPUT); 40 | // initialize SPI: 41 | SPI.begin(); 42 | } 43 | 44 | void loop() { 45 | // go through the six channels of the digital pot: 46 | for (int channel = 0; channel < 6; channel++) { 47 | // change the resistance on this channel from min to max: 48 | for (int level = 0; level < 255; level++) { 49 | digitalPotWrite(channel, level); 50 | delay(10); 51 | } 52 | // wait a second at the top: 53 | delay(100); 54 | // change the resistance on this channel from max to min: 55 | for (int level = 0; level < 255; level++) { 56 | digitalPotWrite(channel, 255 - level); 57 | delay(10); 58 | } 59 | } 60 | 61 | } 62 | 63 | void digitalPotWrite(int address, int value) { 64 | // take the SS pin low to select the chip: 65 | digitalWrite(slaveSelectPin, LOW); 66 | delay(100); 67 | // send in the address and value via SPI: 68 | SPI.transfer(address); 69 | SPI.transfer(value); 70 | delay(100); 71 | // take the SS pin high to de-select the chip: 72 | digitalWrite(slaveSelectPin, HIGH); 73 | } 74 | -------------------------------------------------------------------------------- /libraries/SPI/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map SPI 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | SPI KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | begin KEYWORD2 15 | end KEYWORD2 16 | transfer KEYWORD2 17 | #setBitOrder KEYWORD2 18 | setDataMode KEYWORD2 19 | setClockDivider KEYWORD2 20 | 21 | 22 | ####################################### 23 | # Constants (LITERAL1) 24 | ####################################### 25 | SPI_MODE0 LITERAL1 26 | SPI_MODE1 LITERAL1 27 | SPI_MODE2 LITERAL1 28 | SPI_MODE3 LITERAL1 29 | 30 | SPI_CONTINUE LITERAL1 31 | SPI_LAST LITERAL1 32 | -------------------------------------------------------------------------------- /libraries/SPI/library.properties: -------------------------------------------------------------------------------- 1 | name=SPI 2 | version=1.0 3 | author=Jonathan BAUDIN, Thibaut VIARD, Arduino 4 | maintainer=Arduino 5 | sentence=Enables the communication with devices that use the Serial Peripheral Interface (SPI) Bus. Specific implementation for Arduino Zero. 6 | paragraph= 7 | category=Communication 8 | url=http://www.arduino.cc/en/Reference/SPI 9 | architectures=samd 10 | -------------------------------------------------------------------------------- /libraries/SSU/examples/SSU_HttpOta/arduino_secrets.h: -------------------------------------------------------------------------------- 1 | #define SECRET_PINNUMBER "" 2 | #define SECRET_GPRS_APN "GPRS_APN" // replace your GPRS APN 3 | #define SECRET_GPRS_LOGIN "login" // replace with your GPRS login 4 | #define SECRET_GPRS_PASSWORD "password" // replace with your GPRS password -------------------------------------------------------------------------------- /libraries/SSU/examples/SSU_LZSS_HttpOta/arduino_secrets.h: -------------------------------------------------------------------------------- 1 | #define SECRET_PINNUMBER "" 2 | #define SECRET_GPRS_APN "GPRS_APN" // replace your GPRS APN 3 | #define SECRET_GPRS_LOGIN "login" // replace with your GPRS login 4 | #define SECRET_GPRS_PASSWORD "password" // replace with your GPRS password -------------------------------------------------------------------------------- /libraries/SSU/examples/SSU_LoadBinary/Binary.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/ArduinoCore-samd/993398cb7a23a4e0f821a73501ae98053773165b/libraries/SSU/examples/SSU_LoadBinary/Binary.h -------------------------------------------------------------------------------- /libraries/SSU/examples/SSU_LoadBinary/SSU_LoadBinary.ino: -------------------------------------------------------------------------------- 1 | /************************************************************************************** 2 | * INCLUDE 3 | **************************************************************************************/ 4 | 5 | 6 | #include 7 | 8 | 9 | /************************************************************************************** 10 | * CONSTANTS 11 | **************************************************************************************/ 12 | 13 | static char const BINARY[] = 14 | 15 | { 16 | #include "Binary.h" 17 | }; 18 | 19 | 20 | GSMFileUtils fileUtils; 21 | 22 | 23 | /************************************************************************************** 24 | * SETUP/LOOP 25 | **************************************************************************************/ 26 | 27 | void setup() { 28 | Serial.begin(9600); 29 | 30 | unsigned long const start = millis(); 31 | for(unsigned long now = millis(); !Serial && ((now - start) < 5000); now = millis()) { }; 32 | 33 | Serial.print("Accessing SARA U-201 Filesystem... "); 34 | if(!fileUtils.begin()) { 35 | Serial.println("failed."); 36 | return; 37 | 38 | } 39 | Serial.println("OK"); 40 | Serial.print("Writing \"UPDATE.BIN\" ... "); 41 | 42 | uint32_t bytes_to_write = sizeof(BINARY); 43 | auto bytes_written = fileUtils.downloadFile("UPDATE.BIN", BINARY, bytes_to_write); 44 | 45 | if(bytes_written != bytes_to_write) { 46 | Serial.println("downloadFile failed.");return; 47 | 48 | } else { 49 | Serial.print("OK ("); 50 | Serial.print(bytes_written); 51 | Serial.println(" bytes written)"); 52 | } 53 | } 54 | 55 | void loop() { 56 | 57 | } 58 | -------------------------------------------------------------------------------- /libraries/SSU/examples/SSU_Usage/SSU_Usage.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Usage 3 | This example demonstrates how to use the SAMD SSU library to update a 4 | sketch on any Arduino MKR board via the storage on the SARA U-201 GSM module. 5 | This sketch prints out the date and time the sketch was compiled. 6 | Steps to update sketch: 7 | 1) Upload this sketch or another sketch that includes the SSU library 8 | via #include 9 | 2) Update the sketch as desired. For this example the sketch prints out 10 | the compiled date and time so no updates are needed. 11 | 3) In the IDE select: Sketch -> Export compiled Binary 12 | 4) Open the location of the sketch and convert the .bin file to a C byte array. 13 | cat SKETCH.bin | xxd --include > Binary.h 14 | 5) Copy Binary.h file from the sketch's folder to the SSU_LoadBinary sketch 15 | and load it to the U-201 via SSU_LoadBinary sketch. 16 | */ 17 | 18 | /* 19 | Include the SSU library 20 | 21 | This will add some code to the sketch before setup() is called 22 | to check if UPDATE.BIN and UPDATE.OK are present on the storage of 23 | the U-201 module. If this theck is positive UPDATE.BIN is used to update 24 | the sketch running on the board. 25 | After this UPDATE.BIN and UPDATE.OK are deleted from the flash. 26 | */ 27 | 28 | 29 | #include 30 | 31 | void setup() 32 | { 33 | Serial.begin(9600); 34 | while (!Serial) { } 35 | // wait a bit 36 | delay(1000); 37 | String message; 38 | message += "Sketch compile date and time: "; 39 | message += __DATE__; 40 | message += " "; 41 | message += __TIME__; 42 | // print out the sketch compile date and time on the serial port 43 | Serial.println(message); 44 | } 45 | 46 | void loop() 47 | { 48 | // add you own code here 49 | } -------------------------------------------------------------------------------- /libraries/SSU/extras/SSUBoot/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -x 2 | 3 | #Sara U201 4 | ARDUINO=arduino 5 | SKETCH_NAME="SSUBoot.ino" 6 | SKETCH="$PWD/$SKETCH_NAME" 7 | BUILD_PATH="$PWD/build" 8 | OUTPUT_PATH="../../src/boot" 9 | 10 | if [[ "$OSTYPE" == "darwin"* ]]; then 11 | ARDUINO="/Applications/Arduino.app/Contents/MacOS/Arduino" 12 | fi 13 | 14 | buildSSUBootSketch() { 15 | BOARD=$1 16 | DESTINATION=$2 17 | 18 | $ARDUINO --verify --board $BOARD --preserve-temp-files --pref build.path="$BUILD_PATH" $SKETCH 19 | cat "$BUILD_PATH/$SKETCH_NAME.bin" | xxd -include > $DESTINATION 20 | rm -rf "$BUILD_PATH" 21 | } 22 | 23 | buildSSUBootSketch "arduino:samd:mkrgsm1400" "$OUTPUT_PATH/mkrgsm1400.h" 24 | -------------------------------------------------------------------------------- /libraries/SSU/extras/SSUBoot/lzss.h: -------------------------------------------------------------------------------- 1 | #ifndef SSU_LZSS_H_ 2 | #define SSU_LZSS_H_ 3 | 4 | /************************************************************************************** 5 | INCLUDE 6 | **************************************************************************************/ 7 | 8 | #include 9 | 10 | /************************************************************************************** 11 | FUNCTION DEFINITION 12 | **************************************************************************************/ 13 | 14 | void lzss_init(uint32_t const sketch_start); 15 | void lzss_decode(); 16 | void lzss_flush(); 17 | 18 | #endif /* SSU_LZSS_H_ */ 19 | -------------------------------------------------------------------------------- /libraries/SSU/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For SDU 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | SSU KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | ####################################### 16 | # Constants (LITERAL1) 17 | ####################################### 18 | -------------------------------------------------------------------------------- /libraries/SSU/library.properties: -------------------------------------------------------------------------------- 1 | name=SSU 2 | version=1.0.0 3 | author=Arduino 4 | maintainer=Arduino 5 | sentence=Update the sketch on your Arduino MKRGSM1400 from SARAU201 flash. 6 | paragraph= 7 | category=Other 8 | url=https://www.arduino.cc/en/Reference/SSU 9 | architectures=samd 10 | -------------------------------------------------------------------------------- /libraries/SSU/src/SSU.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2020 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #include 20 | 21 | #include "SSU.h" 22 | 23 | __attribute__ ((section(".sketch_boot"))) 24 | unsigned char SSU_BOOT[0x8000] = { 25 | #if defined(ARDUINO_SAMD_MKRGSM1400) 26 | #include "boot/mkrgsm1400.h" 27 | #else 28 | #error "Unsupported board!" 29 | #endif 30 | }; 31 | -------------------------------------------------------------------------------- /libraries/SSU/src/SSU.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2020 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef _SSU_H_INCLUDED 20 | #define _SSU_H_INCLUDED 21 | 22 | /* Nothing to do */ 23 | 24 | #endif /* _SSU_H_INCLUDED */ 25 | -------------------------------------------------------------------------------- /libraries/USBHost/examples/ADKTerminalTest/ADKTerminalTest.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012 Arduino. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #define ARDUINO_MAIN 20 | //#include "variant.h" 21 | #include "Arduino.h" 22 | #include 23 | #include 24 | 25 | 26 | USBHost usb; 27 | ADK adk(&usb,"Arduino SA", 28 | "Arduino_Terminal", 29 | "Arduino Terminal for Android", 30 | "1.0", 31 | "http://labs.arduino.cc/uploads/ADK/ArduinoTerminal/ThibaultTerminal_ICS_0001.apk", 32 | "1"); 33 | 34 | void setup(void) 35 | { 36 | SERIAL_PORT_MONITOR.begin( 115200 ); 37 | while (!SERIAL_PORT_MONITOR); // Wait for serial port to connect - used on Leonardo, Teensy and other boards with built-in USB CDC serial connection 38 | SERIAL_PORT_MONITOR.println("\r\nADK demo start"); 39 | 40 | if (usb.Init() == -1) 41 | SERIAL_PORT_MONITOR.println("OSC did not start."); 42 | 43 | delay(20); 44 | } 45 | 46 | #define RCVSIZE 128 47 | 48 | void loop(void) 49 | { 50 | uint8_t buf[RCVSIZE]; 51 | uint32_t nbread = 0; 52 | char helloworld[] = "Hello World!\r\n"; 53 | 54 | usb.Task(); 55 | 56 | if( adk.isReady() == false ) { 57 | return; 58 | } 59 | /* Write hello string to ADK */ 60 | adk.SndData(strlen(helloworld), (uint8_t *)helloworld); 61 | 62 | delay(1000); 63 | 64 | /* Read data from ADK and print to UART */ 65 | adk.RcvData((uint8_t *)&nbread, buf); 66 | if (nbread > 0) 67 | { 68 | SERIAL_PORT_MONITOR.print("RCV: "); 69 | for (uint32_t i = 0; i < nbread; ++i) 70 | { 71 | SERIAL_PORT_MONITOR.print((char)buf[i]); 72 | } 73 | SERIAL_PORT_MONITOR.print("\r\n"); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /libraries/USBHost/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For USBHost 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | MouseController KEYWORD1 10 | USBHost KEYWORD1 11 | KeyboardController KEYWORD1 12 | 13 | ####################################### 14 | # Methods and Functions (KEYWORD2) 15 | ####################################### 16 | 17 | Task KEYWORD2 18 | mouseMoved KEYWORD2 19 | mouseDragged KEYWORD2 20 | mousePressed KEYWORD2 21 | mouseReleased KEYWORD2 22 | getXChange KEYWORD2 23 | getYChange KEYWORD2 24 | getButton KEYWORD2 25 | keyPressed KEYWORD2 26 | keyReleased KEYWORD2 27 | getModifiers KEYWORD2 28 | getKey KEYWORD2 29 | getOemKey KEYWORD2 30 | 31 | 32 | ####################################### 33 | # Constants (LITERAL1) 34 | ####################################### 35 | 36 | -------------------------------------------------------------------------------- /libraries/USBHost/library.properties: -------------------------------------------------------------------------------- 1 | name=USBHost 2 | version=1.0 3 | author=Arduino 4 | maintainer=Arduino 5 | sentence=Allows the communication with USB peripherals like mice, keyboards, and thumbdrives. For Arduino MKR1000 and Zero. 6 | paragraph=The USBHost library allows the board to appear as a USB host, enabling it to communicate with peripherals like USB mice and keyboards. USBHost does not support devices that are connected through USB hubs. This includes some keyboards that have an internal hub. 7 | category=Other 8 | url=https://www.arduino.cc/en/Reference/USBHost 9 | architectures=samd 10 | -------------------------------------------------------------------------------- /libraries/USBHost/src/KeyboardController.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012 Arduino. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #include 20 | 21 | extern "C" { 22 | void __keyboardControllerEmptyCallback() { } 23 | } 24 | 25 | void keyPressed() __attribute__ ((weak, alias("__keyboardControllerEmptyCallback"))); 26 | void keyReleased() __attribute__ ((weak, alias("__keyboardControllerEmptyCallback"))); 27 | 28 | void KeyboardController::OnKeyDown(uint8_t _mod, uint8_t _oemKey) { 29 | modifiers = _mod; 30 | keyOem = _oemKey; 31 | key = OemToAscii(_mod, _oemKey); 32 | keyPressed(); 33 | } 34 | 35 | void KeyboardController::OnKeyUp(uint8_t _mod, uint8_t _oemKey) { 36 | modifiers = _mod; 37 | keyOem = _oemKey; 38 | key = OemToAscii(_mod, _oemKey); 39 | keyReleased(); 40 | } 41 | -------------------------------------------------------------------------------- /libraries/USBHost/src/KeyboardController.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012 Arduino. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef KEYBOARD_CONTROLLER_H 20 | #define KEYBOARD_CONTROLLER_H 21 | 22 | #include 23 | 24 | enum KeyboardModifiers { 25 | LeftCtrl = 1, 26 | LeftShift = 2, 27 | Alt = 4, 28 | LeftCmd = 8, 29 | RightCtrl = 16, 30 | RightShift = 32, 31 | AltGr = 64, 32 | RightCmd = 128 33 | }; 34 | 35 | class KeyboardController : public KeyboardReportParser { 36 | public: 37 | KeyboardController(USBHost &usb) : hostKeyboard(&usb), key(0), keyOem(0), modifiers(0) { 38 | hostKeyboard.SetReportParser(0, this); 39 | }; 40 | 41 | uint8_t getKey() { return key; }; 42 | uint8_t getModifiers() { return modifiers; }; 43 | uint8_t getOemKey() { return keyOem; }; 44 | 45 | protected: 46 | virtual void OnKeyDown(uint8_t mod, uint8_t key); 47 | virtual void OnKeyUp(uint8_t mod, uint8_t key); 48 | 49 | private: 50 | HIDBoot hostKeyboard; 51 | uint8_t key, keyOem, modifiers; 52 | }; 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /libraries/USBHost/src/MouseController.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012 Arduino. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef MOUSE_CONTROLLER_H 20 | #define MOUSE_CONTROLLER_H 21 | 22 | #include 23 | 24 | enum MouseButton { 25 | LEFT_BUTTON = 0x01, 26 | MIDDLE_BUTTON = 0x02, 27 | RIGHT_BUTTON = 0x04 28 | }; 29 | 30 | class MouseController : public MouseReportParser 31 | { 32 | public: 33 | MouseController(USBHost &usb) : hostMouse(&usb), dx(0), dy(0), buttons(0) { 34 | hostMouse.SetReportParser(0, this); 35 | }; 36 | 37 | bool getButton(MouseButton button) { return (buttons & button) == button; }; 38 | int getXChange(); 39 | int getYChange(); 40 | // int getWheelChange(); // Not implemented 41 | 42 | protected: 43 | virtual void OnMouseMove(MOUSEINFO *mi); 44 | virtual void OnLeftButtonUp(MOUSEINFO *mi); 45 | virtual void OnLeftButtonDown(MOUSEINFO *mi); 46 | virtual void OnMiddleButtonUp(MOUSEINFO *mi); 47 | virtual void OnMiddleButtonDown(MOUSEINFO *mi); 48 | virtual void OnRightButtonUp(MOUSEINFO *mi); 49 | virtual void OnRightButtonDown(MOUSEINFO *mi); 50 | 51 | private: 52 | HIDBoot hostMouse; 53 | int dx, dy; 54 | int buttons; 55 | }; 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /libraries/USBHost/src/Usb.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. 2 | 3 | This software may be distributed and modified under the terms of the GNU 4 | General Public License version 2 (GPL2) as published by the Free Software 5 | Foundation and appearing in the file GPL2.TXT included in the packaging of 6 | this file. Please note that GPL2 Section 2[b] requires that all works based 7 | on this software must also be made publicly available under the terms of 8 | the GPL2 ("Copyleft"). 9 | 10 | Contact information 11 | ------------------- 12 | 13 | Circuits At Home, LTD 14 | Web : http://www.circuitsathome.com 15 | e-mail : support@circuitsathome.com 16 | */ 17 | /* USB functions */ 18 | 19 | #ifndef USB_H_INCLUDED 20 | #define USB_H_INCLUDED 21 | #define _usb_h_ 22 | 23 | #include 24 | 25 | //#include "Arduino.h" 26 | #include "macros.h" 27 | // None of these should ever be included by a driver, or a user's sketch. 28 | 29 | #include "variant.h" 30 | #define USB_HOST_SERIAL SERIAL_PORT_MONITOR 31 | #include "Print.h" 32 | #include "printhex.h" 33 | #include "message.h" 34 | #include "hexdump.h" 35 | #include "sink_parser.h" 36 | 37 | #include "address.h" 38 | 39 | #include "usb_ch9.h" 40 | //#include "usbhost.h" 41 | #include "UsbCore.h" 42 | #include "parsetools.h" 43 | 44 | #include "confdescparser.h" 45 | 46 | #endif /* USB_H_INCLUDED */ 47 | -------------------------------------------------------------------------------- /libraries/USBHost/src/hexdump.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. 2 | 3 | This software may be distributed and modified under the terms of the GNU 4 | General Public License version 2 (GPL2) as published by the Free Software 5 | Foundation and appearing in the file GPL2.TXT included in the packaging of 6 | this file. Please note that GPL2 Section 2[b] requires that all works based 7 | on this software must also be made publicly available under the terms of 8 | the GPL2 ("Copyleft"). 9 | 10 | Contact information 11 | ------------------- 12 | 13 | Circuits At Home, LTD 14 | Web : http://www.circuitsathome.com 15 | e-mail : support@circuitsathome.com 16 | */ 17 | #if !defined(_usb_h_) || defined(__HEXDUMP_H__) 18 | #error "Never include hexdump.h directly; include Usb.h instead" 19 | #else 20 | #define __HEXDUMP_H__ 21 | 22 | extern int UsbDEBUGlvl; 23 | 24 | template 25 | class HexDumper : public BASE_CLASS { 26 | uint8_t byteCount; 27 | OFFSET_TYPE byteTotal; 28 | 29 | public: 30 | 31 | HexDumper() : byteCount(0), byteTotal(0) { 32 | }; 33 | 34 | void Initialize() { 35 | byteCount = 0; 36 | byteTotal = 0; 37 | }; 38 | 39 | virtual void Parse(const LEN_TYPE len, const uint8_t *pbuf, const OFFSET_TYPE &offset); 40 | }; 41 | 42 | template 43 | void HexDumper::Parse(const LEN_TYPE len, const uint8_t *pbuf, const OFFSET_TYPE &offset) { 44 | if(UsbDEBUGlvl >= 0x80) { // Fully bypass this block of code if we do not debug. 45 | for(LEN_TYPE j = 0; j < len; j++, byteCount++, byteTotal++) { 46 | if(!byteCount) { 47 | PrintHex (byteTotal, 0x80); 48 | E_Notify(PSTR(": "), 0x80); 49 | } 50 | PrintHex (pbuf[j], 0x80); 51 | E_Notify(PSTR(" "), 0x80); 52 | 53 | if(byteCount == 15) { 54 | E_Notify(PSTR("\r\n"), 0x80); 55 | byteCount = 0xFF; 56 | } 57 | } 58 | } 59 | } 60 | 61 | #endif // __HEXDUMP_H__ 62 | -------------------------------------------------------------------------------- /libraries/USBHost/src/parsetools.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. 2 | 3 | This software may be distributed and modified under the terms of the GNU 4 | General Public License version 2 (GPL2) as published by the Free Software 5 | Foundation and appearing in the file GPL2.TXT included in the packaging of 6 | this file. Please note that GPL2 Section 2[b] requires that all works based 7 | on this software must also be made publicly available under the terms of 8 | the GPL2 ("Copyleft"). 9 | 10 | Contact information 11 | ------------------- 12 | 13 | Circuits At Home, LTD 14 | Web : http://www.circuitsathome.com 15 | e-mail : support@circuitsathome.com 16 | */ 17 | #include "Usb.h" 18 | 19 | bool MultiByteValueParser::Parse(uint8_t **pp, uint32_t *pcntdn) { 20 | if(!pBuf) { 21 | Notify(PSTR("Buffer pointer is NULL!\r\n"), 0x80); 22 | return false; 23 | } 24 | for (; countDown && (*pcntdn); countDown--, (*pcntdn)--, (*pp)++) 25 | pBuf[valueSize - countDown] = (**pp); 26 | 27 | if(countDown) 28 | return false; 29 | 30 | countDown = valueSize; 31 | return true; 32 | } 33 | 34 | bool PTPListParser::Parse(uint8_t **pp, uint32_t *pcntdn, PTP_ARRAY_EL_FUNC pf, const void *me) { 35 | switch(nStage) { 36 | case 0: 37 | pBuf->valueSize = lenSize; 38 | theParser.Initialize(pBuf); 39 | nStage = 1; 40 | 41 | case 1: 42 | if(!theParser.Parse(pp, pcntdn)) 43 | return false; 44 | 45 | arLen = 0; 46 | arLen = (pBuf->valueSize >= 4) ? *((uint32_t*)pBuf->pValue) : (uint32_t)(*((uint16_t*)pBuf->pValue)); 47 | arLenCntdn = arLen; 48 | nStage = 2; 49 | 50 | case 2: 51 | pBuf->valueSize = valSize; 52 | theParser.Initialize(pBuf); 53 | nStage = 3; 54 | 55 | case 3: 56 | for(; arLenCntdn; arLenCntdn--) { 57 | if(!theParser.Parse(pp, pcntdn)) 58 | return false; 59 | 60 | if(pf) 61 | pf(pBuf, (arLen - arLenCntdn), me); 62 | } 63 | 64 | nStage = 0; 65 | } 66 | return true; 67 | } 68 | -------------------------------------------------------------------------------- /libraries/USBHost/src/sink_parser.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. 2 | 3 | This software may be distributed and modified under the terms of the GNU 4 | General Public License version 2 (GPL2) as published by the Free Software 5 | Foundation and appearing in the file GPL2.TXT included in the packaging of 6 | this file. Please note that GPL2 Section 2[b] requires that all works based 7 | on this software must also be made publicly available under the terms of 8 | the GPL2 ("Copyleft"). 9 | 10 | Contact information 11 | ------------------- 12 | 13 | Circuits At Home, LTD 14 | Web : http://www.circuitsathome.com 15 | e-mail : support@circuitsathome.com 16 | */ 17 | #if !defined(_usb_h_) || defined(__SINK_PARSER_H__) 18 | #error "Never include hexdump.h directly; include Usb.h instead" 19 | #else 20 | #define __SINK_PARSER_H__ 21 | 22 | extern int UsbDEBUGlvl; 23 | 24 | // This parser does absolutely nothing with the data, just swallows it. 25 | 26 | template 27 | class SinkParser : public BASE_CLASS { 28 | public: 29 | 30 | SinkParser() { 31 | }; 32 | 33 | void Initialize() { 34 | }; 35 | 36 | void Parse(const LEN_TYPE /* len */, const uint8_t * /* pbuf */, const OFFSET_TYPE & /* offset */) { 37 | }; 38 | }; 39 | 40 | 41 | #endif // __HEXDUMP_H__ 42 | -------------------------------------------------------------------------------- /libraries/Wire/examples/digital_potentiometer/digital_potentiometer.ino: -------------------------------------------------------------------------------- 1 | // I2C Digital Potentiometer 2 | // by Nicholas Zambetti 3 | // and Shawn Bonkowski 4 | 5 | // Demonstrates use of the Wire library 6 | // Controls AD5171 digital potentiometer via I2C/TWI 7 | 8 | // Created 31 March 2006 9 | 10 | // This example code is in the public domain. 11 | 12 | // This example code is in the public domain. 13 | 14 | 15 | #include 16 | 17 | void setup() 18 | { 19 | Wire.begin(); // join i2c bus (address optional for master) 20 | } 21 | 22 | byte val = 0; 23 | 24 | void loop() 25 | { 26 | Wire.beginTransmission(44); // transmit to device #44 (0x2c) 27 | // device address is specified in datasheet 28 | Wire.write(byte(0x00)); // sends instruction byte 29 | Wire.write(val); // sends potentiometer value byte 30 | Wire.endTransmission(); // stop transmitting 31 | 32 | val++; // increment value 33 | if(val == 64) // if reached 64th position (max) 34 | { 35 | val = 0; // start over from lowest value 36 | } 37 | delay(500); 38 | } 39 | 40 | -------------------------------------------------------------------------------- /libraries/Wire/examples/master_reader/master_reader.ino: -------------------------------------------------------------------------------- 1 | // Wire Master Reader 2 | // by Nicholas Zambetti 3 | 4 | // Demonstrates use of the Wire library 5 | // Reads data from an I2C/TWI slave device 6 | // Refer to the "Wire Slave Sender" example for use with this 7 | 8 | // Created 29 March 2006 9 | 10 | // This example code is in the public domain. 11 | 12 | 13 | #include 14 | 15 | void setup() 16 | { 17 | Wire.begin(); // join i2c bus (address optional for master) 18 | Serial.begin(9600); // start serial for output 19 | } 20 | 21 | void loop() 22 | { 23 | Wire.requestFrom(2, 6); // request 6 bytes from slave device #2 24 | 25 | while(Wire.available()) // slave may send less than requested 26 | { 27 | char c = Wire.read(); // receive a byte as character 28 | Serial.print(c); // print the character 29 | } 30 | 31 | delay(500); 32 | } 33 | -------------------------------------------------------------------------------- /libraries/Wire/examples/master_writer/master_writer.ino: -------------------------------------------------------------------------------- 1 | // Wire Master Writer 2 | // by Nicholas Zambetti 3 | 4 | // Demonstrates use of the Wire library 5 | // Writes data to an I2C/TWI slave device 6 | // Refer to the "Wire Slave Receiver" example for use with this 7 | 8 | // Created 29 March 2006 9 | 10 | // This example code is in the public domain. 11 | 12 | 13 | #include 14 | 15 | void setup() 16 | { 17 | Wire.begin(); // join i2c bus (address optional for master) 18 | } 19 | 20 | byte x = 0; 21 | 22 | void loop() 23 | { 24 | Wire.beginTransmission(4); // transmit to device #4 25 | Wire.write("x is "); // sends five bytes 26 | Wire.write(x); // sends one byte 27 | Wire.endTransmission(); // stop transmitting 28 | 29 | x++; 30 | delay(500); 31 | } 32 | -------------------------------------------------------------------------------- /libraries/Wire/examples/slave_receiver/slave_receiver.ino: -------------------------------------------------------------------------------- 1 | // Wire Slave Receiver 2 | // by Nicholas Zambetti 3 | 4 | // Demonstrates use of the Wire library 5 | // Receives data as an I2C/TWI slave device 6 | // Refer to the "Wire Master Writer" example for use with this 7 | 8 | // Created 29 March 2006 9 | 10 | // This example code is in the public domain. 11 | 12 | 13 | #include 14 | 15 | void setup() 16 | { 17 | Wire.begin(4); // join i2c bus with address #4 18 | Wire.onReceive(receiveEvent); // register event 19 | Serial.begin(9600); // start serial for output 20 | } 21 | 22 | void loop() 23 | { 24 | delay(100); 25 | } 26 | 27 | // function that executes whenever data is received from master 28 | // this function is registered as an event, see setup() 29 | void receiveEvent(int howMany) 30 | { 31 | while(1 < Wire.available()) // loop through all but the last 32 | { 33 | char c = Wire.read(); // receive byte as a character 34 | Serial.print(c); // print the character 35 | } 36 | int x = Wire.read(); // receive byte as an integer 37 | Serial.println(x); // print the integer 38 | } 39 | -------------------------------------------------------------------------------- /libraries/Wire/examples/slave_sender/slave_sender.ino: -------------------------------------------------------------------------------- 1 | // Wire Slave Sender 2 | // by Nicholas Zambetti 3 | 4 | // Demonstrates use of the Wire library 5 | // Sends data as an I2C/TWI slave device 6 | // Refer to the "Wire Master Reader" example for use with this 7 | 8 | // Created 29 March 2006 9 | 10 | // This example code is in the public domain. 11 | 12 | 13 | #include 14 | 15 | void setup() 16 | { 17 | Wire.begin(2); // join i2c bus with address #2 18 | Wire.onRequest(requestEvent); // register event 19 | } 20 | 21 | void loop() 22 | { 23 | delay(100); 24 | } 25 | 26 | // function that executes whenever data is requested by master 27 | // this function is registered as an event, see setup() 28 | void requestEvent() 29 | { 30 | Wire.write("hello "); // respond with message of 6 bytes 31 | // as expected by master 32 | } 33 | -------------------------------------------------------------------------------- /libraries/Wire/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For Wire 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | Wire KEYWORD2 10 | Wire1 KEYWORD2 11 | 12 | ####################################### 13 | # Methods and Functions (KEYWORD2) 14 | ####################################### 15 | 16 | begin KEYWORD2 17 | beginTransmission KEYWORD2 18 | endTransmission KEYWORD2 19 | requestFrom KEYWORD2 20 | onReceive KEYWORD2 21 | onRequest KEYWORD2 22 | 23 | ####################################### 24 | # Constants (LITERAL1) 25 | ####################################### 26 | 27 | -------------------------------------------------------------------------------- /libraries/Wire/library.properties: -------------------------------------------------------------------------------- 1 | name=Wire 2 | version=1.0 3 | author=Jonathan BAUDIN, Thibaut VIARD, Arduino 4 | maintainer=Arduino 5 | sentence=Allows the communication between devices or sensors connected via Two Wire Interface Bus. Specific implementation for Arduino Zero. 6 | paragraph= 7 | category=Communication 8 | url=http://www.arduino.cc/en/Reference/Wire 9 | architectures=samd 10 | -------------------------------------------------------------------------------- /post_install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set ARGS=/SE /SW /SA 3 | if "%PROCESSOR_ARCHITECTURE%" == "AMD64" ( 4 | drivers\dpinst-amd64.exe %ARGS% 5 | ) ELSE IF "%PROCESSOR_ARCHITEW6432%" == "AMD64" ( 6 | drivers\dpinst-amd64.exe %ARGS% 7 | ) ELSE ( 8 | drivers\dpinst-x86.exe %ARGS% 9 | ) 10 | 11 | @echo off 12 | setlocal 13 | for /f "tokens=4-5 delims=[.] " %%i in ('ver') do @(if %%i==Version (set VERSION=%%j) else (set VERSION=%%i)) 14 | if %VERSION% GEQ 10 ( 15 | exit /b 0 16 | ) 17 | endlocal 18 | 19 | REM dpinst /PATH has problems with relative paths, so use absolute path. 20 | if "%PROCESSOR_ARCHITECTURE%" == "AMD64" ( 21 | drivers\dpinst-amd64.exe /PATH %cd%\drivers\prewin10 %ARGS% 22 | ) ELSE IF "%PROCESSOR_ARCHITEW6432%" == "AMD64" ( 23 | drivers\dpinst-amd64.exe /PATH %cd%\drivers\prewin10 %ARGS% 24 | ) ELSE ( 25 | drivers\dpinst-x86.exe /PATH %cd%\drivers\prewin10 %ARGS% 26 | ) 27 | 28 | exit /b 0 29 | -------------------------------------------------------------------------------- /programmers.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 2 | # 3 | # This library is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU Lesser General Public 5 | # License as published by the Free Software Foundation; either 6 | # version 2.1 of the License, or (at your option) any later version. 7 | # 8 | # This library is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | # See the GNU Lesser General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public 14 | # License along with this library; if not, write to the Free Software 15 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 | 17 | edbg.name=Atmel EDBG 18 | edbg.communication=USB 19 | edbg.protocol=cmsis-dap.cfg 20 | edbg.program.tool=openocd 21 | edbg.program.tool.default=openocd 22 | edbg.program.extra_params= 23 | edbg.extra_params= 24 | 25 | atmel_ice.name=Atmel-ICE 26 | atmel_ice.communication=USB 27 | atmel_ice.protocol=cmsis-dap.cfg 28 | atmel_ice.program.tool=openocd 29 | atmel_ice.program.tool.default=openocd 30 | atmel_ice.program.extra_params= 31 | atmel_ice.extra_params= 32 | 33 | sam_ice.name=Atmel SAM-ICE 34 | sam_ice.communication=USB 35 | sam_ice.protocol=cmsis-dap.cfg 36 | sam_ice.program.tool=openocd 37 | sam_ice.program.tool.default=openocd 38 | sam_ice.program.extra_params= 39 | sam_ice.extra_params= 40 | 41 | jlink.name=Segger J-Link 42 | jlink.communication=USB 43 | jlink.protocol=jlink.cfg 44 | jlink.program.tool=openocd 45 | jlink.program.tool.default=openocd 46 | jlink.extra_params=-c "transport select swd" 47 | -------------------------------------------------------------------------------- /variants/arduino_mzero/debug_scripts/variant.gdb: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | # Define 'reset' command 22 | define reset 23 | 24 | info reg 25 | 26 | break main 27 | 28 | # End of 'reset' command 29 | end 30 | 31 | target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" 32 | -------------------------------------------------------------------------------- /variants/arduino_mzero/openocd_scripts/arduino_zero.cfg: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | source [find interface/cmsis-dap.cfg] 22 | 23 | # chip name 24 | set CHIPNAME at91samd21g18 25 | set ENDIAN little 26 | 27 | # choose a port here 28 | set telnet_port 0 29 | 30 | source [find target/at91samdXX.cfg] 31 | -------------------------------------------------------------------------------- /variants/arduino_mzero/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | // API compatibility 20 | #include "variant.h" 21 | 22 | -------------------------------------------------------------------------------- /variants/arduino_zero/debug_scripts/variant.gdb: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | # Define 'reset' command 22 | define reset 23 | 24 | info reg 25 | 26 | break main 27 | 28 | # End of 'reset' command 29 | end 30 | 31 | target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" 32 | -------------------------------------------------------------------------------- /variants/arduino_zero/openocd_scripts/arduino_zero.cfg: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | source [find interface/cmsis-dap.cfg] 22 | 23 | # chip name 24 | set CHIPNAME at91samd21g18 25 | set ENDIAN little 26 | 27 | # choose a port here 28 | set telnet_port 0 29 | 30 | source [find target/at91samdXX.cfg] 31 | -------------------------------------------------------------------------------- /variants/arduino_zero/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | // API compatibility 20 | #include "variant.h" 21 | 22 | -------------------------------------------------------------------------------- /variants/circuitplay/debug_scripts/variant.gdb: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | # Define 'reset' command 22 | define reset 23 | 24 | info reg 25 | 26 | break main 27 | 28 | # End of 'reset' command 29 | end 30 | 31 | target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" 32 | -------------------------------------------------------------------------------- /variants/circuitplay/openocd_scripts/arduino_zero.cfg: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | source [find interface/cmsis-dap.cfg] 22 | 23 | # chip name 24 | set CHIPNAME at91samd21g18 25 | set ENDIAN little 26 | 27 | # choose a port here 28 | set telnet_port 0 29 | 30 | source [find target/at91samdXX.cfg] 31 | -------------------------------------------------------------------------------- /variants/circuitplay/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | // API compatibility 20 | #include "variant.h" 21 | 22 | -------------------------------------------------------------------------------- /variants/mkr1000/debug_scripts/variant.gdb: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | # Define 'reset' command 22 | define reset 23 | 24 | info reg 25 | 26 | break main 27 | 28 | # End of 'reset' command 29 | end 30 | 31 | target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" 32 | -------------------------------------------------------------------------------- /variants/mkr1000/openocd_scripts/arduino_zero.cfg: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | source [find interface/cmsis-dap.cfg] 22 | 23 | # chip name 24 | set CHIPNAME at91samd21g18 25 | set ENDIAN little 26 | 27 | # choose a port here 28 | set telnet_port 0 29 | 30 | source [find target/at91samdXX.cfg] 31 | -------------------------------------------------------------------------------- /variants/mkr1000/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | // API compatibility 20 | #include "variant.h" 21 | 22 | -------------------------------------------------------------------------------- /variants/mkrfox1200/debug_scripts/variant.gdb: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | # Define 'reset' command 22 | define reset 23 | 24 | info reg 25 | 26 | break main 27 | 28 | # End of 'reset' command 29 | end 30 | 31 | target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" 32 | -------------------------------------------------------------------------------- /variants/mkrfox1200/openocd_scripts/arduino_zero.cfg: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | source [find interface/cmsis-dap.cfg] 22 | 23 | # chip name 24 | set CHIPNAME at91samd21g18 25 | set ENDIAN little 26 | 27 | # choose a port here 28 | set telnet_port 0 29 | 30 | source [find target/at91samdXX.cfg] 31 | -------------------------------------------------------------------------------- /variants/mkrfox1200/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | // API compatibility 20 | #include "variant.h" 21 | 22 | -------------------------------------------------------------------------------- /variants/mkrgsm1400/debug_scripts/variant.gdb: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | # Define 'reset' command 22 | define reset 23 | 24 | info reg 25 | 26 | break main 27 | 28 | # End of 'reset' command 29 | end 30 | 31 | target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" 32 | -------------------------------------------------------------------------------- /variants/mkrgsm1400/openocd_scripts/arduino_zero.cfg: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | source [find interface/cmsis-dap.cfg] 22 | 23 | # chip name 24 | set CHIPNAME at91samd21g18 25 | set ENDIAN little 26 | 27 | # choose a port here 28 | set telnet_port 0 29 | 30 | source [find target/at91samdXX.cfg] 31 | -------------------------------------------------------------------------------- /variants/mkrgsm1400/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | // API compatibility 20 | #include "variant.h" 21 | 22 | -------------------------------------------------------------------------------- /variants/mkrnb1500/debug_scripts/variant.gdb: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | # Define 'reset' command 22 | define reset 23 | 24 | info reg 25 | 26 | break main 27 | 28 | # End of 'reset' command 29 | end 30 | 31 | target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" 32 | -------------------------------------------------------------------------------- /variants/mkrnb1500/openocd_scripts/arduino_zero.cfg: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | source [find interface/cmsis-dap.cfg] 22 | 23 | # chip name 24 | set CHIPNAME at91samd21g18 25 | set ENDIAN little 26 | 27 | # choose a port here 28 | set telnet_port 0 29 | 30 | source [find target/at91samdXX.cfg] 31 | -------------------------------------------------------------------------------- /variants/mkrnb1500/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | // API compatibility 20 | #include "variant.h" 21 | 22 | -------------------------------------------------------------------------------- /variants/mkrvidor4000/clockout.c: -------------------------------------------------------------------------------- 1 | #include "variant.h" 2 | 3 | void clockout(uint32_t gclk, int32_t divisor) 4 | { 5 | GCLK_GENDIV_Type gendiv = 6 | { 7 | .bit.DIV = divisor, // divider, linear or 2^(.DIV+1) 8 | .bit.ID = gclk, // GCLK_GENERATOR_"gclk" 9 | }; 10 | GCLK->GENDIV.reg = gendiv.reg; 11 | 12 | // setup Clock Generator 13 | GCLK_GENCTRL_Type genctrl = 14 | { 15 | .bit.RUNSTDBY = 0, // Run in Standby 16 | .bit.DIVSEL = 0, // .DIV (above) Selection: 0=linear 1=powers of 2 17 | .bit.OE = 1, // Output Enable to observe on any port pin capable of outputting GCLK_IO["gclk"] 18 | .bit.OOV = 0, // Output Off Value 19 | .bit.IDC = 1, // Improve Duty Cycle 20 | .bit.GENEN = 1, // enable this GCLK 21 | //.bit.SRC = GCLK_SOURCE_OSC8M, 22 | .bit.SRC = GCLK_SOURCE_DFLL48M, // select GCLK source 23 | .bit.ID = gclk, // output GCLK_GENERATOR_"gclk" on GCLK_IO["gclk"] 24 | }; 25 | GCLK->GENCTRL.reg = genctrl.reg; 26 | while ( GCLK->STATUS.reg & GCLK_STATUS_SYNCBUSY ) 27 | { 28 | /* Wait for synchronization */ 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /variants/mkrvidor4000/debug_scripts/variant.gdb: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | # Define 'reset' command 22 | define reset 23 | 24 | info reg 25 | 26 | break main 27 | 28 | # End of 'reset' command 29 | end 30 | 31 | target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" 32 | -------------------------------------------------------------------------------- /variants/mkrvidor4000/openocd_scripts/arduino_zero.cfg: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | source [find interface/cmsis-dap.cfg] 22 | 23 | # chip name 24 | set CHIPNAME at91samd21g18 25 | set ENDIAN little 26 | 27 | # choose a port here 28 | set telnet_port 0 29 | 30 | source [find target/at91samdXX.cfg] 31 | -------------------------------------------------------------------------------- /variants/mkrvidor4000/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | // API compatibility 20 | #include "variant.h" 21 | 22 | -------------------------------------------------------------------------------- /variants/mkrwan1300/debug_scripts/variant.gdb: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | # Define 'reset' command 22 | define reset 23 | 24 | info reg 25 | 26 | break main 27 | 28 | # End of 'reset' command 29 | end 30 | 31 | target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" 32 | -------------------------------------------------------------------------------- /variants/mkrwan1300/openocd_scripts/arduino_zero.cfg: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | source [find interface/cmsis-dap.cfg] 22 | 23 | # chip name 24 | set CHIPNAME at91samd21g18 25 | set ENDIAN little 26 | 27 | # choose a port here 28 | set telnet_port 0 29 | 30 | source [find target/at91samdXX.cfg] 31 | -------------------------------------------------------------------------------- /variants/mkrwan1300/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | // API compatibility 20 | #include "variant.h" 21 | 22 | -------------------------------------------------------------------------------- /variants/mkrwifi1010/debug_scripts/variant.gdb: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | # Define 'reset' command 22 | define reset 23 | 24 | info reg 25 | 26 | break main 27 | 28 | # End of 'reset' command 29 | end 30 | 31 | target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" 32 | -------------------------------------------------------------------------------- /variants/mkrwifi1010/openocd_scripts/arduino_zero.cfg: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | source [find interface/cmsis-dap.cfg] 22 | 23 | # chip name 24 | set CHIPNAME at91samd21g18 25 | set ENDIAN little 26 | 27 | # choose a port here 28 | set telnet_port 0 29 | 30 | source [find target/at91samdXX.cfg] 31 | -------------------------------------------------------------------------------- /variants/mkrwifi1010/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | // API compatibility 20 | #include "variant.h" 21 | 22 | -------------------------------------------------------------------------------- /variants/mkrzero/debug_scripts/variant.gdb: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | # Define 'reset' command 22 | define reset 23 | 24 | info reg 25 | 26 | break main 27 | 28 | # End of 'reset' command 29 | end 30 | 31 | target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" 32 | -------------------------------------------------------------------------------- /variants/mkrzero/openocd_scripts/arduino_zero.cfg: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | source [find interface/cmsis-dap.cfg] 22 | 23 | # chip name 24 | set CHIPNAME at91samd21g18 25 | set ENDIAN little 26 | 27 | # choose a port here 28 | set telnet_port 0 29 | 30 | source [find target/at91samdXX.cfg] 31 | -------------------------------------------------------------------------------- /variants/mkrzero/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | // API compatibility 20 | #include "variant.h" 21 | 22 | -------------------------------------------------------------------------------- /variants/nano_33_iot/debug_scripts/variant.gdb: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | # Define 'reset' command 22 | define reset 23 | 24 | info reg 25 | 26 | break main 27 | 28 | # End of 'reset' command 29 | end 30 | 31 | target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" 32 | -------------------------------------------------------------------------------- /variants/nano_33_iot/openocd_scripts/arduino_zero.cfg: -------------------------------------------------------------------------------- 1 | # 2 | # Arduino Zero OpenOCD script. 3 | # 4 | # Copyright (c) 2014-2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | # See the GNU Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | 21 | source [find interface/cmsis-dap.cfg] 22 | 23 | # chip name 24 | set CHIPNAME at91samd21g18 25 | set ENDIAN little 26 | 27 | # choose a port here 28 | set telnet_port 0 29 | 30 | source [find target/at91samdXX.cfg] 31 | -------------------------------------------------------------------------------- /variants/nano_33_iot/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | // API compatibility 20 | #include "variant.h" 21 | 22 | --------------------------------------------------------------------------------