├── tinyusb ├── tinyusb │ ├── examples │ │ ├── device │ │ │ ├── cdc_msc_freertos │ │ │ │ ├── .skip.MCU_CXD56 │ │ │ │ ├── .skip.MCU_MSP430x5xx │ │ │ │ ├── .skip.MCU_VALENTYUSB_EPTRI │ │ │ │ ├── sdkconfig.defaults │ │ │ │ ├── ses │ │ │ │ │ ├── nrf5x │ │ │ │ │ │ ├── nRF52840_xxAA_MemoryMap.xml │ │ │ │ │ │ └── nRF_Target.js │ │ │ │ │ ├── samd21 │ │ │ │ │ │ ├── ATSAMD21G18A_MemoryMap.xml │ │ │ │ │ │ └── SAMD21_Target.js │ │ │ │ │ ├── cdc_msc_hid_freertos.emProject │ │ │ │ │ ├── lpc175x_6x │ │ │ │ │ │ ├── LPC1769_MemoryMap.xml │ │ │ │ │ │ └── LPC1700_Target.js │ │ │ │ │ └── samd51 │ │ │ │ │ │ ├── ATSAMD51J19A_MemoryMap.xml │ │ │ │ │ │ └── SAMD51_Target.js │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Makefile │ │ │ │ └── src │ │ │ │ │ └── CMakeLists.txt │ │ │ ├── net_lwip_webserver │ │ │ │ ├── .skip.MCU_LPC13XX │ │ │ │ ├── .skip.MCU_NUC121 │ │ │ │ ├── .skip.MCU_STM32L0 │ │ │ │ ├── .skip.MCU_LPC11UXX │ │ │ │ ├── .skip.MCU_MSP430x5xx │ │ │ │ └── src │ │ │ │ │ └── usb_descriptors.h │ │ │ ├── hid_composite_freertos │ │ │ │ ├── .skip.MCU_CXD56 │ │ │ │ ├── .skip.MCU_MSP430x5xx │ │ │ │ ├── .skip.MCU_VALENTYUSB_EPTRI │ │ │ │ ├── sdkconfig.defaults │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Makefile │ │ │ │ └── src │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── usb_descriptors.h │ │ │ ├── dfu_rt │ │ │ │ ├── src │ │ │ │ │ └── main.h │ │ │ │ └── Makefile │ │ │ ├── usbtmc │ │ │ │ ├── src │ │ │ │ │ ├── main.h │ │ │ │ │ └── usbtmc_app.h │ │ │ │ └── Makefile │ │ │ ├── board_test │ │ │ │ ├── sdkconfig.defaults │ │ │ │ ├── Makefile │ │ │ │ ├── src │ │ │ │ │ └── CMakeLists.txt │ │ │ │ └── CMakeLists.txt │ │ │ ├── hid_generic_inout │ │ │ │ ├── boards.js │ │ │ │ ├── Makefile │ │ │ │ └── hid_test.py │ │ │ ├── cdc_msc │ │ │ │ ├── Makefile │ │ │ │ └── ses │ │ │ │ │ ├── samd21 │ │ │ │ │ ├── ATSAMD21G18A_MemoryMap.xml │ │ │ │ │ └── SAMD21_Target.js │ │ │ │ │ ├── nrf5x │ │ │ │ │ ├── nRF52840_xxAA_MemoryMap.xml │ │ │ │ │ ├── nRF52840_xxAA_s140v6_MemoryMap.xml │ │ │ │ │ └── nRF_Target.js │ │ │ │ │ ├── lpc175x_6x │ │ │ │ │ ├── LPC1769_MemoryMap.xml │ │ │ │ │ └── LPC1700_Target.js │ │ │ │ │ ├── samd51 │ │ │ │ │ ├── ATSAMD51J19A_MemoryMap.xml │ │ │ │ │ └── SAMD51_Target.js │ │ │ │ │ ├── stm32f4 │ │ │ │ │ ├── STM32F407VG_MemoryMap.xml │ │ │ │ │ └── STM32F4xx_Target.js │ │ │ │ │ ├── lpc40xx │ │ │ │ │ ├── LPC4088FBD208_MemoryMap.xml │ │ │ │ │ └── LPC4000_Target.js │ │ │ │ │ ├── lpc11u6x │ │ │ │ │ └── LPC11U68_MemoryMap.xml │ │ │ │ │ ├── lpc18xx │ │ │ │ │ ├── LPC1857_MemoryMap.xml │ │ │ │ │ └── LPC1800_Target.js │ │ │ │ │ ├── lpc13xx │ │ │ │ │ ├── LPC1347FBD64_MemoryMap.xml │ │ │ │ │ └── LPC1300_Target.js │ │ │ │ │ ├── lpc43xx │ │ │ │ │ ├── LPC4357 Cortex-M4_MemoryMap.xml │ │ │ │ │ └── LPC4300_Target.js │ │ │ │ │ └── cdc_msc_hid.emProject │ │ │ ├── midi_test │ │ │ │ └── Makefile │ │ │ ├── cdc_dual_ports │ │ │ │ └── Makefile │ │ │ ├── hid_composite │ │ │ │ ├── Makefile │ │ │ │ └── src │ │ │ │ │ └── usb_descriptors.h │ │ │ ├── msc_dual_lun │ │ │ │ └── Makefile │ │ │ └── webusb_serial │ │ │ │ ├── Makefile │ │ │ │ └── src │ │ │ │ └── usb_descriptors.h │ │ └── host │ │ │ └── cdc_msc_hid │ │ │ └── ses │ │ │ ├── lpc175x_6x │ │ │ ├── LPC1769_MemoryMap.xml │ │ │ └── LPC1700_Target.js │ │ │ ├── lpc40xx │ │ │ ├── LPC4088FBD208_MemoryMap.xml │ │ │ └── LPC4000_Target.js │ │ │ ├── cdc_msc_hid.emProject │ │ │ ├── lpc18xx │ │ │ ├── LPC1857_MemoryMap.xml │ │ │ └── LPC1800_Target.js │ │ │ └── lpc43xx │ │ │ ├── LPC4357 Cortex-M4_MemoryMap.xml │ │ │ └── LPC4300_Target.js │ ├── test │ │ ├── vendor │ │ │ └── ceedling │ │ │ │ ├── plugins │ │ │ │ ├── bullseye │ │ │ │ │ ├── readme.txt │ │ │ │ │ ├── assets │ │ │ │ │ │ └── template.erb │ │ │ │ │ └── config │ │ │ │ │ │ └── defaults.yml │ │ │ │ ├── fake_function_framework │ │ │ │ │ ├── examples │ │ │ │ │ │ └── fff_example │ │ │ │ │ │ │ ├── src │ │ │ │ │ │ │ ├── bar.c │ │ │ │ │ │ │ ├── subfolder │ │ │ │ │ │ │ │ ├── zzz.c │ │ │ │ │ │ │ │ └── zzz.h │ │ │ │ │ │ │ ├── custom_types.h │ │ │ │ │ │ │ ├── display.c │ │ │ │ │ │ │ ├── foo.h │ │ │ │ │ │ │ ├── foo.c │ │ │ │ │ │ │ ├── event_processor.h │ │ │ │ │ │ │ ├── bar.h │ │ │ │ │ │ │ └── display.h │ │ │ │ │ │ │ ├── rakefile.rb │ │ │ │ │ │ │ └── test │ │ │ │ │ │ │ └── test_foo.c │ │ │ │ │ ├── Rakefile │ │ │ │ │ └── src │ │ │ │ │ │ └── fff_unity_helper.h │ │ │ │ ├── module_generator │ │ │ │ │ └── config │ │ │ │ │ │ └── module_generator.yml │ │ │ │ ├── stdout_ide_tests_report │ │ │ │ │ ├── config │ │ │ │ │ │ └── stdout_ide_tests_report.yml │ │ │ │ │ └── lib │ │ │ │ │ │ └── stdout_ide_tests_report.rb │ │ │ │ ├── teamcity_tests_report │ │ │ │ │ └── config │ │ │ │ │ │ └── teamcity_tests_report.yml │ │ │ │ ├── stdout_pretty_tests_report │ │ │ │ │ └── config │ │ │ │ │ │ └── stdout_pretty_tests_report.yml │ │ │ │ ├── stdout_gtestlike_tests_report │ │ │ │ │ └── config │ │ │ │ │ │ └── stdout_gtestlike_tests_report.yml │ │ │ │ ├── colour_report │ │ │ │ │ └── lib │ │ │ │ │ │ └── colour_report.rb │ │ │ │ ├── gcov │ │ │ │ │ ├── assets │ │ │ │ │ │ └── template.erb │ │ │ │ │ └── lib │ │ │ │ │ │ └── gcov_constants.rb │ │ │ │ ├── subprojects │ │ │ │ │ └── config │ │ │ │ │ │ └── defaults.yml │ │ │ │ ├── beep │ │ │ │ │ ├── lib │ │ │ │ │ │ └── beep.rb │ │ │ │ │ └── README.md │ │ │ │ ├── xml_tests_report │ │ │ │ │ └── README.md │ │ │ │ ├── junit_tests_report │ │ │ │ │ └── README.md │ │ │ │ └── raw_output_report │ │ │ │ │ └── lib │ │ │ │ │ └── raw_output_report.rb │ │ │ │ ├── vendor │ │ │ │ ├── cmock │ │ │ │ │ ├── release │ │ │ │ │ │ ├── build.info │ │ │ │ │ │ └── version.info │ │ │ │ │ ├── config │ │ │ │ │ │ ├── production_environment.rb │ │ │ │ │ │ └── test_environment.rb │ │ │ │ │ └── src │ │ │ │ │ │ └── meson.build │ │ │ │ ├── unity │ │ │ │ │ ├── release │ │ │ │ │ │ ├── build.info │ │ │ │ │ │ └── version.info │ │ │ │ │ ├── auto │ │ │ │ │ │ ├── type_sanitizer.rb │ │ │ │ │ │ ├── test_file_filter.rb │ │ │ │ │ │ ├── run_test.erb │ │ │ │ │ │ ├── colour_reporter.rb │ │ │ │ │ │ └── generate_config.yml │ │ │ │ │ └── src │ │ │ │ │ │ ├── meson.build │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── c_exception │ │ │ │ │ └── release │ │ │ │ │ │ ├── build.info │ │ │ │ │ │ └── version.info │ │ │ │ └── diy │ │ │ │ │ └── lib │ │ │ │ │ └── diy │ │ │ │ │ └── factory.rb │ │ │ │ ├── lib │ │ │ │ └── ceedling │ │ │ │ │ ├── file_system_wrapper.rb │ │ │ │ │ ├── verbosinator.rb │ │ │ │ │ ├── tasks_tests_deep_dependencies.rake │ │ │ │ │ ├── tasks_release_deep_dependencies.rake │ │ │ │ │ ├── erb_wrapper.rb │ │ │ │ │ ├── cmock_builder.rb │ │ │ │ │ ├── rules_cmock.rake │ │ │ │ │ ├── streaminator_helper.rb │ │ │ │ │ ├── yaml_wrapper.rb │ │ │ │ │ ├── par_map.rb │ │ │ │ │ ├── rake_utils.rb │ │ │ │ │ ├── version.rb.erb │ │ │ │ │ ├── plugin_manager_helper.rb │ │ │ │ │ ├── rules_tests_deep_dependencies.rake │ │ │ │ │ ├── stream_wrapper.rb │ │ │ │ │ ├── rules_release_deep_dependencies.rake │ │ │ │ │ ├── release_invoker_helper.rb │ │ │ │ │ ├── rake_wrapper.rb │ │ │ │ │ ├── preprocessinator_file_handler.rb │ │ │ │ │ ├── reportinator.rb │ │ │ │ │ ├── system_utils.rb │ │ │ │ │ ├── loginator.rb │ │ │ │ │ ├── test_invoker_helper.rb │ │ │ │ │ ├── cacheinator_helper.rb │ │ │ │ │ ├── target_loader.rb │ │ │ │ │ ├── rules_preprocess.rake │ │ │ │ │ ├── preprocessinator_extractor.rb │ │ │ │ │ ├── version.rb │ │ │ │ │ ├── streaminator.rb │ │ │ │ │ ├── build_invoker_utils.rb │ │ │ │ │ └── tasks_release.rake │ │ │ │ └── docs │ │ │ │ └── UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf │ │ └── ceedling │ ├── hw │ │ ├── bsp │ │ │ ├── fomu │ │ │ │ ├── output_format.ld │ │ │ │ ├── regions.ld │ │ │ │ ├── board.mk │ │ │ │ └── include │ │ │ │ │ └── hw │ │ │ │ │ └── common.h │ │ │ ├── esp32s2_saola_1 │ │ │ │ ├── board.mk │ │ │ │ └── CMakeLists.txt │ │ │ ├── pca10059 │ │ │ │ └── pca10059.ld │ │ │ ├── nrf52840_mdk_dongle │ │ │ │ └── nrf52840_mdk_dongle.ld │ │ │ ├── arduino_nano33_ble │ │ │ │ └── arduino_nano33_ble.ld │ │ │ ├── adafruit_clue │ │ │ │ └── nrf52840_s140_v6.ld │ │ │ ├── feather_nrf52840_sense │ │ │ │ └── nrf52840_s140_v6.ld │ │ │ ├── circuitplayground_bluefruit │ │ │ │ └── nrf52840_s140_v6.ld │ │ │ ├── feather_nrf52840_express │ │ │ │ └── nrf52840_s140_v6.ld │ │ │ ├── mcb1800 │ │ │ │ └── board.mk │ │ │ ├── lpcxpresso1769 │ │ │ │ └── board.mk │ │ │ ├── ngx4330 │ │ │ │ └── board.mk │ │ │ ├── msp_exp430f5529lp │ │ │ │ └── board.mk │ │ │ ├── lpcxpresso11u68 │ │ │ │ └── board.mk │ │ │ ├── ea4088qs │ │ │ │ └── board.mk │ │ │ ├── mbed1768 │ │ │ │ └── board.mk │ │ │ ├── ea4357 │ │ │ │ └── board.mk │ │ │ ├── lpcxpresso1347 │ │ │ │ └── board.mk │ │ │ ├── lpcxpresso1549 │ │ │ │ └── board.mk │ │ │ ├── pyboardv11 │ │ │ │ └── board.mk │ │ │ ├── lpcxpresso11u37 │ │ │ │ └── board.mk │ │ │ ├── lpcxpresso51u68 │ │ │ │ └── board.mk │ │ │ ├── stm32f407disco │ │ │ │ └── board.mk │ │ │ ├── stm32f411disco │ │ │ │ └── board.mk │ │ │ ├── nutiny_nuc125s │ │ │ │ └── board.mk │ │ │ ├── stm32f401blackpill │ │ │ │ └── board.mk │ │ │ ├── stm32f411blackpill │ │ │ │ └── board.mk │ │ │ ├── lpcxpresso54114 │ │ │ │ └── board.mk │ │ │ ├── stm32h743nucleo │ │ │ │ └── board.mk │ │ │ ├── stm32f207nucleo │ │ │ │ └── board.mk │ │ │ ├── spresense │ │ │ │ └── board.mk │ │ │ ├── stm32f767nucleo │ │ │ │ └── board.mk │ │ │ ├── lpcxpresso55s69 │ │ │ │ └── board.mk │ │ │ ├── stm32f303disco │ │ │ │ └── board.mk │ │ │ ├── stm32f412disco │ │ │ │ └── board.mk │ │ │ ├── stm32f103bluepill │ │ │ │ └── board.mk │ │ │ ├── mimxrt1015_evk │ │ │ │ └── board.h │ │ │ ├── mimxrt1020_evk │ │ │ │ ├── board.h │ │ │ │ └── board.mk │ │ │ ├── mimxrt1060_evk │ │ │ │ ├── board.h │ │ │ │ └── board.mk │ │ │ ├── mimxrt1064_evk │ │ │ │ ├── board.h │ │ │ │ └── board.mk │ │ │ ├── mimxrt1050_evkb │ │ │ │ ├── board.h │ │ │ │ └── board.mk │ │ │ ├── stm32f072disco │ │ │ │ └── board.mk │ │ │ ├── stm32f070rbnucleo │ │ │ │ └── board.mk │ │ │ └── teensy_40 │ │ │ │ └── board.h │ │ └── mcu │ │ │ └── nordic │ │ │ └── nrfx_config.h │ ├── repository.yml │ ├── version.yml │ ├── .github │ │ ├── ISSUE_TEMPLATE │ │ │ ├── question.md │ │ │ ├── porting.md │ │ │ ├── feature_request.md │ │ │ └── bug_report.md │ │ └── workflows │ │ │ └── trigger.yml │ ├── pkg.yml │ ├── .gitignore │ ├── .gitattributes │ ├── tools │ │ ├── top.mk │ │ └── usb_drivers │ │ │ └── 99-tinyusb.rules │ ├── lib │ │ └── fatfs │ │ │ └── integer.h │ └── LICENSE ├── additions │ ├── include │ │ ├── tinyusb_types.h │ │ ├── tusb_console.h │ │ ├── vfs_tinyusb.h │ │ └── tusb_tasks.h │ └── include_private │ │ └── usb_descriptors.h └── port │ ├── common │ └── include │ │ └── usb_descriptors.h │ └── esp32s2 │ └── include │ └── device_controller_driver.h ├── .gitattributes ├── components ├── CMSIS-DAP.zip └── CMSIS-DAP │ ├── component.mk │ ├── Source │ └── CMakeLists.txt │ ├── Include │ ├── DAP_Common.h │ ├── SWD_opt.h │ ├── SWD_flash.h │ ├── error.h │ └── SWD_host.h │ ├── CMakeLists.txt │ └── algo │ ├── STM32_ALGO.c │ └── flash_blob.h ├── CMakeLists.txt ├── sdkconfig.defaults ├── partitions_example.csv ├── main ├── CMakeLists.txt ├── cdc_task.h ├── hid_task.h ├── msc_task.h └── webusb_task.h └── .gitignore /tinyusb/tinyusb/examples/device/cdc_msc_freertos/.skip.MCU_CXD56: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/net_lwip_webserver/.skip.MCU_LPC13XX: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/net_lwip_webserver/.skip.MCU_NUC121: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/net_lwip_webserver/.skip.MCU_STM32L0: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/bullseye/readme.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc_freertos/.skip.MCU_MSP430x5xx: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/hid_composite_freertos/.skip.MCU_CXD56: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/net_lwip_webserver/.skip.MCU_LPC11UXX: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc_freertos/.skip.MCU_VALENTYUSB_EPTRI: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/hid_composite_freertos/.skip.MCU_MSP430x5xx: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/hid_composite_freertos/.skip.MCU_VALENTYUSB_EPTRI: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/fomu/output_format.ld: -------------------------------------------------------------------------------- 1 | OUTPUT_FORMAT("elf32-littleriscv") 2 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/vendor/cmock/release/build.info: -------------------------------------------------------------------------------- 1 | 217 2 | 3 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/vendor/unity/release/build.info: -------------------------------------------------------------------------------- 1 | 122 2 | 3 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/vendor/c_exception/release/build.info: -------------------------------------------------------------------------------- 1 | 18 2 | 3 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/vendor/cmock/release/version.info: -------------------------------------------------------------------------------- 1 | 2.4.6 2 | 3 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/vendor/unity/release/version.info: -------------------------------------------------------------------------------- 1 | 2.4.3 2 | 3 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/ceedling: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ruby vendor/ceedling/bin/ceedling $* 4 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/vendor/c_exception/release/version.info: -------------------------------------------------------------------------------- 1 | 1.3.1 2 | 3 | -------------------------------------------------------------------------------- /components/CMSIS-DAP.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kevincoooool/ESP32S2_DAP/HEAD/components/CMSIS-DAP.zip -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/esp32s2_saola_1/board.mk: -------------------------------------------------------------------------------- 1 | # Cross Compiler for ESP32 2 | CROSS_COMPILE = xtensa-esp32s2-elf- 3 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/net_lwip_webserver/.skip.MCU_MSP430x5xx: -------------------------------------------------------------------------------- 1 | too many warnings for 16-bit integer overflow 2 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/src/bar.c: -------------------------------------------------------------------------------- 1 | #include "bar.h" 2 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/repository.yml: -------------------------------------------------------------------------------- 1 | repo.name: tinyusb 2 | repo.versions: 3 | "0.0.0": "master" 4 | 5 | "0-dev": "0.0.0" 6 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/src/subfolder/zzz.c: -------------------------------------------------------------------------------- 1 | #include "zzz.h" 2 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/dfu_rt/src/main.h: -------------------------------------------------------------------------------- 1 | #ifndef MAIN_H 2 | #define MAIN_H 3 | void led_indicator_pulse(void); 4 | 5 | #endif 6 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/usbtmc/src/main.h: -------------------------------------------------------------------------------- 1 | #ifndef MAIN_H 2 | #define MAIN_H 3 | void led_indicator_pulse(void); 4 | 5 | #endif 6 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/board_test/sdkconfig.defaults: -------------------------------------------------------------------------------- 1 | CONFIG_IDF_CMAKE=y 2 | CONFIG_IDF_TARGET="esp32s2" 3 | CONFIG_IDF_TARGET_ESP32S2=y 4 | 5 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/hid_generic_inout/boards.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "Feather_nRF52840":[0X239A,0X8029], 3 | "Metro_nRF52840":[0X239A,0X803F], 4 | } -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/usbtmc/src/usbtmc_app.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef USBTMC_APP_H 3 | #define USBTMC_APP_H 4 | 5 | void usbtmc_app_task_iter(void); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/module_generator/config/module_generator.yml: -------------------------------------------------------------------------------- 1 | :module_generator: 2 | :project_root: ./ 3 | :source_root: src/ 4 | :test_root: test/ -------------------------------------------------------------------------------- /tinyusb/tinyusb/version.yml: -------------------------------------------------------------------------------- 1 | # Newt uses this file to determine the version of a checked out repo. 2 | # This should always be 0.0.0 in the master branch. 3 | repo.version: 0.0.0 4 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc_freertos/sdkconfig.defaults: -------------------------------------------------------------------------------- 1 | CONFIG_IDF_CMAKE=y 2 | CONFIG_IDF_TARGET="esp32s2" 3 | CONFIG_IDF_TARGET_ESP32S2=y 4 | CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y 5 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/hid_composite_freertos/sdkconfig.defaults: -------------------------------------------------------------------------------- 1 | CONFIG_IDF_CMAKE=y 2 | CONFIG_IDF_TARGET="esp32s2" 3 | CONFIG_IDF_TARGET_ESP32S2=y 4 | CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y 5 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/src/custom_types.h: -------------------------------------------------------------------------------- 1 | #ifndef custom_types_H 2 | #define custom_types_H 3 | 4 | typedef int custom_t; 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/file_system_wrapper.rb: -------------------------------------------------------------------------------- 1 | 2 | class FileSystemWrapper 3 | 4 | def cd(path) 5 | FileUtils.cd path do 6 | yield 7 | end 8 | end 9 | 10 | end -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/src/subfolder/zzz.h: -------------------------------------------------------------------------------- 1 | #ifndef zzz_H 2 | #define zzz_H 3 | 4 | int zzz_sleep(int time, char * name); 5 | 6 | #endif // zzz_H 7 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 3 | about: Question for this project 4 | title: '' 5 | labels: Q&A 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Here is my question** 11 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/stdout_ide_tests_report/config/stdout_ide_tests_report.yml: -------------------------------------------------------------------------------- 1 | --- 2 | :plugins: 3 | # tell Ceedling we got results display taken care of 4 | :display_raw_test_results: FALSE 5 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/teamcity_tests_report/config/teamcity_tests_report.yml: -------------------------------------------------------------------------------- 1 | --- 2 | :plugins: 3 | # tell Ceedling we got results display taken care of 4 | :display_raw_test_results: FALSE 5 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/stdout_pretty_tests_report/config/stdout_pretty_tests_report.yml: -------------------------------------------------------------------------------- 1 | --- 2 | :plugins: 3 | # tell Ceedling we got results display taken care of 4 | :display_raw_test_results: FALSE 5 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/stdout_gtestlike_tests_report/config/stdout_gtestlike_tests_report.yml: -------------------------------------------------------------------------------- 1 | --- 2 | :plugins: 3 | # tell Ceedling we got results display taken care of 4 | :display_raw_test_results: FALSE 5 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/src/display.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "display.h" 3 | 4 | void display_turnOffStatusLed(void) 5 | { 6 | printf("Display: Status LED off"); 7 | } -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/verbosinator.rb: -------------------------------------------------------------------------------- 1 | 2 | class Verbosinator 3 | 4 | constructor :configurator 5 | 6 | def should_output?(level) 7 | return (level <= @configurator.project_verbosity) 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/tasks_tests_deep_dependencies.rake: -------------------------------------------------------------------------------- 1 | require 'ceedling/constants' 2 | 3 | namespace REFRESH_SYM do 4 | 5 | task TEST_SYM do 6 | @ceedling[:test_invoker].refresh_deep_dependencies 7 | end 8 | 9 | end 10 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following five lines of boilerplate have to be in your project's 2 | # CMakeLists in this exact order for cmake to work correctly 3 | cmake_minimum_required(VERSION 3.5) 4 | 5 | include($ENV{IDF_PATH}/tools/cmake/project.cmake) 6 | project(esp32s2_dap) 7 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/fomu/regions.ld: -------------------------------------------------------------------------------- 1 | MEMORY { 2 | csr : ORIGIN = 0x60000000, LENGTH = 0x01000000 3 | vexriscv_debug : ORIGIN = 0xf00f0000, LENGTH = 0x00000100 4 | sram : ORIGIN = 0x10000000, LENGTH = 0x00020000 5 | rom : ORIGIN = 0x00000000, LENGTH = 0x00002000 6 | } 7 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kevincoooool/ESP32S2_DAP/HEAD/tinyusb/tinyusb/test/vendor/ceedling/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/tasks_release_deep_dependencies.rake: -------------------------------------------------------------------------------- 1 | require 'ceedling/constants' 2 | 3 | namespace REFRESH_SYM do 4 | 5 | task RELEASE_SYM do 6 | @ceedling[:release_invoker].refresh_c_deep_dependencies 7 | end 8 | 9 | end 10 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/erb_wrapper.rb: -------------------------------------------------------------------------------- 1 | require 'erb' 2 | 3 | class ErbWrapper 4 | def generate_file(template, data, output_file) 5 | File.open(output_file, "w") do |f| 6 | f << ERB.new(template, 0, "<>").result(binding) 7 | end 8 | end 9 | end -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/src/foo.h: -------------------------------------------------------------------------------- 1 | #ifndef foo_H 2 | #define foo_H 3 | 4 | void foo_turn_on(void); 5 | void foo_print_message(const char * message); 6 | void foo_print_special_message(void); 7 | 8 | #endif // foo_H 9 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/vendor/unity/auto/type_sanitizer.rb: -------------------------------------------------------------------------------- 1 | module TypeSanitizer 2 | def self.sanitize_c_identifier(unsanitized) 3 | # convert filename to valid C identifier by replacing invalid chars with '_' 4 | unsanitized.gsub(/[-\/\\\.\,\s]/, '_') 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/pkg.yml: -------------------------------------------------------------------------------- 1 | pkg.name: tinyusb 2 | pkg.description: A silly USB stack for embedded 3 | pkg.author: "Ha Thach " 4 | pkg.homepage: "https://github.com/hathach/tinyusb" 5 | pkg.keywords: 6 | - usb 7 | 8 | pkg.deps: 9 | - "@apache-mynewt-core/kernel/os" 10 | -------------------------------------------------------------------------------- /components/CMSIS-DAP/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # "main" pseudo-component makefile. 3 | # 4 | # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) 5 | COMPONENT_ADD_INCLUDEDIRS := Include 6 | COMPONENT_ADD_INCLUDEDIRS := cmsis-core 7 | COMPONENT_SRCDIRS := Source 8 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/dfu_rt/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../tools/top.mk 2 | include ../../make.mk 3 | 4 | INC += \ 5 | src \ 6 | $(TOP)/hw \ 7 | 8 | # Example source 9 | EXAMPLE_SOURCE += $(wildcard src/*.c) 10 | SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE)) 11 | 12 | include ../../rules.mk 13 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/usbtmc/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../tools/top.mk 2 | include ../../make.mk 3 | 4 | INC += \ 5 | src \ 6 | $(TOP)/hw \ 7 | 8 | # Example source 9 | EXAMPLE_SOURCE += $(wildcard src/*.c) 10 | SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE)) 11 | 12 | include ../../rules.mk 13 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/cmock_builder.rb: -------------------------------------------------------------------------------- 1 | require 'cmock' 2 | 3 | class CmockBuilder 4 | 5 | attr_accessor :cmock 6 | 7 | def setup 8 | @cmock = nil 9 | end 10 | 11 | def manufacture(cmock_config) 12 | @cmock = CMock.new(cmock_config) 13 | end 14 | 15 | end 16 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../tools/top.mk 2 | include ../../make.mk 3 | 4 | INC += \ 5 | src \ 6 | $(TOP)/hw \ 7 | 8 | # Example source 9 | EXAMPLE_SOURCE += $(wildcard src/*.c) 10 | SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE)) 11 | 12 | include ../../rules.mk 13 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/midi_test/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../tools/top.mk 2 | include ../../make.mk 3 | 4 | INC += \ 5 | src \ 6 | $(TOP)/hw \ 7 | 8 | # Example source 9 | EXAMPLE_SOURCE += $(wildcard src/*.c) 10 | SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE)) 11 | 12 | include ../../rules.mk 13 | -------------------------------------------------------------------------------- /sdkconfig.defaults: -------------------------------------------------------------------------------- 1 | CONFIG_IDF_TARGET="esp32s2" 2 | CONFIG_USB_ENABLED=y 3 | CONFIG_USB_DESC_USE_ESPRESSIF_VID=n 4 | CONFIG_USB_DESC_CUSTOM_VID=0x303A 5 | CONFIG_USB_DESC_USE_DEFAULT_PID=n 6 | CONFIG_USB_DESC_CUSTOM_PID=0x3000 7 | CONFIG_USB_CDC_ENABLED=y 8 | CONFIG_USB_CDC_RX_BUFSIZE=64 9 | CONFIG_USB_CDC_TX_BUFSIZE=64 10 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_dual_ports/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../tools/top.mk 2 | include ../../make.mk 3 | 4 | INC += \ 5 | src \ 6 | $(TOP)/hw \ 7 | 8 | # Example source 9 | EXAMPLE_SOURCE += $(wildcard src/*.c) 10 | SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE)) 11 | 12 | include ../../rules.mk 13 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/hid_composite/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../tools/top.mk 2 | include ../../make.mk 3 | 4 | INC += \ 5 | src \ 6 | $(TOP)/hw \ 7 | 8 | # Example source 9 | EXAMPLE_SOURCE += $(wildcard src/*.c) 10 | SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE)) 11 | 12 | include ../../rules.mk 13 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/msc_dual_lun/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../tools/top.mk 2 | include ../../make.mk 3 | 4 | INC += \ 5 | src \ 6 | $(TOP)/hw \ 7 | 8 | # Example source 9 | EXAMPLE_SOURCE += $(wildcard src/*.c) 10 | SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE)) 11 | 12 | include ../../rules.mk 13 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/webusb_serial/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../tools/top.mk 2 | include ../../make.mk 3 | 4 | INC += \ 5 | src \ 6 | $(TOP)/hw \ 7 | 8 | # Example source 9 | EXAMPLE_SOURCE += $(wildcard src/*.c) 10 | SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE)) 11 | 12 | include ../../rules.mk 13 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/pca10059/pca10059.ld: -------------------------------------------------------------------------------- 1 | /* Linker script to configure memory regions. */ 2 | 3 | SEARCH_DIR(.) 4 | GROUP(-lgcc -lc -lnosys) 5 | 6 | MEMORY 7 | { 8 | FLASH (rx) : ORIGIN = 0x1000, LENGTH = 0xff000 9 | RAM (rwx) : ORIGIN = 0x20000008, LENGTH = 0x3fff8 10 | } 11 | 12 | 13 | INCLUDE "nrf_common.ld" 14 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/hid_generic_inout/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../tools/top.mk 2 | include ../../make.mk 3 | 4 | INC += \ 5 | src \ 6 | $(TOP)/hw \ 7 | 8 | # Example source 9 | EXAMPLE_SOURCE += $(wildcard src/*.c) 10 | SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE)) 11 | 12 | include ../../rules.mk 13 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/.gitignore: -------------------------------------------------------------------------------- 1 | html 2 | latex 3 | *.d 4 | *.o 5 | *.P 6 | *.map 7 | *.axf 8 | *.bin 9 | *.jlink 10 | *.emSession 11 | *.elf 12 | *.ind 13 | .env 14 | /examples/*/*/build-* 15 | test_old/ 16 | tests_obsolete/ 17 | _build 18 | # coverity intermediate files 19 | cov-int 20 | # cppcheck build directories 21 | *-build-dir 22 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/ses/samd21/ATSAMD21G18A_MemoryMap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /components/CMSIS-DAP/Source/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(COMPONENT_SRCS "DAP.c" 3 | "SW_DP.c" 4 | "DAP_vendor.c" 5 | "error.c" 6 | "JTAG_DP.c" 7 | "SWD_flash.c" 8 | "SWD_host.c" 9 | ) 10 | set(COMPONENT_INCLUDEDIRS . ${PROJECT_DIR}/components/CMSIS-DAP/Include 11 | . ${PROJECT_DIR}/components/CMSIS-DAP/cmsis-core) 12 | register_component() -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/ses/nrf5x/nRF52840_xxAA_MemoryMap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc_freertos/ses/nrf5x/nRF52840_xxAA_MemoryMap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc_freertos/ses/samd21/ATSAMD21G18A_MemoryMap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/rakefile.rb: -------------------------------------------------------------------------------- 1 | # This change from the default is for running Ceedling out of another folder. 2 | PROJECT_CEEDLING_ROOT = "../../../.." 3 | load "#{PROJECT_CEEDLING_ROOT}/lib/ceedling.rb" 4 | 5 | Ceedling.load_project 6 | 7 | task :default => %w[ test:all release ] 8 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/ses/nrf5x/nRF52840_xxAA_s140v6_MemoryMap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/nrf52840_mdk_dongle/nrf52840_mdk_dongle.ld: -------------------------------------------------------------------------------- 1 | /* Linker script to configure memory regions. */ 2 | 3 | SEARCH_DIR(.) 4 | GROUP(-lgcc -lc -lnosys) 5 | 6 | MEMORY 7 | { 8 | FLASH (rx) : ORIGIN = 0x1000, LENGTH = 0xE0000-0x1000 9 | RAM (rwx) : ORIGIN = 0x20000008, LENGTH = 0x3fff8 10 | } 11 | 12 | 13 | INCLUDE "nrf_common.ld" 14 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/rules_cmock.rake: -------------------------------------------------------------------------------- 1 | 2 | 3 | rule(/#{CMOCK_MOCK_PREFIX}[^\/\\]+#{'\\'+EXTENSION_SOURCE}$/ => [ 4 | proc do |task_name| 5 | @ceedling[:file_finder].find_header_input_for_mock_file(task_name) 6 | end 7 | ]) do |mock| 8 | @ceedling[:generator].generate_mock(TEST_SYM, mock.source) 9 | end 10 | -------------------------------------------------------------------------------- /partitions_example.csv: -------------------------------------------------------------------------------- 1 | # Name, Type, SubType, Offset, Size, Flags 2 | # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap 3 | nvs, data, nvs, 0x9000, 0x6000, 4 | phy_init, data, phy, 0xf000, 0x1000, 5 | factory, app, factory, 0x10000, 1M, 6 | storage, data, fat, , 1M, 7 | 8 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/streaminator_helper.rb: -------------------------------------------------------------------------------- 1 | 2 | class StreaminatorHelper 3 | 4 | def extract_name(stream) 5 | name = case (stream.fileno) 6 | when 0 then '#' 7 | when 1 then '#' 8 | when 2 then '#' 9 | else stream.inspect 10 | end 11 | 12 | return name 13 | end 14 | 15 | end 16 | -------------------------------------------------------------------------------- /main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(COMPONENT_REQUIRES ". ${PROJECT_DIR}/components/CMSIS-DAP") 3 | set(COMPONENT_ADD_INCLUDEDIRS ". ${PROJECT_DIR}/components/CMSIS-DAP/Include") 4 | idf_component_register(SRCS 5 | "main.c" 6 | "hid_task.c" 7 | "webusb_task.c" 8 | "cdc_task.c" 9 | "msc_task.c" 10 | "my_tcp.c" 11 | 12 | INCLUDE_DIRS . ${COMPONENT_DIR} . ${PROJECT_DIR}/components/CMSIS-DAP/Include) -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/yaml_wrapper.rb: -------------------------------------------------------------------------------- 1 | require 'yaml' 2 | require 'erb' 3 | 4 | 5 | class YamlWrapper 6 | 7 | def load(filepath) 8 | return YAML.load(ERB.new(File.read(filepath)).result) 9 | end 10 | 11 | def dump(filepath, structure) 12 | File.open(filepath, 'w') do |output| 13 | YAML.dump(structure, output) 14 | end 15 | end 16 | 17 | end 18 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc_freertos/ses/cdc_msc_hid_freertos.emProject: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /components/CMSIS-DAP/Include/DAP_Common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @Descripttion: 3 | * @version: 4 | * @Author: Kevincoooool 5 | * @Date: 2020-07-19 16:06:37 6 | * @LastEditors: Kevincoooool 7 | * @LastEditTime: 2020-07-19 17:03:57 8 | * @FilePath: \STM32F103C8_HID\CMSIS-DAP\Include\DAP_Common.h 9 | */ 10 | #ifndef __DAP_COMMON_H__ 11 | #define __DAP_COMMON_H__ 12 | 13 | 14 | 15 | 16 | 17 | #endif /* __DAP_CONFIG_H__ */ 18 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/ses/lpc175x_6x/LPC1769_MemoryMap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC1769_MemoryMap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/ses/samd51/ATSAMD51J19A_MemoryMap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/ses/stm32f4/STM32F407VG_MemoryMap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/ses/lpc40xx/LPC4088FBD208_MemoryMap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC1769_MemoryMap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/host/cdc_msc_hid/ses/lpc40xx/LPC4088FBD208_MemoryMap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc_freertos/ses/samd51/ATSAMD51J19A_MemoryMap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/par_map.rb: -------------------------------------------------------------------------------- 1 | 2 | 3 | def par_map(n, things, &block) 4 | queue = Queue.new 5 | things.each { |thing| queue << thing } 6 | threads = (1..n).collect do 7 | Thread.new do 8 | begin 9 | while true 10 | yield queue.pop(true) 11 | end 12 | rescue ThreadError 13 | 14 | end 15 | end 16 | end 17 | threads.each { |t| t.join } 18 | end 19 | 20 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/rake_utils.rb: -------------------------------------------------------------------------------- 1 | 2 | class RakeUtils 3 | 4 | constructor :rake_wrapper 5 | 6 | def task_invoked?(task_regex) 7 | task_invoked = false 8 | @rake_wrapper.task_list.each do |task| 9 | if ((task.already_invoked) and (task.to_s =~ task_regex)) 10 | task_invoked = true 11 | break 12 | end 13 | end 14 | return task_invoked 15 | end 16 | 17 | end 18 | -------------------------------------------------------------------------------- /components/CMSIS-DAP/Include/SWD_opt.h: -------------------------------------------------------------------------------- 1 | #ifndef __SWD_OPT_H__ 2 | #define __SWD_OPT_H__ 3 | 4 | #include 5 | 6 | #include "error.h" 7 | 8 | error_tt target_opt_init(void); 9 | error_tt target_opt_uninit(void); 10 | error_tt target_opt_program_page(uint32_t addr, const uint8_t *buf, uint32_t size); 11 | error_tt target_opt_erase_sector(uint32_t addr); 12 | error_tt target_opt_erase_chip(void); 13 | 14 | 15 | #endif // __SWD_OPT_H__ 16 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/version.rb.erb: -------------------------------------------------------------------------------- 1 | # @private 2 | module Ceedling 3 | module Version 4 | # @private 5 | GEM = "0.27.0" 6 | # @private 7 | CEEDLING = "<%= versions["CEEDLING"] %>" 8 | # @private 9 | CEXCEPTION = "<%= versions["CEXCEPTION"] %>" 10 | # @private 11 | CMOCK = "<%= versions["CMOCK"] %>" 12 | # @private 13 | UNITY = "<%= versions["UNITY"] %>" 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/colour_report/lib/colour_report.rb: -------------------------------------------------------------------------------- 1 | require 'ceedling/plugin' 2 | require 'ceedling/streaminator' 3 | require 'ceedling/constants' 4 | 5 | class ColourReport < Plugin 6 | 7 | def setup 8 | @ceedling[:stream_wrapper].stdout_override(&ColourReport.method(:colour_stdout)) 9 | end 10 | 11 | def self.colour_stdout(string) 12 | require 'colour_reporter.rb' 13 | report string 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/.github/ISSUE_TEMPLATE/porting.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Porting 3 | about: Adding a new port for this project 4 | title: '' 5 | labels: Porting 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Porting layer** 11 | - [ ] Device Controller Driver (DCD) 12 | - [ ] Host Controller Driver (HCD) 13 | - [ ] Board Supported Package (BSP) 14 | - [ ] OS Abstraction Layer (OSAL) 15 | 16 | **Description** 17 | A clear and concise description of what you want to happen. 18 | -------------------------------------------------------------------------------- /components/CMSIS-DAP/Include/SWD_flash.h: -------------------------------------------------------------------------------- 1 | #ifndef __SWD_FLASH_H__ 2 | #define __SWD_FLASH_H__ 3 | 4 | #include 5 | 6 | #include "error.h" 7 | 8 | error_tt target_flash_init(uint32_t flash_start); 9 | error_tt target_flash_uninit(void); 10 | error_tt target_flash_program_page(uint32_t addr, const uint8_t *buf, uint32_t size); 11 | error_tt target_flash_erase_sector(uint32_t addr); 12 | error_tt target_flash_erase_chip(void); 13 | 14 | 15 | #endif // __SWD_FLASH_H__ 16 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/plugin_manager_helper.rb: -------------------------------------------------------------------------------- 1 | 2 | class PluginManagerHelper 3 | 4 | def include?(plugins, name) 5 | include = false 6 | plugins.each do |plugin| 7 | if (plugin.name == name) 8 | include = true 9 | break 10 | end 11 | end 12 | return include 13 | end 14 | 15 | def instantiate_plugin_script(plugin, system_objects, name) 16 | return eval("#{plugin}.new(system_objects, name)") 17 | end 18 | 19 | end 20 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior, in case people don't have core.autocrlf set. 2 | * text=auto 3 | 4 | *.c text 5 | *.cpp text 6 | *.h text 7 | *.icf text 8 | *.js text 9 | *.json text 10 | *.ld text 11 | *.md text 12 | *.mk text 13 | *.py text 14 | *.rst text 15 | *.s text 16 | *.txt text 17 | *.xml text 18 | *.yml text 19 | 20 | Makefile text 21 | 22 | # Windows-only Visual Studio things 23 | 24 | *.sln text eol=crlf 25 | *.csproj text eol=crlf 26 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/src/foo.c: -------------------------------------------------------------------------------- 1 | #include "foo.h" 2 | #include "bar.h" 3 | #include "subfolder/zzz.h" 4 | 5 | void foo_turn_on(void) { 6 | bar_turn_on(); 7 | zzz_sleep(1, "sleepy"); 8 | } 9 | 10 | void foo_print_message(const char * message) { 11 | bar_print_message(message); 12 | } 13 | 14 | void foo_print_special_message(void) { 15 | bar_print_message_formatted("The numbers are %d, %d and %d", 1, 2, 3); 16 | } 17 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/mcu/nordic/nrfx_config.h: -------------------------------------------------------------------------------- 1 | #ifndef NRFX_CONFIG_H__ 2 | #define NRFX_CONFIG_H__ 3 | 4 | #define NRFX_POWER_ENABLED 1 5 | #define NRFX_POWER_DEFAULT_CONFIG_IRQ_PRIORITY 7 6 | 7 | #define NRFX_CLOCK_ENABLED 0 8 | 9 | #define NRFX_UARTE_ENABLED 1 10 | #define NRFX_UARTE0_ENABLED 1 11 | 12 | #define NRFX_UARTE1_ENABLED 0 13 | #define NRFX_UARTE2_ENABLED 0 14 | #define NRFX_UARTE3_ENABLED 0 15 | 16 | #define NRFX_PRS_ENABLED 0 17 | 18 | #endif // NRFX_CONFIG_H__ 19 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/src/event_processor.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void event_deviceReset(void); 4 | void event_volumeKnobMaxed(void); 5 | void event_powerReadingUpdate(int powerReading); 6 | void event_modeSelectButtonPressed(void); 7 | void event_devicePoweredOn(void); 8 | void event_keyboardCheckTimerExpired(void); 9 | void event_newDataAvailable(int data); 10 | 11 | bool eventProcessor_isLastEventComplete(void); 12 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/ses/lpc11u6x/LPC11U68_MemoryMap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/ses/lpc18xx/LPC1857_MemoryMap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/host/cdc_msc_hid/ses/cdc_msc_hid.emProject: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/host/cdc_msc_hid/ses/lpc18xx/LPC1857_MemoryMap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/ses/lpc13xx/LPC1347FBD64_MemoryMap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/ses/lpc43xx/LPC4357 Cortex-M4_MemoryMap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/host/cdc_msc_hid/ses/lpc43xx/LPC4357 Cortex-M4_MemoryMap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/.github/workflows/trigger.yml: -------------------------------------------------------------------------------- 1 | name: Trigger Repos 2 | 3 | on: 4 | push: 5 | branches: master 6 | 7 | jobs: 8 | trigger: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: mynewt-tinyusb-example 12 | shell: bash 13 | run: | 14 | curl -X POST -H "Authorization: token ${{ secrets.GH_REPO_TOKEN }}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" --data '{"event_type": "rebuild"}' https://api.github.com/repos/hathach/mynewt-tinyusb-example/dispatches 15 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/rules_tests_deep_dependencies.rake: -------------------------------------------------------------------------------- 1 | 2 | 3 | rule(/#{PROJECT_TEST_DEPENDENCIES_PATH}\/#{'.+\\'+EXTENSION_DEPENDENCIES}$/ => [ 4 | proc do |task_name| 5 | @ceedling[:file_finder].find_compilation_input_file(task_name) 6 | end 7 | ]) do |dep| 8 | @ceedling[:generator].generate_dependencies_file( 9 | TOOLS_TEST_DEPENDENCIES_GENERATOR, 10 | TEST_SYM, 11 | dep.source, 12 | @ceedling[:file_path_utils].form_test_build_c_object_filepath(dep.source), 13 | dep.name) 14 | end 15 | 16 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/src/bar.h: -------------------------------------------------------------------------------- 1 | #ifndef bar_H 2 | #define bar_H 3 | 4 | #include "custom_types.h" 5 | 6 | void bar_turn_on(void); 7 | void bar_print_message(const char * message); 8 | void bar_print_message_formatted(const char * format, ...); 9 | void bar_numbers(int one, int two, char three); 10 | void bar_const_test(const char * a, char * const b, const int c); 11 | custom_t bar_needs_custom_type(void); 12 | const char * bar_return_const_ptr(int one); 13 | 14 | #endif // bar_H 15 | -------------------------------------------------------------------------------- /components/CMSIS-DAP/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(COMPONENT_ADD_INCLUDEDIRS "Include/") 2 | set(COMPONENT_SRCS 3 | "Source/DAP.c " 4 | "Source/DAP_vendor.c" 5 | "Source/JTAG_DP.c " 6 | "Source/SW_DP.c " 7 | "Source/SWD_flash.c " 8 | "Source/SWD_host.c " 9 | "Source/SWD_opt.c " 10 | "Source/error.c " 11 | "algo/STM32_ALGO.c " 12 | "algo/STM32F0xx_OPT.c " 13 | "algo/STM32F10x_OPT.c " 14 | "algo/STM32F3xx_OPT.c " 15 | "algo/STM32F4xx_OPT.c " 16 | "algo/STM32F7xx_OPT.c " 17 | "algo/STM32H7xx.c " 18 | 19 | ) 20 | register_component() -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/stream_wrapper.rb: -------------------------------------------------------------------------------- 1 | 2 | class StreamWrapper 3 | 4 | def stdout_override(&fnc) 5 | @stdout_overide_fnc = fnc 6 | end 7 | 8 | def stdout_puts(string) 9 | if @stdout_overide_fnc 10 | @stdout_overide_fnc.call(string) 11 | else 12 | $stdout.puts(string) 13 | end 14 | end 15 | 16 | def stdout_flush 17 | $stdout.flush 18 | end 19 | 20 | def stderr_puts(string) 21 | $stderr.puts(string) 22 | end 23 | 24 | def stderr_flush 25 | $stderr.flush 26 | end 27 | 28 | end 29 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/vendor/cmock/config/production_environment.rb: -------------------------------------------------------------------------------- 1 | # ========================================== 2 | # CMock Project - Automatic Mock Generation for C 3 | # Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams 4 | # [Released under MIT License. Please refer to license.txt for details] 5 | # ========================================== 6 | 7 | # Setup our load path: 8 | [ 9 | 'lib', 10 | ].each do |dir| 11 | $LOAD_PATH.unshift( File.join( File.expand_path(File.dirname(__FILE__)) + '/../', dir) ) 12 | end 13 | 14 | 15 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/board_test/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../tools/top.mk 2 | include ../../make.mk 3 | 4 | INC += \ 5 | src \ 6 | $(TOP)/hw \ 7 | 8 | # Example source 9 | EXAMPLE_SOURCE += $(wildcard src/*.c) 10 | SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE)) 11 | 12 | # board_test example is special example that doesn't enable device or host stack 13 | # This can cause some TinyUSB API missing, this hack to allow us to fill those API 14 | # to pass the compilation process 15 | CFLAGS += \ 16 | -D"tud_irq_handler(x)= " \ 17 | 18 | include ../../rules.mk 19 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/board_test/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRCS "main.c" 2 | INCLUDE_DIRS "." 3 | REQUIRES freertos soc) 4 | 5 | target_compile_options(${COMPONENT_TARGET} PUBLIC 6 | "-DCFG_TUSB_MCU=OPT_MCU_ESP32S2" 7 | "-DCFG_TUSB_OS=OPT_OS_FREERTOS" 8 | ) 9 | 10 | idf_component_get_property( FREERTOS_ORIG_INCLUDE_PATH freertos ORIG_INCLUDE_PATH) 11 | target_include_directories(${COMPONENT_TARGET} PUBLIC 12 | "${FREERTOS_ORIG_INCLUDE_PATH}" 13 | "${TOP}/hw" 14 | "${TOP}/src" 15 | ) 16 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/rules_release_deep_dependencies.rake: -------------------------------------------------------------------------------- 1 | 2 | 3 | rule(/#{PROJECT_RELEASE_DEPENDENCIES_PATH}\/#{'.+\\'+EXTENSION_DEPENDENCIES}$/ => [ 4 | proc do |task_name| 5 | @ceedling[:file_finder].find_compilation_input_file(task_name, :error, true) 6 | end 7 | ]) do |dep| 8 | @ceedling[:generator].generate_dependencies_file( 9 | TOOLS_RELEASE_DEPENDENCIES_GENERATOR, 10 | RELEASE_SYM, 11 | dep.source, 12 | @ceedling[:file_path_utils].form_release_build_c_object_filepath(dep.source), 13 | dep.name) 14 | end 15 | 16 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/fake_function_framework/Rakefile: -------------------------------------------------------------------------------- 1 | require 'rake' 2 | require 'rspec/core/rake_task' 3 | 4 | desc "Run all rspecs" 5 | RSpec::Core::RakeTask.new(:spec) do |t| 6 | t.pattern = Dir.glob('spec/**/*_spec.rb') 7 | t.rspec_opts = '--format documentation' 8 | # t.rspec_opts << ' more options' 9 | end 10 | 11 | desc "Run integration test on example" 12 | task :integration_test do 13 | chdir("./examples/fff_example") do 14 | sh "rake clobber" 15 | sh "rake test:all" 16 | end 17 | end 18 | 19 | task :default => [:spec, :integration_test] -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/board_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following five lines of boilerplate have to be in your project's 2 | # CMakeLists in this exact order for cmake to work correctly 3 | cmake_minimum_required(VERSION 3.5) 4 | 5 | # TOP is absolute path to root directory of TinyUSB git repo 6 | set(TOP "../../..") 7 | get_filename_component(TOP "${TOP}" REALPATH) 8 | 9 | # Add example src and bsp directories 10 | set(EXTRA_COMPONENT_DIRS "src" "${TOP}/hw/bsp/esp32s2_saola_1") 11 | 12 | include($ENV{IDF_PATH}/tools/cmake/project.cmake) 13 | set(SUPPORTED_TARGETS esp32s2) 14 | 15 | project(board_test) 16 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc_freertos/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following five lines of boilerplate have to be in your project's 2 | # CMakeLists in this exact order for cmake to work correctly 3 | cmake_minimum_required(VERSION 3.5) 4 | 5 | # TOP is absolute path to root directory of TinyUSB git repo 6 | set(TOP "../../..") 7 | get_filename_component(TOP "${TOP}" REALPATH) 8 | 9 | # Add example src and bsp directories 10 | set(EXTRA_COMPONENT_DIRS "src" "${TOP}/hw/bsp/esp32s2_saola_1") 11 | 12 | include($ENV{IDF_PATH}/tools/cmake/project.cmake) 13 | set(SUPPORTED_TARGETS esp32s2) 14 | 15 | project(cdc_msc_freertos) 16 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/hid_composite_freertos/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following five lines of boilerplate have to be in your project's 2 | # CMakeLists in this exact order for cmake to work correctly 3 | cmake_minimum_required(VERSION 3.5) 4 | 5 | # TOP is absolute path to root directory of TinyUSB git repo 6 | set(TOP "../../..") 7 | get_filename_component(TOP "${TOP}" REALPATH) 8 | 9 | # Add example src and bsp directories 10 | set(EXTRA_COMPONENT_DIRS "src" "${TOP}/hw/bsp/esp32s2_saola_1") 11 | 12 | include($ENV{IDF_PATH}/tools/cmake/project.cmake) 13 | set(SUPPORTED_TARGETS esp32s2) 14 | 15 | project(hid_composite_freertos) 16 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/release_invoker_helper.rb: -------------------------------------------------------------------------------- 1 | 2 | 3 | class ReleaseInvokerHelper 4 | 5 | constructor :configurator, :dependinator, :task_invoker 6 | 7 | 8 | def process_deep_dependencies(dependencies_list) 9 | return if (not @configurator.project_use_deep_dependencies) 10 | 11 | if @configurator.project_generate_deep_dependencies 12 | @dependinator.enhance_release_file_dependencies( dependencies_list ) 13 | @task_invoker.invoke_release_dependencies_files( dependencies_list ) 14 | end 15 | 16 | @dependinator.load_release_object_deep_dependencies( dependencies_list ) 17 | end 18 | 19 | end 20 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/tools/top.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(lastword a b),b) 2 | $(error This Makefile require make 3.81 or newer) 3 | endif 4 | 5 | # Set TOP to be the path to get from the current directory (where make was 6 | # invoked) to the top of the tree. $(lastword $(MAKEFILE_LIST)) returns 7 | # the name of this makefile relative to where make was invoked. 8 | 9 | THIS_MAKEFILE := $(lastword $(MAKEFILE_LIST)) 10 | TOP := $(patsubst %/tools/top.mk,%,$(THIS_MAKEFILE)) 11 | 12 | TOP := $(shell realpath $(TOP)) 13 | 14 | #$(info Top directory is $(TOP)) 15 | 16 | CURRENT_PATH := $(shell realpath --relative-to=$(TOP) `pwd`) 17 | #$(info Path from top is $(CURRENT_PATH)) 18 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/esp32s2_saola_1/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRCS "esp32s2_saola_1.c" "led_strip/src/led_strip_rmt_ws2812.c" 2 | INCLUDE_DIRS "led_strip/include" 3 | PRIV_REQUIRES "driver" 4 | REQUIRES freertos src) 5 | 6 | target_compile_options(${COMPONENT_TARGET} PUBLIC 7 | "-DCFG_TUSB_MCU=OPT_MCU_ESP32S2" 8 | "-DCFG_TUSB_OS=OPT_OS_FREERTOS" 9 | ) 10 | 11 | idf_component_get_property( FREERTOS_ORIG_INCLUDE_PATH freertos ORIG_INCLUDE_PATH) 12 | target_include_directories(${COMPONENT_TARGET} PUBLIC 13 | "${FREERTOS_ORIG_INCLUDE_PATH}" 14 | "${TOP}/hw" 15 | "${TOP}/src" 16 | ) 17 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/vendor/cmock/config/test_environment.rb: -------------------------------------------------------------------------------- 1 | # ========================================== 2 | # CMock Project - Automatic Mock Generation for C 3 | # Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams 4 | # [Released under MIT License. Please refer to license.txt for details] 5 | # ========================================== 6 | 7 | # Setup our load path: 8 | [ 9 | './lib', 10 | './vendor/behaviors/lib', 11 | './vendor/hardmock/lib', 12 | './vendor/unity/auto/', 13 | './test/system/' 14 | ].each do |dir| 15 | $LOAD_PATH.unshift( File.join( File.expand_path(File.dirname(__FILE__) + "/../"), dir) ) 16 | end 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Object files 5 | *.o 6 | *.ko 7 | *.obj 8 | *.elf 9 | 10 | # Linker output 11 | *.ilk 12 | *.map 13 | *.exp 14 | 15 | # Precompiled Headers 16 | *.gch 17 | *.pch 18 | 19 | # Libraries 20 | *.lib 21 | *.a 22 | *.la 23 | *.lo 24 | 25 | # Shared objects (inc. Windows DLLs) 26 | *.dll 27 | *.so 28 | *.so.* 29 | *.dylib 30 | 31 | # Executables 32 | *.exe 33 | *.out 34 | *.app 35 | *.i*86 36 | *.x86_64 37 | *.hex 38 | 39 | # Debug files 40 | *.dSYM/ 41 | *.su 42 | *.idb 43 | *.pdb 44 | 45 | # Kernel Module Compile Results 46 | *.mod* 47 | *.cmd 48 | .tmp_versions/ 49 | modules.order 50 | Module.symvers 51 | Mkfile.old 52 | dkms.conf 53 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/src/display.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void display_turnOffStatusLed(void); 4 | void display_turnOnStatusLed(void); 5 | void display_setVolume(int level); 6 | void display_setModeToMinimum(void); 7 | void display_setModeToMaximum(void); 8 | void display_setModeToAverage(void); 9 | bool display_isError(void); 10 | void display_powerDown(void); 11 | void display_updateData(int data, void(*updateCompleteCallback)(void)); 12 | 13 | /* 14 | The entry is returned (up to `length` bytes) in the provided `entry` buffer. 15 | */ 16 | void display_getKeyboardEntry(char * entry, int length); 17 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/bullseye/assets/template.erb: -------------------------------------------------------------------------------- 1 | % function_string = hash[:coverage][:functions].to_s 2 | % branch_string = hash[:coverage][:branches].to_s 3 | % format_string = "%#{[function_string.length, branch_string.length].max}i" 4 | <%=@ceedling[:plugin_reportinator].generate_banner("#{hash[:header]}: CODE COVERAGE SUMMARY")%> 5 | % if (!hash[:coverage][:functions].nil?) 6 | FUNCTIONS: <%=sprintf(format_string, hash[:coverage][:functions])%>% 7 | % else 8 | FUNCTIONS: none 9 | % end 10 | % if (!hash[:coverage][:branches].nil?) 11 | BRANCHES: <%=sprintf(format_string, hash[:coverage][:branches])%>% 12 | % else 13 | BRANCHES: none 14 | % end 15 | 16 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/hid_generic_inout/hid_test.py: -------------------------------------------------------------------------------- 1 | # Install python3 HID package https://pypi.org/project/hid/ 2 | import hid 3 | 4 | USB_VID = 0xcafe 5 | 6 | print("Openning HID device with VID = 0x%X" % USB_VID) 7 | 8 | for dict in hid.enumerate(USB_VID): 9 | print(dict) 10 | dev = hid.Device(dict['vendor_id'], dict['product_id']) 11 | if dev: 12 | while True: 13 | # Get input from console and encode to UTF8 for array of chars. 14 | str_out = input("Send text to HID Device : ").encode('utf-8') 15 | dev.write(str_out) 16 | str_in = dev.read(64) 17 | print("Received from HID Device:", str_in, '\n') 18 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/gcov/assets/template.erb: -------------------------------------------------------------------------------- 1 | % function_string = hash[:coverage][:functions].to_s 2 | % branch_string = hash[:coverage][:branches].to_s 3 | % format_string = "%#{[function_string.length, branch_string.length].max}i" 4 | <%=@ceedling[:plugin_reportinator].generate_banner("#{GCOV_ROOT_NAME.upcase}: CODE COVERAGE SUMMARY")%> 5 | % if (!hash[:coverage][:functions].nil?) 6 | FUNCTIONS: <%=sprintf(format_string, hash[:coverage][:functions])%>% 7 | % else 8 | FUNCTIONS: none 9 | % end 10 | % if (!hash[:coverage][:branches].nil?) 11 | BRANCHES: <%=sprintf(format_string, hash[:coverage][:branches])%>% 12 | % else 13 | BRANCHES: none 14 | % end 15 | 16 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/ses/cdc_msc_hid.emProject: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: Feature 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/fomu/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -march=rv32i \ 4 | -mabi=ilp32 \ 5 | -nostdlib \ 6 | -DCFG_TUSB_MCU=OPT_MCU_VALENTYUSB_EPTRI 7 | 8 | # Cross Compiler for RISC-V 9 | CROSS_COMPILE = riscv-none-embed- 10 | 11 | MCU_DIR = hw/mcu/fomu 12 | BSP_DIR = hw/bsp/fomu 13 | 14 | # All source paths should be relative to the top level. 15 | LD_FILE = hw/bsp/$(BOARD)/fomu.ld 16 | 17 | SRC_S += hw/bsp/fomu/crt0-vexriscv.S 18 | 19 | INC += \ 20 | $(TOP)/$(BSP_DIR)/include 21 | 22 | # For TinyUSB port source 23 | VENDOR = valentyusb 24 | CHIP_FAMILY = eptri 25 | 26 | # For freeRTOS port source 27 | FREERTOS_PORT = RISC-V 28 | 29 | # flash using dfu-util 30 | flash: $(BUILD)/$(BOARD)-firmware.dfu 31 | dfu-util -D $^ 32 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/subprojects/config/defaults.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #:extension: 3 | # :subprojects: '.a' 4 | 5 | :subprojects: 6 | :paths: [] 7 | # - :name: subprojectA 8 | # :source: 9 | # - ./first/subproject/dir 10 | # - ./second/subproject/dir 11 | # :include: 12 | # - ./first/include/dir 13 | # :build_root: ./subproject/build/dir 14 | # :defines: 15 | # - FIRST_DEFINE 16 | 17 | :tools: 18 | :subprojects_compiler: 19 | :executable: gcc 20 | :arguments: 21 | - -g 22 | - -I"$": COLLECTION_PATHS_SUBPROJECTS 23 | - -D$: COLLECTION_DEFINES_SUBPROJECTS 24 | - -c "${1}" 25 | - -o "${2}" 26 | :subprojects_linker: 27 | :executable: ar 28 | :arguments: 29 | - rcs 30 | - ${2} 31 | - ${1} 32 | 33 | ... 34 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/rake_wrapper.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems' 2 | require 'rake' 3 | require 'ceedling/makefile' # our replacement for rake's make-style dependency loader 4 | 5 | include Rake::DSL if defined?(Rake::DSL) 6 | 7 | class Rake::Task 8 | attr_reader :already_invoked 9 | end 10 | 11 | class RakeWrapper 12 | 13 | def initialize 14 | @makefile_loader = Rake::MakefileLoader.new # use our custom replacement noted above 15 | end 16 | 17 | def [](task) 18 | return Rake::Task[task] 19 | end 20 | 21 | def task_list 22 | return Rake::Task.tasks 23 | end 24 | 25 | def create_file_task(file_task, dependencies) 26 | file(file_task => dependencies) 27 | end 28 | 29 | def load_dependencies(dependencies_path) 30 | @makefile_loader.load(dependencies_path) 31 | end 32 | 33 | end 34 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/fomu/include/hw/common.h: -------------------------------------------------------------------------------- 1 | #ifndef _HW_COMMON_H_ 2 | #define _HW_COMMON_H_ 3 | #include 4 | static inline void csr_writeb(uint8_t value, uint32_t addr) 5 | { 6 | *((volatile uint8_t *)addr) = value; 7 | } 8 | 9 | static inline uint8_t csr_readb(uint32_t addr) 10 | { 11 | return *(volatile uint8_t *)addr; 12 | } 13 | 14 | static inline void csr_writew(uint16_t value, uint32_t addr) 15 | { 16 | *((volatile uint16_t *)addr) = value; 17 | } 18 | 19 | static inline uint16_t csr_readw(uint32_t addr) 20 | { 21 | return *(volatile uint16_t *)addr; 22 | } 23 | 24 | static inline void csr_writel(uint32_t value, uint32_t addr) 25 | { 26 | *((volatile uint32_t *)addr) = value; 27 | } 28 | 29 | static inline uint32_t csr_readl(uint32_t addr) 30 | { 31 | return *(volatile uint32_t *)addr; 32 | } 33 | #endif /* _HW_COMMON_H_ */ -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc_freertos/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../tools/top.mk 2 | include ../../make.mk 3 | 4 | FREERTOS_SRC = lib/FreeRTOS/FreeRTOS/Source 5 | 6 | INC += \ 7 | src \ 8 | $(TOP)/hw \ 9 | $(TOP)/$(FREERTOS_SRC)/include \ 10 | $(TOP)/$(FREERTOS_SRC)/portable/GCC/$(FREERTOS_PORT) 11 | 12 | # Example source 13 | EXAMPLE_SOURCE += $(wildcard src/*.c) 14 | SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE)) 15 | 16 | # FreeRTOS source, all files in port folder 17 | SRC_C += \ 18 | $(FREERTOS_SRC)/list.c \ 19 | $(FREERTOS_SRC)/queue.c \ 20 | $(FREERTOS_SRC)/tasks.c \ 21 | $(FREERTOS_SRC)/timers.c \ 22 | $(subst ../../../,,$(wildcard ../../../$(FREERTOS_SRC)/portable/GCC/$(FREERTOS_PORT)/*.c)) 23 | 24 | # FreeRTOS (lto + Os) linker issue 25 | LDFLAGS += -Wl,--undefined=vTaskSwitchContext 26 | 27 | include ../../rules.mk 28 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/hid_composite_freertos/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../tools/top.mk 2 | include ../../make.mk 3 | 4 | FREERTOS_SRC = lib/FreeRTOS/FreeRTOS/Source 5 | 6 | INC += \ 7 | src \ 8 | $(TOP)/hw \ 9 | $(TOP)/$(FREERTOS_SRC)/include \ 10 | $(TOP)/$(FREERTOS_SRC)/portable/GCC/$(FREERTOS_PORT) 11 | 12 | # Example source 13 | EXAMPLE_SOURCE += $(wildcard src/*.c) 14 | SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE)) 15 | 16 | # FreeRTOS source, all files in port folder 17 | SRC_C += \ 18 | $(FREERTOS_SRC)/list.c \ 19 | $(FREERTOS_SRC)/queue.c \ 20 | $(FREERTOS_SRC)/tasks.c \ 21 | $(FREERTOS_SRC)/timers.c \ 22 | $(subst ../../../,,$(wildcard ../../../$(FREERTOS_SRC)/portable/GCC/$(FREERTOS_PORT)/*.c)) 23 | 24 | # FreeRTOS (lto + Os) linker issue 25 | LDFLAGS += -Wl,--undefined=vTaskSwitchContext 26 | 27 | include ../../rules.mk 28 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: Bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **Set up (please complete the following information):** 14 | - OS: [e.g. Ubuntu 18.04] 15 | - Board: [e.g pca10056] 16 | - Firmware Code: [e.g examples/device/cdc_msc_hid] 17 | 18 | **To Reproduce** 19 | Steps to reproduce the behavior: 20 | 1. Go to '...' 21 | 2. Click on '....' 22 | 3. Scroll down to '....' 23 | 4. See error 24 | 25 | **Expected behavior** 26 | A clear and concise description of what you expected to happen. 27 | 28 | **Screenshots** 29 | If applicable, add screenshots to help explain your problem. 30 | 31 | **Additional context** 32 | Add any other context about the problem here. 33 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/arduino_nano33_ble/arduino_nano33_ble.ld: -------------------------------------------------------------------------------- 1 | /* Linker script to configure memory regions. */ 2 | 3 | SEARCH_DIR(.) 4 | GROUP(-lgcc -lc -lnosys) 5 | 6 | MEMORY 7 | { 8 | FLASH (rx) : ORIGIN = 0x10000, LENGTH = 0xf0000 9 | RAM_NVIC (rwx) : ORIGIN = 0x20000000, LENGTH = 0x100 10 | RAM_CRASH_DATA (rwx) : ORIGIN = (0x20000000 + 0x100), LENGTH = 0x100 11 | RAM (rwx) : ORIGIN = ((0x20000000 + 0x100) + 0x100), LENGTH = (0x40000 - (0x100 + 0x100)) 12 | } 13 | 14 | SECTIONS 15 | { 16 | . = ALIGN(4); 17 | .svc_data : 18 | { 19 | PROVIDE(__start_svc_data = .); 20 | KEEP(*(.svc_data)) 21 | PROVIDE(__stop_svc_data = .); 22 | } > RAM 23 | 24 | .fs_data : 25 | { 26 | PROVIDE(__start_fs_data = .); 27 | KEEP(*(.fs_data)) 28 | PROVIDE(__stop_fs_data = .); 29 | } > RAM 30 | } INSERT AFTER .data; 31 | 32 | INCLUDE "nrf52_common.ld" 33 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/preprocessinator_file_handler.rb: -------------------------------------------------------------------------------- 1 | 2 | 3 | class PreprocessinatorFileHandler 4 | 5 | constructor :preprocessinator_extractor, :configurator, :tool_executor, :file_path_utils, :file_wrapper 6 | 7 | 8 | def preprocess_file(filepath, includes) 9 | preprocessed_filepath = @file_path_utils.form_preprocessed_file_filepath(filepath) 10 | 11 | command = @tool_executor.build_command_line(@configurator.tools_test_file_preprocessor, [], filepath, preprocessed_filepath) 12 | @tool_executor.exec(command[:line], command[:options]) 13 | 14 | contents = @preprocessinator_extractor.extract_base_file_from_preprocessed_expansion(preprocessed_filepath) 15 | 16 | includes.each{|include| contents.unshift("#include \"#{include}\"")} 17 | 18 | @file_wrapper.write(preprocessed_filepath, contents.join("\n")) 19 | end 20 | 21 | end 22 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/reportinator.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # Pretifies reports 3 | class Reportinator 4 | 5 | ## 6 | # Generates a banner for a message based on the length of the message or a 7 | # given width. 8 | # ==== Attributes 9 | # 10 | # * _message_: The message to put. 11 | # * _width_: The width of the message. If nil the size of the banner is 12 | # determined by the length of the message. 13 | # 14 | # ==== Examples 15 | # 16 | # rp = Reportinator.new 17 | # rp.generate_banner("Hello world!") => "------------\nHello world!\n------------\n" 18 | # rp.generate_banner("Hello world!", 3) => "---\nHello world!\n---\n" 19 | # 20 | # 21 | def generate_banner(message, width=nil) 22 | dash_count = ((width.nil?) ? message.strip.length : width) 23 | return "#{'-' * dash_count}\n#{message}\n#{'-' * dash_count}\n" 24 | end 25 | 26 | end 27 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/system_utils.rb: -------------------------------------------------------------------------------- 1 | 2 | class Object 3 | def deep_clone 4 | Marshal::load(Marshal.dump(self)) 5 | end 6 | end 7 | 8 | 9 | ## 10 | # Class containing system utility funcions. 11 | class SystemUtils 12 | 13 | constructor :system_wrapper 14 | 15 | ## 16 | # Sets up the class. 17 | def setup 18 | @tcsh_shell = nil 19 | end 20 | 21 | ## 22 | # Checks the system shell to see if it a tcsh shell. 23 | def tcsh_shell? 24 | # once run a single time, return state determined at that execution 25 | return @tcsh_shell if not @tcsh_shell.nil? 26 | 27 | result = @system_wrapper.shell_backticks('echo $version') 28 | 29 | if ((result[:exit_code] == 0) and (result[:output].strip =~ /^tcsh/)) 30 | @tcsh_shell = true 31 | else 32 | @tcsh_shell = false 33 | end 34 | 35 | return @tcsh_shell 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/gcov/lib/gcov_constants.rb: -------------------------------------------------------------------------------- 1 | 2 | GCOV_ROOT_NAME = 'gcov'.freeze 3 | GCOV_TASK_ROOT = GCOV_ROOT_NAME + ':' 4 | GCOV_SYM = GCOV_ROOT_NAME.to_sym 5 | 6 | GCOV_BUILD_PATH = File.join(PROJECT_BUILD_ROOT, GCOV_ROOT_NAME) 7 | GCOV_BUILD_OUTPUT_PATH = File.join(GCOV_BUILD_PATH, "out") 8 | GCOV_RESULTS_PATH = File.join(GCOV_BUILD_PATH, "results") 9 | GCOV_DEPENDENCIES_PATH = File.join(GCOV_BUILD_PATH, "dependencies") 10 | GCOV_ARTIFACTS_PATH = File.join(PROJECT_BUILD_ARTIFACTS_ROOT, GCOV_ROOT_NAME) 11 | 12 | GCOV_ARTIFACTS_FILE = File.join(GCOV_ARTIFACTS_PATH, "GcovCoverageResults.html") 13 | GCOV_ARTIFACTS_FILE_XML = File.join(GCOV_ARTIFACTS_PATH, "GcovCoverageResults.xml") 14 | 15 | GCOV_IGNORE_SOURCES = %w(unity cmock cexception).freeze 16 | 17 | GCOV_FILTER_EXCLUDE = '^vendor.*|^build.*|^test.*|^lib.*' 18 | 19 | 20 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/vendor/unity/auto/test_file_filter.rb: -------------------------------------------------------------------------------- 1 | # ========================================== 2 | # Unity Project - A Test Framework for C 3 | # Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams 4 | # [Released under MIT License. Please refer to license.txt for details] 5 | # ========================================== 6 | 7 | require'yaml' 8 | 9 | module RakefileHelpers 10 | class TestFileFilter 11 | def initialize(all_files = false) 12 | @all_files = all_files 13 | 14 | return unless @all_files 15 | return unless File.exist?('test_file_filter.yml') 16 | 17 | filters = YAML.load_file('test_file_filter.yml') 18 | @all_files = filters[:all_files] 19 | @only_files = filters[:only_files] 20 | @exclude_files = filters[:exclude_files] 21 | end 22 | 23 | attr_accessor :all_files, :only_files, :exclude_files 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/beep/lib/beep.rb: -------------------------------------------------------------------------------- 1 | require 'ceedling/plugin' 2 | require 'ceedling/constants' 3 | 4 | class Beep < Plugin 5 | 6 | attr_reader :config 7 | 8 | def setup 9 | @config = { 10 | :on_done => ((defined? TOOLS_BEEP_ON_DONE) ? TOOLS_BEEP_ON_DONE : :bell ), 11 | :on_error => ((defined? TOOLS_BEEP_ON_ERROR) ? TOOLS_BEEP_ON_ERROR : :bell ), 12 | } 13 | end 14 | 15 | def post_build 16 | beep @config[:on_done] 17 | end 18 | 19 | def post_error 20 | beep @config[:on_error] 21 | end 22 | 23 | private 24 | 25 | def beep(method = :none) 26 | case method 27 | when :bell 28 | if (SystemWrapper.windows?) 29 | puts "echo '\007'" 30 | else 31 | puts "echo -ne '\007'" 32 | end 33 | when :speaker_test 34 | `speaker-test -t sine -f 1000 -l 1` 35 | else 36 | #do nothing with illegal or :none 37 | end 38 | end 39 | end 40 | 41 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/beep/README.md: -------------------------------------------------------------------------------- 1 | ceedling-beep 2 | ============= 3 | 4 | This is a simple plugin that just beeps at the end of a build and/or test sequence. Are you getting too distracted surfing 5 | the internet, chatting with coworkers, or swordfighting while it's building or testing? The friendly beep will let you know 6 | it's time to pay attention again. 7 | 8 | This plugin has very few configuration options. At this time it can beep on completion of a task and/or on an error condition. 9 | For each of these, you can configure the method that it should beep. 10 | 11 | ``` 12 | :tools: 13 | :beep_on_done: :bell 14 | :beep_on_error: :bell 15 | ``` 16 | 17 | Each of these have the following options: 18 | 19 | - :bell - this option uses the ASCII bell character out stdout 20 | - :speaker_test - this uses the linux speaker-test command if installed 21 | 22 | Very likely, we'll be adding to this list if people find this to be useful. 23 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/tools/usb_drivers/99-tinyusb.rules: -------------------------------------------------------------------------------- 1 | # Copy this file to the location of your distribution's udev rules, for example on Ubuntu: 2 | # sudo cp 99-tinyusb.rules /etc/udev/rules.d/ 3 | # Then reload udev configuration by executing: 4 | # sudo udevadm control --reload-rules 5 | # sudo udevadm trigger 6 | 7 | # Check SUBSYSTEM 8 | SUBSYSTEMS=="hidraw", KERNEL=="hidraw*", MODE="0666", GROUP="dialout" 9 | 10 | # Rule applies to all TinyUSB example 11 | ATTRS{idVendor}=="cafe", MODE="0666", GROUP="dialout" 12 | 13 | # Rule to blacklist TinyUSB example from being manipulated by ModemManager. 14 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="cafe", ENV{ID_MM_DEVICE_IGNORE}="1" 15 | 16 | # Xplained Pro SamG55 Device 17 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2111", MODE="0666", GROUP="users", ENV{ID_MM_DEVICE_IGNORE}="1" 18 | SUBSYSTEMS=="tty", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2111", MODE="0666", GROUP="users", ENV{ID_MM_DEVICE_IGNORE}="1" 19 | -------------------------------------------------------------------------------- /components/CMSIS-DAP/algo/STM32_ALGO.c: -------------------------------------------------------------------------------- 1 | /* Flash OS Routines (Automagically Generated) 2 | * Copyright (c) 2009-2015 ARM Limited 3 | */ 4 | #include "flash_blob.h" 5 | #include "stdlib.h" 6 | #include "string.h" 7 | 8 | algo_info_t STM32_ALGO[6]={0}; 9 | void algo_init(void) 10 | { 11 | memset(STM32_ALGO,0,sizeof(STM32_ALGO)); 12 | STM32_ALGO[0].name="STM32F0XX"; 13 | STM32_ALGO[1].name="STM32F1XX"; 14 | STM32_ALGO[2].name="STM32F3XX"; 15 | STM32_ALGO[3].name="STM32F4XX"; 16 | STM32_ALGO[4].name="STM32F7XX"; 17 | STM32_ALGO[5].name="STM32H7XX"; 18 | 19 | memcpy(&STM32_ALGO[0].algo,&flash_algo_F0,sizeof(flash_algo_F0)); 20 | memcpy(&STM32_ALGO[1].algo,&flash_algo_F1,sizeof(flash_algo_F1)); 21 | memcpy(&STM32_ALGO[2].algo,&flash_algo_F3,sizeof(flash_algo_F3)); 22 | memcpy(&STM32_ALGO[3].algo,&flash_algo_F4,sizeof(flash_algo_F4)); 23 | memcpy(&STM32_ALGO[4].algo,&flash_algo_F7,sizeof(flash_algo_F7)); 24 | memcpy(&STM32_ALGO[5].algo,&flash_algo_H7,sizeof(flash_algo_H7)); 25 | } 26 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/lib/fatfs/integer.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------*/ 2 | /* Integer type definitions for FatFs module */ 3 | /*-------------------------------------------*/ 4 | 5 | #ifndef _INTEGER 6 | #define _INTEGER 7 | 8 | #ifdef _WIN32 /* FatFs development platform */ 9 | 10 | #include 11 | #include 12 | 13 | #else /* Embedded platform */ 14 | 15 | /* These types must be 16-bit, 32-bit or larger integer */ 16 | typedef int INT; 17 | typedef unsigned int UINT; 18 | 19 | /* These types must be 8-bit integer */ 20 | typedef unsigned char UCHAR; 21 | typedef unsigned char BYTE; 22 | 23 | /* These types must be 16-bit integer */ 24 | typedef short SHORT; 25 | typedef unsigned short USHORT; 26 | typedef unsigned short WORD; 27 | typedef unsigned short WCHAR; 28 | 29 | /* These types must be 32-bit integer */ 30 | typedef long LONG; 31 | typedef unsigned long ULONG; 32 | typedef unsigned long DWORD; 33 | 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/adafruit_clue/nrf52840_s140_v6.ld: -------------------------------------------------------------------------------- 1 | /* Linker script to configure memory regions. */ 2 | 3 | SEARCH_DIR(.) 4 | GROUP(-lgcc -lc -lnosys) 5 | 6 | MEMORY 7 | { 8 | FLASH (rx) : ORIGIN = 0x26000, LENGTH = 0xED000 - 0x26000 9 | 10 | /* SRAM required by S132 depend on 11 | * - Attribute Table Size 12 | * - Vendor UUID count 13 | * - Max ATT MTU 14 | * - Concurrent connection peripheral + central + secure links 15 | * - Event Len, HVN queue, Write CMD queue 16 | */ 17 | RAM (rwx) : ORIGIN = 0x20003400, LENGTH = 0x20040000 - 0x20003400 18 | } 19 | 20 | SECTIONS 21 | { 22 | . = ALIGN(4); 23 | .svc_data : 24 | { 25 | PROVIDE(__start_svc_data = .); 26 | KEEP(*(.svc_data)) 27 | PROVIDE(__stop_svc_data = .); 28 | } > RAM 29 | 30 | .fs_data : 31 | { 32 | PROVIDE(__start_fs_data = .); 33 | KEEP(*(.fs_data)) 34 | PROVIDE(__stop_fs_data = .); 35 | } > RAM 36 | } INSERT AFTER .data; 37 | 38 | INCLUDE "nrf52_common.ld" 39 | -------------------------------------------------------------------------------- /components/CMSIS-DAP/Include/error.h: -------------------------------------------------------------------------------- 1 | #ifndef ERRORT_H 2 | #define ERRORT_H 3 | 4 | 5 | // Keep in sync with the lists error_message and error_type 6 | typedef enum 7 | { 8 | /* Shared errors */ 9 | ERROR_SUCCESS = 0, 10 | ERROR_FAILURE, 11 | ERROR_INTERNAL, 12 | 13 | /* Target flash errors */ 14 | ERROR_RESET, 15 | ERROR_ALGO_DL, 16 | ERROR_ALGO_DATA_SEQ, 17 | ERROR_INIT, 18 | ERROR_SECURITY_BITS, 19 | ERROR_UNLOCK, 20 | ERROR_ERASE_SECTOR, 21 | ERROR_ERASE_ALL, 22 | ERROR_WRITE, 23 | 24 | // Add new values here 25 | 26 | ERROR_COUNT 27 | } error_tt; 28 | 29 | 30 | typedef unsigned char error_type_t; 31 | 32 | #define ERROR_TYPE_INTERNAL 0x1 33 | #define ERROR_TYPE_TRANSIENT 0x2 34 | #define ERROR_TYPE_USER 0x4 35 | #define ERROR_TYPE_TARGET 0x8 36 | 37 | #define ERROR_TYPE_MASK 0xF 38 | 39 | 40 | const char *error_get_string(error_tt error); 41 | 42 | error_type_t error_get_type(error_tt error); 43 | 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/feather_nrf52840_sense/nrf52840_s140_v6.ld: -------------------------------------------------------------------------------- 1 | /* Linker script to configure memory regions. */ 2 | 3 | SEARCH_DIR(.) 4 | GROUP(-lgcc -lc -lnosys) 5 | 6 | MEMORY 7 | { 8 | FLASH (rx) : ORIGIN = 0x26000, LENGTH = 0xED000 - 0x26000 9 | 10 | /* SRAM required by S132 depend on 11 | * - Attribute Table Size 12 | * - Vendor UUID count 13 | * - Max ATT MTU 14 | * - Concurrent connection peripheral + central + secure links 15 | * - Event Len, HVN queue, Write CMD queue 16 | */ 17 | RAM (rwx) : ORIGIN = 0x20003400, LENGTH = 0x20040000 - 0x20003400 18 | } 19 | 20 | SECTIONS 21 | { 22 | . = ALIGN(4); 23 | .svc_data : 24 | { 25 | PROVIDE(__start_svc_data = .); 26 | KEEP(*(.svc_data)) 27 | PROVIDE(__stop_svc_data = .); 28 | } > RAM 29 | 30 | .fs_data : 31 | { 32 | PROVIDE(__start_fs_data = .); 33 | KEEP(*(.fs_data)) 34 | PROVIDE(__stop_fs_data = .); 35 | } > RAM 36 | } INSERT AFTER .data; 37 | 38 | INCLUDE "nrf52_common.ld" 39 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/circuitplayground_bluefruit/nrf52840_s140_v6.ld: -------------------------------------------------------------------------------- 1 | /* Linker script to configure memory regions. */ 2 | 3 | SEARCH_DIR(.) 4 | GROUP(-lgcc -lc -lnosys) 5 | 6 | MEMORY 7 | { 8 | FLASH (rx) : ORIGIN = 0x26000, LENGTH = 0xED000 - 0x26000 9 | 10 | /* SRAM required by S132 depend on 11 | * - Attribute Table Size 12 | * - Vendor UUID count 13 | * - Max ATT MTU 14 | * - Concurrent connection peripheral + central + secure links 15 | * - Event Len, HVN queue, Write CMD queue 16 | */ 17 | RAM (rwx) : ORIGIN = 0x20003400, LENGTH = 0x20040000 - 0x20003400 18 | } 19 | 20 | SECTIONS 21 | { 22 | . = ALIGN(4); 23 | .svc_data : 24 | { 25 | PROVIDE(__start_svc_data = .); 26 | KEEP(*(.svc_data)) 27 | PROVIDE(__stop_svc_data = .); 28 | } > RAM 29 | 30 | .fs_data : 31 | { 32 | PROVIDE(__start_fs_data = .); 33 | KEEP(*(.fs_data)) 34 | PROVIDE(__stop_fs_data = .); 35 | } > RAM 36 | } INSERT AFTER .data; 37 | 38 | INCLUDE "nrf52_common.ld" 39 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/feather_nrf52840_express/nrf52840_s140_v6.ld: -------------------------------------------------------------------------------- 1 | /* Linker script to configure memory regions. */ 2 | 3 | SEARCH_DIR(.) 4 | GROUP(-lgcc -lc -lnosys) 5 | 6 | MEMORY 7 | { 8 | FLASH (rx) : ORIGIN = 0x26000, LENGTH = 0xED000 - 0x26000 9 | 10 | /* SRAM required by S132 depend on 11 | * - Attribute Table Size 12 | * - Vendor UUID count 13 | * - Max ATT MTU 14 | * - Concurrent connection peripheral + central + secure links 15 | * - Event Len, HVN queue, Write CMD queue 16 | */ 17 | RAM (rwx) : ORIGIN = 0x20003400, LENGTH = 0x20040000 - 0x20003400 18 | } 19 | 20 | SECTIONS 21 | { 22 | . = ALIGN(4); 23 | .svc_data : 24 | { 25 | PROVIDE(__start_svc_data = .); 26 | KEEP(*(.svc_data)) 27 | PROVIDE(__stop_svc_data = .); 28 | } > RAM 29 | 30 | .fs_data : 31 | { 32 | PROVIDE(__start_fs_data = .); 33 | KEEP(*(.fs_data)) 34 | PROVIDE(__stop_fs_data = .); 35 | } > RAM 36 | } INSERT AFTER .data; 37 | 38 | INCLUDE "nrf52_common.ld" 39 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/ses/nrf5x/nRF_Target.js: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ***************************************************************************** 5 | * * 6 | * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | *****************************************************************************/ 11 | 12 | function Reset() { 13 | TargetInterface.resetAndStop(); 14 | } 15 | 16 | function EnableTrace(traceInterfaceType) { 17 | // TODO: Enable trace 18 | } 19 | 20 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/loginator.rb: -------------------------------------------------------------------------------- 1 | 2 | class Loginator 3 | 4 | constructor :configurator, :project_file_loader, :project_config_manager, :file_wrapper, :system_wrapper 5 | 6 | 7 | def setup_log_filepath 8 | config_files = [] 9 | config_files << @project_file_loader.main_file 10 | config_files << @project_file_loader.user_file 11 | config_files.concat( @project_config_manager.options_files ) 12 | config_files.compact! 13 | config_files.map! { |file| file.ext('') } 14 | 15 | log_name = config_files.join( '_' ) 16 | 17 | @project_log_filepath = File.join( @configurator.project_log_path, log_name.ext('.log') ) 18 | end 19 | 20 | 21 | def log(string, heading=nil) 22 | return if (not @configurator.project_logging) 23 | 24 | output = "\n[#{@system_wrapper.time_now}]" 25 | output += " :: #{heading}" if (not heading.nil?) 26 | output += "\n#{string.strip}\n" 27 | 28 | @file_wrapper.write(@project_log_filepath, output, 'a') 29 | end 30 | 31 | end 32 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/ses/lpc13xx/LPC1300_Target.js: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ***************************************************************************** 5 | * * 6 | * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | *****************************************************************************/ 11 | 12 | function Reset() { 13 | TargetInterface.resetAndStop(); 14 | } 15 | 16 | function EnableTrace(traceInterfaceType) { 17 | // TODO: Enable trace 18 | } 19 | 20 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/ses/lpc18xx/LPC1800_Target.js: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ***************************************************************************** 5 | * * 6 | * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | *****************************************************************************/ 11 | 12 | function Reset() { 13 | TargetInterface.resetAndStop(); 14 | } 15 | 16 | function EnableTrace(traceInterfaceType) { 17 | // TODO: Enable trace 18 | } 19 | 20 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/ses/lpc40xx/LPC4000_Target.js: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ***************************************************************************** 5 | * * 6 | * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | *****************************************************************************/ 11 | 12 | function Reset() { 13 | TargetInterface.resetAndStop(); 14 | } 15 | 16 | function EnableTrace(traceInterfaceType) { 17 | // TODO: Enable trace 18 | } 19 | 20 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/ses/lpc43xx/LPC4300_Target.js: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ***************************************************************************** 5 | * * 6 | * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | *****************************************************************************/ 11 | 12 | function Reset() { 13 | TargetInterface.resetAndStop(); 14 | } 15 | 16 | function EnableTrace(traceInterfaceType) { 17 | // TODO: Enable trace 18 | } 19 | 20 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/ses/samd21/SAMD21_Target.js: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ***************************************************************************** 5 | * * 6 | * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | *****************************************************************************/ 11 | 12 | function Reset() { 13 | TargetInterface.resetAndStop(); 14 | } 15 | 16 | function EnableTrace(traceInterfaceType) { 17 | // TODO: Enable trace 18 | } 19 | 20 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/ses/samd51/SAMD51_Target.js: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ***************************************************************************** 5 | * * 6 | * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | *****************************************************************************/ 11 | 12 | function Reset() { 13 | TargetInterface.resetAndStop(); 14 | } 15 | 16 | function EnableTrace(traceInterfaceType) { 17 | // TODO: Enable trace 18 | } 19 | 20 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/ses/lpc175x_6x/LPC1700_Target.js: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ***************************************************************************** 5 | * * 6 | * (c) 2015 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | *****************************************************************************/ 11 | 12 | function Reset() { 13 | TargetInterface.resetAndStop(); 14 | } 15 | 16 | function EnableTrace(traceInterfaceType) { 17 | // TODO: Enable trace 18 | } 19 | 20 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc/ses/stm32f4/STM32F4xx_Target.js: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ***************************************************************************** 5 | * * 6 | * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | *****************************************************************************/ 11 | 12 | function Reset() { 13 | TargetInterface.resetAndStop(); 14 | } 15 | 16 | function EnableTrace(traceInterfaceType) { 17 | // TODO: Enable trace 18 | } 19 | 20 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc_freertos/ses/nrf5x/nRF_Target.js: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ***************************************************************************** 5 | * * 6 | * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | *****************************************************************************/ 11 | 12 | function Reset() { 13 | TargetInterface.resetAndStop(); 14 | } 15 | 16 | function EnableTrace(traceInterfaceType) { 17 | // TODO: Enable trace 18 | } 19 | 20 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC1700_Target.js: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ***************************************************************************** 5 | * * 6 | * (c) 2015 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | *****************************************************************************/ 11 | 12 | function Reset() { 13 | TargetInterface.resetAndStop(); 14 | } 15 | 16 | function EnableTrace(traceInterfaceType) { 17 | // TODO: Enable trace 18 | } 19 | 20 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/host/cdc_msc_hid/ses/lpc18xx/LPC1800_Target.js: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ***************************************************************************** 5 | * * 6 | * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | *****************************************************************************/ 11 | 12 | function Reset() { 13 | TargetInterface.resetAndStop(); 14 | } 15 | 16 | function EnableTrace(traceInterfaceType) { 17 | // TODO: Enable trace 18 | } 19 | 20 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/host/cdc_msc_hid/ses/lpc40xx/LPC4000_Target.js: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ***************************************************************************** 5 | * * 6 | * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | *****************************************************************************/ 11 | 12 | function Reset() { 13 | TargetInterface.resetAndStop(); 14 | } 15 | 16 | function EnableTrace(traceInterfaceType) { 17 | // TODO: Enable trace 18 | } 19 | 20 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/host/cdc_msc_hid/ses/lpc43xx/LPC4300_Target.js: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ***************************************************************************** 5 | * * 6 | * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | *****************************************************************************/ 11 | 12 | function Reset() { 13 | TargetInterface.resetAndStop(); 14 | } 15 | 16 | function EnableTrace(traceInterfaceType) { 17 | // TODO: Enable trace 18 | } 19 | 20 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc_freertos/ses/samd21/SAMD21_Target.js: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ***************************************************************************** 5 | * * 6 | * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | *****************************************************************************/ 11 | 12 | function Reset() { 13 | TargetInterface.resetAndStop(); 14 | } 15 | 16 | function EnableTrace(traceInterfaceType) { 17 | // TODO: Enable trace 18 | } 19 | 20 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc_freertos/ses/samd51/SAMD51_Target.js: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ***************************************************************************** 5 | * * 6 | * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | *****************************************************************************/ 11 | 12 | function Reset() { 13 | TargetInterface.resetAndStop(); 14 | } 15 | 16 | function EnableTrace(traceInterfaceType) { 17 | // TODO: Enable trace 18 | } 19 | 20 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/vendor/diy/lib/diy/factory.rb: -------------------------------------------------------------------------------- 1 | module DIY #:nodoc:# 2 | class FactoryDef #:nodoc: 3 | attr_accessor :name, :target, :class_name, :library 4 | 5 | def initialize(opts) 6 | @name, @target, @library, @auto_require = 7 | opts[:name], opts[:target], opts[:library], opts[:auto_require] 8 | 9 | @class_name = Infl.camelize(@target) 10 | @library ||= Infl.underscore(@class_name) if @auto_require 11 | end 12 | end 13 | 14 | class Context 15 | def construct_factory(key) 16 | factory_def = @defs[key] 17 | # puts "requiring #{factory_def.library}" 18 | require factory_def.library if factory_def.library 19 | 20 | big_c = get_class_for_name_with_module_delimeters(factory_def.class_name) 21 | 22 | FactoryFactory.new(big_c) 23 | end 24 | end 25 | 26 | class FactoryFactory 27 | def initialize(clazz) 28 | @class_to_create = clazz 29 | end 30 | 31 | def create(*args) 32 | @class_to_create.new(*args) 33 | end 34 | end 35 | end 36 | 37 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC1700_Target.js: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ***************************************************************************** 5 | * * 6 | * (c) 2015 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | *****************************************************************************/ 11 | 12 | function Reset() { 13 | TargetInterface.resetAndStop(); 14 | } 15 | 16 | function EnableTrace(traceInterfaceType) { 17 | // TODO: Enable trace 18 | } 19 | 20 | -------------------------------------------------------------------------------- /tinyusb/additions/include/tinyusb_types.h: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Espressif Systems (Shanghai) Co. Ltd. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #pragma once 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | #define USB_ESPRESSIF_VID 0x0483 22 | #define USB_STRING_DESCRIPTOR_ARRAY_SIZE 7 23 | 24 | typedef enum{ 25 | TINYUSB_USBDEV_0, 26 | } tinyusb_usbdev_t; 27 | 28 | typedef char *tusb_desc_strarray_device_t[USB_STRING_DESCRIPTOR_ARRAY_SIZE]; 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/vendor/unity/src/meson.build: -------------------------------------------------------------------------------- 1 | ################################################################################### 2 | # # 3 | # NAME: meson.build # 4 | # # 5 | # AUTHOR: Mike Karlesky, Mark VanderVoord, Greg Williams. # 6 | # WRITTEN BY: Michael Brockus. # 7 | # # 8 | # License: MIT # 9 | # # 10 | ################################################################################### 11 | 12 | unity_dir = include_directories('.') 13 | 14 | unity_lib = static_library(meson.project_name(), 15 | sources: ['unity.c'], 16 | include_directories: unity_dir) 17 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/test_invoker_helper.rb: -------------------------------------------------------------------------------- 1 | 2 | class TestInvokerHelper 3 | 4 | constructor :configurator, :task_invoker, :test_includes_extractor, :file_finder, :file_path_utils, :file_wrapper 5 | 6 | def clean_results(results, options) 7 | @file_wrapper.rm_f( results[:fail] ) 8 | @file_wrapper.rm_f( results[:pass] ) if (options[:force_run]) 9 | end 10 | 11 | def process_deep_dependencies(files) 12 | return if (not @configurator.project_use_deep_dependencies) 13 | 14 | dependencies_list = @file_path_utils.form_test_dependencies_filelist( files ) 15 | 16 | if @configurator.project_generate_deep_dependencies 17 | @task_invoker.invoke_test_dependencies_files( dependencies_list ) 18 | end 19 | 20 | yield( dependencies_list ) if block_given? 21 | end 22 | 23 | def extract_sources(test) 24 | sources = [] 25 | includes = @test_includes_extractor.lookup_includes_list(test) 26 | 27 | includes.each { |include| sources << @file_finder.find_compilation_input_file(include, :ignore) } 28 | 29 | return sources.compact 30 | end 31 | 32 | end 33 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/vendor/cmock/src/meson.build: -------------------------------------------------------------------------------- 1 | ################################################################################### 2 | # # 3 | # NAME: meson.build # 4 | # # 5 | # AUTHOR: Mike Karlesky, Mark VanderVoord, Greg Williams. # 6 | # WRITTEN BY: Michael Brockus. # 7 | # # 8 | # License: MIT # 9 | # # 10 | ################################################################################### 11 | 12 | cmock_dir = include_directories('.') 13 | 14 | cmock_lib = static_library(meson.project_name(), 15 | sources: ['cmock.c'], 16 | dependencies: [unity_dep], 17 | include_directories: cmock_dir) 18 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/mcb1800/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m3 \ 6 | -nostdlib \ 7 | -DCORE_M3 \ 8 | -DCFG_TUSB_MCU=OPT_MCU_LPC18XX \ 9 | -D__USE_LPCOPEN 10 | 11 | # mcu driver cause following warnings 12 | CFLAGS += -Wno-error=unused-parameter -Wno-error=strict-prototypes 13 | 14 | MCU_DIR = hw/mcu/nxp/lpcopen/lpc18xx/lpc_chip_18xx 15 | 16 | # All source paths should be relative to the top level. 17 | LD_FILE = hw/bsp/$(BOARD)/lpc1857.ld 18 | 19 | SRC_C += \ 20 | $(MCU_DIR)/../gcc/cr_startup_lpc18xx.c \ 21 | $(MCU_DIR)/src/chip_18xx_43xx.c \ 22 | $(MCU_DIR)/src/clock_18xx_43xx.c \ 23 | $(MCU_DIR)/src/gpio_18xx_43xx.c \ 24 | $(MCU_DIR)/src/sysinit_18xx_43xx.c \ 25 | $(MCU_DIR)/src/uart_18xx_43xx.c 26 | 27 | INC += \ 28 | $(TOP)/$(MCU_DIR)/inc \ 29 | $(TOP)/$(MCU_DIR)/inc/config_18xx 30 | 31 | # For TinyUSB port source 32 | VENDOR = nxp 33 | CHIP_FAMILY = transdimension 34 | 35 | # For freeRTOS port source 36 | FREERTOS_PORT = ARM_CM3 37 | 38 | # For flash-jlink target 39 | JLINK_DEVICE = LPC1857 40 | JLINK_IF = swd 41 | 42 | # flash using jlink 43 | flash: flash-jlink 44 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/hid_composite_freertos/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRCS "main.c" "usb_descriptors.c" 2 | INCLUDE_DIRS "." 3 | REQUIRES freertos soc) 4 | 5 | target_compile_options(${COMPONENT_TARGET} PUBLIC 6 | "-DCFG_TUSB_MCU=OPT_MCU_ESP32S2" 7 | ) 8 | 9 | idf_component_get_property( FREERTOS_ORIG_INCLUDE_PATH freertos ORIG_INCLUDE_PATH) 10 | target_include_directories(${COMPONENT_TARGET} PUBLIC 11 | "${FREERTOS_ORIG_INCLUDE_PATH}" 12 | "${TOP}/hw" 13 | "${TOP}/src" 14 | ) 15 | 16 | target_sources(${COMPONENT_TARGET} PUBLIC 17 | "${TOP}/src/tusb.c" 18 | "${TOP}/src/common/tusb_fifo.c" 19 | "${TOP}/src/device/usbd.c" 20 | "${TOP}/src/device/usbd_control.c" 21 | "${TOP}/src/class/cdc/cdc_device.c" 22 | "${TOP}/src/class/dfu/dfu_rt_device.c" 23 | "${TOP}/src/class/hid/hid_device.c" 24 | "${TOP}/src/class/midi/midi_device.c" 25 | "${TOP}/src/class/msc/msc_device.c" 26 | "${TOP}/src/class/net/net_device.c" 27 | "${TOP}/src/class/usbtmc/usbtmc_device.c" 28 | "${TOP}/src/class/vendor/vendor_device.c" 29 | "${TOP}/src/portable/espressif/esp32s2/dcd_esp32s2.c" 30 | ) 31 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/vendor/unity/auto/run_test.erb: -------------------------------------------------------------------------------- 1 | /*=======Test Runner Used To Run Each Test=====*/ 2 | static void run_test(UnityTestFunction func, const char* name, int line_num) 3 | { 4 | Unity.CurrentTestName = name; 5 | Unity.CurrentTestLineNumber = line_num; 6 | #ifdef UNITY_USE_COMMAND_LINE_ARGS 7 | if (!UnityTestMatches()) 8 | return; 9 | #endif 10 | Unity.NumberOfTests++; 11 | UNITY_CLR_DETAILS(); 12 | UNITY_EXEC_TIME_START(); 13 | CMock_Init(); 14 | if (TEST_PROTECT()) 15 | { 16 | <% if @options[:plugins].include?(:cexception) %> 17 | CEXCEPTION_T e; 18 | Try { 19 | <% end %> 20 | <%= @options[:setup_name] %>(); 21 | func(); 22 | <% if @options[:plugins].include?(:cexception) %> 23 | } Catch(e) { 24 | TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); 25 | } 26 | <% end %> 27 | } 28 | if (TEST_PROTECT()) 29 | { 30 | <%= @options[:teardown_name] %>(); 31 | CMock_Verify(); 32 | } 33 | CMock_Destroy(); 34 | UNITY_EXEC_TIME_STOP(); 35 | UnityConcludeTest(); 36 | } 37 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/cdc_msc_freertos/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRCS "main.c" "usb_descriptors.c" "msc_disk.c" 2 | INCLUDE_DIRS "." 3 | REQUIRES freertos soc) 4 | 5 | target_compile_options(${COMPONENT_TARGET} PUBLIC 6 | "-DCFG_TUSB_MCU=OPT_MCU_ESP32S2" 7 | ) 8 | 9 | idf_component_get_property( FREERTOS_ORIG_INCLUDE_PATH freertos ORIG_INCLUDE_PATH) 10 | target_include_directories(${COMPONENT_TARGET} PUBLIC 11 | "${FREERTOS_ORIG_INCLUDE_PATH}" 12 | "${TOP}/hw" 13 | "${TOP}/src" 14 | ) 15 | 16 | target_sources(${COMPONENT_TARGET} PUBLIC 17 | "${TOP}/src/tusb.c" 18 | "${TOP}/src/common/tusb_fifo.c" 19 | "${TOP}/src/device/usbd.c" 20 | "${TOP}/src/device/usbd_control.c" 21 | "${TOP}/src/class/cdc/cdc_device.c" 22 | "${TOP}/src/class/dfu/dfu_rt_device.c" 23 | "${TOP}/src/class/hid/hid_device.c" 24 | "${TOP}/src/class/midi/midi_device.c" 25 | "${TOP}/src/class/msc/msc_device.c" 26 | "${TOP}/src/class/net/net_device.c" 27 | "${TOP}/src/class/usbtmc/usbtmc_device.c" 28 | "${TOP}/src/class/vendor/vendor_device.c" 29 | "${TOP}/src/portable/espressif/esp32s2/dcd_esp32s2.c" 30 | ) 31 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/cacheinator_helper.rb: -------------------------------------------------------------------------------- 1 | 2 | class CacheinatorHelper 3 | 4 | constructor :file_wrapper, :yaml_wrapper 5 | 6 | def diff_cached_config?(cached_filepath, hash) 7 | return true if ( not @file_wrapper.exist?(cached_filepath) ) 8 | return true if ( (@file_wrapper.exist?(cached_filepath)) and (!(@yaml_wrapper.load(cached_filepath) == hash)) ) 9 | return false 10 | end 11 | 12 | def diff_cached_defines?(cached_filepath, files) 13 | current_defines = COLLECTION_DEFINES_TEST_AND_VENDOR.reject(&:empty?) 14 | 15 | current_dependency = Hash[files.collect { |source| [source, current_defines.dup] }] 16 | if not @file_wrapper.exist?(cached_filepath) 17 | @yaml_wrapper.dump(cached_filepath, current_dependency) 18 | return false 19 | end 20 | 21 | dependencies = @yaml_wrapper.load(cached_filepath) 22 | if dependencies.values_at(*current_dependency.keys) != current_dependency.values 23 | dependencies.merge!(current_dependency) 24 | @yaml_wrapper.dump(cached_filepath, dependencies) 25 | return true 26 | end 27 | 28 | return false 29 | end 30 | 31 | end 32 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018, hathach (tinyusb.org) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /tinyusb/additions/include_private/usb_descriptors.h: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Espressif Systems (Shanghai) PTE LTD 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #pragma once 16 | 17 | #include "tusb.h" 18 | #include "tinyusb_types.h" 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | #define _PID_MAP(itf, n) ((CFG_TUD_##itf) << (n)) 25 | 26 | extern tusb_desc_device_t descriptor_tinyusb; 27 | extern tusb_desc_strarray_device_t descriptor_str_tinyusb; 28 | 29 | extern tusb_desc_device_t descriptor_kconfig; 30 | extern tusb_desc_strarray_device_t descriptor_str_kconfig; 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/lpcxpresso1769/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m3 \ 6 | -nostdlib \ 7 | -DCORE_M3 \ 8 | -D__USE_LPCOPEN \ 9 | -DCFG_TUSB_MCU=OPT_MCU_LPC175X_6X \ 10 | -DRTC_EV_SUPPORT=0 11 | 12 | # lpc_types.h cause following errors 13 | CFLAGS += -Wno-error=strict-prototypes 14 | 15 | MCU_DIR = hw/mcu/nxp/lpcopen/lpc175x_6x/lpc_chip_175x_6x 16 | 17 | # All source paths should be relative to the top level. 18 | LD_FILE = hw/bsp/$(BOARD)/lpc1769.ld 19 | 20 | SRC_C += \ 21 | $(MCU_DIR)/../gcc/cr_startup_lpc175x_6x.c \ 22 | $(MCU_DIR)/src/chip_17xx_40xx.c \ 23 | $(MCU_DIR)/src/clock_17xx_40xx.c \ 24 | $(MCU_DIR)/src/gpio_17xx_40xx.c \ 25 | $(MCU_DIR)/src/iocon_17xx_40xx.c \ 26 | $(MCU_DIR)/src/sysctl_17xx_40xx.c \ 27 | $(MCU_DIR)/src/sysinit_17xx_40xx.c \ 28 | $(MCU_DIR)/src/uart_17xx_40xx.c 29 | 30 | INC += \ 31 | $(TOP)/$(MCU_DIR)/inc 32 | 33 | # For TinyUSB port source 34 | VENDOR = nxp 35 | CHIP_FAMILY = lpc17_40 36 | 37 | # For freeRTOS port source 38 | FREERTOS_PORT = ARM_CM3 39 | 40 | # For flash-jlink target 41 | JLINK_DEVICE = LPC1769 42 | JLINK_IF = swd 43 | 44 | # flash using jlink 45 | flash: flash-jlink 46 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/ngx4330/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m4 \ 6 | -mfloat-abi=hard \ 7 | -mfpu=fpv4-sp-d16 \ 8 | -nostdlib \ 9 | -DCORE_M4 \ 10 | -DCFG_TUSB_MCU=OPT_MCU_LPC43XX \ 11 | -D__USE_LPCOPEN 12 | 13 | # mcu driver cause following warnings 14 | CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter 15 | 16 | MCU_DIR = hw/mcu/nxp/lpcopen/lpc43xx/lpc_chip_43xx 17 | 18 | # All source paths should be relative to the top level. 19 | LD_FILE = hw/bsp/$(BOARD)/ngx4330.ld 20 | 21 | SRC_C += \ 22 | $(MCU_DIR)/../gcc/cr_startup_lpc43xx.c \ 23 | $(MCU_DIR)/src/chip_18xx_43xx.c \ 24 | $(MCU_DIR)/src/clock_18xx_43xx.c \ 25 | $(MCU_DIR)/src/gpio_18xx_43xx.c \ 26 | $(MCU_DIR)/src/sysinit_18xx_43xx.c \ 27 | $(MCU_DIR)/src/uart_18xx_43xx.c 28 | 29 | INC += \ 30 | $(TOP)/$(MCU_DIR)/inc \ 31 | $(TOP)/$(MCU_DIR)/inc/config_43xx 32 | 33 | # For TinyUSB port source 34 | VENDOR = nxp 35 | CHIP_FAMILY = transdimension 36 | 37 | # For freeRTOS port source 38 | FREERTOS_PORT = ARM_CM4F 39 | 40 | # For flash-jlink target 41 | JLINK_DEVICE = LPC4330 42 | JLINK_IF = swd 43 | 44 | # flash using jlink 45 | flash: flash-jlink 46 | -------------------------------------------------------------------------------- /tinyusb/additions/include/tusb_console.h: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Espressif Systems (Shanghai) Co. Ltd. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #pragma once 16 | 17 | #include "esp_err.h" 18 | 19 | /** 20 | * @brief Redirect output to the USB serial 21 | * @param cdc_intf - interface number of TinyUSB's CDC 22 | * 23 | * @return esp_err_t - ESP_OK, ESP_FAIL or an error code 24 | */ 25 | esp_err_t esp_tusb_init_console(int cdc_intf); 26 | 27 | /** 28 | * @brief Switch log to the default output 29 | * @param cdc_intf - interface number of TinyUSB's CDC 30 | * 31 | * @return esp_err_t 32 | */ 33 | esp_err_t esp_tusb_deinit_console(int cdc_intf); 34 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/target_loader.rb: -------------------------------------------------------------------------------- 1 | module TargetLoader 2 | class NoTargets < Exception; end 3 | class NoDirectory < Exception; end 4 | class NoDefault < Exception; end 5 | class NoSuchTarget < Exception; end 6 | 7 | class RequestReload < Exception; end 8 | 9 | def self.inspect(config, target_name=nil) 10 | unless config[:targets] 11 | raise NoTargets 12 | end 13 | 14 | targets = config[:targets] 15 | unless targets[:targets_directory] 16 | raise NoDirectory.new("No targets directory specified.") 17 | end 18 | unless targets[:default_target] 19 | raise NoDefault.new("No default target specified.") 20 | end 21 | 22 | target_path = lambda {|name| File.join(targets[:targets_directory], name + ".yml")} 23 | 24 | target = if target_name 25 | target_path.call(target_name) 26 | else 27 | target_path.call(targets[:default_target]) 28 | end 29 | 30 | unless File.exists? target 31 | raise NoSuchTarget.new("No such target: #{target}") 32 | end 33 | 34 | ENV['CEEDLING_MAIN_PROJECT_FILE'] = target 35 | 36 | raise RequestReload 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/test/test_foo.c: -------------------------------------------------------------------------------- 1 | #include "unity.h" 2 | #include "foo.h" 3 | #include "mock_bar.h" 4 | #include "mock_zzz.h" 5 | 6 | void setUp(void) 7 | { 8 | } 9 | 10 | void tearDown(void) 11 | { 12 | } 13 | 14 | void test_foo(void) 15 | { 16 | //When 17 | foo_turn_on(); 18 | 19 | //Then 20 | TEST_ASSERT_EQUAL(1, bar_turn_on_fake.call_count); 21 | TEST_ASSERT_EQUAL(1, zzz_sleep_fake.call_count); 22 | TEST_ASSERT_EQUAL_STRING("sleepy", zzz_sleep_fake.arg1_val); 23 | } 24 | 25 | void test_foo_again(void) 26 | { 27 | //When 28 | foo_turn_on(); 29 | 30 | //Then 31 | TEST_ASSERT_EQUAL(1, bar_turn_on_fake.call_count); 32 | } 33 | 34 | void test_foo_mock_with_const(void) 35 | { 36 | foo_print_message("123"); 37 | 38 | TEST_ASSERT_EQUAL(1, bar_print_message_fake.call_count); 39 | TEST_ASSERT_EQUAL_STRING("123", bar_print_message_fake.arg0_val); 40 | } 41 | 42 | void test_foo_mock_with_variable_args(void) 43 | { 44 | foo_print_special_message(); 45 | TEST_ASSERT_EQUAL(1, bar_print_message_formatted_fake.call_count); 46 | TEST_ASSERT_EQUAL_STRING("The numbers are %d, %d and %d", bar_print_message_formatted_fake.arg0_val); 47 | } 48 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/msp_exp430f5529lp/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -D__MSP430F5529__ \ 3 | -DCFG_TUSB_MCU=OPT_MCU_MSP430x5xx \ 4 | -DCFG_EXAMPLE_MSC_READONLY \ 5 | -DCFG_TUD_ENDPOINT0_SIZE=8 6 | 7 | #-mmcu=msp430f5529 8 | 9 | # Cross Compiler for MSP430 10 | CROSS_COMPILE = msp430-elf- 11 | 12 | # All source paths should be relative to the top level. 13 | LD_FILE = hw/mcu/ti/msp430/msp430-gcc-support-files/include/msp430f5529.ld 14 | LDINC += $(TOP)/hw/mcu/ti/msp430/msp430-gcc-support-files/include 15 | LDFLAGS += $(addprefix -L,$(LDINC)) 16 | 17 | INC += $(TOP)/hw/mcu/ti/msp430/msp430-gcc-support-files/include 18 | 19 | # For TinyUSB port source 20 | VENDOR = ti 21 | CHIP_FAMILY = msp430x5xx 22 | 23 | # export for libmsp430.so to same installation 24 | ifneq ($(OS),Windows_NT) 25 | export LD_LIBRARY_PATH=$(dir $(shell which MSP430Flasher)) 26 | endif 27 | 28 | # flash target using TI MSP430-Flasher 29 | # http://www.ti.com/tool/MSP430-FLASHER 30 | # Please add its installation dir to PATH 31 | flash: $(BUILD)/$(BOARD)-firmware.hex 32 | MSP430Flasher -w $< -z [VCC] 33 | 34 | # flash target using mspdebug. 35 | flash-mspdebug: $(BUILD)/$(BOARD)-firmware.elf 36 | $(MSPDEBUG) tilib "prog $<" --allow-fw-update 37 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/rules_preprocess.rake: -------------------------------------------------------------------------------- 1 | 2 | 3 | # invocations against this rule should only happen when enhanced dependencies are enabled; 4 | # otherwise, dependency tracking will be too shallow and preprocessed files could intermittently 5 | # fail to be updated when they actually need to be. 6 | rule(/#{PROJECT_TEST_PREPROCESS_FILES_PATH}\/.+/ => [ 7 | proc do |task_name| 8 | @ceedling[:file_finder].find_test_or_source_or_header_file(task_name) 9 | end 10 | ]) do |file| 11 | if (not @ceedling[:configurator].project_use_deep_dependencies) 12 | raise 'ERROR: Ceedling preprocessing rule invoked though neccessary auxiliary dependency support not enabled.' 13 | end 14 | @ceedling[:generator].generate_preprocessed_file(TEST_SYM, file.source) 15 | end 16 | 17 | 18 | # invocations against this rule can always happen as there are no deeper dependencies to consider 19 | rule(/#{PROJECT_TEST_PREPROCESS_INCLUDES_PATH}\/.+/ => [ 20 | proc do |task_name| 21 | @ceedling[:file_finder].find_test_or_source_or_header_file(task_name) 22 | end 23 | ]) do |file| 24 | @ceedling[:generator].generate_shallow_includes_list(TEST_SYM, file.source) 25 | end 26 | 27 | -------------------------------------------------------------------------------- /tinyusb/port/common/include/usb_descriptors.h: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Espressif Systems (Shanghai) PTE LTD 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #pragma once 16 | 17 | #include "tusb.h" 18 | 19 | #define _PID_MAP(itf, n) ((CFG_TUD_##itf) << (n)) 20 | 21 | #define USB_ESPRESSIF_VID 0x303A 22 | 23 | #define USB_STRING_DESCRIPTOR_ARRAY_SIZE 9 24 | typedef char *tusb_desc_strarray_device_t[USB_STRING_DESCRIPTOR_ARRAY_SIZE]; 25 | 26 | extern tusb_desc_device_t descriptor_tinyusb; 27 | extern tusb_desc_strarray_device_t descriptor_str_tinyusb; 28 | 29 | extern tusb_desc_device_t descriptor_kconfig; 30 | extern tusb_desc_strarray_device_t descriptor_str_kconfig; 31 | 32 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/lpcxpresso11u68/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m0plus \ 6 | -nostdlib \ 7 | -DCORE_M0PLUS \ 8 | -D__VTOR_PRESENT=0 \ 9 | -D__USE_LPCOPEN \ 10 | -DCFG_TUSB_MCU=OPT_MCU_LPC11UXX \ 11 | -DCFG_TUSB_MEM_SECTION='__attribute__((section(".data.$$RAM3")))' \ 12 | -DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))' 13 | 14 | MCU_DIR = hw/mcu/nxp/lpcopen/lpc11u6x/lpc_chip_11u6x 15 | 16 | # All source paths should be relative to the top level. 17 | LD_FILE = hw/bsp/$(BOARD)/lpc11u68.ld 18 | 19 | SRC_C += \ 20 | $(MCU_DIR)/../gcc/cr_startup_lpc11u6x.c \ 21 | $(MCU_DIR)/src/chip_11u6x.c \ 22 | $(MCU_DIR)/src/clock_11u6x.c \ 23 | $(MCU_DIR)/src/gpio_11u6x.c \ 24 | $(MCU_DIR)/src/iocon_11u6x.c \ 25 | $(MCU_DIR)/src/syscon_11u6x.c \ 26 | $(MCU_DIR)/src/sysinit_11u6x.c 27 | 28 | INC += \ 29 | $(TOP)/$(MCU_DIR)/inc 30 | 31 | # For TinyUSB port source 32 | VENDOR = nxp 33 | CHIP_FAMILY = lpc_ip3511 34 | 35 | # For freeRTOS port source 36 | FREERTOS_PORT = ARM_CM0 37 | 38 | # For flash-jlink target 39 | JLINK_DEVICE = LPC11U68 40 | JLINK_IF = swd 41 | 42 | # flash using pyocd 43 | flash: $(BUILD)/$(BOARD)-firmware.hex 44 | pyocd flash -t lpc11u68 $< 45 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/xml_tests_report/README.md: -------------------------------------------------------------------------------- 1 | xml_tests_report 2 | ==================== 3 | 4 | ## Overview 5 | 6 | The xml_tests_report plugin creates an XML file of test results in xUnit 7 | format, which is handy for Continuous Integration build servers or as input 8 | into other reporting tools. The XML file is output to the appropriate 9 | `/artifacts/` directory (e.g. `artifacts/test/` for test tasks, 10 | `artifacts/gcov/` for gcov, or `artifacts/bullseye/` for bullseye runs). 11 | 12 | ## Setup 13 | 14 | Enable the plugin in your project.yml by adding `xml_tests_report` to the list 15 | of enabled plugins. 16 | 17 | ``` YAML 18 | :plugins: 19 | :enabled: 20 | - xml_tests_report 21 | ``` 22 | 23 | ## Configuration 24 | 25 | Optionally configure the output / artifact filename in your project.yml with 26 | the `artifact_filename` configuration option. The default filename is 27 | `report.xml`. 28 | 29 | You can also configure the path that this artifact is stored. This can be done 30 | by setting `path`. The default is that it will be placed in a subfolder under 31 | the `build` directory. 32 | 33 | ``` YAML 34 | :xml_tests_report: 35 | :artifact_filename: report_xunit.xml 36 | ``` 37 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/junit_tests_report/README.md: -------------------------------------------------------------------------------- 1 | junit_tests_report 2 | ==================== 3 | 4 | ## Overview 5 | 6 | The junit_tests_report plugin creates an XML file of test results in JUnit 7 | format, which is handy for Continuous Integration build servers or as input 8 | into other reporting tools. The XML file is output to the appropriate 9 | `/artifacts/` directory (e.g. `artifacts/test/` for test tasks, 10 | `artifacts/gcov/` for gcov, or `artifacts/bullseye/` for bullseye runs). 11 | 12 | ## Setup 13 | 14 | Enable the plugin in your project.yml by adding `junit_tests_report` 15 | to the list of enabled plugins. 16 | 17 | ``` YAML 18 | :plugins: 19 | :enabled: 20 | - junit_tests_report 21 | ``` 22 | 23 | ## Configuration 24 | 25 | Optionally configure the output / artifact filename in your project.yml with 26 | the `artifact_filename` configuration option. The default filename is 27 | `report.xml`. 28 | 29 | You can also configure the path that this artifact is stored. This can be done 30 | by setting `path`. The default is that it will be placed in a subfolder under 31 | the `build` directory. 32 | 33 | ``` YAML 34 | :junit_tests_report: 35 | :artifact_filename: report_junit.xml 36 | ``` 37 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/ea4088qs/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m4 \ 6 | -nostdlib \ 7 | -DCORE_M4 \ 8 | -DCFG_TUSB_MCU=OPT_MCU_LPC40XX \ 9 | -DCFG_TUSB_MEM_SECTION='__attribute__((section(".data.$$RAM2")))' \ 10 | -D__USE_LPCOPEN 11 | 12 | # mcu driver cause following warnings 13 | CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter 14 | 15 | MCU_DIR = hw/mcu/nxp/lpcopen/lpc40xx/lpc_chip_40xx 16 | 17 | # All source paths should be relative to the top level. 18 | LD_FILE = hw/bsp/$(BOARD)/lpc4088.ld 19 | 20 | SRC_C += \ 21 | $(MCU_DIR)/../gcc/cr_startup_lpc40xx.c \ 22 | $(MCU_DIR)/src/chip_17xx_40xx.c \ 23 | $(MCU_DIR)/src/clock_17xx_40xx.c \ 24 | $(MCU_DIR)/src/gpio_17xx_40xx.c \ 25 | $(MCU_DIR)/src/iocon_17xx_40xx.c \ 26 | $(MCU_DIR)/src/sysctl_17xx_40xx.c \ 27 | $(MCU_DIR)/src/sysinit_17xx_40xx.c \ 28 | $(MCU_DIR)/src/uart_17xx_40xx.c 29 | 30 | INC += \ 31 | $(TOP)/$(MCU_DIR)/inc 32 | 33 | # For TinyUSB port source 34 | VENDOR = nxp 35 | CHIP_FAMILY = lpc17_40 36 | 37 | # For freeRTOS port source 38 | FREERTOS_PORT = ARM_CM3 39 | 40 | # For flash-jlink target 41 | JLINK_DEVICE = LPC4088 42 | JLINK_IF = swd 43 | 44 | # flash using jlink 45 | flash: flash-jlink 46 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/mbed1768/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m3 \ 6 | -nostdlib \ 7 | -DCORE_M3 \ 8 | -D__USE_LPCOPEN \ 9 | -DCFG_TUSB_MCU=OPT_MCU_LPC175X_6X \ 10 | -DRTC_EV_SUPPORT=0 11 | 12 | # startup.c and lpc_types.h cause following errors 13 | CFLAGS += -Wno-error=strict-prototypes 14 | 15 | MCU_DIR = hw/mcu/nxp/lpcopen/lpc175x_6x/lpc_chip_175x_6x 16 | 17 | # All source paths should be relative to the top level. 18 | LD_FILE = hw/bsp/$(BOARD)/lpc1768.ld 19 | 20 | SRC_C += \ 21 | $(MCU_DIR)/../gcc/cr_startup_lpc175x_6x.c \ 22 | $(MCU_DIR)/src/chip_17xx_40xx.c \ 23 | $(MCU_DIR)/src/clock_17xx_40xx.c \ 24 | $(MCU_DIR)/src/gpio_17xx_40xx.c \ 25 | $(MCU_DIR)/src/iocon_17xx_40xx.c \ 26 | $(MCU_DIR)/src/sysctl_17xx_40xx.c \ 27 | $(MCU_DIR)/src/sysinit_17xx_40xx.c \ 28 | $(MCU_DIR)/src/uart_17xx_40xx.c 29 | 30 | INC += \ 31 | $(TOP)/$(MCU_DIR)/inc 32 | 33 | # For TinyUSB port source 34 | VENDOR = nxp 35 | CHIP_FAMILY = lpc17_40 36 | 37 | # For freeRTOS port source 38 | FREERTOS_PORT = ARM_CM3 39 | 40 | # For flash-jlink target 41 | JLINK_DEVICE = LPC1768 42 | JLINK_IF = swd 43 | 44 | # flash using pyocd 45 | flash: $(BUILD)/$(BOARD)-firmware.hex 46 | pyocd flash -t lpc1768 $< 47 | 48 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/ea4357/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m4 \ 6 | -mfloat-abi=hard \ 7 | -mfpu=fpv4-sp-d16 \ 8 | -nostdlib \ 9 | -DCORE_M4 \ 10 | -DCFG_TUSB_MCU=OPT_MCU_LPC43XX \ 11 | -D__USE_LPCOPEN 12 | 13 | # mcu driver cause following warnings 14 | CFLAGS += -Wno-error=unused-parameter -Wno-error=strict-prototypes 15 | 16 | MCU_DIR = hw/mcu/nxp/lpcopen/lpc43xx/lpc_chip_43xx 17 | 18 | # All source paths should be relative to the top level. 19 | LD_FILE = hw/bsp/$(BOARD)/lpc4357.ld 20 | 21 | SRC_C += \ 22 | $(MCU_DIR)/../gcc/cr_startup_lpc43xx.c \ 23 | $(MCU_DIR)/src/chip_18xx_43xx.c \ 24 | $(MCU_DIR)/src/clock_18xx_43xx.c \ 25 | $(MCU_DIR)/src/gpio_18xx_43xx.c \ 26 | $(MCU_DIR)/src/sysinit_18xx_43xx.c \ 27 | $(MCU_DIR)/src/i2c_18xx_43xx.c \ 28 | $(MCU_DIR)/src/i2cm_18xx_43xx.c \ 29 | $(MCU_DIR)/src/uart_18xx_43xx.c 30 | 31 | INC += \ 32 | $(TOP)/$(MCU_DIR)/inc \ 33 | $(TOP)/$(MCU_DIR)/inc/config_43xx 34 | 35 | # For TinyUSB port source 36 | VENDOR = nxp 37 | CHIP_FAMILY = transdimension 38 | 39 | # For freeRTOS port source 40 | FREERTOS_PORT = ARM_CM4F 41 | 42 | # For flash-jlink target 43 | JLINK_DEVICE = LPC4357 44 | JLINK_IF = jtag 45 | 46 | # flash using jlink 47 | flash: flash-jlink 48 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/lpcxpresso1347/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m3 \ 6 | -nostdlib \ 7 | -DCORE_M3 \ 8 | -D__USE_LPCOPEN \ 9 | -DCFG_EXAMPLE_MSC_READONLY \ 10 | -DCFG_TUSB_MCU=OPT_MCU_LPC13XX \ 11 | -DCFG_TUSB_MEM_SECTION='__attribute__((section(".data.$$RAM2")))' \ 12 | -DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))' 13 | 14 | # startup.c and lpc_types.h cause following errors 15 | CFLAGS += -Wno-error=strict-prototypes 16 | 17 | MCU_DIR = hw/mcu/nxp/lpcopen/lpc13xx/lpc_chip_13xx 18 | 19 | # All source paths should be relative to the top level. 20 | LD_FILE = hw/bsp/$(BOARD)/lpc1347.ld 21 | 22 | SRC_C += \ 23 | $(MCU_DIR)/../gcc/cr_startup_lpc13xx.c \ 24 | $(MCU_DIR)/src/chip_13xx.c \ 25 | $(MCU_DIR)/src/clock_13xx.c \ 26 | $(MCU_DIR)/src/gpio_13xx_1.c \ 27 | $(MCU_DIR)/src/iocon_13xx.c \ 28 | $(MCU_DIR)/src/sysctl_13xx.c \ 29 | $(MCU_DIR)/src/sysinit_13xx.c 30 | 31 | INC += \ 32 | $(TOP)/$(MCU_DIR)/inc 33 | 34 | # For TinyUSB port source 35 | VENDOR = nxp 36 | CHIP_FAMILY = lpc_ip3511 37 | 38 | # For freeRTOS port source 39 | FREERTOS_PORT = ARM_CM3 40 | 41 | # For flash-jlink target 42 | JLINK_DEVICE = LPC1347 43 | JLINK_IF = swd 44 | 45 | # flash using jlink 46 | flash: flash-jlink 47 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/lpcxpresso1549/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m3 \ 6 | -nostdlib \ 7 | -DCORE_M3 \ 8 | -D__USE_LPCOPEN \ 9 | -DCFG_EXAMPLE_MSC_READONLY \ 10 | -DCFG_TUSB_MCU=OPT_MCU_LPC15XX \ 11 | -DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))' 12 | 13 | # mcu driver cause following warnings 14 | CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter -Wno-error=unused-variable 15 | 16 | MCU_DIR = hw/mcu/nxp/lpcopen/lpc15xx/lpc_chip_15xx 17 | 18 | # All source paths should be relative to the top level. 19 | LD_FILE = hw/bsp/$(BOARD)/lpc1549.ld 20 | 21 | SRC_C += \ 22 | $(MCU_DIR)/../gcc/cr_startup_lpc15xx.c \ 23 | $(MCU_DIR)/src/chip_15xx.c \ 24 | $(MCU_DIR)/src/clock_15xx.c \ 25 | $(MCU_DIR)/src/gpio_15xx.c \ 26 | $(MCU_DIR)/src/iocon_15xx.c \ 27 | $(MCU_DIR)/src/swm_15xx.c \ 28 | $(MCU_DIR)/src/sysctl_15xx.c \ 29 | $(MCU_DIR)/src/sysinit_15xx.c 30 | 31 | INC += \ 32 | $(TOP)/$(MCU_DIR)/inc 33 | 34 | # For TinyUSB port source 35 | VENDOR = nxp 36 | CHIP_FAMILY = lpc_ip3511 37 | 38 | # For freeRTOS port source 39 | FREERTOS_PORT = ARM_CM3 40 | 41 | # For flash-jlink target 42 | JLINK_DEVICE = LPC1549 43 | JLINK_IF = swd 44 | 45 | # flash using jlink 46 | flash: flash-jlink 47 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/preprocessinator_extractor.rb: -------------------------------------------------------------------------------- 1 | class PreprocessinatorExtractor 2 | def extract_base_file_from_preprocessed_expansion(filepath) 3 | # preprocessing by way of toolchain preprocessor expands macros, eliminates 4 | # comments, strips out #ifdef code, etc. however, it also expands in place 5 | # each #include'd file. so, we must extract only the lines of the file 6 | # that belong to the file originally preprocessed 7 | 8 | # iterate through all lines and alternate between extract and ignore modes 9 | # all lines between a '#'line containing file name of our filepath and the 10 | # next '#'line should be extracted 11 | 12 | base_name = File.basename(filepath) 13 | not_pragma = /^#(?!pragma\b)/ # preprocessor directive that's not a #pragma 14 | pattern = /^#.*(\s|\/|\\|\")#{Regexp.escape(base_name)}/ 15 | found_file = false # have we found the file we care about? 16 | 17 | lines = [] 18 | File.readlines(filepath).each do |line| 19 | if found_file and not line =~ not_pragma 20 | lines << line 21 | else 22 | found_file = false 23 | end 24 | 25 | found_file = true if line =~ pattern 26 | end 27 | 28 | return lines 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/pyboardv11/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m4 \ 6 | -mfloat-abi=hard \ 7 | -mfpu=fpv4-sp-d16 \ 8 | -nostdlib -nostartfiles \ 9 | -DSTM32F405xx \ 10 | -DCFG_TUSB_MCU=OPT_MCU_STM32F4 11 | 12 | ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F4xx_HAL_Driver 13 | ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F4xx 14 | 15 | # All source paths should be relative to the top level. 16 | LD_FILE = hw/bsp/$(BOARD)/STM32F405RGTx_FLASH.ld 17 | 18 | SRC_C += \ 19 | $(ST_CMSIS)/Source/Templates/system_stm32f4xx.c \ 20 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal.c \ 21 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_cortex.c \ 22 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_rcc.c \ 23 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_gpio.c 24 | 25 | SRC_S += \ 26 | $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f405xx.s 27 | 28 | INC += \ 29 | $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ 30 | $(TOP)/$(ST_CMSIS)/Include \ 31 | $(TOP)/$(ST_HAL_DRIVER)/Inc \ 32 | $(TOP)/hw/bsp/$(BOARD) 33 | 34 | # For TinyUSB port source 35 | VENDOR = st 36 | CHIP_FAMILY = synopsys 37 | 38 | # For freeRTOS port source 39 | FREERTOS_PORT = ARM_CM4F 40 | 41 | # For flash-jlink target 42 | JLINK_DEVICE = stm32f405rg 43 | JLINK_IF = swd 44 | 45 | # flash target using on-board stlink 46 | flash: flash-stlink 47 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/fake_function_framework/src/fff_unity_helper.h: -------------------------------------------------------------------------------- 1 | #ifndef fff_unity_helper_H 2 | #define fff_unity_helper_H 3 | 4 | /* 5 | FFF helper macros for Unity. 6 | */ 7 | 8 | /* 9 | Fail if the function was not called the expected number of times. 10 | */ 11 | #define TEST_ASSERT_CALLED_TIMES(times_, function_) \ 12 | TEST_ASSERT_EQUAL_MESSAGE(times_, \ 13 | function_ ## _fake.call_count, \ 14 | "Function " #function_ " called the incorrect number of times.") 15 | /* 16 | Fail if the function was not called exactly once. 17 | */ 18 | #define TEST_ASSERT_CALLED(function_) TEST_ASSERT_CALLED_TIMES(1, function_) 19 | 20 | /* 21 | Fail if the function was called 1 or more times. 22 | */ 23 | #define TEST_ASSERT_NOT_CALLED(function_) TEST_ASSERT_CALLED_TIMES(0, function_) 24 | 25 | /* 26 | Fail if the function was not called in this particular order. 27 | */ 28 | #define TEST_ASSERT_CALLED_IN_ORDER(order_, function_) \ 29 | TEST_ASSERT_EQUAL_PTR_MESSAGE((void *) function_, \ 30 | fff.call_history[order_], \ 31 | "Function " #function_ " not called in order " #order_ ) 32 | 33 | #endif -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/raw_output_report/lib/raw_output_report.rb: -------------------------------------------------------------------------------- 1 | require 'ceedling/plugin' 2 | require 'ceedling/constants' 3 | 4 | class RawOutputReport < Plugin 5 | def setup 6 | @log_paths = {} 7 | end 8 | 9 | def post_test_fixture_execute(arg_hash) 10 | output = strip_output(arg_hash[:shell_result][:output]) 11 | write_raw_output_log(arg_hash, output) 12 | end 13 | 14 | private 15 | 16 | def strip_output(raw_output) 17 | output = "" 18 | raw_output.each_line do |line| 19 | next if line =~ /^\n$/ 20 | next if line =~ /^.*:\d+:.*:(IGNORE|PASS|FAIL)/ 21 | return output if line =~/^-----------------------\n$/ 22 | output << line 23 | end 24 | end 25 | def write_raw_output_log(arg_hash, output) 26 | logging = generate_log_path(arg_hash) 27 | @ceedling[:file_wrapper].write(logging[:path], output , logging[:flags]) unless logging.nil? 28 | end 29 | 30 | def generate_log_path(arg_hash) 31 | f_name = File.basename(arg_hash[:result_file], '.pass') 32 | base_path = File.join(PROJECT_BUILD_ARTIFACTS_ROOT, arg_hash[:context].to_s) 33 | file_path = File.join(base_path, f_name + '.log') 34 | 35 | if @ceedling[:file_wrapper].exist?(base_path) 36 | return { path: file_path, flags: 'w' } 37 | end 38 | 39 | nil 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/version.rb: -------------------------------------------------------------------------------- 1 | 2 | # @private 3 | module Ceedling 4 | module Version 5 | # Check for local or global version of vendor directory in order to look up versions 6 | { 7 | "CEXCEPTION" => File.join("vendor","c_exception","lib","CException.h"), 8 | "CMOCK" => File.join("vendor","cmock","src","cmock.h"), 9 | "UNITY" => File.join("vendor","unity","src","unity.h"), 10 | }.each_pair do |name, path| 11 | filename = if (File.exist?(File.join("..","..",path))) 12 | File.join("..","..",path) 13 | elsif (File.exist?(File.join(File.dirname(__FILE__),"..","..",path))) 14 | File.join(File.dirname(__FILE__),"..","..",path) 15 | else 16 | eval "#{name} = 'unknown'" 17 | continue 18 | end 19 | 20 | # Actually look up the versions 21 | a = [0,0,0] 22 | File.readlines(filename) do |line| 23 | ["VERSION_MAJOR", "VERSION_MINOR", "VERSION_BUILD"].each_with_index do |field, i| 24 | m = line.match(/#{name}_#{field}\s+(\d+)/) 25 | a[i] = m[1] unless (m.nil?) 26 | end 27 | end 28 | 29 | # Make a constant from each, so that we can use it elsewhere 30 | eval "#{name} = '#{a.join(".")}'" 31 | end 32 | 33 | GEM = "0.29.0" 34 | CEEDLING = GEM 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/lpcxpresso11u37/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m0 \ 6 | -nostdlib \ 7 | -DCORE_M0 \ 8 | -D__USE_LPCOPEN \ 9 | -DCFG_EXAMPLE_MSC_READONLY \ 10 | -DCFG_TUSB_MCU=OPT_MCU_LPC11UXX \ 11 | -DCFG_TUSB_MEM_SECTION='__attribute__((section(".data.$$RAM2")))' \ 12 | -DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))' 13 | 14 | # mcu driver cause following warnings 15 | CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter 16 | 17 | MCU_DIR = hw/mcu/nxp/lpcopen/lpc11uxx/lpc_chip_11uxx 18 | 19 | # All source paths should be relative to the top level. 20 | LD_FILE = hw/bsp/$(BOARD)/lpc11u37.ld 21 | 22 | SRC_C += \ 23 | $(MCU_DIR)/../gcc/cr_startup_lpc11xx.c \ 24 | $(MCU_DIR)/src/chip_11xx.c \ 25 | $(MCU_DIR)/src/clock_11xx.c \ 26 | $(MCU_DIR)/src/gpio_11xx_1.c \ 27 | $(MCU_DIR)/src/iocon_11xx.c \ 28 | $(MCU_DIR)/src/sysctl_11xx.c \ 29 | $(MCU_DIR)/src/sysinit_11xx.c 30 | 31 | INC += \ 32 | $(TOP)/$(MCU_DIR)/inc 33 | 34 | # For TinyUSB port source 35 | VENDOR = nxp 36 | CHIP_FAMILY = lpc_ip3511 37 | 38 | # For freeRTOS port source 39 | FREERTOS_PORT = ARM_CM0 40 | 41 | # For flash-jlink target 42 | JLINK_DEVICE = LPC11U37/401 43 | JLINK_IF = swd 44 | 45 | # flash using pyocd 46 | flash: $(BUILD)/$(BOARD)-firmware.hex 47 | pyocd flash -t lpc11u37 $< 48 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/vendor/unity/auto/colour_reporter.rb: -------------------------------------------------------------------------------- 1 | # ========================================== 2 | # Unity Project - A Test Framework for C 3 | # Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams 4 | # [Released under MIT License. Please refer to license.txt for details] 5 | # ========================================== 6 | 7 | require_relative 'colour_prompt' 8 | 9 | $colour_output = true 10 | 11 | def report(message) 12 | if !$colour_output 13 | $stdout.puts(message) 14 | else 15 | message = message.join('\n') if message.class == Array 16 | message.each_line do |line| 17 | line.chomp! 18 | colour = case line 19 | when /(?:total\s+)?tests:?\s+(\d+)\s+(?:total\s+)?failures:?\s+\d+\s+Ignored:?/i 20 | Regexp.last_match(1).to_i.zero? ? :green : :red 21 | when /PASS/ 22 | :green 23 | when /^OK$/ 24 | :green 25 | when /(?:FAIL|ERROR)/ 26 | :red 27 | when /IGNORE/ 28 | :yellow 29 | when /^(?:Creating|Compiling|Linking)/ 30 | :white 31 | else 32 | :silver 33 | end 34 | colour_puts(colour, line) 35 | end 36 | end 37 | $stdout.flush 38 | $stderr.flush 39 | end 40 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/lpcxpresso51u68/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m0plus \ 6 | -DCPU_LPC51U68JBD64 \ 7 | -DCFG_TUSB_MCU=OPT_MCU_LPC51UXX \ 8 | -DCFG_TUSB_MEM_SECTION='__attribute__((section(".data")))' \ 9 | -DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))' 10 | 11 | # mcu driver cause following warnings 12 | CFLAGS += -Wno-error=unused-parameter 13 | 14 | MCU_DIR = hw/mcu/nxp/sdk/devices/LPC51U68 15 | 16 | # All source paths should be relative to the top level. 17 | LD_FILE = $(MCU_DIR)/gcc/LPC51U68_flash.ld 18 | 19 | SRC_C += \ 20 | $(MCU_DIR)/system_LPC51U68.c \ 21 | $(MCU_DIR)/drivers/fsl_clock.c \ 22 | $(MCU_DIR)/drivers/fsl_gpio.c \ 23 | $(MCU_DIR)/drivers/fsl_power.c \ 24 | $(MCU_DIR)/drivers/fsl_reset.c 25 | 26 | INC += \ 27 | $(TOP)/$(MCU_DIR)/../../CMSIS/Include \ 28 | $(TOP)/$(MCU_DIR) \ 29 | $(TOP)/$(MCU_DIR)/drivers 30 | 31 | SRC_S += $(MCU_DIR)/gcc/startup_LPC51U68.S 32 | 33 | LIBS += $(TOP)/$(MCU_DIR)/gcc/libpower.a 34 | 35 | # For TinyUSB port source 36 | VENDOR = nxp 37 | CHIP_FAMILY = lpc_ip3511 38 | 39 | # For freeRTOS port source 40 | FREERTOS_PORT = ARM_CM0 41 | 42 | # For flash-jlink target 43 | JLINK_DEVICE = LPC51U68 44 | JLINK_IF = swd 45 | 46 | # flash using pyocd (51u68 is not supported yet) 47 | flash: $(BUILD)/$(BOARD)-firmware.hex 48 | pyocd flash -t LPC51U68 $< 49 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/stm32f407disco/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m4 \ 6 | -mfloat-abi=hard \ 7 | -mfpu=fpv4-sp-d16 \ 8 | -nostdlib -nostartfiles \ 9 | -DSTM32F407xx \ 10 | -DCFG_TUSB_MCU=OPT_MCU_STM32F4 11 | 12 | ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F4xx_HAL_Driver 13 | ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F4xx 14 | 15 | # All source paths should be relative to the top level. 16 | LD_FILE = hw/bsp/$(BOARD)/STM32F407VGTx_FLASH.ld 17 | 18 | SRC_C += \ 19 | $(ST_CMSIS)/Source/Templates/system_stm32f4xx.c \ 20 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal.c \ 21 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_cortex.c \ 22 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_rcc.c \ 23 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_uart.c \ 24 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_gpio.c 25 | 26 | SRC_S += \ 27 | $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f407xx.s 28 | 29 | INC += \ 30 | $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ 31 | $(TOP)/$(ST_CMSIS)/Include \ 32 | $(TOP)/$(ST_HAL_DRIVER)/Inc \ 33 | $(TOP)/hw/bsp/$(BOARD) 34 | 35 | # For TinyUSB port source 36 | VENDOR = st 37 | CHIP_FAMILY = synopsys 38 | 39 | # For freeRTOS port source 40 | FREERTOS_PORT = ARM_CM4F 41 | 42 | # For flash-jlink target 43 | JLINK_DEVICE = stm32f407vg 44 | JLINK_IF = swd 45 | 46 | # flash target using on-board stlink 47 | flash: flash-stlink 48 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/stm32f411disco/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m4 \ 6 | -mfloat-abi=hard \ 7 | -mfpu=fpv4-sp-d16 \ 8 | -nostdlib -nostartfiles \ 9 | -DSTM32F411xE \ 10 | -DCFG_TUSB_MCU=OPT_MCU_STM32F4 11 | 12 | ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F4xx_HAL_Driver 13 | ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F4xx 14 | 15 | # All source paths should be relative to the top level. 16 | LD_FILE = hw/bsp/$(BOARD)/STM32F411VETx_FLASH.ld 17 | 18 | SRC_C += \ 19 | $(ST_CMSIS)/Source/Templates/system_stm32f4xx.c \ 20 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal.c \ 21 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_cortex.c \ 22 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_rcc.c \ 23 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_uart.c \ 24 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_gpio.c 25 | 26 | SRC_S += \ 27 | $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f411xe.s 28 | 29 | INC += \ 30 | $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ 31 | $(TOP)/$(ST_CMSIS)/Include \ 32 | $(TOP)/$(ST_HAL_DRIVER)/Inc \ 33 | $(TOP)/hw/bsp/$(BOARD) 34 | 35 | # For TinyUSB port source 36 | VENDOR = st 37 | CHIP_FAMILY = synopsys 38 | 39 | # For freeRTOS port source 40 | FREERTOS_PORT = ARM_CM4F 41 | 42 | # For flash-jlink target 43 | JLINK_DEVICE = stm32f411ve 44 | JLINK_IF = swd 45 | 46 | # flash target using on-board stlink 47 | flash: flash-stlink 48 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/nutiny_nuc125s/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs-linux \ 5 | -mcpu=cortex-m0 \ 6 | -D__ARM_FEATURE_DSP=0 \ 7 | -DUSE_ASSERT=0 \ 8 | -DCFG_EXAMPLE_MSC_READONLY \ 9 | -DCFG_TUSB_MCU=OPT_MCU_NUC121 10 | 11 | # All source paths should be relative to the top level. 12 | LD_FILE = hw/bsp/$(BOARD)/nuc125_flash.ld 13 | 14 | SRC_C += \ 15 | hw/mcu/nuvoton/nuc121_125/Device/Nuvoton/NUC121/Source/system_NUC121.c \ 16 | hw/mcu/nuvoton/nuc121_125/StdDriver/src/clk.c \ 17 | hw/mcu/nuvoton/nuc121_125/StdDriver/src/gpio.c 18 | 19 | SRC_S += \ 20 | hw/mcu/nuvoton/nuc121_125/Device/Nuvoton/NUC121/Source/GCC/startup_NUC121.S 21 | 22 | INC += \ 23 | $(TOP)/hw/mcu/nuvoton/nuc121_125/Device/Nuvoton/NUC121/Include \ 24 | $(TOP)/hw/mcu/nuvoton/nuc121_125/StdDriver/inc \ 25 | $(TOP)/hw/mcu/nuvoton/nuc121_125/CMSIS/Include 26 | 27 | # For TinyUSB port source 28 | VENDOR = nuvoton 29 | CHIP_FAMILY = nuc121 30 | 31 | # For freeRTOS port source 32 | FREERTOS_PORT = ARM_CM0 33 | 34 | # For flash-jlink target 35 | JLINK_DEVICE = NUC125SC2AE 36 | JLINK_IF = swd 37 | 38 | # Flash using Nuvoton's openocd fork at https://github.com/OpenNuvoton/OpenOCD-Nuvoton 39 | # Please compile and install it from github source 40 | flash: $(BUILD)/$(BOARD)-firmware.elf 41 | openocd -f interface/nulink.cfg -f target/numicroM0.cfg -c "program $< reset exit" 42 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/vendor/unity/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ################################################################################### 2 | # # 3 | # NAME: CMakeLists.txt # 4 | # # 5 | # AUTHOR: Mike Karlesky, Mark VanderVoord, Greg Williams. # 6 | # WRITTEN BY: Michael Brockus. # 7 | # # 8 | # License: MIT # 9 | # # 10 | ################################################################################### 11 | cmake_minimum_required(VERSION 3.0 FATAL_ERROR) 12 | 13 | 14 | add_library(unity STATIC "unity.c") 15 | 16 | install(TARGETS unity EXPORT unityConfig 17 | ARCHIVE DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_INSTALL_LIBDIR}" 18 | LIBRARY DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_INSTALL_LIBDIR}" 19 | RUNTIME DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_INSTALL_BINDIR}" 20 | INCLUDES DESTINATION "${CMAKE_INSTALL_LIBDIR}") 21 | 22 | 23 | -------------------------------------------------------------------------------- /components/CMSIS-DAP/algo/flash_blob.h: -------------------------------------------------------------------------------- 1 | #ifndef FLASH_BLOB_H 2 | #define FLASH_BLOB_H 3 | 4 | #include 5 | 6 | 7 | typedef struct { 8 | uint32_t breakpoint; 9 | uint32_t static_base; 10 | uint32_t stack_pointer; 11 | } program_syscall_t; 12 | 13 | typedef struct { 14 | const uint32_t init; 15 | const uint32_t uninit; 16 | const uint32_t erase_chip; 17 | const uint32_t erase_sector; 18 | const uint32_t program_page; 19 | const program_syscall_t sys_call_s; 20 | const uint32_t program_buffer; 21 | const uint32_t algo_start; 22 | const uint32_t algo_size; 23 | const uint32_t *algo_blob; 24 | const uint32_t program_buffer_size; 25 | } program_target_t; 26 | 27 | typedef struct { 28 | const uint32_t start; 29 | const uint32_t size; 30 | } sector_info_t; 31 | 32 | typedef struct { 33 | 34 | char * name; 35 | program_target_t algo; 36 | } algo_info_t; 37 | 38 | enum 39 | { 40 | F0 = 0, 41 | F1, 42 | F3, 43 | F4, 44 | F7, 45 | H7 46 | }; 47 | 48 | extern const program_target_t flash_algo_F0; 49 | extern const program_target_t flash_algo_F1; 50 | extern const program_target_t flash_algo_F3; 51 | extern const program_target_t flash_algo_F4; 52 | extern const program_target_t flash_algo_F7; 53 | extern const program_target_t flash_algo_H7; 54 | extern algo_info_t STM32_ALGO[6]; 55 | void algo_init(void); 56 | #endif 57 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/stm32f401blackpill/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m4 \ 6 | -mfloat-abi=hard \ 7 | -mfpu=fpv4-sp-d16 \ 8 | -nostdlib -nostartfiles \ 9 | -DSTM32F401xC \ 10 | -DCFG_TUSB_MCU=OPT_MCU_STM32F4 11 | 12 | ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F4xx_HAL_Driver 13 | ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F4xx 14 | 15 | # All source paths should be relative to the top level. 16 | LD_FILE = hw/bsp/$(BOARD)/STM32F401VCTx_FLASH.ld 17 | 18 | SRC_C += \ 19 | $(ST_CMSIS)/Source/Templates/system_stm32f4xx.c \ 20 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal.c \ 21 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_cortex.c \ 22 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_rcc.c \ 23 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_gpio.c 24 | 25 | SRC_S += \ 26 | $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f401xc.s 27 | 28 | INC += \ 29 | $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ 30 | $(TOP)/$(ST_CMSIS)/Include \ 31 | $(TOP)/$(ST_HAL_DRIVER)/Inc \ 32 | $(TOP)/hw/bsp/$(BOARD) 33 | 34 | # For TinyUSB port source 35 | VENDOR = st 36 | CHIP_FAMILY = synopsys 37 | 38 | # For freeRTOS port source 39 | FREERTOS_PORT = ARM_CM4F 40 | 41 | # For flash-jlink target 42 | JLINK_DEVICE = stm32f401cc 43 | JLINK_IF = swd 44 | 45 | # flash target ROM bootloader 46 | flash: $(BUILD)/$(BOARD)-firmware.bin 47 | dfu-util -R -a 0 --dfuse-address 0x08000000 -D $< 48 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/stm32f411blackpill/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m4 \ 6 | -mfloat-abi=hard \ 7 | -mfpu=fpv4-sp-d16 \ 8 | -nostdlib -nostartfiles \ 9 | -DSTM32F411xE \ 10 | -DCFG_TUSB_MCU=OPT_MCU_STM32F4 11 | 12 | ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F4xx_HAL_Driver 13 | ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F4xx 14 | 15 | # All source paths should be relative to the top level. 16 | LD_FILE = hw/bsp/$(BOARD)/STM32F411CEUx_FLASH.ld 17 | 18 | SRC_C += \ 19 | $(ST_CMSIS)/Source/Templates/system_stm32f4xx.c \ 20 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal.c \ 21 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_cortex.c \ 22 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_rcc.c \ 23 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_gpio.c 24 | 25 | SRC_S += \ 26 | $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f411xe.s 27 | 28 | INC += \ 29 | $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ 30 | $(TOP)/$(ST_CMSIS)/Include \ 31 | $(TOP)/$(ST_HAL_DRIVER)/Inc \ 32 | $(TOP)/hw/bsp/$(BOARD) 33 | 34 | # For TinyUSB port source 35 | VENDOR = st 36 | CHIP_FAMILY = synopsys 37 | 38 | # For freeRTOS port source 39 | FREERTOS_PORT = ARM_CM4F 40 | 41 | # For flash-jlink target 42 | JLINK_DEVICE = stm32f411ce 43 | JLINK_IF = swd 44 | 45 | # flash target ROM bootloader 46 | flash: $(BUILD)/$(BOARD)-firmware.bin 47 | dfu-util -R -a 0 --dfuse-address 0x08000000 -D $< 48 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/net_lwip_webserver/src/usb_descriptors.h: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2019 Ha Thach (tinyusb.org) 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | #ifndef USB_DESCRIPTORS_H_ 26 | #define USB_DESCRIPTORS_H_ 27 | 28 | #endif /* USB_DESCRIPTORS_H_ */ 29 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/lpcxpresso54114/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m4 \ 6 | -mfloat-abi=hard \ 7 | -mfpu=fpv4-sp-d16 \ 8 | -DCPU_LPC54114J256BD64_cm4 \ 9 | -DCFG_TUSB_MCU=OPT_MCU_LPC54XXX \ 10 | -DCFG_TUSB_MEM_SECTION='__attribute__((section(".data")))' \ 11 | -DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))' 12 | 13 | # mcu driver cause following warnings 14 | CFLAGS += -Wno-error=unused-parameter 15 | 16 | MCU_DIR = hw/mcu/nxp/sdk/devices/LPC54114 17 | 18 | # All source paths should be relative to the top level. 19 | LD_FILE = $(MCU_DIR)/gcc/LPC54114J256_cm4_flash.ld 20 | 21 | SRC_C += \ 22 | $(MCU_DIR)/system_LPC54114_cm4.c \ 23 | $(MCU_DIR)/drivers/fsl_clock.c \ 24 | $(MCU_DIR)/drivers/fsl_gpio.c \ 25 | $(MCU_DIR)/drivers/fsl_power.c \ 26 | $(MCU_DIR)/drivers/fsl_reset.c 27 | 28 | INC += \ 29 | $(TOP)/$(MCU_DIR)/../../CMSIS/Include \ 30 | $(TOP)/$(MCU_DIR) \ 31 | $(TOP)/$(MCU_DIR)/drivers 32 | 33 | SRC_S += $(MCU_DIR)/gcc/startup_LPC54114_cm4.S 34 | 35 | LIBS += $(TOP)/$(MCU_DIR)/gcc/libpower_cm4_hardabi.a 36 | 37 | # For TinyUSB port source 38 | VENDOR = nxp 39 | CHIP_FAMILY = lpc_ip3511 40 | 41 | # For freeRTOS port source 42 | FREERTOS_PORT = ARM_CM4F 43 | 44 | # For flash-jlink target 45 | JLINK_DEVICE = LPC54114J256_M4 46 | JLINK_IF = swd 47 | 48 | # flash using pyocd 49 | flash: $(BUILD)/$(BOARD)-firmware.hex 50 | pyocd flash -t LPC54114 $< 51 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/stm32h743nucleo/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m7 \ 6 | -mfloat-abi=hard \ 7 | -mfpu=fpv5-d16 \ 8 | -nostdlib -nostartfiles \ 9 | -DSTM32H743xx \ 10 | -DCFG_TUSB_MCU=OPT_MCU_STM32H7 11 | 12 | # mcu driver cause following warnings 13 | CFLAGS += -Wno-error=maybe-uninitialized 14 | 15 | ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32H7xx_HAL_Driver 16 | ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32H7xx 17 | 18 | # All source paths should be relative to the top level. 19 | LD_FILE = hw/bsp/$(BOARD)/STM32H743ZITx_FLASH.ld 20 | 21 | SRC_C += \ 22 | $(ST_CMSIS)/Source/Templates/system_stm32h7xx.c \ 23 | $(ST_HAL_DRIVER)/Src/stm32h7xx_hal.c \ 24 | $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_cortex.c \ 25 | $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_rcc.c \ 26 | $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_rcc_ex.c \ 27 | $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_gpio.c \ 28 | $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_pwr_ex.c 29 | 30 | SRC_S += \ 31 | $(ST_CMSIS)/Source/Templates/gcc/startup_stm32h743xx.s 32 | 33 | INC += \ 34 | $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ 35 | $(TOP)/$(ST_CMSIS)/Include \ 36 | $(TOP)/$(ST_HAL_DRIVER)/Inc \ 37 | $(TOP)/hw/bsp/$(BOARD) 38 | 39 | # For TinyUSB port source 40 | VENDOR = st 41 | CHIP_FAMILY = synopsys 42 | 43 | # For freeRTOS port source 44 | FREERTOS_PORT = ARM_CM7/r0p1 45 | 46 | # flash target using on-board stlink 47 | flash: flash-stlink 48 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/stdout_ide_tests_report/lib/stdout_ide_tests_report.rb: -------------------------------------------------------------------------------- 1 | require 'ceedling/plugin' 2 | require 'ceedling/defaults' 3 | 4 | class StdoutIdeTestsReport < Plugin 5 | 6 | def setup 7 | @result_list = [] 8 | end 9 | 10 | def post_test_fixture_execute(arg_hash) 11 | return if not (arg_hash[:context] == TEST_SYM) 12 | 13 | @result_list << arg_hash[:result_file] 14 | end 15 | 16 | def post_build 17 | return if (not @ceedling[:task_invoker].test_invoked?) 18 | 19 | results = @ceedling[:plugin_reportinator].assemble_test_results(@result_list) 20 | hash = { 21 | :header => '', 22 | :results => results 23 | } 24 | 25 | @ceedling[:plugin_reportinator].run_test_results_report(hash) do 26 | message = '' 27 | message = 'Unit test failures.' if (hash[:results][:counts][:failed] > 0) 28 | message 29 | end 30 | end 31 | 32 | def summary 33 | result_list = @ceedling[:file_path_utils].form_pass_results_filelist( PROJECT_TEST_RESULTS_PATH, COLLECTION_ALL_TESTS ) 34 | 35 | # get test results for only those tests in our configuration and of those only tests with results on disk 36 | hash = { 37 | :header => '', 38 | :results => @ceedling[:plugin_reportinator].assemble_test_results(result_list, {:boom => false}) 39 | } 40 | 41 | @ceedling[:plugin_reportinator].run_test_results_report(hash) 42 | end 43 | 44 | end 45 | -------------------------------------------------------------------------------- /main/cdc_task.h: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2019 Ha Thach (tinyusb.org) 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | * 24 | */ 25 | #ifndef _CDC_TASK_H 26 | #define _CDC_TASK_H 27 | 28 | #include "stdint.h" 29 | void cdc_task(void *params); 30 | void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts); 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/stm32f207nucleo/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m3 \ 6 | -mfloat-abi=soft \ 7 | -nostdlib -nostartfiles \ 8 | -DSTM32F207xx \ 9 | -DCFG_TUSB_MCU=OPT_MCU_STM32F2 10 | 11 | # mcu driver cause following warnings 12 | CFLAGS += -Wno-error=sign-compare 13 | 14 | ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F2xx_HAL_Driver 15 | ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F2xx 16 | 17 | # All source paths should be relative to the top level. 18 | LD_FILE = hw/bsp/$(BOARD)/STM32F207ZGTx_FLASH.ld 19 | 20 | SRC_C += \ 21 | $(ST_CMSIS)/Source/Templates/system_stm32f2xx.c \ 22 | $(ST_HAL_DRIVER)/Src/stm32f2xx_hal.c \ 23 | $(ST_HAL_DRIVER)/Src/stm32f2xx_hal_cortex.c \ 24 | $(ST_HAL_DRIVER)/Src/stm32f2xx_hal_rcc.c \ 25 | $(ST_HAL_DRIVER)/Src/stm32f2xx_hal_rcc_ex.c \ 26 | $(ST_HAL_DRIVER)/Src/stm32f2xx_hal_gpio.c 27 | 28 | SRC_S += \ 29 | $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f207xx.s 30 | 31 | INC += \ 32 | $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ 33 | $(TOP)/$(ST_CMSIS)/Include \ 34 | $(TOP)/$(ST_HAL_DRIVER)/Inc \ 35 | $(TOP)/hw/bsp/$(BOARD) 36 | 37 | # For TinyUSB port source 38 | VENDOR = st 39 | CHIP_FAMILY = synopsys 40 | 41 | # For freeRTOS port source 42 | FREERTOS_PORT = ARM_CM3 43 | 44 | # For flash-jlink target 45 | JLINK_DEVICE = stm32f207zg 46 | JLINK_IF = swd 47 | 48 | # flash target using on-board stlink 49 | flash: flash-stlink 50 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/streaminator.rb: -------------------------------------------------------------------------------- 1 | require 'ceedling/constants' 2 | 3 | class Streaminator 4 | 5 | constructor :streaminator_helper, :verbosinator, :loginator, :stream_wrapper 6 | 7 | # for those objects for whom the configurator has already been instantiated, 8 | # Streaminator is a convenience object for handling verbosity and writing to the std streams 9 | 10 | def stdout_puts(string, verbosity=Verbosity::NORMAL) 11 | if (@verbosinator.should_output?(verbosity)) 12 | @stream_wrapper.stdout_puts(string) 13 | @stream_wrapper.stdout_flush 14 | end 15 | 16 | # write to log as though Verbosity::OBNOXIOUS 17 | @loginator.log( string, @streaminator_helper.extract_name($stdout) ) 18 | end 19 | 20 | def stderr_puts(string, verbosity=Verbosity::NORMAL) 21 | if (@verbosinator.should_output?(verbosity)) 22 | @stream_wrapper.stderr_puts(string) 23 | @stream_wrapper.stderr_flush 24 | end 25 | 26 | # write to log as though Verbosity::OBNOXIOUS 27 | @loginator.log( string, @streaminator_helper.extract_name($stderr) ) 28 | end 29 | 30 | def stream_puts(stream, string, verbosity=Verbosity::NORMAL) 31 | if (@verbosinator.should_output?(verbosity)) 32 | stream.puts(string) 33 | stream.flush 34 | end 35 | 36 | # write to log as though Verbosity::OBNOXIOUS 37 | @loginator.log( string, @streaminator_helper.extract_name(stream) ) 38 | end 39 | 40 | end 41 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/spresense/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -DCONFIG_HAVE_DOUBLE \ 3 | -Dmain=spresense_main \ 4 | -pipe \ 5 | -std=gnu11 \ 6 | -mcpu=cortex-m4 \ 7 | -mthumb \ 8 | -mfpu=fpv4-sp-d16 \ 9 | -mfloat-abi=hard \ 10 | -mabi=aapcs \ 11 | -fno-builtin \ 12 | -fno-strength-reduce \ 13 | -fomit-frame-pointer \ 14 | -DCFG_TUSB_MCU=OPT_MCU_CXD56 \ 15 | 16 | # lwip/src/core/raw.c:334:43: error: declaration of 'recv' shadows a global declaration 17 | CFLAGS += -Wno-error=shadow 18 | 19 | SPRESENSE_SDK = $(TOP)/hw/mcu/sony/cxd56/spresense-exported-sdk 20 | 21 | INC += \ 22 | $(SPRESENSE_SDK)/nuttx/include \ 23 | $(SPRESENSE_SDK)/nuttx/arch \ 24 | $(SPRESENSE_SDK)/nuttx/arch/chip \ 25 | $(SPRESENSE_SDK)/sdk/bsp/include \ 26 | $(SPRESENSE_SDK)/sdk/bsp/include/sdk \ 27 | 28 | LIBS += \ 29 | $(SPRESENSE_SDK)/sdk/libs/libapps.a \ 30 | $(SPRESENSE_SDK)/sdk/libs/libsdk.a \ 31 | 32 | LD_FILE = hw/mcu/sony/cxd56/spresense-exported-sdk/nuttx/build/ramconfig.ld 33 | 34 | LDFLAGS += \ 35 | -Xlinker --entry=__start \ 36 | -nostartfiles \ 37 | -nodefaultlibs \ 38 | -Wl,--defsym,__stack=_vectors+786432 \ 39 | -Wl,--gc-sections \ 40 | -u spresense_main \ 41 | 42 | # For TinyUSB port source 43 | VENDOR = sony 44 | CHIP_FAMILY = cxd56 45 | 46 | # flash 47 | flash: 48 | $(SPRESENSE_SDK)/sdk/tools/linux/mkspk -c 2 $(BUILD)/spresense-firmware.elf nuttx $(BUILD)/spresense-firmware.spk 49 | $(SPRESENSE_SDK)/sdk/tools/flash.sh -c /dev/ttyUSB0 $(BUILD)/spresense-firmware.spk 50 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/stm32f767nucleo/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m7 \ 6 | -mfloat-abi=hard \ 7 | -mfpu=fpv5-d16 \ 8 | -nostdlib -nostartfiles \ 9 | -DSTM32F767xx \ 10 | -DCFG_TUSB_MCU=OPT_MCU_STM32F7 11 | 12 | # mcu driver cause following warnings 13 | CFLAGS += -Wno-error=shadow 14 | 15 | ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F7xx_HAL_Driver 16 | ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F7xx 17 | 18 | # All source paths should be relative to the top level. 19 | LD_FILE = hw/bsp/$(BOARD)/STM32F767ZITx_FLASH.ld 20 | 21 | SRC_C += \ 22 | $(ST_CMSIS)/Source/Templates/system_stm32f7xx.c \ 23 | $(ST_HAL_DRIVER)/Src/stm32f7xx_hal.c \ 24 | $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_cortex.c \ 25 | $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_rcc.c \ 26 | $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_rcc_ex.c \ 27 | $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_gpio.c \ 28 | $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_uart.c \ 29 | $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_pwr_ex.c 30 | 31 | SRC_S += \ 32 | $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f767xx.s 33 | 34 | INC += \ 35 | $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ 36 | $(TOP)/$(ST_CMSIS)/Include \ 37 | $(TOP)/$(ST_HAL_DRIVER)/Inc \ 38 | $(TOP)/hw/bsp/$(BOARD) 39 | 40 | # For TinyUSB port source 41 | VENDOR = st 42 | CHIP_FAMILY = synopsys 43 | 44 | # For freeRTOS port source 45 | FREERTOS_PORT = ARM_CM7/r0p1 46 | 47 | # flash target using on-board stlink 48 | flash: flash-stlink 49 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/build_invoker_utils.rb: -------------------------------------------------------------------------------- 1 | require 'ceedling/constants' 2 | 3 | ## 4 | # Utilities for raiser and reporting errors during building. 5 | class BuildInvokerUtils 6 | 7 | constructor :configurator, :streaminator 8 | 9 | ## 10 | # Processes exceptions and tries to display a useful message for the user. 11 | # 12 | # ==== Attriboops...utes 13 | # 14 | # * _exception_: The exception given by a rescue statement. 15 | # * _context_: A symbol representing where in the build the exception 16 | # occurs. 17 | # * _test_build_: A bool to signify if the exception occurred while building 18 | # from test or source. 19 | # 20 | def process_exception(exception, context, test_build=true) 21 | if (exception.message =~ /Don't know how to build task '(.+)'/i) 22 | error_header = "ERROR: Rake could not find file referenced in source" 23 | error_header += " or test" if (test_build) 24 | error_header += ": '#{$1}'. Possible stale dependency." 25 | 26 | @streaminator.stderr_puts( error_header ) 27 | 28 | if (@configurator.project_use_deep_dependencies) 29 | help_message = "Try fixing #include statements or adding missing file. Then run '#{REFRESH_TASK_ROOT}#{context.to_s}' task and try again." 30 | @streaminator.stderr_puts( help_message ) 31 | end 32 | 33 | raise '' 34 | else 35 | raise exception 36 | end 37 | end 38 | 39 | end 40 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/lib/ceedling/tasks_release.rake: -------------------------------------------------------------------------------- 1 | require 'ceedling/constants' 2 | require 'ceedling/file_path_utils' 3 | 4 | 5 | desc "Build release target." 6 | task RELEASE_SYM => [:directories] do 7 | header = "Release build '#{File.basename(PROJECT_RELEASE_BUILD_TARGET)}'" 8 | @ceedling[:streaminator].stdout_puts("\n\n#{header}\n#{'-' * header.length}") 9 | 10 | begin 11 | @ceedling[:plugin_manager].pre_release 12 | 13 | core_objects = [] 14 | extra_objects = @ceedling[:file_path_utils].form_release_build_c_objects_filelist( COLLECTION_RELEASE_ARTIFACT_EXTRA_LINK_OBJECTS ) 15 | 16 | @ceedling[:project_config_manager].process_release_config_change 17 | core_objects.concat( @ceedling[:release_invoker].setup_and_invoke_c_objects( COLLECTION_ALL_SOURCE ) ) 18 | 19 | # if assembler use isn't enabled, COLLECTION_ALL_ASSEMBLY is empty array & nothing happens 20 | core_objects.concat( @ceedling[:release_invoker].setup_and_invoke_asm_objects( COLLECTION_ALL_ASSEMBLY ) ) 21 | 22 | # if we're using libraries, we need to add those to our collection as well 23 | library_objects = (defined? LIBRARIES_RELEASE && !LIBRARIES_RELEASE.empty?) ? LIBRARIES_RELEASE.flatten.compact : [] 24 | file( PROJECT_RELEASE_BUILD_TARGET => (core_objects + extra_objects + library_objects) ) 25 | Rake::Task[PROJECT_RELEASE_BUILD_TARGET].invoke 26 | ensure 27 | @ceedling[:plugin_manager].post_release 28 | end 29 | end 30 | 31 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/vendor/unity/auto/generate_config.yml: -------------------------------------------------------------------------------- 1 | #this is a sample configuration file for generate_module 2 | #you would use it by calling generate_module with the -ygenerate_config.yml option 3 | #files like this are useful for customizing generate_module to your environment 4 | :generate_module: 5 | :defaults: 6 | #these defaults are used in place of any missing options at the command line 7 | :path_src: ../src/ 8 | :path_inc: ../src/ 9 | :path_tst: ../test/ 10 | :update_svn: true 11 | :includes: 12 | #use [] for no additional includes, otherwise list the includes on separate lines 13 | :src: 14 | - Defs.h 15 | - Board.h 16 | :inc: [] 17 | :tst: 18 | - Defs.h 19 | - Board.h 20 | - Exception.h 21 | :boilerplates: 22 | #these are inserted at the top of generated files. 23 | #just comment out or remove if not desired. 24 | #use %1$s where you would like the file name to appear (path/extension not included) 25 | :src: | 26 | //------------------------------------------- 27 | // %1$s.c 28 | //------------------------------------------- 29 | :inc: | 30 | //------------------------------------------- 31 | // %1$s.h 32 | //------------------------------------------- 33 | :tst: | 34 | //------------------------------------------- 35 | // Test%1$s.c : Units tests for %1$s.c 36 | //------------------------------------------- 37 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/lpcxpresso55s69/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m33 \ 6 | -mfloat-abi=hard \ 7 | -mfpu=fpv5-sp-d16 \ 8 | -DCPU_LPC55S69JBD100_cm33_core0 \ 9 | -DCFG_TUSB_MCU=OPT_MCU_LPC55XX \ 10 | -DCFG_TUSB_MEM_SECTION='__attribute__((section(".data")))' \ 11 | -DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))' 12 | 13 | # mcu driver cause following warnings 14 | CFLAGS += -Wno-error=unused-parameter -Wno-error=float-equal 15 | 16 | MCU_DIR = hw/mcu/nxp/sdk/devices/LPC55S69 17 | 18 | # All source paths should be relative to the top level. 19 | LD_FILE = $(MCU_DIR)/gcc/LPC55S69_cm33_core0_flash.ld 20 | 21 | SRC_C += \ 22 | $(MCU_DIR)/system_LPC55S69_cm33_core0.c \ 23 | $(MCU_DIR)/drivers/fsl_clock.c \ 24 | $(MCU_DIR)/drivers/fsl_gpio.c \ 25 | $(MCU_DIR)/drivers/fsl_power.c \ 26 | $(MCU_DIR)/drivers/fsl_reset.c 27 | 28 | INC += \ 29 | $(TOP)/$(MCU_DIR)/../../CMSIS/Include \ 30 | $(TOP)/$(MCU_DIR) \ 31 | $(TOP)/$(MCU_DIR)/drivers 32 | 33 | SRC_S += $(MCU_DIR)/gcc/startup_LPC55S69_cm33_core0.S 34 | 35 | LIBS += $(TOP)/$(MCU_DIR)/gcc/libpower_hardabi.a 36 | 37 | # For TinyUSB port source 38 | VENDOR = nxp 39 | CHIP_FAMILY = lpc_ip3511 40 | 41 | # For freeRTOS port source 42 | FREERTOS_PORT = ARM_CM33_NTZ/non_secure 43 | 44 | # For flash-jlink target 45 | JLINK_DEVICE = LPC55S69 46 | JLINK_IF = swd 47 | 48 | # flash using pyocd 49 | flash: $(BUILD)/$(BOARD)-firmware.hex 50 | pyocd flash -t LPC55S69 $< 51 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/stm32f303disco/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m4 \ 6 | -mfloat-abi=hard \ 7 | -mfpu=fpv4-sp-d16 \ 8 | -nostdlib -nostartfiles \ 9 | -DSTM32F303xC \ 10 | -DCFG_TUSB_MCU=OPT_MCU_STM32F3 11 | 12 | # mcu driver cause following warnings 13 | CFLAGS += -Wno-error=unused-parameter 14 | 15 | ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F3xx_HAL_Driver 16 | ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F3xx 17 | 18 | # All source paths should be relative to the top level. 19 | LD_FILE = hw/bsp/$(BOARD)/STM32F303VCTx_FLASH.ld 20 | 21 | SRC_C += \ 22 | $(ST_CMSIS)/Source/Templates/system_stm32f3xx.c \ 23 | $(ST_HAL_DRIVER)/Src/stm32f3xx_hal.c \ 24 | $(ST_HAL_DRIVER)/Src/stm32f3xx_hal_cortex.c \ 25 | $(ST_HAL_DRIVER)/Src/stm32f3xx_hal_rcc.c \ 26 | $(ST_HAL_DRIVER)/Src/stm32f3xx_hal_rcc_ex.c \ 27 | $(ST_HAL_DRIVER)/Src/stm32f3xx_hal_gpio.c 28 | 29 | SRC_S += \ 30 | $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f303xc.s 31 | 32 | INC += \ 33 | $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ 34 | $(TOP)/$(ST_CMSIS)/Include \ 35 | $(TOP)/$(ST_HAL_DRIVER)/Inc \ 36 | $(TOP)/hw/bsp/$(BOARD) 37 | 38 | # For TinyUSB port source 39 | VENDOR = st 40 | CHIP_FAMILY = stm32_fsdev 41 | 42 | # For freeRTOS port source 43 | FREERTOS_PORT = ARM_CM4F 44 | 45 | # For flash-jlink target 46 | JLINK_DEVICE = stm32f303vc 47 | JLINK_IF = swd 48 | 49 | # flash target using on-board stlink 50 | flash: flash-stlink 51 | -------------------------------------------------------------------------------- /tinyusb/additions/include/vfs_tinyusb.h: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Espressif Systems (Shanghai) Co. Ltd. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #pragma once 16 | 17 | #include "esp_err.h" 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | /** 24 | * @brief Register TinyUSB CDC at VFS with path 25 | * @param cdc_intf - interface number of TinyUSB's CDC 26 | * @param path - path where the CDC will be registered, `/dev/tusb_cdc` will be used if left NULL. 27 | * 28 | * @return esp_err_t ESP_OK or ESP_FAIL 29 | */ 30 | esp_err_t esp_vfs_tusb_cdc_register(int cdc_intf, char const *path); 31 | 32 | /** 33 | * @brief Unregister TinyUSB CDC from VFS 34 | * @param path - path where the CDC will be unregistered if NULL will be used `/dev/tusb_cdc` 35 | * 36 | * @return esp_err_t ESP_OK or ESP_FAIL 37 | */ 38 | esp_err_t esp_vfs_tusb_cdc_unregister(char const *path); 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/hid_composite/src/usb_descriptors.h: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2019 Ha Thach (tinyusb.org) 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | #ifndef USB_DESCRIPTORS_H_ 26 | #define USB_DESCRIPTORS_H_ 27 | 28 | enum 29 | { 30 | REPORT_ID_KEYBOARD = 1, 31 | REPORT_ID_MOUSE 32 | }; 33 | 34 | #endif /* USB_DESCRIPTORS_H_ */ 35 | -------------------------------------------------------------------------------- /tinyusb/additions/include/tusb_tasks.h: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Espressif Systems (Shanghai) PTE LTD 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #pragma once 16 | 17 | #include "esp_err.h" 18 | 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | /** 25 | * @brief This API starts a task with a wrapper function of tud_task and default task parameters. 26 | * 27 | * The wrapper function basically wraps tud_task and some log. Default parameters: stack size and priority as configured, argument = NULL, 28 | * not pinned to any core. 29 | * If you have more requirements for this task, you can create your own task which calls tud_task as the last step. 30 | * 31 | * @return ESP_OK or ESP_FAIL 32 | */ 33 | esp_err_t tusb_run_task(void); 34 | 35 | /** 36 | * @brief Stops a FreeRTOS task 37 | * 38 | * @return ESP_OK or ESP_FAIL 39 | */ 40 | esp_err_t tusb_stop_task(void); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /tinyusb/port/esp32s2/include/device_controller_driver.h: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Espressif Systems (Shanghai) PTE LTD 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #pragma once 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | #include 22 | #include 23 | // Espressif 24 | #include "driver/periph_ctrl.h" 25 | #include "freertos/xtensa_api.h" 26 | #include "esp_intr_alloc.h" 27 | #include "esp_log.h" 28 | #include "soc/dport_reg.h" 29 | #include "soc/usb_periph.h" 30 | #include "tusb_config.h" 31 | // TinyUSB 32 | #include "tusb_option.h" 33 | #include "descriptors_control.h" 34 | #include "device/dcd.h" 35 | 36 | 37 | #define USB_EP_DIRECTIONS 2 38 | #define USB_MAX_EP_NUM 16 39 | 40 | typedef struct { 41 | uint8_t *buffer; 42 | uint16_t total_len; 43 | uint16_t queued_len; 44 | uint16_t max_size; 45 | bool short_packet; 46 | } xfer_ctl_t; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/hid_composite_freertos/src/usb_descriptors.h: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2019 Ha Thach (tinyusb.org) 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | #ifndef USB_DESCRIPTORS_H_ 26 | #define USB_DESCRIPTORS_H_ 27 | 28 | enum 29 | { 30 | REPORT_ID_KEYBOARD = 1, 31 | REPORT_ID_MOUSE 32 | }; 33 | 34 | #endif /* USB_DESCRIPTORS_H_ */ 35 | -------------------------------------------------------------------------------- /components/CMSIS-DAP/Include/SWD_host.h: -------------------------------------------------------------------------------- 1 | #ifndef SWDHOST_CM_H 2 | #define SWDHOST_CM_H 3 | 4 | #include 5 | 6 | #include "../algo/flash_blob.h" 7 | 8 | 9 | typedef enum 10 | { 11 | RESET_HOLD, // Hold target in reset 12 | RESET_PROGRAM, // Reset target and setup for flash programming. 13 | RESET_RUN, // Reset target and run normally 14 | NO_DEBUG, // Disable debug on running target 15 | DEBUG, // Enable debug on running target 16 | HALT, // Halt the target without resetting it 17 | RUN // Resume the target without resetting it 18 | } TARGET_RESET_STATE; 19 | 20 | 21 | uint8_t swd_init(void); 22 | uint8_t swd_off(void); 23 | uint8_t swd_init_debug(void); 24 | uint8_t swd_read_dp(uint8_t adr, uint32_t *val); 25 | uint8_t swd_write_dp(uint8_t adr, uint32_t val); 26 | uint8_t swd_read_ap(uint32_t adr, uint32_t *val); 27 | uint8_t swd_write_ap(uint32_t adr, uint32_t val); 28 | uint8_t swd_read_memory(uint32_t address, uint8_t *data, uint32_t size); 29 | uint8_t swd_write_memory(uint32_t address, uint8_t *data, uint32_t size); 30 | uint8_t swd_flash_syscall_exec(const program_syscall_t *sysCallParam, uint32_t entry, uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4); 31 | void swd_set_target_reset(uint8_t asserted); 32 | uint8_t swd_set_target_state_hw(TARGET_RESET_STATE state); 33 | uint8_t swd_set_target_state_sw(TARGET_RESET_STATE state); 34 | 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/stm32f412disco/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m4 \ 6 | -mfloat-abi=hard \ 7 | -mfpu=fpv4-sp-d16 \ 8 | -nostdlib -nostartfiles \ 9 | -DSTM32F412Zx \ 10 | -DCFG_TUSB_MCU=OPT_MCU_STM32F4 11 | 12 | # mcu driver cause following warnings 13 | CFLAGS += -Wno-error=maybe-uninitialized 14 | 15 | ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F4xx_HAL_Driver 16 | ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F4xx 17 | 18 | # All source paths should be relative to the top level. 19 | LD_FILE = hw/bsp/$(BOARD)/STM32F412ZGTx_FLASH.ld 20 | 21 | SRC_C += \ 22 | $(ST_CMSIS)/Source/Templates/system_stm32f4xx.c \ 23 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal.c \ 24 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_cortex.c \ 25 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_rcc.c \ 26 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_rcc_ex.c \ 27 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_uart.c \ 28 | $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_gpio.c 29 | 30 | SRC_S += \ 31 | $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f412zx.s 32 | 33 | INC += \ 34 | $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ 35 | $(TOP)/$(ST_CMSIS)/Include \ 36 | $(TOP)/$(ST_HAL_DRIVER)/Inc \ 37 | $(TOP)/hw/bsp/$(BOARD) 38 | 39 | # For TinyUSB port source 40 | VENDOR = st 41 | CHIP_FAMILY = synopsys 42 | 43 | # For freeRTOS port source 44 | FREERTOS_PORT = ARM_CM4F 45 | 46 | # For flash-jlink target 47 | JLINK_DEVICE = stm32f41zx 48 | JLINK_IF = swd 49 | 50 | # flash target using on-board stlink 51 | flash: flash-stlink 52 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/stm32f103bluepill/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m3 \ 6 | -mfloat-abi=soft \ 7 | -nostdlib -nostartfiles \ 8 | -DSTM32F103xB \ 9 | -DCFG_TUSB_MCU=OPT_MCU_STM32F1 10 | 11 | # mcu driver cause following warnings 12 | #CFLAGS += -Wno-error=unused-parameter 13 | 14 | ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F1xx_HAL_Driver 15 | ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F1xx 16 | 17 | # All source paths should be relative to the top level. 18 | LD_FILE = hw/bsp/$(BOARD)/STM32F103XB_FLASH.ld 19 | 20 | SRC_C += \ 21 | $(ST_CMSIS)/Source/Templates/system_stm32f1xx.c \ 22 | $(ST_HAL_DRIVER)/Src/stm32f1xx_hal.c \ 23 | $(ST_HAL_DRIVER)/Src/stm32f1xx_hal_cortex.c \ 24 | $(ST_HAL_DRIVER)/Src/stm32f1xx_hal_rcc.c \ 25 | $(ST_HAL_DRIVER)/Src/stm32f1xx_hal_rcc_ex.c \ 26 | $(ST_HAL_DRIVER)/Src/stm32f1xx_hal_gpio.c 27 | 28 | SRC_S += \ 29 | $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f103xb.s 30 | 31 | INC += \ 32 | $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ 33 | $(TOP)/$(ST_CMSIS)/Include \ 34 | $(TOP)/$(ST_HAL_DRIVER)/Inc \ 35 | $(TOP)/hw/bsp/$(BOARD) 36 | 37 | # For TinyUSB port source 38 | VENDOR = st 39 | CHIP_FAMILY = stm32_fsdev 40 | 41 | # For freeRTOS port source 42 | FREERTOS_PORT = ARM_CM3 43 | 44 | # For flash-jlink target 45 | JLINK_DEVICE = stm32f103c8 46 | JLINK_IF = swd 47 | 48 | # flash target ROM bootloader 49 | flash: $(BUILD)/$(BOARD)-firmware.bin 50 | dfu-util -R -a 0 --dfuse-address 0x08000000 -D $< 51 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/mimxrt1015_evk/board.h: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2019, Ha Thach (tinyusb.org) 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | * 24 | * This file is part of the TinyUSB stack. 25 | */ 26 | 27 | 28 | #ifndef BOARD_H_ 29 | #define BOARD_H_ 30 | 31 | // required since iMX RT10xx SDK include this file for board size 32 | #define BOARD_FLASH_SIZE (0x1000000U) 33 | 34 | #endif /* BOARD_H_ */ 35 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/mimxrt1020_evk/board.h: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2019, Ha Thach (tinyusb.org) 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | * 24 | * This file is part of the TinyUSB stack. 25 | */ 26 | 27 | 28 | #ifndef BOARD_H_ 29 | #define BOARD_H_ 30 | 31 | // required since iMX RT10xx SDK include this file for board size 32 | #define BOARD_FLASH_SIZE (0x800000U) 33 | 34 | #endif /* BOARD_H_ */ 35 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/mimxrt1060_evk/board.h: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2019, Ha Thach (tinyusb.org) 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | * 24 | * This file is part of the TinyUSB stack. 25 | */ 26 | 27 | 28 | #ifndef BOARD_H_ 29 | #define BOARD_H_ 30 | 31 | // required since iMX RT10xx SDK include this file for board size 32 | #define BOARD_FLASH_SIZE (0x800000U) 33 | 34 | #endif /* BOARD_H_ */ 35 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/mimxrt1064_evk/board.h: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2019, Ha Thach (tinyusb.org) 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | * 24 | * This file is part of the TinyUSB stack. 25 | */ 26 | 27 | 28 | #ifndef BOARD_H_ 29 | #define BOARD_H_ 30 | 31 | // required since iMX RT10xx SDK include this file for board size 32 | #define BOARD_FLASH_SIZE (0x400000U) 33 | 34 | #endif /* BOARD_H_ */ 35 | -------------------------------------------------------------------------------- /main/hid_task.h: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2019 Ha Thach (tinyusb.org) 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | * 24 | */ 25 | #ifndef _HID_TASK_H 26 | #define _HID_TASK_H 27 | 28 | #include "stdint.h" 29 | // Invoked when received SCSI_CMD_INQUIRY 30 | // Application fill vendor id, product id and revision with string up to 8, 16, 4 characters respectively 31 | void hid_task(void *params); 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /main/msc_task.h: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2019 Ha Thach (tinyusb.org) 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | * 24 | */ 25 | #ifndef _MSC_TASK_H 26 | #define _MSC_TASK_H 27 | 28 | #include "stdint.h" 29 | // Invoked when received SCSI_CMD_INQUIRY 30 | // Application fill vendor id, product id and revision with string up to 8, 16, 4 characters respectively 31 | void msc_task(void *params); 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/mimxrt1050_evkb/board.h: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2019, Ha Thach (tinyusb.org) 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | * 24 | * This file is part of the TinyUSB stack. 25 | */ 26 | 27 | 28 | #ifndef BOARD_H_ 29 | #define BOARD_H_ 30 | 31 | // required since iMX RT10xx SDK include this file for board size 32 | #define BOARD_FLASH_SIZE (0x4000000U) 33 | 34 | #endif /* BOARD_H_ */ 35 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/test/vendor/ceedling/plugins/bullseye/config/defaults.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | :bullseye: 4 | :auto_license: TRUE 5 | :plugins: 6 | :bullseye_lib_path: [] 7 | :paths: 8 | :bullseye_toolchain_include: [] 9 | 10 | :tools: 11 | :bullseye_instrumentation: 12 | :executable: covc 13 | :arguments: 14 | - '--file $': ENVIRONMENT_COVFILE 15 | - -q 16 | - ${1} 17 | :bullseye_compiler: 18 | :executable: gcc 19 | :arguments: 20 | - -g 21 | - -I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR 22 | - -I"$": COLLECTION_PATHS_BULLSEYE_TOOLCHAIN_INCLUDE 23 | - -D$: COLLECTION_DEFINES_TEST_AND_VENDOR 24 | - -DBULLSEYE_COMPILER 25 | - -c "${1}" 26 | - -o "${2}" 27 | :bullseye_linker: 28 | :executable: gcc 29 | :arguments: 30 | - ${1} 31 | - -o ${2} 32 | - -L$: PLUGINS_BULLSEYE_LIB_PATH 33 | - -lcov 34 | :bullseye_fixture: 35 | :executable: ${1} 36 | :bullseye_report_covsrc: 37 | :executable: covsrc 38 | :arguments: 39 | - '--file $': ENVIRONMENT_COVFILE 40 | - -q 41 | - -w140 42 | :bullseye_report_covfn: 43 | :executable: covfn 44 | :stderr_redirect: :auto 45 | :arguments: 46 | - '--file $': ENVIRONMENT_COVFILE 47 | - --width 120 48 | - --no-source 49 | - '"${1}"' 50 | :bullseye_browser: 51 | :executable: CoverageBrowser 52 | :background_exec: :auto 53 | :optional: TRUE 54 | :arguments: 55 | - '"$"': ENVIRONMENT_COVFILE 56 | 57 | ... 58 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/stm32f072disco/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs \ 5 | -mcpu=cortex-m0 \ 6 | -mfloat-abi=soft \ 7 | -nostdlib -nostartfiles \ 8 | -DSTM32F072xB \ 9 | -DCFG_EXAMPLE_MSC_READONLY \ 10 | -DCFG_TUSB_MCU=OPT_MCU_STM32F0 11 | 12 | # mcu driver cause following warnings 13 | CFLAGS += -Wno-error=unused-parameter 14 | 15 | ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F0xx_HAL_Driver 16 | ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F0xx 17 | 18 | # All source paths should be relative to the top level. 19 | LD_FILE = hw/bsp/$(BOARD)/STM32F072RBTx_FLASH.ld 20 | 21 | SRC_C += \ 22 | $(ST_CMSIS)/Source/Templates/system_stm32f0xx.c \ 23 | $(ST_HAL_DRIVER)/Src/stm32f0xx_hal.c \ 24 | $(ST_HAL_DRIVER)/Src/stm32f0xx_hal_cortex.c \ 25 | $(ST_HAL_DRIVER)/Src/stm32f0xx_hal_rcc.c \ 26 | $(ST_HAL_DRIVER)/Src/stm32f0xx_hal_rcc_ex.c \ 27 | $(ST_HAL_DRIVER)/Src/stm32f0xx_hal_gpio.c \ 28 | $(ST_HAL_DRIVER)/Src/stm32f0xx_hal_uart.c 29 | 30 | SRC_S += \ 31 | $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f072xb.s 32 | 33 | INC += \ 34 | $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ 35 | $(TOP)/$(ST_CMSIS)/Include \ 36 | $(TOP)/$(ST_HAL_DRIVER)/Inc \ 37 | $(TOP)/hw/bsp/$(BOARD) 38 | 39 | # For TinyUSB port source 40 | VENDOR = st 41 | CHIP_FAMILY = stm32_fsdev 42 | 43 | # For freeRTOS port source 44 | FREERTOS_PORT = ARM_CM0 45 | 46 | # For flash-jlink target 47 | JLINK_DEVICE = stm32f072rb 48 | JLINK_IF = swd 49 | 50 | # flash target using on-board stlink 51 | flash: flash-stlink 52 | -------------------------------------------------------------------------------- /main/webusb_task.h: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2019 Ha Thach (tinyusb.org) 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | * 24 | */ 25 | #ifndef _WEBUSB_TASK_H 26 | #define _WEBUSB_TASK_H 27 | 28 | #include "stdint.h" 29 | // Invoked when received SCSI_CMD_INQUIRY 30 | // Application fill vendor id, product id and revision with string up to 8, 16, 4 characters respectively 31 | void webusb_task(void *p); 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/mimxrt1020_evk/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -mthumb \ 3 | -mabi=aapcs \ 4 | -mcpu=cortex-m7 \ 5 | -mfloat-abi=hard \ 6 | -mfpu=fpv5-d16 \ 7 | -D__ARMVFP__=0 -D__ARMFPV5__=0\ 8 | -DCPU_MIMXRT1021DAG5A \ 9 | -DXIP_EXTERNAL_FLASH=1 \ 10 | -DXIP_BOOT_HEADER_ENABLE=1 \ 11 | -DCFG_TUSB_MCU=OPT_MCU_MIMXRT10XX 12 | 13 | # mcu driver cause following warnings 14 | CFLAGS += -Wno-error=unused-parameter 15 | 16 | MCU_DIR = hw/mcu/nxp/sdk/devices/MIMXRT1021 17 | 18 | # All source paths should be relative to the top level. 19 | LD_FILE = $(MCU_DIR)/gcc/MIMXRT1021xxxxx_flexspi_nor.ld 20 | 21 | SRC_C += \ 22 | $(MCU_DIR)/system_MIMXRT1021.c \ 23 | $(MCU_DIR)/xip/fsl_flexspi_nor_boot.c \ 24 | $(MCU_DIR)/project_template/clock_config.c \ 25 | $(MCU_DIR)/drivers/fsl_clock.c \ 26 | $(MCU_DIR)/drivers/fsl_gpio.c \ 27 | $(MCU_DIR)/drivers/fsl_common.c \ 28 | $(MCU_DIR)/drivers/fsl_lpuart.c 29 | 30 | INC += \ 31 | $(TOP)/hw/bsp/$(BOARD) \ 32 | $(TOP)/$(MCU_DIR)/../../CMSIS/Include \ 33 | $(TOP)/$(MCU_DIR) \ 34 | $(TOP)/$(MCU_DIR)/drivers \ 35 | $(TOP)/$(MCU_DIR)/project_template \ 36 | 37 | SRC_S += $(MCU_DIR)/gcc/startup_MIMXRT1021.S 38 | 39 | # For TinyUSB port source 40 | VENDOR = nxp 41 | CHIP_FAMILY = transdimension 42 | 43 | # For freeRTOS port source 44 | FREERTOS_PORT = ARM_CM7/r0p1 45 | 46 | # For flash-jlink target 47 | JLINK_DEVICE = MIMXRT1021DAG5A 48 | JLINK_IF = swd 49 | 50 | # flash by copying bin file to DAP Mass Storage 51 | flash: $(BUILD)/$(BOARD)-firmware.bin 52 | cp $< /media/$(USER)/RT1020-EVK/ 53 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/mimxrt1050_evkb/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -mthumb \ 3 | -mabi=aapcs \ 4 | -mcpu=cortex-m7 \ 5 | -mfloat-abi=hard \ 6 | -mfpu=fpv5-d16 \ 7 | -D__ARMVFP__=0 -D__ARMFPV5__=0\ 8 | -DCPU_MIMXRT1052DVL6B \ 9 | -DXIP_EXTERNAL_FLASH=1 \ 10 | -DXIP_BOOT_HEADER_ENABLE=1 \ 11 | -DCFG_TUSB_MCU=OPT_MCU_MIMXRT10XX 12 | 13 | # mcu driver cause following warnings 14 | CFLAGS += -Wno-error=unused-parameter 15 | 16 | MCU_DIR = hw/mcu/nxp/sdk/devices/MIMXRT1052 17 | 18 | # All source paths should be relative to the top level. 19 | LD_FILE = $(MCU_DIR)/gcc/MIMXRT1052xxxxx_flexspi_nor.ld 20 | 21 | SRC_C += \ 22 | $(MCU_DIR)/system_MIMXRT1052.c \ 23 | $(MCU_DIR)/xip/fsl_flexspi_nor_boot.c \ 24 | $(MCU_DIR)/project_template/clock_config.c \ 25 | $(MCU_DIR)/drivers/fsl_clock.c \ 26 | $(MCU_DIR)/drivers/fsl_gpio.c \ 27 | $(MCU_DIR)/drivers/fsl_common.c \ 28 | $(MCU_DIR)/drivers/fsl_lpuart.c 29 | 30 | INC += \ 31 | $(TOP)/hw/bsp/$(BOARD) \ 32 | $(TOP)/$(MCU_DIR)/../../CMSIS/Include \ 33 | $(TOP)/$(MCU_DIR) \ 34 | $(TOP)/$(MCU_DIR)/drivers \ 35 | $(TOP)/$(MCU_DIR)/project_template \ 36 | 37 | SRC_S += $(MCU_DIR)/gcc/startup_MIMXRT1052.S 38 | 39 | # For TinyUSB port source 40 | VENDOR = nxp 41 | CHIP_FAMILY = transdimension 42 | 43 | # For freeRTOS port source 44 | FREERTOS_PORT = ARM_CM7/r0p1 45 | 46 | # For flash-jlink target 47 | JLINK_DEVICE = MIMXRT1052xxx6B 48 | JLINK_IF = swd 49 | 50 | # flash by copying bin file to DAP Mass Storage 51 | flash: $(BUILD)/$(BOARD)-firmware.bin 52 | cp $< /media/$(USER)/RT1050-EVK/ 53 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/mimxrt1060_evk/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -mthumb \ 3 | -mabi=aapcs \ 4 | -mcpu=cortex-m7 \ 5 | -mfloat-abi=hard \ 6 | -mfpu=fpv5-d16 \ 7 | -D__ARMVFP__=0 -D__ARMFPV5__=0\ 8 | -DCPU_MIMXRT1062DVL6A \ 9 | -DXIP_EXTERNAL_FLASH=1 \ 10 | -DXIP_BOOT_HEADER_ENABLE=1 \ 11 | -DCFG_TUSB_MCU=OPT_MCU_MIMXRT10XX 12 | 13 | # mcu driver cause following warnings 14 | CFLAGS += -Wno-error=unused-parameter 15 | 16 | MCU_DIR = hw/mcu/nxp/sdk/devices/MIMXRT1062 17 | 18 | # All source paths should be relative to the top level. 19 | LD_FILE = $(MCU_DIR)/gcc/MIMXRT1062xxxxx_flexspi_nor.ld 20 | 21 | SRC_C += \ 22 | $(MCU_DIR)/system_MIMXRT1062.c \ 23 | $(MCU_DIR)/xip/fsl_flexspi_nor_boot.c \ 24 | $(MCU_DIR)/project_template/clock_config.c \ 25 | $(MCU_DIR)/drivers/fsl_clock.c \ 26 | $(MCU_DIR)/drivers/fsl_gpio.c \ 27 | $(MCU_DIR)/drivers/fsl_common.c \ 28 | $(MCU_DIR)/drivers/fsl_lpuart.c 29 | 30 | INC += \ 31 | $(TOP)/hw/bsp/$(BOARD) \ 32 | $(TOP)/$(MCU_DIR)/../../CMSIS/Include \ 33 | $(TOP)/$(MCU_DIR) \ 34 | $(TOP)/$(MCU_DIR)/drivers \ 35 | $(TOP)/$(MCU_DIR)/project_template \ 36 | 37 | SRC_S += $(MCU_DIR)/gcc/startup_MIMXRT1062.S 38 | 39 | # For TinyUSB port source 40 | VENDOR = nxp 41 | CHIP_FAMILY = transdimension 42 | 43 | # For freeRTOS port source 44 | FREERTOS_PORT = ARM_CM7/r0p1 45 | 46 | # For flash-jlink target 47 | JLINK_DEVICE = MIMXRT1062xxx6A 48 | JLINK_IF = swd 49 | 50 | # flash by copying bin file to DAP Mass Storage 51 | flash: $(BUILD)/$(BOARD)-firmware.bin 52 | cp $< /media/$(USER)/RT1060-EVK/ 53 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/mimxrt1064_evk/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -mthumb \ 3 | -mabi=aapcs \ 4 | -mcpu=cortex-m7 \ 5 | -mfloat-abi=hard \ 6 | -mfpu=fpv5-d16 \ 7 | -D__ARMVFP__=0 -D__ARMFPV5__=0\ 8 | -DCPU_MIMXRT1064DVL6A \ 9 | -DXIP_EXTERNAL_FLASH=1 \ 10 | -DXIP_BOOT_HEADER_ENABLE=1 \ 11 | -DCFG_TUSB_MCU=OPT_MCU_MIMXRT10XX 12 | 13 | # mcu driver cause following warnings 14 | CFLAGS += -Wno-error=unused-parameter 15 | 16 | MCU_DIR = hw/mcu/nxp/sdk/devices/MIMXRT1064 17 | 18 | # All source paths should be relative to the top level. 19 | LD_FILE = $(MCU_DIR)/gcc/MIMXRT1064xxxxx_flexspi_nor.ld 20 | 21 | SRC_C += \ 22 | $(MCU_DIR)/system_MIMXRT1064.c \ 23 | $(MCU_DIR)/xip/fsl_flexspi_nor_boot.c \ 24 | $(MCU_DIR)/project_template/clock_config.c \ 25 | $(MCU_DIR)/drivers/fsl_clock.c \ 26 | $(MCU_DIR)/drivers/fsl_gpio.c \ 27 | $(MCU_DIR)/drivers/fsl_common.c \ 28 | $(MCU_DIR)/drivers/fsl_lpuart.c 29 | 30 | INC += \ 31 | $(TOP)/hw/bsp/$(BOARD) \ 32 | $(TOP)/$(MCU_DIR)/../../CMSIS/Include \ 33 | $(TOP)/$(MCU_DIR) \ 34 | $(TOP)/$(MCU_DIR)/drivers \ 35 | $(TOP)/$(MCU_DIR)/project_template \ 36 | 37 | SRC_S += $(MCU_DIR)/gcc/startup_MIMXRT1064.S 38 | 39 | # For TinyUSB port source 40 | VENDOR = nxp 41 | CHIP_FAMILY = transdimension 42 | 43 | # For freeRTOS port source 44 | FREERTOS_PORT = ARM_CM7/r0p1 45 | 46 | # For flash-jlink target 47 | JLINK_DEVICE = MIMXRT1064xxx6A 48 | JLINK_IF = swd 49 | 50 | # flash by copying bin file to DAP Mass Storage 51 | flash: $(BUILD)/$(BOARD)-firmware.bin 52 | cp $< /media/$(USER)/RT1064-EVK/ 53 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/stm32f070rbnucleo/board.mk: -------------------------------------------------------------------------------- 1 | CFLAGS += \ 2 | -flto \ 3 | -mthumb \ 4 | -mabi=aapcs-linux \ 5 | -mcpu=cortex-m0 \ 6 | -mfloat-abi=soft \ 7 | -nostdlib -nostartfiles \ 8 | -DSTM32F070xB \ 9 | -DCFG_EXAMPLE_MSC_READONLY \ 10 | -DCFG_TUSB_MCU=OPT_MCU_STM32F0 11 | 12 | # mcu driver cause following warnings 13 | CFLAGS += -Wno-error=unused-parameter 14 | 15 | ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F0xx_HAL_Driver 16 | ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F0xx 17 | 18 | # All source paths should be relative to the top level. 19 | LD_FILE = hw/bsp/$(BOARD)/stm32F070rbtx_flash.ld 20 | 21 | SRC_C += \ 22 | $(ST_CMSIS)/Source/Templates/system_stm32f0xx.c \ 23 | $(ST_HAL_DRIVER)/Src/stm32f0xx_hal.c \ 24 | $(ST_HAL_DRIVER)/Src/stm32f0xx_hal_cortex.c \ 25 | $(ST_HAL_DRIVER)/Src/stm32f0xx_hal_rcc.c \ 26 | $(ST_HAL_DRIVER)/Src/stm32f0xx_hal_rcc_ex.c \ 27 | $(ST_HAL_DRIVER)/Src/stm32f0xx_hal_gpio.c \ 28 | $(ST_HAL_DRIVER)/Src/stm32f0xx_hal_uart.c 29 | SRC_S += \ 30 | $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f070xb.s 31 | 32 | INC += \ 33 | $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ 34 | $(TOP)/$(ST_CMSIS)/Include \ 35 | $(TOP)/$(ST_HAL_DRIVER)/Inc \ 36 | $(TOP)/hw/bsp/$(BOARD) 37 | 38 | # For TinyUSB port source 39 | VENDOR = st 40 | CHIP_FAMILY = stm32_fsdev 41 | 42 | # For freeRTOS port source 43 | FREERTOS_PORT = ARM_CM0 44 | 45 | # For flash-jlink target 46 | JLINK_DEVICE = stm32f070rb 47 | JLINK_IF = swd 48 | 49 | # flash target using on-board stlink 50 | flash: flash-stlink 51 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/hw/bsp/teensy_40/board.h: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2019, Ha Thach (tinyusb.org) 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | * 24 | * This file is part of the TinyUSB stack. 25 | */ 26 | 27 | 28 | #ifndef BOARD_H_ 29 | #define BOARD_H_ 30 | 31 | 32 | // required since iMX RT10xx SDK include this file for board size 33 | #define BOARD_FLASH_SIZE (2 * 1024 * 1024) 34 | 35 | 36 | #endif /* BOARD_H_ */ 37 | -------------------------------------------------------------------------------- /tinyusb/tinyusb/examples/device/webusb_serial/src/usb_descriptors.h: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2019 Ha Thach (tinyusb.org) 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | #ifndef USB_DESCRIPTORS_H_ 26 | #define USB_DESCRIPTORS_H_ 27 | 28 | enum 29 | { 30 | VENDOR_REQUEST_WEBUSB = 1, 31 | VENDOR_REQUEST_MICROSOFT = 2 32 | }; 33 | 34 | extern uint8_t const desc_ms_os_20[]; 35 | 36 | #endif /* USB_DESCRIPTORS_H_ */ 37 | --------------------------------------------------------------------------------