From 09bce3532c9279b54f5dc1e48c51959344df6c56 Mon Sep 17 00:00:00 2001 From: HiFiPhile Date: Sun, 9 Feb 2025 00:04:16 +0100 Subject: [PATCH 01/11] Add CMake presets. Signed-off-by: HiFiPhile --- .gitignore | 8 +- examples/CMakePresets.json | 6 + examples/device/CMakePresets.json | 6 + .../audio_4_channel_mic/CMakePresets.json | 6 + .../CMakePresets.json | 6 + .../src/CMakePresets.json | 6 + examples/device/audio_test/CMakePresets.json | 6 + .../audio_test_freertos/CMakePresets.json | 6 + .../audio_test_freertos/src/CMakePresets.json | 6 + .../audio_test_multi_rate/CMakePresets.json | 6 + examples/device/board_test/CMakePresets.json | 6 + .../device/board_test/src/CMakePresets.json | 6 + .../device/cdc_dual_ports/CMakePresets.json | 6 + examples/device/cdc_msc/CMakePresets.json | 6 + .../device/cdc_msc_freertos/CMakePresets.json | 6 + .../cdc_msc_freertos/src/CMakePresets.json | 6 + examples/device/cdc_uac2/CMakePresets.json | 6 + examples/device/dfu/CMakePresets.json | 6 + examples/device/dfu_runtime/CMakePresets.json | 6 + .../dynamic_configuration/CMakePresets.json | 6 + .../hid_boot_interface/CMakePresets.json | 6 + .../device/hid_composite/CMakePresets.json | 6 + .../hid_composite_freertos/CMakePresets.json | 6 + .../src/CMakePresets.json | 6 + .../hid_generic_inout/CMakePresets.json | 6 + .../hid_multiple_interface/CMakePresets.json | 6 + examples/device/midi_test/CMakePresets.json | 6 + .../midi_test_freertos/CMakePresets.json | 6 + .../midi_test_freertos/src/CMakePresets.json | 6 + .../device/msc_dual_lun/CMakePresets.json | 6 + .../net_lwip_webserver/CMakePresets.json | 6 + .../device/uac2_headset/CMakePresets.json | 6 + .../device/uac2_speaker_fb/CMakePresets.json | 6 + examples/device/usbtmc/CMakePresets.json | 6 + .../device/video_capture/CMakePresets.json | 6 + .../video_capture/src/CMakePresets.json | 6 + .../video_capture_2ch/CMakePresets.json | 6 + .../video_capture_2ch/src/CMakePresets.json | 6 + .../device/webusb_serial/CMakePresets.json | 6 + examples/dual/CMakePresets.json | 6 + .../host_hid_to_device_cdc/CMakePresets.json | 6 + .../host_info_to_device_cdc/CMakePresets.json | 6 + examples/host/CMakePresets.json | 6 + examples/host/bare_api/CMakePresets.json | 6 + examples/host/cdc_msc_hid/CMakePresets.json | 6 + .../cdc_msc_hid_freertos/CMakePresets.json | 6 + .../src/CMakePresets.json | 6 + examples/host/device_info/CMakePresets.json | 6 + .../host/device_info/src/CMakePresets.json | 6 + .../host/hid_controller/CMakePresets.json | 6 + .../host/msc_file_explorer/CMakePresets.json | 6 + examples/typec/CMakePresets.json | 6 + .../typec/power_delivery/CMakePresets.json | 6 + hw/bsp/BoardPresets.json | 4002 +++++++++++++++++ hw/bsp/family_support.cmake | 6 +- tools/gen_presets.py | 91 + 56 files changed, 4417 insertions(+), 2 deletions(-) create mode 100644 examples/CMakePresets.json create mode 100644 examples/device/CMakePresets.json create mode 100644 examples/device/audio_4_channel_mic/CMakePresets.json create mode 100644 examples/device/audio_4_channel_mic_freertos/CMakePresets.json create mode 100644 examples/device/audio_4_channel_mic_freertos/src/CMakePresets.json create mode 100644 examples/device/audio_test/CMakePresets.json create mode 100644 examples/device/audio_test_freertos/CMakePresets.json create mode 100644 examples/device/audio_test_freertos/src/CMakePresets.json create mode 100644 examples/device/audio_test_multi_rate/CMakePresets.json create mode 100644 examples/device/board_test/CMakePresets.json create mode 100644 examples/device/board_test/src/CMakePresets.json create mode 100644 examples/device/cdc_dual_ports/CMakePresets.json create mode 100644 examples/device/cdc_msc/CMakePresets.json create mode 100644 examples/device/cdc_msc_freertos/CMakePresets.json create mode 100644 examples/device/cdc_msc_freertos/src/CMakePresets.json create mode 100644 examples/device/cdc_uac2/CMakePresets.json create mode 100644 examples/device/dfu/CMakePresets.json create mode 100644 examples/device/dfu_runtime/CMakePresets.json create mode 100644 examples/device/dynamic_configuration/CMakePresets.json create mode 100644 examples/device/hid_boot_interface/CMakePresets.json create mode 100644 examples/device/hid_composite/CMakePresets.json create mode 100644 examples/device/hid_composite_freertos/CMakePresets.json create mode 100644 examples/device/hid_composite_freertos/src/CMakePresets.json create mode 100644 examples/device/hid_generic_inout/CMakePresets.json create mode 100644 examples/device/hid_multiple_interface/CMakePresets.json create mode 100644 examples/device/midi_test/CMakePresets.json create mode 100644 examples/device/midi_test_freertos/CMakePresets.json create mode 100644 examples/device/midi_test_freertos/src/CMakePresets.json create mode 100644 examples/device/msc_dual_lun/CMakePresets.json create mode 100644 examples/device/net_lwip_webserver/CMakePresets.json create mode 100644 examples/device/uac2_headset/CMakePresets.json create mode 100644 examples/device/uac2_speaker_fb/CMakePresets.json create mode 100644 examples/device/usbtmc/CMakePresets.json create mode 100644 examples/device/video_capture/CMakePresets.json create mode 100644 examples/device/video_capture/src/CMakePresets.json create mode 100644 examples/device/video_capture_2ch/CMakePresets.json create mode 100644 examples/device/video_capture_2ch/src/CMakePresets.json create mode 100644 examples/device/webusb_serial/CMakePresets.json create mode 100644 examples/dual/CMakePresets.json create mode 100644 examples/dual/host_hid_to_device_cdc/CMakePresets.json create mode 100644 examples/dual/host_info_to_device_cdc/CMakePresets.json create mode 100644 examples/host/CMakePresets.json create mode 100644 examples/host/bare_api/CMakePresets.json create mode 100644 examples/host/cdc_msc_hid/CMakePresets.json create mode 100644 examples/host/cdc_msc_hid_freertos/CMakePresets.json create mode 100644 examples/host/cdc_msc_hid_freertos/src/CMakePresets.json create mode 100644 examples/host/device_info/CMakePresets.json create mode 100644 examples/host/device_info/src/CMakePresets.json create mode 100644 examples/host/hid_controller/CMakePresets.json create mode 100644 examples/host/msc_file_explorer/CMakePresets.json create mode 100644 examples/typec/CMakePresets.json create mode 100644 examples/typec/power_delivery/CMakePresets.json create mode 100644 hw/bsp/BoardPresets.json create mode 100755 tools/gen_presets.py diff --git a/.gitignore b/.gitignore index 010b5c9ed..f981110b2 100644 --- a/.gitignore +++ b/.gitignore @@ -37,4 +37,10 @@ cmake-build-* sdkconfig .PVS-Studio .vscode/ -build/ +build +CMakeFiles +Debug +RelWithDebInfo +Release +BrowseInfo +.cmake_build diff --git a/examples/CMakePresets.json b/examples/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/CMakePresets.json b/examples/device/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/audio_4_channel_mic/CMakePresets.json b/examples/device/audio_4_channel_mic/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/audio_4_channel_mic/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/audio_4_channel_mic_freertos/CMakePresets.json b/examples/device/audio_4_channel_mic_freertos/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/audio_4_channel_mic_freertos/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/audio_4_channel_mic_freertos/src/CMakePresets.json b/examples/device/audio_4_channel_mic_freertos/src/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/audio_4_channel_mic_freertos/src/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/audio_test/CMakePresets.json b/examples/device/audio_test/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/audio_test/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/audio_test_freertos/CMakePresets.json b/examples/device/audio_test_freertos/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/audio_test_freertos/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/audio_test_freertos/src/CMakePresets.json b/examples/device/audio_test_freertos/src/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/audio_test_freertos/src/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/audio_test_multi_rate/CMakePresets.json b/examples/device/audio_test_multi_rate/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/audio_test_multi_rate/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/board_test/CMakePresets.json b/examples/device/board_test/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/board_test/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/board_test/src/CMakePresets.json b/examples/device/board_test/src/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/board_test/src/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/cdc_dual_ports/CMakePresets.json b/examples/device/cdc_dual_ports/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/cdc_dual_ports/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/cdc_msc/CMakePresets.json b/examples/device/cdc_msc/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/cdc_msc/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/cdc_msc_freertos/CMakePresets.json b/examples/device/cdc_msc_freertos/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/cdc_msc_freertos/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/cdc_msc_freertos/src/CMakePresets.json b/examples/device/cdc_msc_freertos/src/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/cdc_msc_freertos/src/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/cdc_uac2/CMakePresets.json b/examples/device/cdc_uac2/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/cdc_uac2/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/dfu/CMakePresets.json b/examples/device/dfu/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/dfu/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/dfu_runtime/CMakePresets.json b/examples/device/dfu_runtime/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/dfu_runtime/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/dynamic_configuration/CMakePresets.json b/examples/device/dynamic_configuration/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/dynamic_configuration/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/hid_boot_interface/CMakePresets.json b/examples/device/hid_boot_interface/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/hid_boot_interface/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/hid_composite/CMakePresets.json b/examples/device/hid_composite/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/hid_composite/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/hid_composite_freertos/CMakePresets.json b/examples/device/hid_composite_freertos/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/hid_composite_freertos/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/hid_composite_freertos/src/CMakePresets.json b/examples/device/hid_composite_freertos/src/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/hid_composite_freertos/src/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/hid_generic_inout/CMakePresets.json b/examples/device/hid_generic_inout/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/hid_generic_inout/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/hid_multiple_interface/CMakePresets.json b/examples/device/hid_multiple_interface/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/hid_multiple_interface/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/midi_test/CMakePresets.json b/examples/device/midi_test/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/midi_test/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/midi_test_freertos/CMakePresets.json b/examples/device/midi_test_freertos/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/midi_test_freertos/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/midi_test_freertos/src/CMakePresets.json b/examples/device/midi_test_freertos/src/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/midi_test_freertos/src/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/msc_dual_lun/CMakePresets.json b/examples/device/msc_dual_lun/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/msc_dual_lun/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/net_lwip_webserver/CMakePresets.json b/examples/device/net_lwip_webserver/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/net_lwip_webserver/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/uac2_headset/CMakePresets.json b/examples/device/uac2_headset/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/uac2_headset/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/uac2_speaker_fb/CMakePresets.json b/examples/device/uac2_speaker_fb/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/uac2_speaker_fb/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/usbtmc/CMakePresets.json b/examples/device/usbtmc/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/usbtmc/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/video_capture/CMakePresets.json b/examples/device/video_capture/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/video_capture/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/video_capture/src/CMakePresets.json b/examples/device/video_capture/src/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/video_capture/src/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/video_capture_2ch/CMakePresets.json b/examples/device/video_capture_2ch/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/video_capture_2ch/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/video_capture_2ch/src/CMakePresets.json b/examples/device/video_capture_2ch/src/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/video_capture_2ch/src/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/device/webusb_serial/CMakePresets.json b/examples/device/webusb_serial/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/device/webusb_serial/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/dual/CMakePresets.json b/examples/dual/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/dual/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/dual/host_hid_to_device_cdc/CMakePresets.json b/examples/dual/host_hid_to_device_cdc/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/dual/host_hid_to_device_cdc/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/dual/host_info_to_device_cdc/CMakePresets.json b/examples/dual/host_info_to_device_cdc/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/dual/host_info_to_device_cdc/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/host/CMakePresets.json b/examples/host/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/host/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/host/bare_api/CMakePresets.json b/examples/host/bare_api/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/host/bare_api/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/host/cdc_msc_hid/CMakePresets.json b/examples/host/cdc_msc_hid/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/host/cdc_msc_hid/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/host/cdc_msc_hid_freertos/CMakePresets.json b/examples/host/cdc_msc_hid_freertos/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/host/cdc_msc_hid_freertos/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/host/cdc_msc_hid_freertos/src/CMakePresets.json b/examples/host/cdc_msc_hid_freertos/src/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/host/cdc_msc_hid_freertos/src/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/host/device_info/CMakePresets.json b/examples/host/device_info/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/host/device_info/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/host/device_info/src/CMakePresets.json b/examples/host/device_info/src/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/host/device_info/src/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/host/hid_controller/CMakePresets.json b/examples/host/hid_controller/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/host/hid_controller/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/host/msc_file_explorer/CMakePresets.json b/examples/host/msc_file_explorer/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/host/msc_file_explorer/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/typec/CMakePresets.json b/examples/typec/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/typec/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/examples/typec/power_delivery/CMakePresets.json b/examples/typec/power_delivery/CMakePresets.json new file mode 100644 index 000000000..5cd8971e9 --- /dev/null +++ b/examples/typec/power_delivery/CMakePresets.json @@ -0,0 +1,6 @@ +{ + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] +} diff --git a/hw/bsp/BoardPresets.json b/hw/bsp/BoardPresets.json new file mode 100644 index 000000000..c295efbdd --- /dev/null +++ b/hw/bsp/BoardPresets.json @@ -0,0 +1,4002 @@ +{ + "version": 6, + "configurePresets": [ + { + "name": "default", + "hidden": true, + "description": "Configure preset for the ${presetName} board", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build/${presetName}", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithDebInfo", + "BOARD": "${presetName}" + } + }, + { + "name": "raspberrypi_zero", + "inherits": "default" + }, + { + "name": "raspberrypi_cm4", + "inherits": "default" + }, + { + "name": "raspberrypi_zero2", + "inherits": "default" + }, + { + "name": "ch32v103r_r1_1v0", + "inherits": "default" + }, + { + "name": "ch32v203c_r0_1v0", + "inherits": "default" + }, + { + "name": "ch32v203g_r0_1v0", + "inherits": "default" + }, + { + "name": "nanoch32v203", + "inherits": "default" + }, + { + "name": "ch32v307v_r1_1v0", + "inherits": "default" + }, + { + "name": "da14695_dk_usb", + "inherits": "default" + }, + { + "name": "da1469x_dk_pro", + "inherits": "default" + }, + { + "name": "adafruit_feather_esp32s2", + "inherits": "default" + }, + { + "name": "adafruit_feather_esp32s3", + "inherits": "default" + }, + { + "name": "adafruit_feather_esp32_v2", + "inherits": "default" + }, + { + "name": "adafruit_magtag_29gray", + "inherits": "default" + }, + { + "name": "adafruit_metro_esp32s2", + "inherits": "default" + }, + { + "name": "espressif_addax_1", + "inherits": "default" + }, + { + "name": "espressif_c3_devkitc", + "inherits": "default" + }, + { + "name": "espressif_c6_devkitc", + "inherits": "default" + }, + { + "name": "espressif_kaluga_1", + "inherits": "default" + }, + { + "name": "espressif_p4_function_ev", + "inherits": "default" + }, + { + "name": "espressif_s2_devkitc", + "inherits": "default" + }, + { + "name": "espressif_s3_devkitc", + "inherits": "default" + }, + { + "name": "espressif_s3_devkitm", + "inherits": "default" + }, + { + "name": "espressif_saola_1", + "inherits": "default" + }, + { + "name": "f1c100s", + "inherits": "default" + }, + { + "name": "fomu", + "inherits": "default" + }, + { + "name": "sipeed_longan_nano", + "inherits": "default" + }, + { + "name": "metro_m7_1011", + "inherits": "default" + }, + { + "name": "metro_m7_1011_sd", + "inherits": "default" + }, + { + "name": "mimxrt1010_evk", + "inherits": "default" + }, + { + "name": "mimxrt1015_evk", + "inherits": "default" + }, + { + "name": "mimxrt1020_evk", + "inherits": "default" + }, + { + "name": "mimxrt1024_evk", + "inherits": "default" + }, + { + "name": "mimxrt1050_evkb", + "inherits": "default" + }, + { + "name": "mimxrt1060_evk", + "inherits": "default" + }, + { + "name": "mimxrt1064_evk", + "inherits": "default" + }, + { + "name": "mimxrt1170_evkb", + "inherits": "default" + }, + { + "name": "teensy_40", + "inherits": "default" + }, + { + "name": "teensy_41", + "inherits": "default" + }, + { + "name": "frdm_k64f", + "inherits": "default" + }, + { + "name": "teensy_35", + "inherits": "default" + }, + { + "name": "frdm_k32l2a4s", + "inherits": "default" + }, + { + "name": "frdm_k32l2b", + "inherits": "default" + }, + { + "name": "kuiic", + "inherits": "default" + }, + { + "name": "frdm_kl25z", + "inherits": "default" + }, + { + "name": "lpcxpresso11u37", + "inherits": "default" + }, + { + "name": "lpcxpresso11u68", + "inherits": "default" + }, + { + "name": "lpcxpresso1347", + "inherits": "default" + }, + { + "name": "lpcxpresso1549", + "inherits": "default" + }, + { + "name": "lpcxpresso1769", + "inherits": "default" + }, + { + "name": "mbed1768", + "inherits": "default" + }, + { + "name": "lpcxpresso18s37", + "inherits": "default" + }, + { + "name": "mcb1800", + "inherits": "default" + }, + { + "name": "ea4088_quickstart", + "inherits": "default" + }, + { + "name": "ea4357", + "inherits": "default" + }, + { + "name": "lpcxpresso43s67", + "inherits": "default" + }, + { + "name": "lpcxpresso51u68", + "inherits": "default" + }, + { + "name": "lpcxpresso54114", + "inherits": "default" + }, + { + "name": "lpcxpresso54608", + "inherits": "default" + }, + { + "name": "lpcxpresso54628", + "inherits": "default" + }, + { + "name": "double_m33_express", + "inherits": "default" + }, + { + "name": "lpcxpresso55s28", + "inherits": "default" + }, + { + "name": "lpcxpresso55s69", + "inherits": "default" + }, + { + "name": "mcu_link", + "inherits": "default" + }, + { + "name": "max32650evkit", + "inherits": "default" + }, + { + "name": "max32650fthr", + "inherits": "default" + }, + { + "name": "max32651evkit", + "inherits": "default" + }, + { + "name": "max32666evkit", + "inherits": "default" + }, + { + "name": "max32666fthr", + "inherits": "default" + }, + { + "name": "apard32690", + "inherits": "default" + }, + { + "name": "max32690evkit", + "inherits": "default" + }, + { + "name": "max78002evkit", + "inherits": "default" + }, + { + "name": "frdm_mcxa153", + "inherits": "default" + }, + { + "name": "frdm_mcxn947", + "inherits": "default" + }, + { + "name": "mcxn947brk", + "inherits": "default" + }, + { + "name": "mm32f327x_mb39", + "inherits": "default" + }, + { + "name": "mm32f327x_pitaya_lite", + "inherits": "default" + }, + { + "name": "msp_exp430f5529lp", + "inherits": "default" + }, + { + "name": "msp_exp432e401y", + "inherits": "default" + }, + { + "name": "adafruit_clue", + "inherits": "default" + }, + { + "name": "arduino_nano33_ble", + "inherits": "default" + }, + { + "name": "circuitplayground_bluefruit", + "inherits": "default" + }, + { + "name": "feather_nrf52840_express", + "inherits": "default" + }, + { + "name": "feather_nrf52840_sense", + "inherits": "default" + }, + { + "name": "itsybitsy_nrf52840", + "inherits": "default" + }, + { + "name": "pca10056", + "inherits": "default" + }, + { + "name": "pca10059", + "inherits": "default" + }, + { + "name": "pca10095", + "inherits": "default" + }, + { + "name": "pca10100", + "inherits": "default" + }, + { + "name": "portenta_c33", + "inherits": "default" + }, + { + "name": "ra2a1_ek", + "inherits": "default" + }, + { + "name": "ra4m1_ek", + "inherits": "default" + }, + { + "name": "ra4m3_ek", + "inherits": "default" + }, + { + "name": "ra6m1_ek", + "inherits": "default" + }, + { + "name": "ra6m5_ek", + "inherits": "default" + }, + { + "name": "ra8m1_ek", + "inherits": "default" + }, + { + "name": "uno_r4", + "inherits": "default" + }, + { + "name": "feather_rp2040_max3421", + "inherits": "default" + }, + { + "name": "pico_sdk", + "inherits": "default" + }, + { + "name": "raspberry_pi_pico", + "inherits": "default" + }, + { + "name": "raspberry_pi_pico2", + "inherits": "default" + }, + { + "name": "cynthion_d11", + "inherits": "default" + }, + { + "name": "samd11_xplained", + "inherits": "default" + }, + { + "name": "atsamd21_xpro", + "inherits": "default" + }, + { + "name": "circuitplayground_express", + "inherits": "default" + }, + { + "name": "curiosity_nano", + "inherits": "default" + }, + { + "name": "cynthion_d21", + "inherits": "default" + }, + { + "name": "feather_m0_express", + "inherits": "default" + }, + { + "name": "itsybitsy_m0", + "inherits": "default" + }, + { + "name": "metro_m0_express", + "inherits": "default" + }, + { + "name": "qtpy", + "inherits": "default" + }, + { + "name": "seeeduino_xiao", + "inherits": "default" + }, + { + "name": "sparkfun_samd21_mini_usb", + "inherits": "default" + }, + { + "name": "trinket_m0", + "inherits": "default" + }, + { + "name": "d5035_01", + "inherits": "default" + }, + { + "name": "feather_m4_express", + "inherits": "default" + }, + { + "name": "itsybitsy_m4", + "inherits": "default" + }, + { + "name": "metro_m4_express", + "inherits": "default" + }, + { + "name": "pybadge", + "inherits": "default" + }, + { + "name": "pyportal", + "inherits": "default" + }, + { + "name": "same54_xplained", + "inherits": "default" + }, + { + "name": "samg55_xplained", + "inherits": "default" + }, + { + "name": "atsaml21_xpro", + "inherits": "default" + }, + { + "name": "saml22_feather", + "inherits": "default" + }, + { + "name": "sensorwatch_m0", + "inherits": "default" + }, + { + "name": "stm32c071nucleo", + "inherits": "default" + }, + { + "name": "stm32f070rbnucleo", + "inherits": "default" + }, + { + "name": "stm32f072disco", + "inherits": "default" + }, + { + "name": "stm32f072eval", + "inherits": "default" + }, + { + "name": "stm32f103ze_iar", + "inherits": "default" + }, + { + "name": "stm32f103_bluepill", + "inherits": "default" + }, + { + "name": "stm32f103_mini_2", + "inherits": "default" + }, + { + "name": "stm32f207nucleo", + "inherits": "default" + }, + { + "name": "stm32f303disco", + "inherits": "default" + }, + { + "name": "feather_stm32f405", + "inherits": "default" + }, + { + "name": "pyboardv11", + "inherits": "default" + }, + { + "name": "stm32f401blackpill", + "inherits": "default" + }, + { + "name": "stm32f407blackvet", + "inherits": "default" + }, + { + "name": "stm32f407disco", + "inherits": "default" + }, + { + "name": "stm32f411blackpill", + "inherits": "default" + }, + { + "name": "stm32f411disco", + "inherits": "default" + }, + { + "name": "stm32f412disco", + "inherits": "default" + }, + { + "name": "stm32f412nucleo", + "inherits": "default" + }, + { + "name": "stm32f439nucleo", + "inherits": "default" + }, + { + "name": "stlinkv3mini", + "inherits": "default" + }, + { + "name": "stm32f723disco", + "inherits": "default" + }, + { + "name": "stm32f746disco", + "inherits": "default" + }, + { + "name": "stm32f746nucleo", + "inherits": "default" + }, + { + "name": "stm32f767nucleo", + "inherits": "default" + }, + { + "name": "stm32f769disco", + "inherits": "default" + }, + { + "name": "stm32g0b1nucleo", + "inherits": "default" + }, + { + "name": "b_g474e_dpow1", + "inherits": "default" + }, + { + "name": "stm32g474nucleo", + "inherits": "default" + }, + { + "name": "stm32g491nucleo", + "inherits": "default" + }, + { + "name": "stm32h503nucleo", + "inherits": "default" + }, + { + "name": "stm32h563nucleo", + "inherits": "default" + }, + { + "name": "stm32h573i_dk", + "inherits": "default" + }, + { + "name": "daisyseed", + "inherits": "default" + }, + { + "name": "stm32h723nucleo", + "inherits": "default" + }, + { + "name": "stm32h743eval", + "inherits": "default" + }, + { + "name": "stm32h743nucleo", + "inherits": "default" + }, + { + "name": "stm32h745disco", + "inherits": "default" + }, + { + "name": "stm32h750bdk", + "inherits": "default" + }, + { + "name": "stm32h750_weact", + "inherits": "default" + }, + { + "name": "waveshare_openh743i", + "inherits": "default" + }, + { + "name": "stm32h7s3nucleo", + "inherits": "default" + }, + { + "name": "stm32l052dap52", + "inherits": "default" + }, + { + "name": "stm32l0538disco", + "inherits": "default" + }, + { + "name": "stm32l412nucleo", + "inherits": "default" + }, + { + "name": "stm32l476disco", + "inherits": "default" + }, + { + "name": "stm32l4p5nucleo", + "inherits": "default" + }, + { + "name": "stm32l4r5nucleo", + "inherits": "default" + }, + { + "name": "b_u585i_iot2a", + "inherits": "default" + }, + { + "name": "stm32u545nucleo", + "inherits": "default" + }, + { + "name": "stm32u575eval", + "inherits": "default" + }, + { + "name": "stm32u575nucleo", + "inherits": "default" + }, + { + "name": "stm32u5a5nucleo", + "inherits": "default" + }, + { + "name": "stm32wb55nucleo", + "inherits": "default" + }, + { + "name": "ek_tm4c123gxl", + "inherits": "default" + }, + { + "name": "xmc4500_relax", + "inherits": "default" + }, + { + "name": "xmc4700_relax", + "inherits": "default" + } + ], + "buildPresets": [ + { + "name": "raspberrypi_zero", + "description": "Build preset for the raspberrypi_zero board", + "configurePreset": "raspberrypi_zero" + }, + { + "name": "raspberrypi_cm4", + "description": "Build preset for the raspberrypi_cm4 board", + "configurePreset": "raspberrypi_cm4" + }, + { + "name": "raspberrypi_zero2", + "description": "Build preset for the raspberrypi_zero2 board", + "configurePreset": "raspberrypi_zero2" + }, + { + "name": "ch32v103r_r1_1v0", + "description": "Build preset for the ch32v103r_r1_1v0 board", + "configurePreset": "ch32v103r_r1_1v0" + }, + { + "name": "ch32v203c_r0_1v0", + "description": "Build preset for the ch32v203c_r0_1v0 board", + "configurePreset": "ch32v203c_r0_1v0" + }, + { + "name": "ch32v203g_r0_1v0", + "description": "Build preset for the ch32v203g_r0_1v0 board", + "configurePreset": "ch32v203g_r0_1v0" + }, + { + "name": "nanoch32v203", + "description": "Build preset for the nanoch32v203 board", + "configurePreset": "nanoch32v203" + }, + { + "name": "ch32v307v_r1_1v0", + "description": "Build preset for the ch32v307v_r1_1v0 board", + "configurePreset": "ch32v307v_r1_1v0" + }, + { + "name": "da14695_dk_usb", + "description": "Build preset for the da14695_dk_usb board", + "configurePreset": "da14695_dk_usb" + }, + { + "name": "da1469x_dk_pro", + "description": "Build preset for the da1469x_dk_pro board", + "configurePreset": "da1469x_dk_pro" + }, + { + "name": "adafruit_feather_esp32s2", + "description": "Build preset for the adafruit_feather_esp32s2 board", + "configurePreset": "adafruit_feather_esp32s2" + }, + { + "name": "adafruit_feather_esp32s3", + "description": "Build preset for the adafruit_feather_esp32s3 board", + "configurePreset": "adafruit_feather_esp32s3" + }, + { + "name": "adafruit_feather_esp32_v2", + "description": "Build preset for the adafruit_feather_esp32_v2 board", + "configurePreset": "adafruit_feather_esp32_v2" + }, + { + "name": "adafruit_magtag_29gray", + "description": "Build preset for the adafruit_magtag_29gray board", + "configurePreset": "adafruit_magtag_29gray" + }, + { + "name": "adafruit_metro_esp32s2", + "description": "Build preset for the adafruit_metro_esp32s2 board", + "configurePreset": "adafruit_metro_esp32s2" + }, + { + "name": "espressif_addax_1", + "description": "Build preset for the espressif_addax_1 board", + "configurePreset": "espressif_addax_1" + }, + { + "name": "espressif_c3_devkitc", + "description": "Build preset for the espressif_c3_devkitc board", + "configurePreset": "espressif_c3_devkitc" + }, + { + "name": "espressif_c6_devkitc", + "description": "Build preset for the espressif_c6_devkitc board", + "configurePreset": "espressif_c6_devkitc" + }, + { + "name": "espressif_kaluga_1", + "description": "Build preset for the espressif_kaluga_1 board", + "configurePreset": "espressif_kaluga_1" + }, + { + "name": "espressif_p4_function_ev", + "description": "Build preset for the espressif_p4_function_ev board", + "configurePreset": "espressif_p4_function_ev" + }, + { + "name": "espressif_s2_devkitc", + "description": "Build preset for the espressif_s2_devkitc board", + "configurePreset": "espressif_s2_devkitc" + }, + { + "name": "espressif_s3_devkitc", + "description": "Build preset for the espressif_s3_devkitc board", + "configurePreset": "espressif_s3_devkitc" + }, + { + "name": "espressif_s3_devkitm", + "description": "Build preset for the espressif_s3_devkitm board", + "configurePreset": "espressif_s3_devkitm" + }, + { + "name": "espressif_saola_1", + "description": "Build preset for the espressif_saola_1 board", + "configurePreset": "espressif_saola_1" + }, + { + "name": "f1c100s", + "description": "Build preset for the f1c100s board", + "configurePreset": "f1c100s" + }, + { + "name": "fomu", + "description": "Build preset for the fomu board", + "configurePreset": "fomu" + }, + { + "name": "sipeed_longan_nano", + "description": "Build preset for the sipeed_longan_nano board", + "configurePreset": "sipeed_longan_nano" + }, + { + "name": "metro_m7_1011", + "description": "Build preset for the metro_m7_1011 board", + "configurePreset": "metro_m7_1011" + }, + { + "name": "metro_m7_1011_sd", + "description": "Build preset for the metro_m7_1011_sd board", + "configurePreset": "metro_m7_1011_sd" + }, + { + "name": "mimxrt1010_evk", + "description": "Build preset for the mimxrt1010_evk board", + "configurePreset": "mimxrt1010_evk" + }, + { + "name": "mimxrt1015_evk", + "description": "Build preset for the mimxrt1015_evk board", + "configurePreset": "mimxrt1015_evk" + }, + { + "name": "mimxrt1020_evk", + "description": "Build preset for the mimxrt1020_evk board", + "configurePreset": "mimxrt1020_evk" + }, + { + "name": "mimxrt1024_evk", + "description": "Build preset for the mimxrt1024_evk board", + "configurePreset": "mimxrt1024_evk" + }, + { + "name": "mimxrt1050_evkb", + "description": "Build preset for the mimxrt1050_evkb board", + "configurePreset": "mimxrt1050_evkb" + }, + { + "name": "mimxrt1060_evk", + "description": "Build preset for the mimxrt1060_evk board", + "configurePreset": "mimxrt1060_evk" + }, + { + "name": "mimxrt1064_evk", + "description": "Build preset for the mimxrt1064_evk board", + "configurePreset": "mimxrt1064_evk" + }, + { + "name": "mimxrt1170_evkb", + "description": "Build preset for the mimxrt1170_evkb board", + "configurePreset": "mimxrt1170_evkb" + }, + { + "name": "teensy_40", + "description": "Build preset for the teensy_40 board", + "configurePreset": "teensy_40" + }, + { + "name": "teensy_41", + "description": "Build preset for the teensy_41 board", + "configurePreset": "teensy_41" + }, + { + "name": "frdm_k64f", + "description": "Build preset for the frdm_k64f board", + "configurePreset": "frdm_k64f" + }, + { + "name": "teensy_35", + "description": "Build preset for the teensy_35 board", + "configurePreset": "teensy_35" + }, + { + "name": "frdm_k32l2a4s", + "description": "Build preset for the frdm_k32l2a4s board", + "configurePreset": "frdm_k32l2a4s" + }, + { + "name": "frdm_k32l2b", + "description": "Build preset for the frdm_k32l2b board", + "configurePreset": "frdm_k32l2b" + }, + { + "name": "kuiic", + "description": "Build preset for the kuiic board", + "configurePreset": "kuiic" + }, + { + "name": "frdm_kl25z", + "description": "Build preset for the frdm_kl25z board", + "configurePreset": "frdm_kl25z" + }, + { + "name": "lpcxpresso11u37", + "description": "Build preset for the lpcxpresso11u37 board", + "configurePreset": "lpcxpresso11u37" + }, + { + "name": "lpcxpresso11u68", + "description": "Build preset for the lpcxpresso11u68 board", + "configurePreset": "lpcxpresso11u68" + }, + { + "name": "lpcxpresso1347", + "description": "Build preset for the lpcxpresso1347 board", + "configurePreset": "lpcxpresso1347" + }, + { + "name": "lpcxpresso1549", + "description": "Build preset for the lpcxpresso1549 board", + "configurePreset": "lpcxpresso1549" + }, + { + "name": "lpcxpresso1769", + "description": "Build preset for the lpcxpresso1769 board", + "configurePreset": "lpcxpresso1769" + }, + { + "name": "mbed1768", + "description": "Build preset for the mbed1768 board", + "configurePreset": "mbed1768" + }, + { + "name": "lpcxpresso18s37", + "description": "Build preset for the lpcxpresso18s37 board", + "configurePreset": "lpcxpresso18s37" + }, + { + "name": "mcb1800", + "description": "Build preset for the mcb1800 board", + "configurePreset": "mcb1800" + }, + { + "name": "ea4088_quickstart", + "description": "Build preset for the ea4088_quickstart board", + "configurePreset": "ea4088_quickstart" + }, + { + "name": "ea4357", + "description": "Build preset for the ea4357 board", + "configurePreset": "ea4357" + }, + { + "name": "lpcxpresso43s67", + "description": "Build preset for the lpcxpresso43s67 board", + "configurePreset": "lpcxpresso43s67" + }, + { + "name": "lpcxpresso51u68", + "description": "Build preset for the lpcxpresso51u68 board", + "configurePreset": "lpcxpresso51u68" + }, + { + "name": "lpcxpresso54114", + "description": "Build preset for the lpcxpresso54114 board", + "configurePreset": "lpcxpresso54114" + }, + { + "name": "lpcxpresso54608", + "description": "Build preset for the lpcxpresso54608 board", + "configurePreset": "lpcxpresso54608" + }, + { + "name": "lpcxpresso54628", + "description": "Build preset for the lpcxpresso54628 board", + "configurePreset": "lpcxpresso54628" + }, + { + "name": "double_m33_express", + "description": "Build preset for the double_m33_express board", + "configurePreset": "double_m33_express" + }, + { + "name": "lpcxpresso55s28", + "description": "Build preset for the lpcxpresso55s28 board", + "configurePreset": "lpcxpresso55s28" + }, + { + "name": "lpcxpresso55s69", + "description": "Build preset for the lpcxpresso55s69 board", + "configurePreset": "lpcxpresso55s69" + }, + { + "name": "mcu_link", + "description": "Build preset for the mcu_link board", + "configurePreset": "mcu_link" + }, + { + "name": "max32650evkit", + "description": "Build preset for the max32650evkit board", + "configurePreset": "max32650evkit" + }, + { + "name": "max32650fthr", + "description": "Build preset for the max32650fthr board", + "configurePreset": "max32650fthr" + }, + { + "name": "max32651evkit", + "description": "Build preset for the max32651evkit board", + "configurePreset": "max32651evkit" + }, + { + "name": "max32666evkit", + "description": "Build preset for the max32666evkit board", + "configurePreset": "max32666evkit" + }, + { + "name": "max32666fthr", + "description": "Build preset for the max32666fthr board", + "configurePreset": "max32666fthr" + }, + { + "name": "apard32690", + "description": "Build preset for the apard32690 board", + "configurePreset": "apard32690" + }, + { + "name": "max32690evkit", + "description": "Build preset for the max32690evkit board", + "configurePreset": "max32690evkit" + }, + { + "name": "max78002evkit", + "description": "Build preset for the max78002evkit board", + "configurePreset": "max78002evkit" + }, + { + "name": "frdm_mcxa153", + "description": "Build preset for the frdm_mcxa153 board", + "configurePreset": "frdm_mcxa153" + }, + { + "name": "frdm_mcxn947", + "description": "Build preset for the frdm_mcxn947 board", + "configurePreset": "frdm_mcxn947" + }, + { + "name": "mcxn947brk", + "description": "Build preset for the mcxn947brk board", + "configurePreset": "mcxn947brk" + }, + { + "name": "mm32f327x_mb39", + "description": "Build preset for the mm32f327x_mb39 board", + "configurePreset": "mm32f327x_mb39" + }, + { + "name": "mm32f327x_pitaya_lite", + "description": "Build preset for the mm32f327x_pitaya_lite board", + "configurePreset": "mm32f327x_pitaya_lite" + }, + { + "name": "msp_exp430f5529lp", + "description": "Build preset for the msp_exp430f5529lp board", + "configurePreset": "msp_exp430f5529lp" + }, + { + "name": "msp_exp432e401y", + "description": "Build preset for the msp_exp432e401y board", + "configurePreset": "msp_exp432e401y" + }, + { + "name": "adafruit_clue", + "description": "Build preset for the adafruit_clue board", + "configurePreset": "adafruit_clue" + }, + { + "name": "arduino_nano33_ble", + "description": "Build preset for the arduino_nano33_ble board", + "configurePreset": "arduino_nano33_ble" + }, + { + "name": "circuitplayground_bluefruit", + "description": "Build preset for the circuitplayground_bluefruit board", + "configurePreset": "circuitplayground_bluefruit" + }, + { + "name": "feather_nrf52840_express", + "description": "Build preset for the feather_nrf52840_express board", + "configurePreset": "feather_nrf52840_express" + }, + { + "name": "feather_nrf52840_sense", + "description": "Build preset for the feather_nrf52840_sense board", + "configurePreset": "feather_nrf52840_sense" + }, + { + "name": "itsybitsy_nrf52840", + "description": "Build preset for the itsybitsy_nrf52840 board", + "configurePreset": "itsybitsy_nrf52840" + }, + { + "name": "pca10056", + "description": "Build preset for the pca10056 board", + "configurePreset": "pca10056" + }, + { + "name": "pca10059", + "description": "Build preset for the pca10059 board", + "configurePreset": "pca10059" + }, + { + "name": "pca10095", + "description": "Build preset for the pca10095 board", + "configurePreset": "pca10095" + }, + { + "name": "pca10100", + "description": "Build preset for the pca10100 board", + "configurePreset": "pca10100" + }, + { + "name": "portenta_c33", + "description": "Build preset for the portenta_c33 board", + "configurePreset": "portenta_c33" + }, + { + "name": "ra2a1_ek", + "description": "Build preset for the ra2a1_ek board", + "configurePreset": "ra2a1_ek" + }, + { + "name": "ra4m1_ek", + "description": "Build preset for the ra4m1_ek board", + "configurePreset": "ra4m1_ek" + }, + { + "name": "ra4m3_ek", + "description": "Build preset for the ra4m3_ek board", + "configurePreset": "ra4m3_ek" + }, + { + "name": "ra6m1_ek", + "description": "Build preset for the ra6m1_ek board", + "configurePreset": "ra6m1_ek" + }, + { + "name": "ra6m5_ek", + "description": "Build preset for the ra6m5_ek board", + "configurePreset": "ra6m5_ek" + }, + { + "name": "ra8m1_ek", + "description": "Build preset for the ra8m1_ek board", + "configurePreset": "ra8m1_ek" + }, + { + "name": "uno_r4", + "description": "Build preset for the uno_r4 board", + "configurePreset": "uno_r4" + }, + { + "name": "feather_rp2040_max3421", + "description": "Build preset for the feather_rp2040_max3421 board", + "configurePreset": "feather_rp2040_max3421" + }, + { + "name": "pico_sdk", + "description": "Build preset for the pico_sdk board", + "configurePreset": "pico_sdk" + }, + { + "name": "raspberry_pi_pico", + "description": "Build preset for the raspberry_pi_pico board", + "configurePreset": "raspberry_pi_pico" + }, + { + "name": "raspberry_pi_pico2", + "description": "Build preset for the raspberry_pi_pico2 board", + "configurePreset": "raspberry_pi_pico2" + }, + { + "name": "cynthion_d11", + "description": "Build preset for the cynthion_d11 board", + "configurePreset": "cynthion_d11" + }, + { + "name": "samd11_xplained", + "description": "Build preset for the samd11_xplained board", + "configurePreset": "samd11_xplained" + }, + { + "name": "atsamd21_xpro", + "description": "Build preset for the atsamd21_xpro board", + "configurePreset": "atsamd21_xpro" + }, + { + "name": "circuitplayground_express", + "description": "Build preset for the circuitplayground_express board", + "configurePreset": "circuitplayground_express" + }, + { + "name": "curiosity_nano", + "description": "Build preset for the curiosity_nano board", + "configurePreset": "curiosity_nano" + }, + { + "name": "cynthion_d21", + "description": "Build preset for the cynthion_d21 board", + "configurePreset": "cynthion_d21" + }, + { + "name": "feather_m0_express", + "description": "Build preset for the feather_m0_express board", + "configurePreset": "feather_m0_express" + }, + { + "name": "itsybitsy_m0", + "description": "Build preset for the itsybitsy_m0 board", + "configurePreset": "itsybitsy_m0" + }, + { + "name": "metro_m0_express", + "description": "Build preset for the metro_m0_express board", + "configurePreset": "metro_m0_express" + }, + { + "name": "qtpy", + "description": "Build preset for the qtpy board", + "configurePreset": "qtpy" + }, + { + "name": "seeeduino_xiao", + "description": "Build preset for the seeeduino_xiao board", + "configurePreset": "seeeduino_xiao" + }, + { + "name": "sparkfun_samd21_mini_usb", + "description": "Build preset for the sparkfun_samd21_mini_usb board", + "configurePreset": "sparkfun_samd21_mini_usb" + }, + { + "name": "trinket_m0", + "description": "Build preset for the trinket_m0 board", + "configurePreset": "trinket_m0" + }, + { + "name": "d5035_01", + "description": "Build preset for the d5035_01 board", + "configurePreset": "d5035_01" + }, + { + "name": "feather_m4_express", + "description": "Build preset for the feather_m4_express board", + "configurePreset": "feather_m4_express" + }, + { + "name": "itsybitsy_m4", + "description": "Build preset for the itsybitsy_m4 board", + "configurePreset": "itsybitsy_m4" + }, + { + "name": "metro_m4_express", + "description": "Build preset for the metro_m4_express board", + "configurePreset": "metro_m4_express" + }, + { + "name": "pybadge", + "description": "Build preset for the pybadge board", + "configurePreset": "pybadge" + }, + { + "name": "pyportal", + "description": "Build preset for the pyportal board", + "configurePreset": "pyportal" + }, + { + "name": "same54_xplained", + "description": "Build preset for the same54_xplained board", + "configurePreset": "same54_xplained" + }, + { + "name": "samg55_xplained", + "description": "Build preset for the samg55_xplained board", + "configurePreset": "samg55_xplained" + }, + { + "name": "atsaml21_xpro", + "description": "Build preset for the atsaml21_xpro board", + "configurePreset": "atsaml21_xpro" + }, + { + "name": "saml22_feather", + "description": "Build preset for the saml22_feather board", + "configurePreset": "saml22_feather" + }, + { + "name": "sensorwatch_m0", + "description": "Build preset for the sensorwatch_m0 board", + "configurePreset": "sensorwatch_m0" + }, + { + "name": "stm32c071nucleo", + "description": "Build preset for the stm32c071nucleo board", + "configurePreset": "stm32c071nucleo" + }, + { + "name": "stm32f070rbnucleo", + "description": "Build preset for the stm32f070rbnucleo board", + "configurePreset": "stm32f070rbnucleo" + }, + { + "name": "stm32f072disco", + "description": "Build preset for the stm32f072disco board", + "configurePreset": "stm32f072disco" + }, + { + "name": "stm32f072eval", + "description": "Build preset for the stm32f072eval board", + "configurePreset": "stm32f072eval" + }, + { + "name": "stm32f103ze_iar", + "description": "Build preset for the stm32f103ze_iar board", + "configurePreset": "stm32f103ze_iar" + }, + { + "name": "stm32f103_bluepill", + "description": "Build preset for the stm32f103_bluepill board", + "configurePreset": "stm32f103_bluepill" + }, + { + "name": "stm32f103_mini_2", + "description": "Build preset for the stm32f103_mini_2 board", + "configurePreset": "stm32f103_mini_2" + }, + { + "name": "stm32f207nucleo", + "description": "Build preset for the stm32f207nucleo board", + "configurePreset": "stm32f207nucleo" + }, + { + "name": "stm32f303disco", + "description": "Build preset for the stm32f303disco board", + "configurePreset": "stm32f303disco" + }, + { + "name": "feather_stm32f405", + "description": "Build preset for the feather_stm32f405 board", + "configurePreset": "feather_stm32f405" + }, + { + "name": "pyboardv11", + "description": "Build preset for the pyboardv11 board", + "configurePreset": "pyboardv11" + }, + { + "name": "stm32f401blackpill", + "description": "Build preset for the stm32f401blackpill board", + "configurePreset": "stm32f401blackpill" + }, + { + "name": "stm32f407blackvet", + "description": "Build preset for the stm32f407blackvet board", + "configurePreset": "stm32f407blackvet" + }, + { + "name": "stm32f407disco", + "description": "Build preset for the stm32f407disco board", + "configurePreset": "stm32f407disco" + }, + { + "name": "stm32f411blackpill", + "description": "Build preset for the stm32f411blackpill board", + "configurePreset": "stm32f411blackpill" + }, + { + "name": "stm32f411disco", + "description": "Build preset for the stm32f411disco board", + "configurePreset": "stm32f411disco" + }, + { + "name": "stm32f412disco", + "description": "Build preset for the stm32f412disco board", + "configurePreset": "stm32f412disco" + }, + { + "name": "stm32f412nucleo", + "description": "Build preset for the stm32f412nucleo board", + "configurePreset": "stm32f412nucleo" + }, + { + "name": "stm32f439nucleo", + "description": "Build preset for the stm32f439nucleo board", + "configurePreset": "stm32f439nucleo" + }, + { + "name": "stlinkv3mini", + "description": "Build preset for the stlinkv3mini board", + "configurePreset": "stlinkv3mini" + }, + { + "name": "stm32f723disco", + "description": "Build preset for the stm32f723disco board", + "configurePreset": "stm32f723disco" + }, + { + "name": "stm32f746disco", + "description": "Build preset for the stm32f746disco board", + "configurePreset": "stm32f746disco" + }, + { + "name": "stm32f746nucleo", + "description": "Build preset for the stm32f746nucleo board", + "configurePreset": "stm32f746nucleo" + }, + { + "name": "stm32f767nucleo", + "description": "Build preset for the stm32f767nucleo board", + "configurePreset": "stm32f767nucleo" + }, + { + "name": "stm32f769disco", + "description": "Build preset for the stm32f769disco board", + "configurePreset": "stm32f769disco" + }, + { + "name": "stm32g0b1nucleo", + "description": "Build preset for the stm32g0b1nucleo board", + "configurePreset": "stm32g0b1nucleo" + }, + { + "name": "b_g474e_dpow1", + "description": "Build preset for the b_g474e_dpow1 board", + "configurePreset": "b_g474e_dpow1" + }, + { + "name": "stm32g474nucleo", + "description": "Build preset for the stm32g474nucleo board", + "configurePreset": "stm32g474nucleo" + }, + { + "name": "stm32g491nucleo", + "description": "Build preset for the stm32g491nucleo board", + "configurePreset": "stm32g491nucleo" + }, + { + "name": "stm32h503nucleo", + "description": "Build preset for the stm32h503nucleo board", + "configurePreset": "stm32h503nucleo" + }, + { + "name": "stm32h563nucleo", + "description": "Build preset for the stm32h563nucleo board", + "configurePreset": "stm32h563nucleo" + }, + { + "name": "stm32h573i_dk", + "description": "Build preset for the stm32h573i_dk board", + "configurePreset": "stm32h573i_dk" + }, + { + "name": "daisyseed", + "description": "Build preset for the daisyseed board", + "configurePreset": "daisyseed" + }, + { + "name": "stm32h723nucleo", + "description": "Build preset for the stm32h723nucleo board", + "configurePreset": "stm32h723nucleo" + }, + { + "name": "stm32h743eval", + "description": "Build preset for the stm32h743eval board", + "configurePreset": "stm32h743eval" + }, + { + "name": "stm32h743nucleo", + "description": "Build preset for the stm32h743nucleo board", + "configurePreset": "stm32h743nucleo" + }, + { + "name": "stm32h745disco", + "description": "Build preset for the stm32h745disco board", + "configurePreset": "stm32h745disco" + }, + { + "name": "stm32h750bdk", + "description": "Build preset for the stm32h750bdk board", + "configurePreset": "stm32h750bdk" + }, + { + "name": "stm32h750_weact", + "description": "Build preset for the stm32h750_weact board", + "configurePreset": "stm32h750_weact" + }, + { + "name": "waveshare_openh743i", + "description": "Build preset for the waveshare_openh743i board", + "configurePreset": "waveshare_openh743i" + }, + { + "name": "stm32h7s3nucleo", + "description": "Build preset for the stm32h7s3nucleo board", + "configurePreset": "stm32h7s3nucleo" + }, + { + "name": "stm32l052dap52", + "description": "Build preset for the stm32l052dap52 board", + "configurePreset": "stm32l052dap52" + }, + { + "name": "stm32l0538disco", + "description": "Build preset for the stm32l0538disco board", + "configurePreset": "stm32l0538disco" + }, + { + "name": "stm32l412nucleo", + "description": "Build preset for the stm32l412nucleo board", + "configurePreset": "stm32l412nucleo" + }, + { + "name": "stm32l476disco", + "description": "Build preset for the stm32l476disco board", + "configurePreset": "stm32l476disco" + }, + { + "name": "stm32l4p5nucleo", + "description": "Build preset for the stm32l4p5nucleo board", + "configurePreset": "stm32l4p5nucleo" + }, + { + "name": "stm32l4r5nucleo", + "description": "Build preset for the stm32l4r5nucleo board", + "configurePreset": "stm32l4r5nucleo" + }, + { + "name": "b_u585i_iot2a", + "description": "Build preset for the b_u585i_iot2a board", + "configurePreset": "b_u585i_iot2a" + }, + { + "name": "stm32u545nucleo", + "description": "Build preset for the stm32u545nucleo board", + "configurePreset": "stm32u545nucleo" + }, + { + "name": "stm32u575eval", + "description": "Build preset for the stm32u575eval board", + "configurePreset": "stm32u575eval" + }, + { + "name": "stm32u575nucleo", + "description": "Build preset for the stm32u575nucleo board", + "configurePreset": "stm32u575nucleo" + }, + { + "name": "stm32u5a5nucleo", + "description": "Build preset for the stm32u5a5nucleo board", + "configurePreset": "stm32u5a5nucleo" + }, + { + "name": "stm32wb55nucleo", + "description": "Build preset for the stm32wb55nucleo board", + "configurePreset": "stm32wb55nucleo" + }, + { + "name": "ek_tm4c123gxl", + "description": "Build preset for the ek_tm4c123gxl board", + "configurePreset": "ek_tm4c123gxl" + }, + { + "name": "xmc4500_relax", + "description": "Build preset for the xmc4500_relax board", + "configurePreset": "xmc4500_relax" + }, + { + "name": "xmc4700_relax", + "description": "Build preset for the xmc4700_relax board", + "configurePreset": "xmc4700_relax" + } + ], + "workflowPresets": [ + { + "name": "raspberrypi_zero", + "steps": [ + { + "type": "configure", + "name": "raspberrypi_zero" + }, + { + "type": "build", + "name": "raspberrypi_zero" + } + ] + }, + { + "name": "raspberrypi_cm4", + "steps": [ + { + "type": "configure", + "name": "raspberrypi_cm4" + }, + { + "type": "build", + "name": "raspberrypi_cm4" + } + ] + }, + { + "name": "raspberrypi_zero2", + "steps": [ + { + "type": "configure", + "name": "raspberrypi_zero2" + }, + { + "type": "build", + "name": "raspberrypi_zero2" + } + ] + }, + { + "name": "ch32v103r_r1_1v0", + "steps": [ + { + "type": "configure", + "name": "ch32v103r_r1_1v0" + }, + { + "type": "build", + "name": "ch32v103r_r1_1v0" + } + ] + }, + { + "name": "ch32v203c_r0_1v0", + "steps": [ + { + "type": "configure", + "name": "ch32v203c_r0_1v0" + }, + { + "type": "build", + "name": "ch32v203c_r0_1v0" + } + ] + }, + { + "name": "ch32v203g_r0_1v0", + "steps": [ + { + "type": "configure", + "name": "ch32v203g_r0_1v0" + }, + { + "type": "build", + "name": "ch32v203g_r0_1v0" + } + ] + }, + { + "name": "nanoch32v203", + "steps": [ + { + "type": "configure", + "name": "nanoch32v203" + }, + { + "type": "build", + "name": "nanoch32v203" + } + ] + }, + { + "name": "ch32v307v_r1_1v0", + "steps": [ + { + "type": "configure", + "name": "ch32v307v_r1_1v0" + }, + { + "type": "build", + "name": "ch32v307v_r1_1v0" + } + ] + }, + { + "name": "da14695_dk_usb", + "steps": [ + { + "type": "configure", + "name": "da14695_dk_usb" + }, + { + "type": "build", + "name": "da14695_dk_usb" + } + ] + }, + { + "name": "da1469x_dk_pro", + "steps": [ + { + "type": "configure", + "name": "da1469x_dk_pro" + }, + { + "type": "build", + "name": "da1469x_dk_pro" + } + ] + }, + { + "name": "adafruit_feather_esp32s2", + "steps": [ + { + "type": "configure", + "name": "adafruit_feather_esp32s2" + }, + { + "type": "build", + "name": "adafruit_feather_esp32s2" + } + ] + }, + { + "name": "adafruit_feather_esp32s3", + "steps": [ + { + "type": "configure", + "name": "adafruit_feather_esp32s3" + }, + { + "type": "build", + "name": "adafruit_feather_esp32s3" + } + ] + }, + { + "name": "adafruit_feather_esp32_v2", + "steps": [ + { + "type": "configure", + "name": "adafruit_feather_esp32_v2" + }, + { + "type": "build", + "name": "adafruit_feather_esp32_v2" + } + ] + }, + { + "name": "adafruit_magtag_29gray", + "steps": [ + { + "type": "configure", + "name": "adafruit_magtag_29gray" + }, + { + "type": "build", + "name": "adafruit_magtag_29gray" + } + ] + }, + { + "name": "adafruit_metro_esp32s2", + "steps": [ + { + "type": "configure", + "name": "adafruit_metro_esp32s2" + }, + { + "type": "build", + "name": "adafruit_metro_esp32s2" + } + ] + }, + { + "name": "espressif_addax_1", + "steps": [ + { + "type": "configure", + "name": "espressif_addax_1" + }, + { + "type": "build", + "name": "espressif_addax_1" + } + ] + }, + { + "name": "espressif_c3_devkitc", + "steps": [ + { + "type": "configure", + "name": "espressif_c3_devkitc" + }, + { + "type": "build", + "name": "espressif_c3_devkitc" + } + ] + }, + { + "name": "espressif_c6_devkitc", + "steps": [ + { + "type": "configure", + "name": "espressif_c6_devkitc" + }, + { + "type": "build", + "name": "espressif_c6_devkitc" + } + ] + }, + { + "name": "espressif_kaluga_1", + "steps": [ + { + "type": "configure", + "name": "espressif_kaluga_1" + }, + { + "type": "build", + "name": "espressif_kaluga_1" + } + ] + }, + { + "name": "espressif_p4_function_ev", + "steps": [ + { + "type": "configure", + "name": "espressif_p4_function_ev" + }, + { + "type": "build", + "name": "espressif_p4_function_ev" + } + ] + }, + { + "name": "espressif_s2_devkitc", + "steps": [ + { + "type": "configure", + "name": "espressif_s2_devkitc" + }, + { + "type": "build", + "name": "espressif_s2_devkitc" + } + ] + }, + { + "name": "espressif_s3_devkitc", + "steps": [ + { + "type": "configure", + "name": "espressif_s3_devkitc" + }, + { + "type": "build", + "name": "espressif_s3_devkitc" + } + ] + }, + { + "name": "espressif_s3_devkitm", + "steps": [ + { + "type": "configure", + "name": "espressif_s3_devkitm" + }, + { + "type": "build", + "name": "espressif_s3_devkitm" + } + ] + }, + { + "name": "espressif_saola_1", + "steps": [ + { + "type": "configure", + "name": "espressif_saola_1" + }, + { + "type": "build", + "name": "espressif_saola_1" + } + ] + }, + { + "name": "f1c100s", + "steps": [ + { + "type": "configure", + "name": "f1c100s" + }, + { + "type": "build", + "name": "f1c100s" + } + ] + }, + { + "name": "fomu", + "steps": [ + { + "type": "configure", + "name": "fomu" + }, + { + "type": "build", + "name": "fomu" + } + ] + }, + { + "name": "sipeed_longan_nano", + "steps": [ + { + "type": "configure", + "name": "sipeed_longan_nano" + }, + { + "type": "build", + "name": "sipeed_longan_nano" + } + ] + }, + { + "name": "metro_m7_1011", + "steps": [ + { + "type": "configure", + "name": "metro_m7_1011" + }, + { + "type": "build", + "name": "metro_m7_1011" + } + ] + }, + { + "name": "metro_m7_1011_sd", + "steps": [ + { + "type": "configure", + "name": "metro_m7_1011_sd" + }, + { + "type": "build", + "name": "metro_m7_1011_sd" + } + ] + }, + { + "name": "mimxrt1010_evk", + "steps": [ + { + "type": "configure", + "name": "mimxrt1010_evk" + }, + { + "type": "build", + "name": "mimxrt1010_evk" + } + ] + }, + { + "name": "mimxrt1015_evk", + "steps": [ + { + "type": "configure", + "name": "mimxrt1015_evk" + }, + { + "type": "build", + "name": "mimxrt1015_evk" + } + ] + }, + { + "name": "mimxrt1020_evk", + "steps": [ + { + "type": "configure", + "name": "mimxrt1020_evk" + }, + { + "type": "build", + "name": "mimxrt1020_evk" + } + ] + }, + { + "name": "mimxrt1024_evk", + "steps": [ + { + "type": "configure", + "name": "mimxrt1024_evk" + }, + { + "type": "build", + "name": "mimxrt1024_evk" + } + ] + }, + { + "name": "mimxrt1050_evkb", + "steps": [ + { + "type": "configure", + "name": "mimxrt1050_evkb" + }, + { + "type": "build", + "name": "mimxrt1050_evkb" + } + ] + }, + { + "name": "mimxrt1060_evk", + "steps": [ + { + "type": "configure", + "name": "mimxrt1060_evk" + }, + { + "type": "build", + "name": "mimxrt1060_evk" + } + ] + }, + { + "name": "mimxrt1064_evk", + "steps": [ + { + "type": "configure", + "name": "mimxrt1064_evk" + }, + { + "type": "build", + "name": "mimxrt1064_evk" + } + ] + }, + { + "name": "mimxrt1170_evkb", + "steps": [ + { + "type": "configure", + "name": "mimxrt1170_evkb" + }, + { + "type": "build", + "name": "mimxrt1170_evkb" + } + ] + }, + { + "name": "teensy_40", + "steps": [ + { + "type": "configure", + "name": "teensy_40" + }, + { + "type": "build", + "name": "teensy_40" + } + ] + }, + { + "name": "teensy_41", + "steps": [ + { + "type": "configure", + "name": "teensy_41" + }, + { + "type": "build", + "name": "teensy_41" + } + ] + }, + { + "name": "frdm_k64f", + "steps": [ + { + "type": "configure", + "name": "frdm_k64f" + }, + { + "type": "build", + "name": "frdm_k64f" + } + ] + }, + { + "name": "teensy_35", + "steps": [ + { + "type": "configure", + "name": "teensy_35" + }, + { + "type": "build", + "name": "teensy_35" + } + ] + }, + { + "name": "frdm_k32l2a4s", + "steps": [ + { + "type": "configure", + "name": "frdm_k32l2a4s" + }, + { + "type": "build", + "name": "frdm_k32l2a4s" + } + ] + }, + { + "name": "frdm_k32l2b", + "steps": [ + { + "type": "configure", + "name": "frdm_k32l2b" + }, + { + "type": "build", + "name": "frdm_k32l2b" + } + ] + }, + { + "name": "kuiic", + "steps": [ + { + "type": "configure", + "name": "kuiic" + }, + { + "type": "build", + "name": "kuiic" + } + ] + }, + { + "name": "frdm_kl25z", + "steps": [ + { + "type": "configure", + "name": "frdm_kl25z" + }, + { + "type": "build", + "name": "frdm_kl25z" + } + ] + }, + { + "name": "lpcxpresso11u37", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso11u37" + }, + { + "type": "build", + "name": "lpcxpresso11u37" + } + ] + }, + { + "name": "lpcxpresso11u68", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso11u68" + }, + { + "type": "build", + "name": "lpcxpresso11u68" + } + ] + }, + { + "name": "lpcxpresso1347", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso1347" + }, + { + "type": "build", + "name": "lpcxpresso1347" + } + ] + }, + { + "name": "lpcxpresso1549", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso1549" + }, + { + "type": "build", + "name": "lpcxpresso1549" + } + ] + }, + { + "name": "lpcxpresso1769", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso1769" + }, + { + "type": "build", + "name": "lpcxpresso1769" + } + ] + }, + { + "name": "mbed1768", + "steps": [ + { + "type": "configure", + "name": "mbed1768" + }, + { + "type": "build", + "name": "mbed1768" + } + ] + }, + { + "name": "lpcxpresso18s37", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso18s37" + }, + { + "type": "build", + "name": "lpcxpresso18s37" + } + ] + }, + { + "name": "mcb1800", + "steps": [ + { + "type": "configure", + "name": "mcb1800" + }, + { + "type": "build", + "name": "mcb1800" + } + ] + }, + { + "name": "ea4088_quickstart", + "steps": [ + { + "type": "configure", + "name": "ea4088_quickstart" + }, + { + "type": "build", + "name": "ea4088_quickstart" + } + ] + }, + { + "name": "ea4357", + "steps": [ + { + "type": "configure", + "name": "ea4357" + }, + { + "type": "build", + "name": "ea4357" + } + ] + }, + { + "name": "lpcxpresso43s67", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso43s67" + }, + { + "type": "build", + "name": "lpcxpresso43s67" + } + ] + }, + { + "name": "lpcxpresso51u68", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso51u68" + }, + { + "type": "build", + "name": "lpcxpresso51u68" + } + ] + }, + { + "name": "lpcxpresso54114", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso54114" + }, + { + "type": "build", + "name": "lpcxpresso54114" + } + ] + }, + { + "name": "lpcxpresso54608", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso54608" + }, + { + "type": "build", + "name": "lpcxpresso54608" + } + ] + }, + { + "name": "lpcxpresso54628", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso54628" + }, + { + "type": "build", + "name": "lpcxpresso54628" + } + ] + }, + { + "name": "double_m33_express", + "steps": [ + { + "type": "configure", + "name": "double_m33_express" + }, + { + "type": "build", + "name": "double_m33_express" + } + ] + }, + { + "name": "lpcxpresso55s28", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso55s28" + }, + { + "type": "build", + "name": "lpcxpresso55s28" + } + ] + }, + { + "name": "lpcxpresso55s69", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso55s69" + }, + { + "type": "build", + "name": "lpcxpresso55s69" + } + ] + }, + { + "name": "mcu_link", + "steps": [ + { + "type": "configure", + "name": "mcu_link" + }, + { + "type": "build", + "name": "mcu_link" + } + ] + }, + { + "name": "max32650evkit", + "steps": [ + { + "type": "configure", + "name": "max32650evkit" + }, + { + "type": "build", + "name": "max32650evkit" + } + ] + }, + { + "name": "max32650fthr", + "steps": [ + { + "type": "configure", + "name": "max32650fthr" + }, + { + "type": "build", + "name": "max32650fthr" + } + ] + }, + { + "name": "max32651evkit", + "steps": [ + { + "type": "configure", + "name": "max32651evkit" + }, + { + "type": "build", + "name": "max32651evkit" + } + ] + }, + { + "name": "max32666evkit", + "steps": [ + { + "type": "configure", + "name": "max32666evkit" + }, + { + "type": "build", + "name": "max32666evkit" + } + ] + }, + { + "name": "max32666fthr", + "steps": [ + { + "type": "configure", + "name": "max32666fthr" + }, + { + "type": "build", + "name": "max32666fthr" + } + ] + }, + { + "name": "apard32690", + "steps": [ + { + "type": "configure", + "name": "apard32690" + }, + { + "type": "build", + "name": "apard32690" + } + ] + }, + { + "name": "max32690evkit", + "steps": [ + { + "type": "configure", + "name": "max32690evkit" + }, + { + "type": "build", + "name": "max32690evkit" + } + ] + }, + { + "name": "max78002evkit", + "steps": [ + { + "type": "configure", + "name": "max78002evkit" + }, + { + "type": "build", + "name": "max78002evkit" + } + ] + }, + { + "name": "frdm_mcxa153", + "steps": [ + { + "type": "configure", + "name": "frdm_mcxa153" + }, + { + "type": "build", + "name": "frdm_mcxa153" + } + ] + }, + { + "name": "frdm_mcxn947", + "steps": [ + { + "type": "configure", + "name": "frdm_mcxn947" + }, + { + "type": "build", + "name": "frdm_mcxn947" + } + ] + }, + { + "name": "mcxn947brk", + "steps": [ + { + "type": "configure", + "name": "mcxn947brk" + }, + { + "type": "build", + "name": "mcxn947brk" + } + ] + }, + { + "name": "mm32f327x_mb39", + "steps": [ + { + "type": "configure", + "name": "mm32f327x_mb39" + }, + { + "type": "build", + "name": "mm32f327x_mb39" + } + ] + }, + { + "name": "mm32f327x_pitaya_lite", + "steps": [ + { + "type": "configure", + "name": "mm32f327x_pitaya_lite" + }, + { + "type": "build", + "name": "mm32f327x_pitaya_lite" + } + ] + }, + { + "name": "msp_exp430f5529lp", + "steps": [ + { + "type": "configure", + "name": "msp_exp430f5529lp" + }, + { + "type": "build", + "name": "msp_exp430f5529lp" + } + ] + }, + { + "name": "msp_exp432e401y", + "steps": [ + { + "type": "configure", + "name": "msp_exp432e401y" + }, + { + "type": "build", + "name": "msp_exp432e401y" + } + ] + }, + { + "name": "adafruit_clue", + "steps": [ + { + "type": "configure", + "name": "adafruit_clue" + }, + { + "type": "build", + "name": "adafruit_clue" + } + ] + }, + { + "name": "arduino_nano33_ble", + "steps": [ + { + "type": "configure", + "name": "arduino_nano33_ble" + }, + { + "type": "build", + "name": "arduino_nano33_ble" + } + ] + }, + { + "name": "circuitplayground_bluefruit", + "steps": [ + { + "type": "configure", + "name": "circuitplayground_bluefruit" + }, + { + "type": "build", + "name": "circuitplayground_bluefruit" + } + ] + }, + { + "name": "feather_nrf52840_express", + "steps": [ + { + "type": "configure", + "name": "feather_nrf52840_express" + }, + { + "type": "build", + "name": "feather_nrf52840_express" + } + ] + }, + { + "name": "feather_nrf52840_sense", + "steps": [ + { + "type": "configure", + "name": "feather_nrf52840_sense" + }, + { + "type": "build", + "name": "feather_nrf52840_sense" + } + ] + }, + { + "name": "itsybitsy_nrf52840", + "steps": [ + { + "type": "configure", + "name": "itsybitsy_nrf52840" + }, + { + "type": "build", + "name": "itsybitsy_nrf52840" + } + ] + }, + { + "name": "pca10056", + "steps": [ + { + "type": "configure", + "name": "pca10056" + }, + { + "type": "build", + "name": "pca10056" + } + ] + }, + { + "name": "pca10059", + "steps": [ + { + "type": "configure", + "name": "pca10059" + }, + { + "type": "build", + "name": "pca10059" + } + ] + }, + { + "name": "pca10095", + "steps": [ + { + "type": "configure", + "name": "pca10095" + }, + { + "type": "build", + "name": "pca10095" + } + ] + }, + { + "name": "pca10100", + "steps": [ + { + "type": "configure", + "name": "pca10100" + }, + { + "type": "build", + "name": "pca10100" + } + ] + }, + { + "name": "portenta_c33", + "steps": [ + { + "type": "configure", + "name": "portenta_c33" + }, + { + "type": "build", + "name": "portenta_c33" + } + ] + }, + { + "name": "ra2a1_ek", + "steps": [ + { + "type": "configure", + "name": "ra2a1_ek" + }, + { + "type": "build", + "name": "ra2a1_ek" + } + ] + }, + { + "name": "ra4m1_ek", + "steps": [ + { + "type": "configure", + "name": "ra4m1_ek" + }, + { + "type": "build", + "name": "ra4m1_ek" + } + ] + }, + { + "name": "ra4m3_ek", + "steps": [ + { + "type": "configure", + "name": "ra4m3_ek" + }, + { + "type": "build", + "name": "ra4m3_ek" + } + ] + }, + { + "name": "ra6m1_ek", + "steps": [ + { + "type": "configure", + "name": "ra6m1_ek" + }, + { + "type": "build", + "name": "ra6m1_ek" + } + ] + }, + { + "name": "ra6m5_ek", + "steps": [ + { + "type": "configure", + "name": "ra6m5_ek" + }, + { + "type": "build", + "name": "ra6m5_ek" + } + ] + }, + { + "name": "ra8m1_ek", + "steps": [ + { + "type": "configure", + "name": "ra8m1_ek" + }, + { + "type": "build", + "name": "ra8m1_ek" + } + ] + }, + { + "name": "uno_r4", + "steps": [ + { + "type": "configure", + "name": "uno_r4" + }, + { + "type": "build", + "name": "uno_r4" + } + ] + }, + { + "name": "feather_rp2040_max3421", + "steps": [ + { + "type": "configure", + "name": "feather_rp2040_max3421" + }, + { + "type": "build", + "name": "feather_rp2040_max3421" + } + ] + }, + { + "name": "pico_sdk", + "steps": [ + { + "type": "configure", + "name": "pico_sdk" + }, + { + "type": "build", + "name": "pico_sdk" + } + ] + }, + { + "name": "raspberry_pi_pico", + "steps": [ + { + "type": "configure", + "name": "raspberry_pi_pico" + }, + { + "type": "build", + "name": "raspberry_pi_pico" + } + ] + }, + { + "name": "raspberry_pi_pico2", + "steps": [ + { + "type": "configure", + "name": "raspberry_pi_pico2" + }, + { + "type": "build", + "name": "raspberry_pi_pico2" + } + ] + }, + { + "name": "cynthion_d11", + "steps": [ + { + "type": "configure", + "name": "cynthion_d11" + }, + { + "type": "build", + "name": "cynthion_d11" + } + ] + }, + { + "name": "samd11_xplained", + "steps": [ + { + "type": "configure", + "name": "samd11_xplained" + }, + { + "type": "build", + "name": "samd11_xplained" + } + ] + }, + { + "name": "atsamd21_xpro", + "steps": [ + { + "type": "configure", + "name": "atsamd21_xpro" + }, + { + "type": "build", + "name": "atsamd21_xpro" + } + ] + }, + { + "name": "circuitplayground_express", + "steps": [ + { + "type": "configure", + "name": "circuitplayground_express" + }, + { + "type": "build", + "name": "circuitplayground_express" + } + ] + }, + { + "name": "curiosity_nano", + "steps": [ + { + "type": "configure", + "name": "curiosity_nano" + }, + { + "type": "build", + "name": "curiosity_nano" + } + ] + }, + { + "name": "cynthion_d21", + "steps": [ + { + "type": "configure", + "name": "cynthion_d21" + }, + { + "type": "build", + "name": "cynthion_d21" + } + ] + }, + { + "name": "feather_m0_express", + "steps": [ + { + "type": "configure", + "name": "feather_m0_express" + }, + { + "type": "build", + "name": "feather_m0_express" + } + ] + }, + { + "name": "itsybitsy_m0", + "steps": [ + { + "type": "configure", + "name": "itsybitsy_m0" + }, + { + "type": "build", + "name": "itsybitsy_m0" + } + ] + }, + { + "name": "metro_m0_express", + "steps": [ + { + "type": "configure", + "name": "metro_m0_express" + }, + { + "type": "build", + "name": "metro_m0_express" + } + ] + }, + { + "name": "qtpy", + "steps": [ + { + "type": "configure", + "name": "qtpy" + }, + { + "type": "build", + "name": "qtpy" + } + ] + }, + { + "name": "seeeduino_xiao", + "steps": [ + { + "type": "configure", + "name": "seeeduino_xiao" + }, + { + "type": "build", + "name": "seeeduino_xiao" + } + ] + }, + { + "name": "sparkfun_samd21_mini_usb", + "steps": [ + { + "type": "configure", + "name": "sparkfun_samd21_mini_usb" + }, + { + "type": "build", + "name": "sparkfun_samd21_mini_usb" + } + ] + }, + { + "name": "trinket_m0", + "steps": [ + { + "type": "configure", + "name": "trinket_m0" + }, + { + "type": "build", + "name": "trinket_m0" + } + ] + }, + { + "name": "d5035_01", + "steps": [ + { + "type": "configure", + "name": "d5035_01" + }, + { + "type": "build", + "name": "d5035_01" + } + ] + }, + { + "name": "feather_m4_express", + "steps": [ + { + "type": "configure", + "name": "feather_m4_express" + }, + { + "type": "build", + "name": "feather_m4_express" + } + ] + }, + { + "name": "itsybitsy_m4", + "steps": [ + { + "type": "configure", + "name": "itsybitsy_m4" + }, + { + "type": "build", + "name": "itsybitsy_m4" + } + ] + }, + { + "name": "metro_m4_express", + "steps": [ + { + "type": "configure", + "name": "metro_m4_express" + }, + { + "type": "build", + "name": "metro_m4_express" + } + ] + }, + { + "name": "pybadge", + "steps": [ + { + "type": "configure", + "name": "pybadge" + }, + { + "type": "build", + "name": "pybadge" + } + ] + }, + { + "name": "pyportal", + "steps": [ + { + "type": "configure", + "name": "pyportal" + }, + { + "type": "build", + "name": "pyportal" + } + ] + }, + { + "name": "same54_xplained", + "steps": [ + { + "type": "configure", + "name": "same54_xplained" + }, + { + "type": "build", + "name": "same54_xplained" + } + ] + }, + { + "name": "samg55_xplained", + "steps": [ + { + "type": "configure", + "name": "samg55_xplained" + }, + { + "type": "build", + "name": "samg55_xplained" + } + ] + }, + { + "name": "atsaml21_xpro", + "steps": [ + { + "type": "configure", + "name": "atsaml21_xpro" + }, + { + "type": "build", + "name": "atsaml21_xpro" + } + ] + }, + { + "name": "saml22_feather", + "steps": [ + { + "type": "configure", + "name": "saml22_feather" + }, + { + "type": "build", + "name": "saml22_feather" + } + ] + }, + { + "name": "sensorwatch_m0", + "steps": [ + { + "type": "configure", + "name": "sensorwatch_m0" + }, + { + "type": "build", + "name": "sensorwatch_m0" + } + ] + }, + { + "name": "stm32c071nucleo", + "steps": [ + { + "type": "configure", + "name": "stm32c071nucleo" + }, + { + "type": "build", + "name": "stm32c071nucleo" + } + ] + }, + { + "name": "stm32f070rbnucleo", + "steps": [ + { + "type": "configure", + "name": "stm32f070rbnucleo" + }, + { + "type": "build", + "name": "stm32f070rbnucleo" + } + ] + }, + { + "name": "stm32f072disco", + "steps": [ + { + "type": "configure", + "name": "stm32f072disco" + }, + { + "type": "build", + "name": "stm32f072disco" + } + ] + }, + { + "name": "stm32f072eval", + "steps": [ + { + "type": "configure", + "name": "stm32f072eval" + }, + { + "type": "build", + "name": "stm32f072eval" + } + ] + }, + { + "name": "stm32f103ze_iar", + "steps": [ + { + "type": "configure", + "name": "stm32f103ze_iar" + }, + { + "type": "build", + "name": "stm32f103ze_iar" + } + ] + }, + { + "name": "stm32f103_bluepill", + "steps": [ + { + "type": "configure", + "name": "stm32f103_bluepill" + }, + { + "type": "build", + "name": "stm32f103_bluepill" + } + ] + }, + { + "name": "stm32f103_mini_2", + "steps": [ + { + "type": "configure", + "name": "stm32f103_mini_2" + }, + { + "type": "build", + "name": "stm32f103_mini_2" + } + ] + }, + { + "name": "stm32f207nucleo", + "steps": [ + { + "type": "configure", + "name": "stm32f207nucleo" + }, + { + "type": "build", + "name": "stm32f207nucleo" + } + ] + }, + { + "name": "stm32f303disco", + "steps": [ + { + "type": "configure", + "name": "stm32f303disco" + }, + { + "type": "build", + "name": "stm32f303disco" + } + ] + }, + { + "name": "feather_stm32f405", + "steps": [ + { + "type": "configure", + "name": "feather_stm32f405" + }, + { + "type": "build", + "name": "feather_stm32f405" + } + ] + }, + { + "name": "pyboardv11", + "steps": [ + { + "type": "configure", + "name": "pyboardv11" + }, + { + "type": "build", + "name": "pyboardv11" + } + ] + }, + { + "name": "stm32f401blackpill", + "steps": [ + { + "type": "configure", + "name": "stm32f401blackpill" + }, + { + "type": "build", + "name": "stm32f401blackpill" + } + ] + }, + { + "name": "stm32f407blackvet", + "steps": [ + { + "type": "configure", + "name": "stm32f407blackvet" + }, + { + "type": "build", + "name": "stm32f407blackvet" + } + ] + }, + { + "name": "stm32f407disco", + "steps": [ + { + "type": "configure", + "name": "stm32f407disco" + }, + { + "type": "build", + "name": "stm32f407disco" + } + ] + }, + { + "name": "stm32f411blackpill", + "steps": [ + { + "type": "configure", + "name": "stm32f411blackpill" + }, + { + "type": "build", + "name": "stm32f411blackpill" + } + ] + }, + { + "name": "stm32f411disco", + "steps": [ + { + "type": "configure", + "name": "stm32f411disco" + }, + { + "type": "build", + "name": "stm32f411disco" + } + ] + }, + { + "name": "stm32f412disco", + "steps": [ + { + "type": "configure", + "name": "stm32f412disco" + }, + { + "type": "build", + "name": "stm32f412disco" + } + ] + }, + { + "name": "stm32f412nucleo", + "steps": [ + { + "type": "configure", + "name": "stm32f412nucleo" + }, + { + "type": "build", + "name": "stm32f412nucleo" + } + ] + }, + { + "name": "stm32f439nucleo", + "steps": [ + { + "type": "configure", + "name": "stm32f439nucleo" + }, + { + "type": "build", + "name": "stm32f439nucleo" + } + ] + }, + { + "name": "stlinkv3mini", + "steps": [ + { + "type": "configure", + "name": "stlinkv3mini" + }, + { + "type": "build", + "name": "stlinkv3mini" + } + ] + }, + { + "name": "stm32f723disco", + "steps": [ + { + "type": "configure", + "name": "stm32f723disco" + }, + { + "type": "build", + "name": "stm32f723disco" + } + ] + }, + { + "name": "stm32f746disco", + "steps": [ + { + "type": "configure", + "name": "stm32f746disco" + }, + { + "type": "build", + "name": "stm32f746disco" + } + ] + }, + { + "name": "stm32f746nucleo", + "steps": [ + { + "type": "configure", + "name": "stm32f746nucleo" + }, + { + "type": "build", + "name": "stm32f746nucleo" + } + ] + }, + { + "name": "stm32f767nucleo", + "steps": [ + { + "type": "configure", + "name": "stm32f767nucleo" + }, + { + "type": "build", + "name": "stm32f767nucleo" + } + ] + }, + { + "name": "stm32f769disco", + "steps": [ + { + "type": "configure", + "name": "stm32f769disco" + }, + { + "type": "build", + "name": "stm32f769disco" + } + ] + }, + { + "name": "stm32g0b1nucleo", + "steps": [ + { + "type": "configure", + "name": "stm32g0b1nucleo" + }, + { + "type": "build", + "name": "stm32g0b1nucleo" + } + ] + }, + { + "name": "b_g474e_dpow1", + "steps": [ + { + "type": "configure", + "name": "b_g474e_dpow1" + }, + { + "type": "build", + "name": "b_g474e_dpow1" + } + ] + }, + { + "name": "stm32g474nucleo", + "steps": [ + { + "type": "configure", + "name": "stm32g474nucleo" + }, + { + "type": "build", + "name": "stm32g474nucleo" + } + ] + }, + { + "name": "stm32g491nucleo", + "steps": [ + { + "type": "configure", + "name": "stm32g491nucleo" + }, + { + "type": "build", + "name": "stm32g491nucleo" + } + ] + }, + { + "name": "stm32h503nucleo", + "steps": [ + { + "type": "configure", + "name": "stm32h503nucleo" + }, + { + "type": "build", + "name": "stm32h503nucleo" + } + ] + }, + { + "name": "stm32h563nucleo", + "steps": [ + { + "type": "configure", + "name": "stm32h563nucleo" + }, + { + "type": "build", + "name": "stm32h563nucleo" + } + ] + }, + { + "name": "stm32h573i_dk", + "steps": [ + { + "type": "configure", + "name": "stm32h573i_dk" + }, + { + "type": "build", + "name": "stm32h573i_dk" + } + ] + }, + { + "name": "daisyseed", + "steps": [ + { + "type": "configure", + "name": "daisyseed" + }, + { + "type": "build", + "name": "daisyseed" + } + ] + }, + { + "name": "stm32h723nucleo", + "steps": [ + { + "type": "configure", + "name": "stm32h723nucleo" + }, + { + "type": "build", + "name": "stm32h723nucleo" + } + ] + }, + { + "name": "stm32h743eval", + "steps": [ + { + "type": "configure", + "name": "stm32h743eval" + }, + { + "type": "build", + "name": "stm32h743eval" + } + ] + }, + { + "name": "stm32h743nucleo", + "steps": [ + { + "type": "configure", + "name": "stm32h743nucleo" + }, + { + "type": "build", + "name": "stm32h743nucleo" + } + ] + }, + { + "name": "stm32h745disco", + "steps": [ + { + "type": "configure", + "name": "stm32h745disco" + }, + { + "type": "build", + "name": "stm32h745disco" + } + ] + }, + { + "name": "stm32h750bdk", + "steps": [ + { + "type": "configure", + "name": "stm32h750bdk" + }, + { + "type": "build", + "name": "stm32h750bdk" + } + ] + }, + { + "name": "stm32h750_weact", + "steps": [ + { + "type": "configure", + "name": "stm32h750_weact" + }, + { + "type": "build", + "name": "stm32h750_weact" + } + ] + }, + { + "name": "waveshare_openh743i", + "steps": [ + { + "type": "configure", + "name": "waveshare_openh743i" + }, + { + "type": "build", + "name": "waveshare_openh743i" + } + ] + }, + { + "name": "stm32h7s3nucleo", + "steps": [ + { + "type": "configure", + "name": "stm32h7s3nucleo" + }, + { + "type": "build", + "name": "stm32h7s3nucleo" + } + ] + }, + { + "name": "stm32l052dap52", + "steps": [ + { + "type": "configure", + "name": "stm32l052dap52" + }, + { + "type": "build", + "name": "stm32l052dap52" + } + ] + }, + { + "name": "stm32l0538disco", + "steps": [ + { + "type": "configure", + "name": "stm32l0538disco" + }, + { + "type": "build", + "name": "stm32l0538disco" + } + ] + }, + { + "name": "stm32l412nucleo", + "steps": [ + { + "type": "configure", + "name": "stm32l412nucleo" + }, + { + "type": "build", + "name": "stm32l412nucleo" + } + ] + }, + { + "name": "stm32l476disco", + "steps": [ + { + "type": "configure", + "name": "stm32l476disco" + }, + { + "type": "build", + "name": "stm32l476disco" + } + ] + }, + { + "name": "stm32l4p5nucleo", + "steps": [ + { + "type": "configure", + "name": "stm32l4p5nucleo" + }, + { + "type": "build", + "name": "stm32l4p5nucleo" + } + ] + }, + { + "name": "stm32l4r5nucleo", + "steps": [ + { + "type": "configure", + "name": "stm32l4r5nucleo" + }, + { + "type": "build", + "name": "stm32l4r5nucleo" + } + ] + }, + { + "name": "b_u585i_iot2a", + "steps": [ + { + "type": "configure", + "name": "b_u585i_iot2a" + }, + { + "type": "build", + "name": "b_u585i_iot2a" + } + ] + }, + { + "name": "stm32u545nucleo", + "steps": [ + { + "type": "configure", + "name": "stm32u545nucleo" + }, + { + "type": "build", + "name": "stm32u545nucleo" + } + ] + }, + { + "name": "stm32u575eval", + "steps": [ + { + "type": "configure", + "name": "stm32u575eval" + }, + { + "type": "build", + "name": "stm32u575eval" + } + ] + }, + { + "name": "stm32u575nucleo", + "steps": [ + { + "type": "configure", + "name": "stm32u575nucleo" + }, + { + "type": "build", + "name": "stm32u575nucleo" + } + ] + }, + { + "name": "stm32u5a5nucleo", + "steps": [ + { + "type": "configure", + "name": "stm32u5a5nucleo" + }, + { + "type": "build", + "name": "stm32u5a5nucleo" + } + ] + }, + { + "name": "stm32wb55nucleo", + "steps": [ + { + "type": "configure", + "name": "stm32wb55nucleo" + }, + { + "type": "build", + "name": "stm32wb55nucleo" + } + ] + }, + { + "name": "ek_tm4c123gxl", + "steps": [ + { + "type": "configure", + "name": "ek_tm4c123gxl" + }, + { + "type": "build", + "name": "ek_tm4c123gxl" + } + ] + }, + { + "name": "xmc4500_relax", + "steps": [ + { + "type": "configure", + "name": "xmc4500_relax" + }, + { + "type": "build", + "name": "xmc4500_relax" + } + ] + }, + { + "name": "xmc4700_relax", + "steps": [ + { + "type": "configure", + "name": "xmc4700_relax" + }, + { + "type": "build", + "name": "xmc4700_relax" + } + ] + } + ] +} diff --git a/hw/bsp/family_support.cmake b/hw/bsp/family_support.cmake index 04d537376..409fb9c75 100644 --- a/hw/bsp/family_support.cmake +++ b/hw/bsp/family_support.cmake @@ -399,7 +399,11 @@ endfunction() # Add flash jlink target function(family_flash_jlink TARGET) if (NOT DEFINED JLINKEXE) - set(JLINKEXE JLinkExe) + if(CMAKE_HOST_WIN32) + set(JLINKEXE JLink.exe) + else() + set(JLINKEXE JLinkExe) + endif() endif () if (NOT DEFINED JLINK_IF) diff --git a/tools/gen_presets.py b/tools/gen_presets.py new file mode 100755 index 000000000..98b1a7d46 --- /dev/null +++ b/tools/gen_presets.py @@ -0,0 +1,91 @@ +#!/usr/bin/env python3 +import os +import json + + +def main(): + board_list = [] + + # Find all board.cmake files + for root, dirs, files in os.walk("hw/bsp"): + for file in files: + if file == "board.cmake": + board_list.append(os.path.basename(root)) + + print('Generating presets for the following boards:') + print(board_list) + + # Generate the presets + presets = {} + presets['version'] = 6 + + # Configure presets + presets['configurePresets'] = [ + {"name": "default", + "hidden": True, + "description": r"Configure preset for the ${presetName} board", + "generator": "Ninja", + "binaryDir": r"${sourceDir}/build/${presetName}", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithDebInfo", + "BOARD": r"${presetName}" + } + }] + + presets['configurePresets'].extend( + [{'name': board, 'inherits': 'default'} for board in board_list] + ) + + # Build presets + # no inheritance since 'name' doesn't support macro expansion + presets['buildPresets'] = [ + { + 'name': board, + 'description': "Build preset for the " + board + " board", + 'configurePreset': board + } + for board in board_list + ] + + # Workflow presets + presets['workflowPresets'] = [ + { + "name": board, + "steps": [ + { + "type": "configure", + "name": board + }, + { + "type": "build", + "name": board + } + ] + } + for board in board_list + ] + + with open("hw/bsp/BoardPresets.json", "w") as f: + f.write('{}\n'.format(json.dumps(presets, indent=2))) + + # Generate presets for examples + presets = { + "version": 6, + "include": [ + "../../../hw/bsp/BoardPresets.json" + ] + } + + example_list = [] + for root, dirs, files in os.walk("examples"): + for file in files: + if file == "CMakeLists.txt": + with open(os.path.join(root, 'CMakePresets.json'), 'w') as f: + f.write('{}\n'.format(json.dumps(presets, indent=2))) + example_list.append(os.path.basename(root)) + + print('Generating presets for the following examples:') + print(example_list) + +if __name__ == "__main__": + main() From 1208f88b6ecc899bfac908aaf90a8be0997efb5d Mon Sep 17 00:00:00 2001 From: HiFiPhile Date: Sun, 9 Feb 2025 18:40:30 +0100 Subject: [PATCH 02/11] Sort list (bettter for Clion) Signed-off-by: HiFiPhile --- hw/bsp/BoardPresets.json | 3394 +++++++++++++++++++------------------- tools/gen_presets.py | 70 +- 2 files changed, 1738 insertions(+), 1726 deletions(-) diff --git a/hw/bsp/BoardPresets.json b/hw/bsp/BoardPresets.json index c295efbdd..fee8f2c97 100644 --- a/hw/bsp/BoardPresets.json +++ b/hw/bsp/BoardPresets.json @@ -5,23 +5,59 @@ "name": "default", "hidden": true, "description": "Configure preset for the ${presetName} board", - "generator": "Ninja", + "generator": "Ninja Multi-Config", "binaryDir": "${sourceDir}/build/${presetName}", "cacheVariables": { - "CMAKE_BUILD_TYPE": "RelWithDebInfo", + "CMAKE_DEFAULT_BUILD_TYPE": "RelWithDebInfo", "BOARD": "${presetName}" } }, { - "name": "raspberrypi_zero", + "name": "adafruit_clue", "inherits": "default" }, { - "name": "raspberrypi_cm4", + "name": "adafruit_feather_esp32_v2", "inherits": "default" }, { - "name": "raspberrypi_zero2", + "name": "adafruit_feather_esp32s2", + "inherits": "default" + }, + { + "name": "adafruit_feather_esp32s3", + "inherits": "default" + }, + { + "name": "adafruit_magtag_29gray", + "inherits": "default" + }, + { + "name": "adafruit_metro_esp32s2", + "inherits": "default" + }, + { + "name": "apard32690", + "inherits": "default" + }, + { + "name": "arduino_nano33_ble", + "inherits": "default" + }, + { + "name": "atsamd21_xpro", + "inherits": "default" + }, + { + "name": "atsaml21_xpro", + "inherits": "default" + }, + { + "name": "b_g474e_dpow1", + "inherits": "default" + }, + { + "name": "b_u585i_iot2a", "inherits": "default" }, { @@ -37,11 +73,31 @@ "inherits": "default" }, { - "name": "nanoch32v203", + "name": "ch32v307v_r1_1v0", "inherits": "default" }, { - "name": "ch32v307v_r1_1v0", + "name": "circuitplayground_bluefruit", + "inherits": "default" + }, + { + "name": "circuitplayground_express", + "inherits": "default" + }, + { + "name": "curiosity_nano", + "inherits": "default" + }, + { + "name": "cynthion_d11", + "inherits": "default" + }, + { + "name": "cynthion_d21", + "inherits": "default" + }, + { + "name": "d5035_01", "inherits": "default" }, { @@ -53,23 +109,23 @@ "inherits": "default" }, { - "name": "adafruit_feather_esp32s2", + "name": "daisyseed", "inherits": "default" }, { - "name": "adafruit_feather_esp32s3", + "name": "double_m33_express", "inherits": "default" }, { - "name": "adafruit_feather_esp32_v2", + "name": "ea4088_quickstart", "inherits": "default" }, { - "name": "adafruit_magtag_29gray", + "name": "ea4357", "inherits": "default" }, { - "name": "adafruit_metro_esp32s2", + "name": "ek_tm4c123gxl", "inherits": "default" }, { @@ -112,12 +168,176 @@ "name": "f1c100s", "inherits": "default" }, + { + "name": "feather_m0_express", + "inherits": "default" + }, + { + "name": "feather_m4_express", + "inherits": "default" + }, + { + "name": "feather_nrf52840_express", + "inherits": "default" + }, + { + "name": "feather_nrf52840_sense", + "inherits": "default" + }, + { + "name": "feather_rp2040_max3421", + "inherits": "default" + }, + { + "name": "feather_stm32f405", + "inherits": "default" + }, { "name": "fomu", "inherits": "default" }, { - "name": "sipeed_longan_nano", + "name": "frdm_k32l2a4s", + "inherits": "default" + }, + { + "name": "frdm_k32l2b", + "inherits": "default" + }, + { + "name": "frdm_k64f", + "inherits": "default" + }, + { + "name": "frdm_kl25z", + "inherits": "default" + }, + { + "name": "frdm_mcxa153", + "inherits": "default" + }, + { + "name": "frdm_mcxn947", + "inherits": "default" + }, + { + "name": "itsybitsy_m0", + "inherits": "default" + }, + { + "name": "itsybitsy_m4", + "inherits": "default" + }, + { + "name": "itsybitsy_nrf52840", + "inherits": "default" + }, + { + "name": "kuiic", + "inherits": "default" + }, + { + "name": "lpcxpresso11u37", + "inherits": "default" + }, + { + "name": "lpcxpresso11u68", + "inherits": "default" + }, + { + "name": "lpcxpresso1347", + "inherits": "default" + }, + { + "name": "lpcxpresso1549", + "inherits": "default" + }, + { + "name": "lpcxpresso1769", + "inherits": "default" + }, + { + "name": "lpcxpresso18s37", + "inherits": "default" + }, + { + "name": "lpcxpresso43s67", + "inherits": "default" + }, + { + "name": "lpcxpresso51u68", + "inherits": "default" + }, + { + "name": "lpcxpresso54114", + "inherits": "default" + }, + { + "name": "lpcxpresso54608", + "inherits": "default" + }, + { + "name": "lpcxpresso54628", + "inherits": "default" + }, + { + "name": "lpcxpresso55s28", + "inherits": "default" + }, + { + "name": "lpcxpresso55s69", + "inherits": "default" + }, + { + "name": "max32650evkit", + "inherits": "default" + }, + { + "name": "max32650fthr", + "inherits": "default" + }, + { + "name": "max32651evkit", + "inherits": "default" + }, + { + "name": "max32666evkit", + "inherits": "default" + }, + { + "name": "max32666fthr", + "inherits": "default" + }, + { + "name": "max32690evkit", + "inherits": "default" + }, + { + "name": "max78002evkit", + "inherits": "default" + }, + { + "name": "mbed1768", + "inherits": "default" + }, + { + "name": "mcb1800", + "inherits": "default" + }, + { + "name": "mcu_link", + "inherits": "default" + }, + { + "name": "mcxn947brk", + "inherits": "default" + }, + { + "name": "metro_m0_express", + "inherits": "default" + }, + { + "name": "metro_m4_express", "inherits": "default" }, { @@ -160,158 +380,6 @@ "name": "mimxrt1170_evkb", "inherits": "default" }, - { - "name": "teensy_40", - "inherits": "default" - }, - { - "name": "teensy_41", - "inherits": "default" - }, - { - "name": "frdm_k64f", - "inherits": "default" - }, - { - "name": "teensy_35", - "inherits": "default" - }, - { - "name": "frdm_k32l2a4s", - "inherits": "default" - }, - { - "name": "frdm_k32l2b", - "inherits": "default" - }, - { - "name": "kuiic", - "inherits": "default" - }, - { - "name": "frdm_kl25z", - "inherits": "default" - }, - { - "name": "lpcxpresso11u37", - "inherits": "default" - }, - { - "name": "lpcxpresso11u68", - "inherits": "default" - }, - { - "name": "lpcxpresso1347", - "inherits": "default" - }, - { - "name": "lpcxpresso1549", - "inherits": "default" - }, - { - "name": "lpcxpresso1769", - "inherits": "default" - }, - { - "name": "mbed1768", - "inherits": "default" - }, - { - "name": "lpcxpresso18s37", - "inherits": "default" - }, - { - "name": "mcb1800", - "inherits": "default" - }, - { - "name": "ea4088_quickstart", - "inherits": "default" - }, - { - "name": "ea4357", - "inherits": "default" - }, - { - "name": "lpcxpresso43s67", - "inherits": "default" - }, - { - "name": "lpcxpresso51u68", - "inherits": "default" - }, - { - "name": "lpcxpresso54114", - "inherits": "default" - }, - { - "name": "lpcxpresso54608", - "inherits": "default" - }, - { - "name": "lpcxpresso54628", - "inherits": "default" - }, - { - "name": "double_m33_express", - "inherits": "default" - }, - { - "name": "lpcxpresso55s28", - "inherits": "default" - }, - { - "name": "lpcxpresso55s69", - "inherits": "default" - }, - { - "name": "mcu_link", - "inherits": "default" - }, - { - "name": "max32650evkit", - "inherits": "default" - }, - { - "name": "max32650fthr", - "inherits": "default" - }, - { - "name": "max32651evkit", - "inherits": "default" - }, - { - "name": "max32666evkit", - "inherits": "default" - }, - { - "name": "max32666fthr", - "inherits": "default" - }, - { - "name": "apard32690", - "inherits": "default" - }, - { - "name": "max32690evkit", - "inherits": "default" - }, - { - "name": "max78002evkit", - "inherits": "default" - }, - { - "name": "frdm_mcxa153", - "inherits": "default" - }, - { - "name": "frdm_mcxn947", - "inherits": "default" - }, - { - "name": "mcxn947brk", - "inherits": "default" - }, { "name": "mm32f327x_mb39", "inherits": "default" @@ -329,27 +397,7 @@ "inherits": "default" }, { - "name": "adafruit_clue", - "inherits": "default" - }, - { - "name": "arduino_nano33_ble", - "inherits": "default" - }, - { - "name": "circuitplayground_bluefruit", - "inherits": "default" - }, - { - "name": "feather_nrf52840_express", - "inherits": "default" - }, - { - "name": "feather_nrf52840_sense", - "inherits": "default" - }, - { - "name": "itsybitsy_nrf52840", + "name": "nanoch32v203", "inherits": "default" }, { @@ -368,10 +416,30 @@ "name": "pca10100", "inherits": "default" }, + { + "name": "pico_sdk", + "inherits": "default" + }, { "name": "portenta_c33", "inherits": "default" }, + { + "name": "pybadge", + "inherits": "default" + }, + { + "name": "pyboardv11", + "inherits": "default" + }, + { + "name": "pyportal", + "inherits": "default" + }, + { + "name": "qtpy", + "inherits": "default" + }, { "name": "ra2a1_ek", "inherits": "default" @@ -396,18 +464,6 @@ "name": "ra8m1_ek", "inherits": "default" }, - { - "name": "uno_r4", - "inherits": "default" - }, - { - "name": "feather_rp2040_max3421", - "inherits": "default" - }, - { - "name": "pico_sdk", - "inherits": "default" - }, { "name": "raspberry_pi_pico", "inherits": "default" @@ -417,81 +473,21 @@ "inherits": "default" }, { - "name": "cynthion_d11", + "name": "raspberrypi_cm4", + "inherits": "default" + }, + { + "name": "raspberrypi_zero", + "inherits": "default" + }, + { + "name": "raspberrypi_zero2", "inherits": "default" }, { "name": "samd11_xplained", "inherits": "default" }, - { - "name": "atsamd21_xpro", - "inherits": "default" - }, - { - "name": "circuitplayground_express", - "inherits": "default" - }, - { - "name": "curiosity_nano", - "inherits": "default" - }, - { - "name": "cynthion_d21", - "inherits": "default" - }, - { - "name": "feather_m0_express", - "inherits": "default" - }, - { - "name": "itsybitsy_m0", - "inherits": "default" - }, - { - "name": "metro_m0_express", - "inherits": "default" - }, - { - "name": "qtpy", - "inherits": "default" - }, - { - "name": "seeeduino_xiao", - "inherits": "default" - }, - { - "name": "sparkfun_samd21_mini_usb", - "inherits": "default" - }, - { - "name": "trinket_m0", - "inherits": "default" - }, - { - "name": "d5035_01", - "inherits": "default" - }, - { - "name": "feather_m4_express", - "inherits": "default" - }, - { - "name": "itsybitsy_m4", - "inherits": "default" - }, - { - "name": "metro_m4_express", - "inherits": "default" - }, - { - "name": "pybadge", - "inherits": "default" - }, - { - "name": "pyportal", - "inherits": "default" - }, { "name": "same54_xplained", "inherits": "default" @@ -500,18 +496,30 @@ "name": "samg55_xplained", "inherits": "default" }, - { - "name": "atsaml21_xpro", - "inherits": "default" - }, { "name": "saml22_feather", "inherits": "default" }, + { + "name": "seeeduino_xiao", + "inherits": "default" + }, { "name": "sensorwatch_m0", "inherits": "default" }, + { + "name": "sipeed_longan_nano", + "inherits": "default" + }, + { + "name": "sparkfun_samd21_mini_usb", + "inherits": "default" + }, + { + "name": "stlinkv3mini", + "inherits": "default" + }, { "name": "stm32c071nucleo", "inherits": "default" @@ -528,10 +536,6 @@ "name": "stm32f072eval", "inherits": "default" }, - { - "name": "stm32f103ze_iar", - "inherits": "default" - }, { "name": "stm32f103_bluepill", "inherits": "default" @@ -540,6 +544,10 @@ "name": "stm32f103_mini_2", "inherits": "default" }, + { + "name": "stm32f103ze_iar", + "inherits": "default" + }, { "name": "stm32f207nucleo", "inherits": "default" @@ -548,14 +556,6 @@ "name": "stm32f303disco", "inherits": "default" }, - { - "name": "feather_stm32f405", - "inherits": "default" - }, - { - "name": "pyboardv11", - "inherits": "default" - }, { "name": "stm32f401blackpill", "inherits": "default" @@ -588,10 +588,6 @@ "name": "stm32f439nucleo", "inherits": "default" }, - { - "name": "stlinkv3mini", - "inherits": "default" - }, { "name": "stm32f723disco", "inherits": "default" @@ -616,10 +612,6 @@ "name": "stm32g0b1nucleo", "inherits": "default" }, - { - "name": "b_g474e_dpow1", - "inherits": "default" - }, { "name": "stm32g474nucleo", "inherits": "default" @@ -640,10 +632,6 @@ "name": "stm32h573i_dk", "inherits": "default" }, - { - "name": "daisyseed", - "inherits": "default" - }, { "name": "stm32h723nucleo", "inherits": "default" @@ -660,16 +648,12 @@ "name": "stm32h745disco", "inherits": "default" }, - { - "name": "stm32h750bdk", - "inherits": "default" - }, { "name": "stm32h750_weact", "inherits": "default" }, { - "name": "waveshare_openh743i", + "name": "stm32h750bdk", "inherits": "default" }, { @@ -700,10 +684,6 @@ "name": "stm32l4r5nucleo", "inherits": "default" }, - { - "name": "b_u585i_iot2a", - "inherits": "default" - }, { "name": "stm32u545nucleo", "inherits": "default" @@ -725,7 +705,27 @@ "inherits": "default" }, { - "name": "ek_tm4c123gxl", + "name": "teensy_35", + "inherits": "default" + }, + { + "name": "teensy_40", + "inherits": "default" + }, + { + "name": "teensy_41", + "inherits": "default" + }, + { + "name": "trinket_m0", + "inherits": "default" + }, + { + "name": "uno_r4", + "inherits": "default" + }, + { + "name": "waveshare_openh743i", "inherits": "default" }, { @@ -739,19 +739,64 @@ ], "buildPresets": [ { - "name": "raspberrypi_zero", - "description": "Build preset for the raspberrypi_zero board", - "configurePreset": "raspberrypi_zero" + "name": "adafruit_clue", + "description": "Build preset for the adafruit_clue board", + "configurePreset": "adafruit_clue" }, { - "name": "raspberrypi_cm4", - "description": "Build preset for the raspberrypi_cm4 board", - "configurePreset": "raspberrypi_cm4" + "name": "adafruit_feather_esp32_v2", + "description": "Build preset for the adafruit_feather_esp32_v2 board", + "configurePreset": "adafruit_feather_esp32_v2" }, { - "name": "raspberrypi_zero2", - "description": "Build preset for the raspberrypi_zero2 board", - "configurePreset": "raspberrypi_zero2" + "name": "adafruit_feather_esp32s2", + "description": "Build preset for the adafruit_feather_esp32s2 board", + "configurePreset": "adafruit_feather_esp32s2" + }, + { + "name": "adafruit_feather_esp32s3", + "description": "Build preset for the adafruit_feather_esp32s3 board", + "configurePreset": "adafruit_feather_esp32s3" + }, + { + "name": "adafruit_magtag_29gray", + "description": "Build preset for the adafruit_magtag_29gray board", + "configurePreset": "adafruit_magtag_29gray" + }, + { + "name": "adafruit_metro_esp32s2", + "description": "Build preset for the adafruit_metro_esp32s2 board", + "configurePreset": "adafruit_metro_esp32s2" + }, + { + "name": "apard32690", + "description": "Build preset for the apard32690 board", + "configurePreset": "apard32690" + }, + { + "name": "arduino_nano33_ble", + "description": "Build preset for the arduino_nano33_ble board", + "configurePreset": "arduino_nano33_ble" + }, + { + "name": "atsamd21_xpro", + "description": "Build preset for the atsamd21_xpro board", + "configurePreset": "atsamd21_xpro" + }, + { + "name": "atsaml21_xpro", + "description": "Build preset for the atsaml21_xpro board", + "configurePreset": "atsaml21_xpro" + }, + { + "name": "b_g474e_dpow1", + "description": "Build preset for the b_g474e_dpow1 board", + "configurePreset": "b_g474e_dpow1" + }, + { + "name": "b_u585i_iot2a", + "description": "Build preset for the b_u585i_iot2a board", + "configurePreset": "b_u585i_iot2a" }, { "name": "ch32v103r_r1_1v0", @@ -768,16 +813,41 @@ "description": "Build preset for the ch32v203g_r0_1v0 board", "configurePreset": "ch32v203g_r0_1v0" }, - { - "name": "nanoch32v203", - "description": "Build preset for the nanoch32v203 board", - "configurePreset": "nanoch32v203" - }, { "name": "ch32v307v_r1_1v0", "description": "Build preset for the ch32v307v_r1_1v0 board", "configurePreset": "ch32v307v_r1_1v0" }, + { + "name": "circuitplayground_bluefruit", + "description": "Build preset for the circuitplayground_bluefruit board", + "configurePreset": "circuitplayground_bluefruit" + }, + { + "name": "circuitplayground_express", + "description": "Build preset for the circuitplayground_express board", + "configurePreset": "circuitplayground_express" + }, + { + "name": "curiosity_nano", + "description": "Build preset for the curiosity_nano board", + "configurePreset": "curiosity_nano" + }, + { + "name": "cynthion_d11", + "description": "Build preset for the cynthion_d11 board", + "configurePreset": "cynthion_d11" + }, + { + "name": "cynthion_d21", + "description": "Build preset for the cynthion_d21 board", + "configurePreset": "cynthion_d21" + }, + { + "name": "d5035_01", + "description": "Build preset for the d5035_01 board", + "configurePreset": "d5035_01" + }, { "name": "da14695_dk_usb", "description": "Build preset for the da14695_dk_usb board", @@ -789,29 +859,29 @@ "configurePreset": "da1469x_dk_pro" }, { - "name": "adafruit_feather_esp32s2", - "description": "Build preset for the adafruit_feather_esp32s2 board", - "configurePreset": "adafruit_feather_esp32s2" + "name": "daisyseed", + "description": "Build preset for the daisyseed board", + "configurePreset": "daisyseed" }, { - "name": "adafruit_feather_esp32s3", - "description": "Build preset for the adafruit_feather_esp32s3 board", - "configurePreset": "adafruit_feather_esp32s3" + "name": "double_m33_express", + "description": "Build preset for the double_m33_express board", + "configurePreset": "double_m33_express" }, { - "name": "adafruit_feather_esp32_v2", - "description": "Build preset for the adafruit_feather_esp32_v2 board", - "configurePreset": "adafruit_feather_esp32_v2" + "name": "ea4088_quickstart", + "description": "Build preset for the ea4088_quickstart board", + "configurePreset": "ea4088_quickstart" }, { - "name": "adafruit_magtag_29gray", - "description": "Build preset for the adafruit_magtag_29gray board", - "configurePreset": "adafruit_magtag_29gray" + "name": "ea4357", + "description": "Build preset for the ea4357 board", + "configurePreset": "ea4357" }, { - "name": "adafruit_metro_esp32s2", - "description": "Build preset for the adafruit_metro_esp32s2 board", - "configurePreset": "adafruit_metro_esp32s2" + "name": "ek_tm4c123gxl", + "description": "Build preset for the ek_tm4c123gxl board", + "configurePreset": "ek_tm4c123gxl" }, { "name": "espressif_addax_1", @@ -863,15 +933,220 @@ "description": "Build preset for the f1c100s board", "configurePreset": "f1c100s" }, + { + "name": "feather_m0_express", + "description": "Build preset for the feather_m0_express board", + "configurePreset": "feather_m0_express" + }, + { + "name": "feather_m4_express", + "description": "Build preset for the feather_m4_express board", + "configurePreset": "feather_m4_express" + }, + { + "name": "feather_nrf52840_express", + "description": "Build preset for the feather_nrf52840_express board", + "configurePreset": "feather_nrf52840_express" + }, + { + "name": "feather_nrf52840_sense", + "description": "Build preset for the feather_nrf52840_sense board", + "configurePreset": "feather_nrf52840_sense" + }, + { + "name": "feather_rp2040_max3421", + "description": "Build preset for the feather_rp2040_max3421 board", + "configurePreset": "feather_rp2040_max3421" + }, + { + "name": "feather_stm32f405", + "description": "Build preset for the feather_stm32f405 board", + "configurePreset": "feather_stm32f405" + }, { "name": "fomu", "description": "Build preset for the fomu board", "configurePreset": "fomu" }, { - "name": "sipeed_longan_nano", - "description": "Build preset for the sipeed_longan_nano board", - "configurePreset": "sipeed_longan_nano" + "name": "frdm_k32l2a4s", + "description": "Build preset for the frdm_k32l2a4s board", + "configurePreset": "frdm_k32l2a4s" + }, + { + "name": "frdm_k32l2b", + "description": "Build preset for the frdm_k32l2b board", + "configurePreset": "frdm_k32l2b" + }, + { + "name": "frdm_k64f", + "description": "Build preset for the frdm_k64f board", + "configurePreset": "frdm_k64f" + }, + { + "name": "frdm_kl25z", + "description": "Build preset for the frdm_kl25z board", + "configurePreset": "frdm_kl25z" + }, + { + "name": "frdm_mcxa153", + "description": "Build preset for the frdm_mcxa153 board", + "configurePreset": "frdm_mcxa153" + }, + { + "name": "frdm_mcxn947", + "description": "Build preset for the frdm_mcxn947 board", + "configurePreset": "frdm_mcxn947" + }, + { + "name": "itsybitsy_m0", + "description": "Build preset for the itsybitsy_m0 board", + "configurePreset": "itsybitsy_m0" + }, + { + "name": "itsybitsy_m4", + "description": "Build preset for the itsybitsy_m4 board", + "configurePreset": "itsybitsy_m4" + }, + { + "name": "itsybitsy_nrf52840", + "description": "Build preset for the itsybitsy_nrf52840 board", + "configurePreset": "itsybitsy_nrf52840" + }, + { + "name": "kuiic", + "description": "Build preset for the kuiic board", + "configurePreset": "kuiic" + }, + { + "name": "lpcxpresso11u37", + "description": "Build preset for the lpcxpresso11u37 board", + "configurePreset": "lpcxpresso11u37" + }, + { + "name": "lpcxpresso11u68", + "description": "Build preset for the lpcxpresso11u68 board", + "configurePreset": "lpcxpresso11u68" + }, + { + "name": "lpcxpresso1347", + "description": "Build preset for the lpcxpresso1347 board", + "configurePreset": "lpcxpresso1347" + }, + { + "name": "lpcxpresso1549", + "description": "Build preset for the lpcxpresso1549 board", + "configurePreset": "lpcxpresso1549" + }, + { + "name": "lpcxpresso1769", + "description": "Build preset for the lpcxpresso1769 board", + "configurePreset": "lpcxpresso1769" + }, + { + "name": "lpcxpresso18s37", + "description": "Build preset for the lpcxpresso18s37 board", + "configurePreset": "lpcxpresso18s37" + }, + { + "name": "lpcxpresso43s67", + "description": "Build preset for the lpcxpresso43s67 board", + "configurePreset": "lpcxpresso43s67" + }, + { + "name": "lpcxpresso51u68", + "description": "Build preset for the lpcxpresso51u68 board", + "configurePreset": "lpcxpresso51u68" + }, + { + "name": "lpcxpresso54114", + "description": "Build preset for the lpcxpresso54114 board", + "configurePreset": "lpcxpresso54114" + }, + { + "name": "lpcxpresso54608", + "description": "Build preset for the lpcxpresso54608 board", + "configurePreset": "lpcxpresso54608" + }, + { + "name": "lpcxpresso54628", + "description": "Build preset for the lpcxpresso54628 board", + "configurePreset": "lpcxpresso54628" + }, + { + "name": "lpcxpresso55s28", + "description": "Build preset for the lpcxpresso55s28 board", + "configurePreset": "lpcxpresso55s28" + }, + { + "name": "lpcxpresso55s69", + "description": "Build preset for the lpcxpresso55s69 board", + "configurePreset": "lpcxpresso55s69" + }, + { + "name": "max32650evkit", + "description": "Build preset for the max32650evkit board", + "configurePreset": "max32650evkit" + }, + { + "name": "max32650fthr", + "description": "Build preset for the max32650fthr board", + "configurePreset": "max32650fthr" + }, + { + "name": "max32651evkit", + "description": "Build preset for the max32651evkit board", + "configurePreset": "max32651evkit" + }, + { + "name": "max32666evkit", + "description": "Build preset for the max32666evkit board", + "configurePreset": "max32666evkit" + }, + { + "name": "max32666fthr", + "description": "Build preset for the max32666fthr board", + "configurePreset": "max32666fthr" + }, + { + "name": "max32690evkit", + "description": "Build preset for the max32690evkit board", + "configurePreset": "max32690evkit" + }, + { + "name": "max78002evkit", + "description": "Build preset for the max78002evkit board", + "configurePreset": "max78002evkit" + }, + { + "name": "mbed1768", + "description": "Build preset for the mbed1768 board", + "configurePreset": "mbed1768" + }, + { + "name": "mcb1800", + "description": "Build preset for the mcb1800 board", + "configurePreset": "mcb1800" + }, + { + "name": "mcu_link", + "description": "Build preset for the mcu_link board", + "configurePreset": "mcu_link" + }, + { + "name": "mcxn947brk", + "description": "Build preset for the mcxn947brk board", + "configurePreset": "mcxn947brk" + }, + { + "name": "metro_m0_express", + "description": "Build preset for the metro_m0_express board", + "configurePreset": "metro_m0_express" + }, + { + "name": "metro_m4_express", + "description": "Build preset for the metro_m4_express board", + "configurePreset": "metro_m4_express" }, { "name": "metro_m7_1011", @@ -923,196 +1198,6 @@ "description": "Build preset for the mimxrt1170_evkb board", "configurePreset": "mimxrt1170_evkb" }, - { - "name": "teensy_40", - "description": "Build preset for the teensy_40 board", - "configurePreset": "teensy_40" - }, - { - "name": "teensy_41", - "description": "Build preset for the teensy_41 board", - "configurePreset": "teensy_41" - }, - { - "name": "frdm_k64f", - "description": "Build preset for the frdm_k64f board", - "configurePreset": "frdm_k64f" - }, - { - "name": "teensy_35", - "description": "Build preset for the teensy_35 board", - "configurePreset": "teensy_35" - }, - { - "name": "frdm_k32l2a4s", - "description": "Build preset for the frdm_k32l2a4s board", - "configurePreset": "frdm_k32l2a4s" - }, - { - "name": "frdm_k32l2b", - "description": "Build preset for the frdm_k32l2b board", - "configurePreset": "frdm_k32l2b" - }, - { - "name": "kuiic", - "description": "Build preset for the kuiic board", - "configurePreset": "kuiic" - }, - { - "name": "frdm_kl25z", - "description": "Build preset for the frdm_kl25z board", - "configurePreset": "frdm_kl25z" - }, - { - "name": "lpcxpresso11u37", - "description": "Build preset for the lpcxpresso11u37 board", - "configurePreset": "lpcxpresso11u37" - }, - { - "name": "lpcxpresso11u68", - "description": "Build preset for the lpcxpresso11u68 board", - "configurePreset": "lpcxpresso11u68" - }, - { - "name": "lpcxpresso1347", - "description": "Build preset for the lpcxpresso1347 board", - "configurePreset": "lpcxpresso1347" - }, - { - "name": "lpcxpresso1549", - "description": "Build preset for the lpcxpresso1549 board", - "configurePreset": "lpcxpresso1549" - }, - { - "name": "lpcxpresso1769", - "description": "Build preset for the lpcxpresso1769 board", - "configurePreset": "lpcxpresso1769" - }, - { - "name": "mbed1768", - "description": "Build preset for the mbed1768 board", - "configurePreset": "mbed1768" - }, - { - "name": "lpcxpresso18s37", - "description": "Build preset for the lpcxpresso18s37 board", - "configurePreset": "lpcxpresso18s37" - }, - { - "name": "mcb1800", - "description": "Build preset for the mcb1800 board", - "configurePreset": "mcb1800" - }, - { - "name": "ea4088_quickstart", - "description": "Build preset for the ea4088_quickstart board", - "configurePreset": "ea4088_quickstart" - }, - { - "name": "ea4357", - "description": "Build preset for the ea4357 board", - "configurePreset": "ea4357" - }, - { - "name": "lpcxpresso43s67", - "description": "Build preset for the lpcxpresso43s67 board", - "configurePreset": "lpcxpresso43s67" - }, - { - "name": "lpcxpresso51u68", - "description": "Build preset for the lpcxpresso51u68 board", - "configurePreset": "lpcxpresso51u68" - }, - { - "name": "lpcxpresso54114", - "description": "Build preset for the lpcxpresso54114 board", - "configurePreset": "lpcxpresso54114" - }, - { - "name": "lpcxpresso54608", - "description": "Build preset for the lpcxpresso54608 board", - "configurePreset": "lpcxpresso54608" - }, - { - "name": "lpcxpresso54628", - "description": "Build preset for the lpcxpresso54628 board", - "configurePreset": "lpcxpresso54628" - }, - { - "name": "double_m33_express", - "description": "Build preset for the double_m33_express board", - "configurePreset": "double_m33_express" - }, - { - "name": "lpcxpresso55s28", - "description": "Build preset for the lpcxpresso55s28 board", - "configurePreset": "lpcxpresso55s28" - }, - { - "name": "lpcxpresso55s69", - "description": "Build preset for the lpcxpresso55s69 board", - "configurePreset": "lpcxpresso55s69" - }, - { - "name": "mcu_link", - "description": "Build preset for the mcu_link board", - "configurePreset": "mcu_link" - }, - { - "name": "max32650evkit", - "description": "Build preset for the max32650evkit board", - "configurePreset": "max32650evkit" - }, - { - "name": "max32650fthr", - "description": "Build preset for the max32650fthr board", - "configurePreset": "max32650fthr" - }, - { - "name": "max32651evkit", - "description": "Build preset for the max32651evkit board", - "configurePreset": "max32651evkit" - }, - { - "name": "max32666evkit", - "description": "Build preset for the max32666evkit board", - "configurePreset": "max32666evkit" - }, - { - "name": "max32666fthr", - "description": "Build preset for the max32666fthr board", - "configurePreset": "max32666fthr" - }, - { - "name": "apard32690", - "description": "Build preset for the apard32690 board", - "configurePreset": "apard32690" - }, - { - "name": "max32690evkit", - "description": "Build preset for the max32690evkit board", - "configurePreset": "max32690evkit" - }, - { - "name": "max78002evkit", - "description": "Build preset for the max78002evkit board", - "configurePreset": "max78002evkit" - }, - { - "name": "frdm_mcxa153", - "description": "Build preset for the frdm_mcxa153 board", - "configurePreset": "frdm_mcxa153" - }, - { - "name": "frdm_mcxn947", - "description": "Build preset for the frdm_mcxn947 board", - "configurePreset": "frdm_mcxn947" - }, - { - "name": "mcxn947brk", - "description": "Build preset for the mcxn947brk board", - "configurePreset": "mcxn947brk" - }, { "name": "mm32f327x_mb39", "description": "Build preset for the mm32f327x_mb39 board", @@ -1134,34 +1219,9 @@ "configurePreset": "msp_exp432e401y" }, { - "name": "adafruit_clue", - "description": "Build preset for the adafruit_clue board", - "configurePreset": "adafruit_clue" - }, - { - "name": "arduino_nano33_ble", - "description": "Build preset for the arduino_nano33_ble board", - "configurePreset": "arduino_nano33_ble" - }, - { - "name": "circuitplayground_bluefruit", - "description": "Build preset for the circuitplayground_bluefruit board", - "configurePreset": "circuitplayground_bluefruit" - }, - { - "name": "feather_nrf52840_express", - "description": "Build preset for the feather_nrf52840_express board", - "configurePreset": "feather_nrf52840_express" - }, - { - "name": "feather_nrf52840_sense", - "description": "Build preset for the feather_nrf52840_sense board", - "configurePreset": "feather_nrf52840_sense" - }, - { - "name": "itsybitsy_nrf52840", - "description": "Build preset for the itsybitsy_nrf52840 board", - "configurePreset": "itsybitsy_nrf52840" + "name": "nanoch32v203", + "description": "Build preset for the nanoch32v203 board", + "configurePreset": "nanoch32v203" }, { "name": "pca10056", @@ -1183,11 +1243,36 @@ "description": "Build preset for the pca10100 board", "configurePreset": "pca10100" }, + { + "name": "pico_sdk", + "description": "Build preset for the pico_sdk board", + "configurePreset": "pico_sdk" + }, { "name": "portenta_c33", "description": "Build preset for the portenta_c33 board", "configurePreset": "portenta_c33" }, + { + "name": "pybadge", + "description": "Build preset for the pybadge board", + "configurePreset": "pybadge" + }, + { + "name": "pyboardv11", + "description": "Build preset for the pyboardv11 board", + "configurePreset": "pyboardv11" + }, + { + "name": "pyportal", + "description": "Build preset for the pyportal board", + "configurePreset": "pyportal" + }, + { + "name": "qtpy", + "description": "Build preset for the qtpy board", + "configurePreset": "qtpy" + }, { "name": "ra2a1_ek", "description": "Build preset for the ra2a1_ek board", @@ -1218,21 +1303,6 @@ "description": "Build preset for the ra8m1_ek board", "configurePreset": "ra8m1_ek" }, - { - "name": "uno_r4", - "description": "Build preset for the uno_r4 board", - "configurePreset": "uno_r4" - }, - { - "name": "feather_rp2040_max3421", - "description": "Build preset for the feather_rp2040_max3421 board", - "configurePreset": "feather_rp2040_max3421" - }, - { - "name": "pico_sdk", - "description": "Build preset for the pico_sdk board", - "configurePreset": "pico_sdk" - }, { "name": "raspberry_pi_pico", "description": "Build preset for the raspberry_pi_pico board", @@ -1244,100 +1314,25 @@ "configurePreset": "raspberry_pi_pico2" }, { - "name": "cynthion_d11", - "description": "Build preset for the cynthion_d11 board", - "configurePreset": "cynthion_d11" + "name": "raspberrypi_cm4", + "description": "Build preset for the raspberrypi_cm4 board", + "configurePreset": "raspberrypi_cm4" + }, + { + "name": "raspberrypi_zero", + "description": "Build preset for the raspberrypi_zero board", + "configurePreset": "raspberrypi_zero" + }, + { + "name": "raspberrypi_zero2", + "description": "Build preset for the raspberrypi_zero2 board", + "configurePreset": "raspberrypi_zero2" }, { "name": "samd11_xplained", "description": "Build preset for the samd11_xplained board", "configurePreset": "samd11_xplained" }, - { - "name": "atsamd21_xpro", - "description": "Build preset for the atsamd21_xpro board", - "configurePreset": "atsamd21_xpro" - }, - { - "name": "circuitplayground_express", - "description": "Build preset for the circuitplayground_express board", - "configurePreset": "circuitplayground_express" - }, - { - "name": "curiosity_nano", - "description": "Build preset for the curiosity_nano board", - "configurePreset": "curiosity_nano" - }, - { - "name": "cynthion_d21", - "description": "Build preset for the cynthion_d21 board", - "configurePreset": "cynthion_d21" - }, - { - "name": "feather_m0_express", - "description": "Build preset for the feather_m0_express board", - "configurePreset": "feather_m0_express" - }, - { - "name": "itsybitsy_m0", - "description": "Build preset for the itsybitsy_m0 board", - "configurePreset": "itsybitsy_m0" - }, - { - "name": "metro_m0_express", - "description": "Build preset for the metro_m0_express board", - "configurePreset": "metro_m0_express" - }, - { - "name": "qtpy", - "description": "Build preset for the qtpy board", - "configurePreset": "qtpy" - }, - { - "name": "seeeduino_xiao", - "description": "Build preset for the seeeduino_xiao board", - "configurePreset": "seeeduino_xiao" - }, - { - "name": "sparkfun_samd21_mini_usb", - "description": "Build preset for the sparkfun_samd21_mini_usb board", - "configurePreset": "sparkfun_samd21_mini_usb" - }, - { - "name": "trinket_m0", - "description": "Build preset for the trinket_m0 board", - "configurePreset": "trinket_m0" - }, - { - "name": "d5035_01", - "description": "Build preset for the d5035_01 board", - "configurePreset": "d5035_01" - }, - { - "name": "feather_m4_express", - "description": "Build preset for the feather_m4_express board", - "configurePreset": "feather_m4_express" - }, - { - "name": "itsybitsy_m4", - "description": "Build preset for the itsybitsy_m4 board", - "configurePreset": "itsybitsy_m4" - }, - { - "name": "metro_m4_express", - "description": "Build preset for the metro_m4_express board", - "configurePreset": "metro_m4_express" - }, - { - "name": "pybadge", - "description": "Build preset for the pybadge board", - "configurePreset": "pybadge" - }, - { - "name": "pyportal", - "description": "Build preset for the pyportal board", - "configurePreset": "pyportal" - }, { "name": "same54_xplained", "description": "Build preset for the same54_xplained board", @@ -1348,21 +1343,36 @@ "description": "Build preset for the samg55_xplained board", "configurePreset": "samg55_xplained" }, - { - "name": "atsaml21_xpro", - "description": "Build preset for the atsaml21_xpro board", - "configurePreset": "atsaml21_xpro" - }, { "name": "saml22_feather", "description": "Build preset for the saml22_feather board", "configurePreset": "saml22_feather" }, + { + "name": "seeeduino_xiao", + "description": "Build preset for the seeeduino_xiao board", + "configurePreset": "seeeduino_xiao" + }, { "name": "sensorwatch_m0", "description": "Build preset for the sensorwatch_m0 board", "configurePreset": "sensorwatch_m0" }, + { + "name": "sipeed_longan_nano", + "description": "Build preset for the sipeed_longan_nano board", + "configurePreset": "sipeed_longan_nano" + }, + { + "name": "sparkfun_samd21_mini_usb", + "description": "Build preset for the sparkfun_samd21_mini_usb board", + "configurePreset": "sparkfun_samd21_mini_usb" + }, + { + "name": "stlinkv3mini", + "description": "Build preset for the stlinkv3mini board", + "configurePreset": "stlinkv3mini" + }, { "name": "stm32c071nucleo", "description": "Build preset for the stm32c071nucleo board", @@ -1383,11 +1393,6 @@ "description": "Build preset for the stm32f072eval board", "configurePreset": "stm32f072eval" }, - { - "name": "stm32f103ze_iar", - "description": "Build preset for the stm32f103ze_iar board", - "configurePreset": "stm32f103ze_iar" - }, { "name": "stm32f103_bluepill", "description": "Build preset for the stm32f103_bluepill board", @@ -1398,6 +1403,11 @@ "description": "Build preset for the stm32f103_mini_2 board", "configurePreset": "stm32f103_mini_2" }, + { + "name": "stm32f103ze_iar", + "description": "Build preset for the stm32f103ze_iar board", + "configurePreset": "stm32f103ze_iar" + }, { "name": "stm32f207nucleo", "description": "Build preset for the stm32f207nucleo board", @@ -1408,16 +1418,6 @@ "description": "Build preset for the stm32f303disco board", "configurePreset": "stm32f303disco" }, - { - "name": "feather_stm32f405", - "description": "Build preset for the feather_stm32f405 board", - "configurePreset": "feather_stm32f405" - }, - { - "name": "pyboardv11", - "description": "Build preset for the pyboardv11 board", - "configurePreset": "pyboardv11" - }, { "name": "stm32f401blackpill", "description": "Build preset for the stm32f401blackpill board", @@ -1458,11 +1458,6 @@ "description": "Build preset for the stm32f439nucleo board", "configurePreset": "stm32f439nucleo" }, - { - "name": "stlinkv3mini", - "description": "Build preset for the stlinkv3mini board", - "configurePreset": "stlinkv3mini" - }, { "name": "stm32f723disco", "description": "Build preset for the stm32f723disco board", @@ -1493,11 +1488,6 @@ "description": "Build preset for the stm32g0b1nucleo board", "configurePreset": "stm32g0b1nucleo" }, - { - "name": "b_g474e_dpow1", - "description": "Build preset for the b_g474e_dpow1 board", - "configurePreset": "b_g474e_dpow1" - }, { "name": "stm32g474nucleo", "description": "Build preset for the stm32g474nucleo board", @@ -1523,11 +1513,6 @@ "description": "Build preset for the stm32h573i_dk board", "configurePreset": "stm32h573i_dk" }, - { - "name": "daisyseed", - "description": "Build preset for the daisyseed board", - "configurePreset": "daisyseed" - }, { "name": "stm32h723nucleo", "description": "Build preset for the stm32h723nucleo board", @@ -1548,20 +1533,15 @@ "description": "Build preset for the stm32h745disco board", "configurePreset": "stm32h745disco" }, - { - "name": "stm32h750bdk", - "description": "Build preset for the stm32h750bdk board", - "configurePreset": "stm32h750bdk" - }, { "name": "stm32h750_weact", "description": "Build preset for the stm32h750_weact board", "configurePreset": "stm32h750_weact" }, { - "name": "waveshare_openh743i", - "description": "Build preset for the waveshare_openh743i board", - "configurePreset": "waveshare_openh743i" + "name": "stm32h750bdk", + "description": "Build preset for the stm32h750bdk board", + "configurePreset": "stm32h750bdk" }, { "name": "stm32h7s3nucleo", @@ -1598,11 +1578,6 @@ "description": "Build preset for the stm32l4r5nucleo board", "configurePreset": "stm32l4r5nucleo" }, - { - "name": "b_u585i_iot2a", - "description": "Build preset for the b_u585i_iot2a board", - "configurePreset": "b_u585i_iot2a" - }, { "name": "stm32u545nucleo", "description": "Build preset for the stm32u545nucleo board", @@ -1629,9 +1604,34 @@ "configurePreset": "stm32wb55nucleo" }, { - "name": "ek_tm4c123gxl", - "description": "Build preset for the ek_tm4c123gxl board", - "configurePreset": "ek_tm4c123gxl" + "name": "teensy_35", + "description": "Build preset for the teensy_35 board", + "configurePreset": "teensy_35" + }, + { + "name": "teensy_40", + "description": "Build preset for the teensy_40 board", + "configurePreset": "teensy_40" + }, + { + "name": "teensy_41", + "description": "Build preset for the teensy_41 board", + "configurePreset": "teensy_41" + }, + { + "name": "trinket_m0", + "description": "Build preset for the trinket_m0 board", + "configurePreset": "trinket_m0" + }, + { + "name": "uno_r4", + "description": "Build preset for the uno_r4 board", + "configurePreset": "uno_r4" + }, + { + "name": "waveshare_openh743i", + "description": "Build preset for the waveshare_openh743i board", + "configurePreset": "waveshare_openh743i" }, { "name": "xmc4500_relax", @@ -1646,41 +1646,158 @@ ], "workflowPresets": [ { - "name": "raspberrypi_zero", + "name": "adafruit_clue", "steps": [ { "type": "configure", - "name": "raspberrypi_zero" + "name": "adafruit_clue" }, { "type": "build", - "name": "raspberrypi_zero" + "name": "adafruit_clue" } ] }, { - "name": "raspberrypi_cm4", + "name": "adafruit_feather_esp32_v2", "steps": [ { "type": "configure", - "name": "raspberrypi_cm4" + "name": "adafruit_feather_esp32_v2" }, { "type": "build", - "name": "raspberrypi_cm4" + "name": "adafruit_feather_esp32_v2" } ] }, { - "name": "raspberrypi_zero2", + "name": "adafruit_feather_esp32s2", "steps": [ { "type": "configure", - "name": "raspberrypi_zero2" + "name": "adafruit_feather_esp32s2" }, { "type": "build", - "name": "raspberrypi_zero2" + "name": "adafruit_feather_esp32s2" + } + ] + }, + { + "name": "adafruit_feather_esp32s3", + "steps": [ + { + "type": "configure", + "name": "adafruit_feather_esp32s3" + }, + { + "type": "build", + "name": "adafruit_feather_esp32s3" + } + ] + }, + { + "name": "adafruit_magtag_29gray", + "steps": [ + { + "type": "configure", + "name": "adafruit_magtag_29gray" + }, + { + "type": "build", + "name": "adafruit_magtag_29gray" + } + ] + }, + { + "name": "adafruit_metro_esp32s2", + "steps": [ + { + "type": "configure", + "name": "adafruit_metro_esp32s2" + }, + { + "type": "build", + "name": "adafruit_metro_esp32s2" + } + ] + }, + { + "name": "apard32690", + "steps": [ + { + "type": "configure", + "name": "apard32690" + }, + { + "type": "build", + "name": "apard32690" + } + ] + }, + { + "name": "arduino_nano33_ble", + "steps": [ + { + "type": "configure", + "name": "arduino_nano33_ble" + }, + { + "type": "build", + "name": "arduino_nano33_ble" + } + ] + }, + { + "name": "atsamd21_xpro", + "steps": [ + { + "type": "configure", + "name": "atsamd21_xpro" + }, + { + "type": "build", + "name": "atsamd21_xpro" + } + ] + }, + { + "name": "atsaml21_xpro", + "steps": [ + { + "type": "configure", + "name": "atsaml21_xpro" + }, + { + "type": "build", + "name": "atsaml21_xpro" + } + ] + }, + { + "name": "b_g474e_dpow1", + "steps": [ + { + "type": "configure", + "name": "b_g474e_dpow1" + }, + { + "type": "build", + "name": "b_g474e_dpow1" + } + ] + }, + { + "name": "b_u585i_iot2a", + "steps": [ + { + "type": "configure", + "name": "b_u585i_iot2a" + }, + { + "type": "build", + "name": "b_u585i_iot2a" } ] }, @@ -1723,19 +1840,6 @@ } ] }, - { - "name": "nanoch32v203", - "steps": [ - { - "type": "configure", - "name": "nanoch32v203" - }, - { - "type": "build", - "name": "nanoch32v203" - } - ] - }, { "name": "ch32v307v_r1_1v0", "steps": [ @@ -1749,6 +1853,84 @@ } ] }, + { + "name": "circuitplayground_bluefruit", + "steps": [ + { + "type": "configure", + "name": "circuitplayground_bluefruit" + }, + { + "type": "build", + "name": "circuitplayground_bluefruit" + } + ] + }, + { + "name": "circuitplayground_express", + "steps": [ + { + "type": "configure", + "name": "circuitplayground_express" + }, + { + "type": "build", + "name": "circuitplayground_express" + } + ] + }, + { + "name": "curiosity_nano", + "steps": [ + { + "type": "configure", + "name": "curiosity_nano" + }, + { + "type": "build", + "name": "curiosity_nano" + } + ] + }, + { + "name": "cynthion_d11", + "steps": [ + { + "type": "configure", + "name": "cynthion_d11" + }, + { + "type": "build", + "name": "cynthion_d11" + } + ] + }, + { + "name": "cynthion_d21", + "steps": [ + { + "type": "configure", + "name": "cynthion_d21" + }, + { + "type": "build", + "name": "cynthion_d21" + } + ] + }, + { + "name": "d5035_01", + "steps": [ + { + "type": "configure", + "name": "d5035_01" + }, + { + "type": "build", + "name": "d5035_01" + } + ] + }, { "name": "da14695_dk_usb", "steps": [ @@ -1776,67 +1958,67 @@ ] }, { - "name": "adafruit_feather_esp32s2", + "name": "daisyseed", "steps": [ { "type": "configure", - "name": "adafruit_feather_esp32s2" + "name": "daisyseed" }, { "type": "build", - "name": "adafruit_feather_esp32s2" + "name": "daisyseed" } ] }, { - "name": "adafruit_feather_esp32s3", + "name": "double_m33_express", "steps": [ { "type": "configure", - "name": "adafruit_feather_esp32s3" + "name": "double_m33_express" }, { "type": "build", - "name": "adafruit_feather_esp32s3" + "name": "double_m33_express" } ] }, { - "name": "adafruit_feather_esp32_v2", + "name": "ea4088_quickstart", "steps": [ { "type": "configure", - "name": "adafruit_feather_esp32_v2" + "name": "ea4088_quickstart" }, { "type": "build", - "name": "adafruit_feather_esp32_v2" + "name": "ea4088_quickstart" } ] }, { - "name": "adafruit_magtag_29gray", + "name": "ea4357", "steps": [ { "type": "configure", - "name": "adafruit_magtag_29gray" + "name": "ea4357" }, { "type": "build", - "name": "adafruit_magtag_29gray" + "name": "ea4357" } ] }, { - "name": "adafruit_metro_esp32s2", + "name": "ek_tm4c123gxl", "steps": [ { "type": "configure", - "name": "adafruit_metro_esp32s2" + "name": "ek_tm4c123gxl" }, { "type": "build", - "name": "adafruit_metro_esp32s2" + "name": "ek_tm4c123gxl" } ] }, @@ -1970,6 +2152,84 @@ } ] }, + { + "name": "feather_m0_express", + "steps": [ + { + "type": "configure", + "name": "feather_m0_express" + }, + { + "type": "build", + "name": "feather_m0_express" + } + ] + }, + { + "name": "feather_m4_express", + "steps": [ + { + "type": "configure", + "name": "feather_m4_express" + }, + { + "type": "build", + "name": "feather_m4_express" + } + ] + }, + { + "name": "feather_nrf52840_express", + "steps": [ + { + "type": "configure", + "name": "feather_nrf52840_express" + }, + { + "type": "build", + "name": "feather_nrf52840_express" + } + ] + }, + { + "name": "feather_nrf52840_sense", + "steps": [ + { + "type": "configure", + "name": "feather_nrf52840_sense" + }, + { + "type": "build", + "name": "feather_nrf52840_sense" + } + ] + }, + { + "name": "feather_rp2040_max3421", + "steps": [ + { + "type": "configure", + "name": "feather_rp2040_max3421" + }, + { + "type": "build", + "name": "feather_rp2040_max3421" + } + ] + }, + { + "name": "feather_stm32f405", + "steps": [ + { + "type": "configure", + "name": "feather_stm32f405" + }, + { + "type": "build", + "name": "feather_stm32f405" + } + ] + }, { "name": "fomu", "steps": [ @@ -1984,15 +2244,470 @@ ] }, { - "name": "sipeed_longan_nano", + "name": "frdm_k32l2a4s", "steps": [ { "type": "configure", - "name": "sipeed_longan_nano" + "name": "frdm_k32l2a4s" }, { "type": "build", - "name": "sipeed_longan_nano" + "name": "frdm_k32l2a4s" + } + ] + }, + { + "name": "frdm_k32l2b", + "steps": [ + { + "type": "configure", + "name": "frdm_k32l2b" + }, + { + "type": "build", + "name": "frdm_k32l2b" + } + ] + }, + { + "name": "frdm_k64f", + "steps": [ + { + "type": "configure", + "name": "frdm_k64f" + }, + { + "type": "build", + "name": "frdm_k64f" + } + ] + }, + { + "name": "frdm_kl25z", + "steps": [ + { + "type": "configure", + "name": "frdm_kl25z" + }, + { + "type": "build", + "name": "frdm_kl25z" + } + ] + }, + { + "name": "frdm_mcxa153", + "steps": [ + { + "type": "configure", + "name": "frdm_mcxa153" + }, + { + "type": "build", + "name": "frdm_mcxa153" + } + ] + }, + { + "name": "frdm_mcxn947", + "steps": [ + { + "type": "configure", + "name": "frdm_mcxn947" + }, + { + "type": "build", + "name": "frdm_mcxn947" + } + ] + }, + { + "name": "itsybitsy_m0", + "steps": [ + { + "type": "configure", + "name": "itsybitsy_m0" + }, + { + "type": "build", + "name": "itsybitsy_m0" + } + ] + }, + { + "name": "itsybitsy_m4", + "steps": [ + { + "type": "configure", + "name": "itsybitsy_m4" + }, + { + "type": "build", + "name": "itsybitsy_m4" + } + ] + }, + { + "name": "itsybitsy_nrf52840", + "steps": [ + { + "type": "configure", + "name": "itsybitsy_nrf52840" + }, + { + "type": "build", + "name": "itsybitsy_nrf52840" + } + ] + }, + { + "name": "kuiic", + "steps": [ + { + "type": "configure", + "name": "kuiic" + }, + { + "type": "build", + "name": "kuiic" + } + ] + }, + { + "name": "lpcxpresso11u37", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso11u37" + }, + { + "type": "build", + "name": "lpcxpresso11u37" + } + ] + }, + { + "name": "lpcxpresso11u68", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso11u68" + }, + { + "type": "build", + "name": "lpcxpresso11u68" + } + ] + }, + { + "name": "lpcxpresso1347", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso1347" + }, + { + "type": "build", + "name": "lpcxpresso1347" + } + ] + }, + { + "name": "lpcxpresso1549", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso1549" + }, + { + "type": "build", + "name": "lpcxpresso1549" + } + ] + }, + { + "name": "lpcxpresso1769", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso1769" + }, + { + "type": "build", + "name": "lpcxpresso1769" + } + ] + }, + { + "name": "lpcxpresso18s37", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso18s37" + }, + { + "type": "build", + "name": "lpcxpresso18s37" + } + ] + }, + { + "name": "lpcxpresso43s67", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso43s67" + }, + { + "type": "build", + "name": "lpcxpresso43s67" + } + ] + }, + { + "name": "lpcxpresso51u68", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso51u68" + }, + { + "type": "build", + "name": "lpcxpresso51u68" + } + ] + }, + { + "name": "lpcxpresso54114", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso54114" + }, + { + "type": "build", + "name": "lpcxpresso54114" + } + ] + }, + { + "name": "lpcxpresso54608", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso54608" + }, + { + "type": "build", + "name": "lpcxpresso54608" + } + ] + }, + { + "name": "lpcxpresso54628", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso54628" + }, + { + "type": "build", + "name": "lpcxpresso54628" + } + ] + }, + { + "name": "lpcxpresso55s28", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso55s28" + }, + { + "type": "build", + "name": "lpcxpresso55s28" + } + ] + }, + { + "name": "lpcxpresso55s69", + "steps": [ + { + "type": "configure", + "name": "lpcxpresso55s69" + }, + { + "type": "build", + "name": "lpcxpresso55s69" + } + ] + }, + { + "name": "max32650evkit", + "steps": [ + { + "type": "configure", + "name": "max32650evkit" + }, + { + "type": "build", + "name": "max32650evkit" + } + ] + }, + { + "name": "max32650fthr", + "steps": [ + { + "type": "configure", + "name": "max32650fthr" + }, + { + "type": "build", + "name": "max32650fthr" + } + ] + }, + { + "name": "max32651evkit", + "steps": [ + { + "type": "configure", + "name": "max32651evkit" + }, + { + "type": "build", + "name": "max32651evkit" + } + ] + }, + { + "name": "max32666evkit", + "steps": [ + { + "type": "configure", + "name": "max32666evkit" + }, + { + "type": "build", + "name": "max32666evkit" + } + ] + }, + { + "name": "max32666fthr", + "steps": [ + { + "type": "configure", + "name": "max32666fthr" + }, + { + "type": "build", + "name": "max32666fthr" + } + ] + }, + { + "name": "max32690evkit", + "steps": [ + { + "type": "configure", + "name": "max32690evkit" + }, + { + "type": "build", + "name": "max32690evkit" + } + ] + }, + { + "name": "max78002evkit", + "steps": [ + { + "type": "configure", + "name": "max78002evkit" + }, + { + "type": "build", + "name": "max78002evkit" + } + ] + }, + { + "name": "mbed1768", + "steps": [ + { + "type": "configure", + "name": "mbed1768" + }, + { + "type": "build", + "name": "mbed1768" + } + ] + }, + { + "name": "mcb1800", + "steps": [ + { + "type": "configure", + "name": "mcb1800" + }, + { + "type": "build", + "name": "mcb1800" + } + ] + }, + { + "name": "mcu_link", + "steps": [ + { + "type": "configure", + "name": "mcu_link" + }, + { + "type": "build", + "name": "mcu_link" + } + ] + }, + { + "name": "mcxn947brk", + "steps": [ + { + "type": "configure", + "name": "mcxn947brk" + }, + { + "type": "build", + "name": "mcxn947brk" + } + ] + }, + { + "name": "metro_m0_express", + "steps": [ + { + "type": "configure", + "name": "metro_m0_express" + }, + { + "type": "build", + "name": "metro_m0_express" + } + ] + }, + { + "name": "metro_m4_express", + "steps": [ + { + "type": "configure", + "name": "metro_m4_express" + }, + { + "type": "build", + "name": "metro_m4_express" } ] }, @@ -2126,500 +2841,6 @@ } ] }, - { - "name": "teensy_40", - "steps": [ - { - "type": "configure", - "name": "teensy_40" - }, - { - "type": "build", - "name": "teensy_40" - } - ] - }, - { - "name": "teensy_41", - "steps": [ - { - "type": "configure", - "name": "teensy_41" - }, - { - "type": "build", - "name": "teensy_41" - } - ] - }, - { - "name": "frdm_k64f", - "steps": [ - { - "type": "configure", - "name": "frdm_k64f" - }, - { - "type": "build", - "name": "frdm_k64f" - } - ] - }, - { - "name": "teensy_35", - "steps": [ - { - "type": "configure", - "name": "teensy_35" - }, - { - "type": "build", - "name": "teensy_35" - } - ] - }, - { - "name": "frdm_k32l2a4s", - "steps": [ - { - "type": "configure", - "name": "frdm_k32l2a4s" - }, - { - "type": "build", - "name": "frdm_k32l2a4s" - } - ] - }, - { - "name": "frdm_k32l2b", - "steps": [ - { - "type": "configure", - "name": "frdm_k32l2b" - }, - { - "type": "build", - "name": "frdm_k32l2b" - } - ] - }, - { - "name": "kuiic", - "steps": [ - { - "type": "configure", - "name": "kuiic" - }, - { - "type": "build", - "name": "kuiic" - } - ] - }, - { - "name": "frdm_kl25z", - "steps": [ - { - "type": "configure", - "name": "frdm_kl25z" - }, - { - "type": "build", - "name": "frdm_kl25z" - } - ] - }, - { - "name": "lpcxpresso11u37", - "steps": [ - { - "type": "configure", - "name": "lpcxpresso11u37" - }, - { - "type": "build", - "name": "lpcxpresso11u37" - } - ] - }, - { - "name": "lpcxpresso11u68", - "steps": [ - { - "type": "configure", - "name": "lpcxpresso11u68" - }, - { - "type": "build", - "name": "lpcxpresso11u68" - } - ] - }, - { - "name": "lpcxpresso1347", - "steps": [ - { - "type": "configure", - "name": "lpcxpresso1347" - }, - { - "type": "build", - "name": "lpcxpresso1347" - } - ] - }, - { - "name": "lpcxpresso1549", - "steps": [ - { - "type": "configure", - "name": "lpcxpresso1549" - }, - { - "type": "build", - "name": "lpcxpresso1549" - } - ] - }, - { - "name": "lpcxpresso1769", - "steps": [ - { - "type": "configure", - "name": "lpcxpresso1769" - }, - { - "type": "build", - "name": "lpcxpresso1769" - } - ] - }, - { - "name": "mbed1768", - "steps": [ - { - "type": "configure", - "name": "mbed1768" - }, - { - "type": "build", - "name": "mbed1768" - } - ] - }, - { - "name": "lpcxpresso18s37", - "steps": [ - { - "type": "configure", - "name": "lpcxpresso18s37" - }, - { - "type": "build", - "name": "lpcxpresso18s37" - } - ] - }, - { - "name": "mcb1800", - "steps": [ - { - "type": "configure", - "name": "mcb1800" - }, - { - "type": "build", - "name": "mcb1800" - } - ] - }, - { - "name": "ea4088_quickstart", - "steps": [ - { - "type": "configure", - "name": "ea4088_quickstart" - }, - { - "type": "build", - "name": "ea4088_quickstart" - } - ] - }, - { - "name": "ea4357", - "steps": [ - { - "type": "configure", - "name": "ea4357" - }, - { - "type": "build", - "name": "ea4357" - } - ] - }, - { - "name": "lpcxpresso43s67", - "steps": [ - { - "type": "configure", - "name": "lpcxpresso43s67" - }, - { - "type": "build", - "name": "lpcxpresso43s67" - } - ] - }, - { - "name": "lpcxpresso51u68", - "steps": [ - { - "type": "configure", - "name": "lpcxpresso51u68" - }, - { - "type": "build", - "name": "lpcxpresso51u68" - } - ] - }, - { - "name": "lpcxpresso54114", - "steps": [ - { - "type": "configure", - "name": "lpcxpresso54114" - }, - { - "type": "build", - "name": "lpcxpresso54114" - } - ] - }, - { - "name": "lpcxpresso54608", - "steps": [ - { - "type": "configure", - "name": "lpcxpresso54608" - }, - { - "type": "build", - "name": "lpcxpresso54608" - } - ] - }, - { - "name": "lpcxpresso54628", - "steps": [ - { - "type": "configure", - "name": "lpcxpresso54628" - }, - { - "type": "build", - "name": "lpcxpresso54628" - } - ] - }, - { - "name": "double_m33_express", - "steps": [ - { - "type": "configure", - "name": "double_m33_express" - }, - { - "type": "build", - "name": "double_m33_express" - } - ] - }, - { - "name": "lpcxpresso55s28", - "steps": [ - { - "type": "configure", - "name": "lpcxpresso55s28" - }, - { - "type": "build", - "name": "lpcxpresso55s28" - } - ] - }, - { - "name": "lpcxpresso55s69", - "steps": [ - { - "type": "configure", - "name": "lpcxpresso55s69" - }, - { - "type": "build", - "name": "lpcxpresso55s69" - } - ] - }, - { - "name": "mcu_link", - "steps": [ - { - "type": "configure", - "name": "mcu_link" - }, - { - "type": "build", - "name": "mcu_link" - } - ] - }, - { - "name": "max32650evkit", - "steps": [ - { - "type": "configure", - "name": "max32650evkit" - }, - { - "type": "build", - "name": "max32650evkit" - } - ] - }, - { - "name": "max32650fthr", - "steps": [ - { - "type": "configure", - "name": "max32650fthr" - }, - { - "type": "build", - "name": "max32650fthr" - } - ] - }, - { - "name": "max32651evkit", - "steps": [ - { - "type": "configure", - "name": "max32651evkit" - }, - { - "type": "build", - "name": "max32651evkit" - } - ] - }, - { - "name": "max32666evkit", - "steps": [ - { - "type": "configure", - "name": "max32666evkit" - }, - { - "type": "build", - "name": "max32666evkit" - } - ] - }, - { - "name": "max32666fthr", - "steps": [ - { - "type": "configure", - "name": "max32666fthr" - }, - { - "type": "build", - "name": "max32666fthr" - } - ] - }, - { - "name": "apard32690", - "steps": [ - { - "type": "configure", - "name": "apard32690" - }, - { - "type": "build", - "name": "apard32690" - } - ] - }, - { - "name": "max32690evkit", - "steps": [ - { - "type": "configure", - "name": "max32690evkit" - }, - { - "type": "build", - "name": "max32690evkit" - } - ] - }, - { - "name": "max78002evkit", - "steps": [ - { - "type": "configure", - "name": "max78002evkit" - }, - { - "type": "build", - "name": "max78002evkit" - } - ] - }, - { - "name": "frdm_mcxa153", - "steps": [ - { - "type": "configure", - "name": "frdm_mcxa153" - }, - { - "type": "build", - "name": "frdm_mcxa153" - } - ] - }, - { - "name": "frdm_mcxn947", - "steps": [ - { - "type": "configure", - "name": "frdm_mcxn947" - }, - { - "type": "build", - "name": "frdm_mcxn947" - } - ] - }, - { - "name": "mcxn947brk", - "steps": [ - { - "type": "configure", - "name": "mcxn947brk" - }, - { - "type": "build", - "name": "mcxn947brk" - } - ] - }, { "name": "mm32f327x_mb39", "steps": [ @@ -2673,80 +2894,15 @@ ] }, { - "name": "adafruit_clue", + "name": "nanoch32v203", "steps": [ { "type": "configure", - "name": "adafruit_clue" + "name": "nanoch32v203" }, { "type": "build", - "name": "adafruit_clue" - } - ] - }, - { - "name": "arduino_nano33_ble", - "steps": [ - { - "type": "configure", - "name": "arduino_nano33_ble" - }, - { - "type": "build", - "name": "arduino_nano33_ble" - } - ] - }, - { - "name": "circuitplayground_bluefruit", - "steps": [ - { - "type": "configure", - "name": "circuitplayground_bluefruit" - }, - { - "type": "build", - "name": "circuitplayground_bluefruit" - } - ] - }, - { - "name": "feather_nrf52840_express", - "steps": [ - { - "type": "configure", - "name": "feather_nrf52840_express" - }, - { - "type": "build", - "name": "feather_nrf52840_express" - } - ] - }, - { - "name": "feather_nrf52840_sense", - "steps": [ - { - "type": "configure", - "name": "feather_nrf52840_sense" - }, - { - "type": "build", - "name": "feather_nrf52840_sense" - } - ] - }, - { - "name": "itsybitsy_nrf52840", - "steps": [ - { - "type": "configure", - "name": "itsybitsy_nrf52840" - }, - { - "type": "build", - "name": "itsybitsy_nrf52840" + "name": "nanoch32v203" } ] }, @@ -2802,6 +2958,19 @@ } ] }, + { + "name": "pico_sdk", + "steps": [ + { + "type": "configure", + "name": "pico_sdk" + }, + { + "type": "build", + "name": "pico_sdk" + } + ] + }, { "name": "portenta_c33", "steps": [ @@ -2815,6 +2984,58 @@ } ] }, + { + "name": "pybadge", + "steps": [ + { + "type": "configure", + "name": "pybadge" + }, + { + "type": "build", + "name": "pybadge" + } + ] + }, + { + "name": "pyboardv11", + "steps": [ + { + "type": "configure", + "name": "pyboardv11" + }, + { + "type": "build", + "name": "pyboardv11" + } + ] + }, + { + "name": "pyportal", + "steps": [ + { + "type": "configure", + "name": "pyportal" + }, + { + "type": "build", + "name": "pyportal" + } + ] + }, + { + "name": "qtpy", + "steps": [ + { + "type": "configure", + "name": "qtpy" + }, + { + "type": "build", + "name": "qtpy" + } + ] + }, { "name": "ra2a1_ek", "steps": [ @@ -2893,45 +3114,6 @@ } ] }, - { - "name": "uno_r4", - "steps": [ - { - "type": "configure", - "name": "uno_r4" - }, - { - "type": "build", - "name": "uno_r4" - } - ] - }, - { - "name": "feather_rp2040_max3421", - "steps": [ - { - "type": "configure", - "name": "feather_rp2040_max3421" - }, - { - "type": "build", - "name": "feather_rp2040_max3421" - } - ] - }, - { - "name": "pico_sdk", - "steps": [ - { - "type": "configure", - "name": "pico_sdk" - }, - { - "type": "build", - "name": "pico_sdk" - } - ] - }, { "name": "raspberry_pi_pico", "steps": [ @@ -2959,15 +3141,41 @@ ] }, { - "name": "cynthion_d11", + "name": "raspberrypi_cm4", "steps": [ { "type": "configure", - "name": "cynthion_d11" + "name": "raspberrypi_cm4" }, { "type": "build", - "name": "cynthion_d11" + "name": "raspberrypi_cm4" + } + ] + }, + { + "name": "raspberrypi_zero", + "steps": [ + { + "type": "configure", + "name": "raspberrypi_zero" + }, + { + "type": "build", + "name": "raspberrypi_zero" + } + ] + }, + { + "name": "raspberrypi_zero2", + "steps": [ + { + "type": "configure", + "name": "raspberrypi_zero2" + }, + { + "type": "build", + "name": "raspberrypi_zero2" } ] }, @@ -2984,227 +3192,6 @@ } ] }, - { - "name": "atsamd21_xpro", - "steps": [ - { - "type": "configure", - "name": "atsamd21_xpro" - }, - { - "type": "build", - "name": "atsamd21_xpro" - } - ] - }, - { - "name": "circuitplayground_express", - "steps": [ - { - "type": "configure", - "name": "circuitplayground_express" - }, - { - "type": "build", - "name": "circuitplayground_express" - } - ] - }, - { - "name": "curiosity_nano", - "steps": [ - { - "type": "configure", - "name": "curiosity_nano" - }, - { - "type": "build", - "name": "curiosity_nano" - } - ] - }, - { - "name": "cynthion_d21", - "steps": [ - { - "type": "configure", - "name": "cynthion_d21" - }, - { - "type": "build", - "name": "cynthion_d21" - } - ] - }, - { - "name": "feather_m0_express", - "steps": [ - { - "type": "configure", - "name": "feather_m0_express" - }, - { - "type": "build", - "name": "feather_m0_express" - } - ] - }, - { - "name": "itsybitsy_m0", - "steps": [ - { - "type": "configure", - "name": "itsybitsy_m0" - }, - { - "type": "build", - "name": "itsybitsy_m0" - } - ] - }, - { - "name": "metro_m0_express", - "steps": [ - { - "type": "configure", - "name": "metro_m0_express" - }, - { - "type": "build", - "name": "metro_m0_express" - } - ] - }, - { - "name": "qtpy", - "steps": [ - { - "type": "configure", - "name": "qtpy" - }, - { - "type": "build", - "name": "qtpy" - } - ] - }, - { - "name": "seeeduino_xiao", - "steps": [ - { - "type": "configure", - "name": "seeeduino_xiao" - }, - { - "type": "build", - "name": "seeeduino_xiao" - } - ] - }, - { - "name": "sparkfun_samd21_mini_usb", - "steps": [ - { - "type": "configure", - "name": "sparkfun_samd21_mini_usb" - }, - { - "type": "build", - "name": "sparkfun_samd21_mini_usb" - } - ] - }, - { - "name": "trinket_m0", - "steps": [ - { - "type": "configure", - "name": "trinket_m0" - }, - { - "type": "build", - "name": "trinket_m0" - } - ] - }, - { - "name": "d5035_01", - "steps": [ - { - "type": "configure", - "name": "d5035_01" - }, - { - "type": "build", - "name": "d5035_01" - } - ] - }, - { - "name": "feather_m4_express", - "steps": [ - { - "type": "configure", - "name": "feather_m4_express" - }, - { - "type": "build", - "name": "feather_m4_express" - } - ] - }, - { - "name": "itsybitsy_m4", - "steps": [ - { - "type": "configure", - "name": "itsybitsy_m4" - }, - { - "type": "build", - "name": "itsybitsy_m4" - } - ] - }, - { - "name": "metro_m4_express", - "steps": [ - { - "type": "configure", - "name": "metro_m4_express" - }, - { - "type": "build", - "name": "metro_m4_express" - } - ] - }, - { - "name": "pybadge", - "steps": [ - { - "type": "configure", - "name": "pybadge" - }, - { - "type": "build", - "name": "pybadge" - } - ] - }, - { - "name": "pyportal", - "steps": [ - { - "type": "configure", - "name": "pyportal" - }, - { - "type": "build", - "name": "pyportal" - } - ] - }, { "name": "same54_xplained", "steps": [ @@ -3231,19 +3218,6 @@ } ] }, - { - "name": "atsaml21_xpro", - "steps": [ - { - "type": "configure", - "name": "atsaml21_xpro" - }, - { - "type": "build", - "name": "atsaml21_xpro" - } - ] - }, { "name": "saml22_feather", "steps": [ @@ -3257,6 +3231,19 @@ } ] }, + { + "name": "seeeduino_xiao", + "steps": [ + { + "type": "configure", + "name": "seeeduino_xiao" + }, + { + "type": "build", + "name": "seeeduino_xiao" + } + ] + }, { "name": "sensorwatch_m0", "steps": [ @@ -3270,6 +3257,45 @@ } ] }, + { + "name": "sipeed_longan_nano", + "steps": [ + { + "type": "configure", + "name": "sipeed_longan_nano" + }, + { + "type": "build", + "name": "sipeed_longan_nano" + } + ] + }, + { + "name": "sparkfun_samd21_mini_usb", + "steps": [ + { + "type": "configure", + "name": "sparkfun_samd21_mini_usb" + }, + { + "type": "build", + "name": "sparkfun_samd21_mini_usb" + } + ] + }, + { + "name": "stlinkv3mini", + "steps": [ + { + "type": "configure", + "name": "stlinkv3mini" + }, + { + "type": "build", + "name": "stlinkv3mini" + } + ] + }, { "name": "stm32c071nucleo", "steps": [ @@ -3322,19 +3348,6 @@ } ] }, - { - "name": "stm32f103ze_iar", - "steps": [ - { - "type": "configure", - "name": "stm32f103ze_iar" - }, - { - "type": "build", - "name": "stm32f103ze_iar" - } - ] - }, { "name": "stm32f103_bluepill", "steps": [ @@ -3361,6 +3374,19 @@ } ] }, + { + "name": "stm32f103ze_iar", + "steps": [ + { + "type": "configure", + "name": "stm32f103ze_iar" + }, + { + "type": "build", + "name": "stm32f103ze_iar" + } + ] + }, { "name": "stm32f207nucleo", "steps": [ @@ -3387,32 +3413,6 @@ } ] }, - { - "name": "feather_stm32f405", - "steps": [ - { - "type": "configure", - "name": "feather_stm32f405" - }, - { - "type": "build", - "name": "feather_stm32f405" - } - ] - }, - { - "name": "pyboardv11", - "steps": [ - { - "type": "configure", - "name": "pyboardv11" - }, - { - "type": "build", - "name": "pyboardv11" - } - ] - }, { "name": "stm32f401blackpill", "steps": [ @@ -3517,19 +3517,6 @@ } ] }, - { - "name": "stlinkv3mini", - "steps": [ - { - "type": "configure", - "name": "stlinkv3mini" - }, - { - "type": "build", - "name": "stlinkv3mini" - } - ] - }, { "name": "stm32f723disco", "steps": [ @@ -3608,19 +3595,6 @@ } ] }, - { - "name": "b_g474e_dpow1", - "steps": [ - { - "type": "configure", - "name": "b_g474e_dpow1" - }, - { - "type": "build", - "name": "b_g474e_dpow1" - } - ] - }, { "name": "stm32g474nucleo", "steps": [ @@ -3686,19 +3660,6 @@ } ] }, - { - "name": "daisyseed", - "steps": [ - { - "type": "configure", - "name": "daisyseed" - }, - { - "type": "build", - "name": "daisyseed" - } - ] - }, { "name": "stm32h723nucleo", "steps": [ @@ -3751,19 +3712,6 @@ } ] }, - { - "name": "stm32h750bdk", - "steps": [ - { - "type": "configure", - "name": "stm32h750bdk" - }, - { - "type": "build", - "name": "stm32h750bdk" - } - ] - }, { "name": "stm32h750_weact", "steps": [ @@ -3778,15 +3726,15 @@ ] }, { - "name": "waveshare_openh743i", + "name": "stm32h750bdk", "steps": [ { "type": "configure", - "name": "waveshare_openh743i" + "name": "stm32h750bdk" }, { "type": "build", - "name": "waveshare_openh743i" + "name": "stm32h750bdk" } ] }, @@ -3881,19 +3829,6 @@ } ] }, - { - "name": "b_u585i_iot2a", - "steps": [ - { - "type": "configure", - "name": "b_u585i_iot2a" - }, - { - "type": "build", - "name": "b_u585i_iot2a" - } - ] - }, { "name": "stm32u545nucleo", "steps": [ @@ -3960,15 +3895,80 @@ ] }, { - "name": "ek_tm4c123gxl", + "name": "teensy_35", "steps": [ { "type": "configure", - "name": "ek_tm4c123gxl" + "name": "teensy_35" }, { "type": "build", - "name": "ek_tm4c123gxl" + "name": "teensy_35" + } + ] + }, + { + "name": "teensy_40", + "steps": [ + { + "type": "configure", + "name": "teensy_40" + }, + { + "type": "build", + "name": "teensy_40" + } + ] + }, + { + "name": "teensy_41", + "steps": [ + { + "type": "configure", + "name": "teensy_41" + }, + { + "type": "build", + "name": "teensy_41" + } + ] + }, + { + "name": "trinket_m0", + "steps": [ + { + "type": "configure", + "name": "trinket_m0" + }, + { + "type": "build", + "name": "trinket_m0" + } + ] + }, + { + "name": "uno_r4", + "steps": [ + { + "type": "configure", + "name": "uno_r4" + }, + { + "type": "build", + "name": "uno_r4" + } + ] + }, + { + "name": "waveshare_openh743i", + "steps": [ + { + "type": "configure", + "name": "waveshare_openh743i" + }, + { + "type": "build", + "name": "waveshare_openh743i" } ] }, diff --git a/tools/gen_presets.py b/tools/gen_presets.py index 98b1a7d46..7542cfdf5 100755 --- a/tools/gen_presets.py +++ b/tools/gen_presets.py @@ -24,46 +24,57 @@ def main(): {"name": "default", "hidden": True, "description": r"Configure preset for the ${presetName} board", - "generator": "Ninja", + "generator": "Ninja Multi-Config", "binaryDir": r"${sourceDir}/build/${presetName}", "cacheVariables": { - "CMAKE_BUILD_TYPE": "RelWithDebInfo", + "CMAKE_DEFAULT_BUILD_TYPE": "RelWithDebInfo", "BOARD": r"${presetName}" - } - }] + }}] presets['configurePresets'].extend( - [{'name': board, 'inherits': 'default'} for board in board_list] + sorted( + [ + { + 'name': board, + 'inherits': 'default' + } + for board in board_list + ], key=lambda x: x['name'] + ) ) # Build presets # no inheritance since 'name' doesn't support macro expansion - presets['buildPresets'] = [ - { - 'name': board, - 'description': "Build preset for the " + board + " board", - 'configurePreset': board - } - for board in board_list - ] + presets['buildPresets'] = sorted( + [ + { + 'name': board, + 'description': "Build preset for the " + board + " board", + 'configurePreset': board + } + for board in board_list + ], key=lambda x: x['name'] + ) # Workflow presets - presets['workflowPresets'] = [ - { - "name": board, - "steps": [ - { - "type": "configure", - "name": board - }, - { - "type": "build", - "name": board - } - ] - } - for board in board_list - ] + presets['workflowPresets'] = sorted( + [ + { + "name": board, + "steps": [ + { + "type": "configure", + "name": board + }, + { + "type": "build", + "name": board + } + ] + } + for board in board_list + ], key=lambda x: x['name'] + ) with open("hw/bsp/BoardPresets.json", "w") as f: f.write('{}\n'.format(json.dumps(presets, indent=2))) @@ -87,5 +98,6 @@ def main(): print('Generating presets for the following examples:') print(example_list) + if __name__ == "__main__": main() From 14f1feac8412668206e69a1178bd29d569f01994 Mon Sep 17 00:00:00 2001 From: HiFiPhile Date: Tue, 11 Feb 2025 20:56:41 +0100 Subject: [PATCH 03/11] Fix path. Signed-off-by: HiFiPhile --- examples/CMakePresets.json | 2 +- examples/device/CMakePresets.json | 2 +- .../audio_4_channel_mic_freertos/src/CMakePresets.json | 6 ------ .../device/audio_test_freertos/src/CMakePresets.json | 6 ------ examples/device/board_test/src/CMakePresets.json | 6 ------ examples/device/cdc_msc_freertos/src/CMakePresets.json | 6 ------ .../hid_composite_freertos/src/CMakePresets.json | 6 ------ .../device/midi_test_freertos/src/CMakePresets.json | 6 ------ examples/device/video_capture/src/CMakePresets.json | 6 ------ .../device/video_capture_2ch/src/CMakePresets.json | 6 ------ examples/dual/CMakePresets.json | 2 +- examples/host/CMakePresets.json | 2 +- .../host/cdc_msc_hid_freertos/src/CMakePresets.json | 6 ------ examples/host/device_info/src/CMakePresets.json | 6 ------ examples/typec/CMakePresets.json | 2 +- tools/gen_presets.py | 10 ++++++---- 16 files changed, 11 insertions(+), 69 deletions(-) delete mode 100644 examples/device/audio_4_channel_mic_freertos/src/CMakePresets.json delete mode 100644 examples/device/audio_test_freertos/src/CMakePresets.json delete mode 100644 examples/device/board_test/src/CMakePresets.json delete mode 100644 examples/device/cdc_msc_freertos/src/CMakePresets.json delete mode 100644 examples/device/hid_composite_freertos/src/CMakePresets.json delete mode 100644 examples/device/midi_test_freertos/src/CMakePresets.json delete mode 100644 examples/device/video_capture/src/CMakePresets.json delete mode 100644 examples/device/video_capture_2ch/src/CMakePresets.json delete mode 100644 examples/host/cdc_msc_hid_freertos/src/CMakePresets.json delete mode 100644 examples/host/device_info/src/CMakePresets.json diff --git a/examples/CMakePresets.json b/examples/CMakePresets.json index 5cd8971e9..2f904a269 100644 --- a/examples/CMakePresets.json +++ b/examples/CMakePresets.json @@ -1,6 +1,6 @@ { "version": 6, "include": [ - "../../../hw/bsp/BoardPresets.json" + "../hw/bsp/BoardPresets.json" ] } diff --git a/examples/device/CMakePresets.json b/examples/device/CMakePresets.json index 5cd8971e9..c22e8c0ec 100644 --- a/examples/device/CMakePresets.json +++ b/examples/device/CMakePresets.json @@ -1,6 +1,6 @@ { "version": 6, "include": [ - "../../../hw/bsp/BoardPresets.json" + "../../hw/bsp/BoardPresets.json" ] } diff --git a/examples/device/audio_4_channel_mic_freertos/src/CMakePresets.json b/examples/device/audio_4_channel_mic_freertos/src/CMakePresets.json deleted file mode 100644 index 5cd8971e9..000000000 --- a/examples/device/audio_4_channel_mic_freertos/src/CMakePresets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 6, - "include": [ - "../../../hw/bsp/BoardPresets.json" - ] -} diff --git a/examples/device/audio_test_freertos/src/CMakePresets.json b/examples/device/audio_test_freertos/src/CMakePresets.json deleted file mode 100644 index 5cd8971e9..000000000 --- a/examples/device/audio_test_freertos/src/CMakePresets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 6, - "include": [ - "../../../hw/bsp/BoardPresets.json" - ] -} diff --git a/examples/device/board_test/src/CMakePresets.json b/examples/device/board_test/src/CMakePresets.json deleted file mode 100644 index 5cd8971e9..000000000 --- a/examples/device/board_test/src/CMakePresets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 6, - "include": [ - "../../../hw/bsp/BoardPresets.json" - ] -} diff --git a/examples/device/cdc_msc_freertos/src/CMakePresets.json b/examples/device/cdc_msc_freertos/src/CMakePresets.json deleted file mode 100644 index 5cd8971e9..000000000 --- a/examples/device/cdc_msc_freertos/src/CMakePresets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 6, - "include": [ - "../../../hw/bsp/BoardPresets.json" - ] -} diff --git a/examples/device/hid_composite_freertos/src/CMakePresets.json b/examples/device/hid_composite_freertos/src/CMakePresets.json deleted file mode 100644 index 5cd8971e9..000000000 --- a/examples/device/hid_composite_freertos/src/CMakePresets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 6, - "include": [ - "../../../hw/bsp/BoardPresets.json" - ] -} diff --git a/examples/device/midi_test_freertos/src/CMakePresets.json b/examples/device/midi_test_freertos/src/CMakePresets.json deleted file mode 100644 index 5cd8971e9..000000000 --- a/examples/device/midi_test_freertos/src/CMakePresets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 6, - "include": [ - "../../../hw/bsp/BoardPresets.json" - ] -} diff --git a/examples/device/video_capture/src/CMakePresets.json b/examples/device/video_capture/src/CMakePresets.json deleted file mode 100644 index 5cd8971e9..000000000 --- a/examples/device/video_capture/src/CMakePresets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 6, - "include": [ - "../../../hw/bsp/BoardPresets.json" - ] -} diff --git a/examples/device/video_capture_2ch/src/CMakePresets.json b/examples/device/video_capture_2ch/src/CMakePresets.json deleted file mode 100644 index 5cd8971e9..000000000 --- a/examples/device/video_capture_2ch/src/CMakePresets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 6, - "include": [ - "../../../hw/bsp/BoardPresets.json" - ] -} diff --git a/examples/dual/CMakePresets.json b/examples/dual/CMakePresets.json index 5cd8971e9..c22e8c0ec 100644 --- a/examples/dual/CMakePresets.json +++ b/examples/dual/CMakePresets.json @@ -1,6 +1,6 @@ { "version": 6, "include": [ - "../../../hw/bsp/BoardPresets.json" + "../../hw/bsp/BoardPresets.json" ] } diff --git a/examples/host/CMakePresets.json b/examples/host/CMakePresets.json index 5cd8971e9..c22e8c0ec 100644 --- a/examples/host/CMakePresets.json +++ b/examples/host/CMakePresets.json @@ -1,6 +1,6 @@ { "version": 6, "include": [ - "../../../hw/bsp/BoardPresets.json" + "../../hw/bsp/BoardPresets.json" ] } diff --git a/examples/host/cdc_msc_hid_freertos/src/CMakePresets.json b/examples/host/cdc_msc_hid_freertos/src/CMakePresets.json deleted file mode 100644 index 5cd8971e9..000000000 --- a/examples/host/cdc_msc_hid_freertos/src/CMakePresets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 6, - "include": [ - "../../../hw/bsp/BoardPresets.json" - ] -} diff --git a/examples/host/device_info/src/CMakePresets.json b/examples/host/device_info/src/CMakePresets.json deleted file mode 100644 index 5cd8971e9..000000000 --- a/examples/host/device_info/src/CMakePresets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 6, - "include": [ - "../../../hw/bsp/BoardPresets.json" - ] -} diff --git a/examples/typec/CMakePresets.json b/examples/typec/CMakePresets.json index 5cd8971e9..c22e8c0ec 100644 --- a/examples/typec/CMakePresets.json +++ b/examples/typec/CMakePresets.json @@ -1,6 +1,6 @@ { "version": 6, "include": [ - "../../../hw/bsp/BoardPresets.json" + "../../hw/bsp/BoardPresets.json" ] } diff --git a/tools/gen_presets.py b/tools/gen_presets.py index 7542cfdf5..94b8d16b0 100755 --- a/tools/gen_presets.py +++ b/tools/gen_presets.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import os import json - +from pathlib import Path def main(): board_list = [] @@ -76,21 +76,23 @@ def main(): ], key=lambda x: x['name'] ) - with open("hw/bsp/BoardPresets.json", "w") as f: + path_boardpresets = "hw/bsp/BoardPresets.json" + with open(path_boardpresets, "w") as f: f.write('{}\n'.format(json.dumps(presets, indent=2))) # Generate presets for examples presets = { "version": 6, "include": [ - "../../../hw/bsp/BoardPresets.json" ] } example_list = [] for root, dirs, files in os.walk("examples"): for file in files: - if file == "CMakeLists.txt": + # Filter out ESP-IDF CMakeLists.txt in src folder + if file == "CMakeLists.txt" and os.path.basename(root) != 'src': + presets['include'] = [os.path.relpath(path_boardpresets, root).replace(os.sep, '/')] with open(os.path.join(root, 'CMakePresets.json'), 'w') as f: f.write('{}\n'.format(json.dumps(presets, indent=2))) example_list.append(os.path.basename(root)) From 18d566b94c8f17d9df04914979997d589b905290 Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 17 Feb 2025 17:06:51 +0700 Subject: [PATCH 04/11] improve hub: retry if hub interrupt endpoint failed bump up pio-usb to latest --- src/host/hub.c | 184 ++++++++++++++++++++++------------------------ src/host/hub.h | 51 ++++++------- src/host/usbh.c | 8 +- tools/get_deps.py | 9 ++- 4 files changed, 120 insertions(+), 132 deletions(-) diff --git a/src/host/hub.c b/src/host/hub.c index e97014443..611bf71be 100644 --- a/src/host/hub.c +++ b/src/host/hub.c @@ -40,29 +40,37 @@ //--------------------------------------------------------------------+ // MACRO CONSTANT TYPEDEF //--------------------------------------------------------------------+ -typedef struct -{ +typedef struct { uint8_t itf_num; uint8_t ep_in; - uint8_t port_count; + + // from hub descriptor + uint8_t bNbrPorts; + // uint8_t bPwrOn2PwrGood; + // uint16_t wHubCharacteristics; CFG_TUH_MEM_ALIGN uint8_t status_change; CFG_TUH_MEM_ALIGN hub_port_status_response_t port_status; CFG_TUH_MEM_ALIGN hub_status_response_t hub_status; } hub_interface_t; -CFG_TUH_MEM_SECTION static hub_interface_t hub_data[CFG_TUH_HUB]; -CFG_TUH_MEM_SECTION CFG_TUH_MEM_ALIGN static uint8_t _hub_buffer[sizeof(descriptor_hub_desc_t)]; +typedef struct { + TUH_EPBUF_DEF(buf, CFG_TUH_HUB_BUFSIZE); +} hub_epbuf_t; -TU_ATTR_ALWAYS_INLINE -static inline hub_interface_t* get_itf(uint8_t dev_addr) -{ - return &hub_data[dev_addr-1-CFG_TUH_DEVICE_MAX]; +CFG_TUH_MEM_SECTION static hub_interface_t hub_itfs[CFG_TUH_HUB]; +CFG_TUH_MEM_SECTION static hub_epbuf_t hub_epbufs[CFG_TUH_HUB]; + +TU_ATTR_ALWAYS_INLINE static inline hub_interface_t* get_hub_itf(uint8_t daddr) { + return &hub_itfs[daddr-1-CFG_TUH_DEVICE_MAX]; } -#if CFG_TUSB_DEBUG >= 2 -static char const* const _hub_feature_str[] = -{ +TU_ATTR_ALWAYS_INLINE static inline uint8_t* get_hub_epbuf(uint8_t daddr) { + return hub_epbufs[daddr-1-CFG_TUH_DEVICE_MAX].buf; +} + +#if CFG_TUSB_DEBUG >= HUB_DEBUG +static char const* const _hub_feature_str[] = { [HUB_FEATURE_PORT_CONNECTION ] = "PORT_CONNECTION", [HUB_FEATURE_PORT_ENABLE ] = "PORT_ENABLE", [HUB_FEATURE_PORT_SUSPEND ] = "PORT_SUSPEND", @@ -84,12 +92,9 @@ static char const* const _hub_feature_str[] = // HUB //--------------------------------------------------------------------+ bool hub_port_clear_feature(uint8_t hub_addr, uint8_t hub_port, uint8_t feature, - tuh_xfer_cb_t complete_cb, uintptr_t user_data) -{ - tusb_control_request_t const request = - { - .bmRequestType_bit = - { + tuh_xfer_cb_t complete_cb, uintptr_t user_data) { + tusb_control_request_t const request = { + .bmRequestType_bit = { .recipient = (hub_port == 0) ? TUSB_REQ_RCPT_DEVICE : TUSB_REQ_RCPT_OTHER, .type = TUSB_REQ_TYPE_CLASS, .direction = TUSB_DIR_OUT @@ -100,8 +105,7 @@ bool hub_port_clear_feature(uint8_t hub_addr, uint8_t hub_port, uint8_t feature, .wLength = 0 }; - tuh_xfer_t xfer = - { + tuh_xfer_t xfer = { .daddr = hub_addr, .ep_addr = 0, .setup = &request, @@ -110,7 +114,7 @@ bool hub_port_clear_feature(uint8_t hub_addr, uint8_t hub_port, uint8_t feature, .user_data = user_data }; - TU_LOG2("HUB Clear Feature: %s, addr = %u port = %u\r\n", _hub_feature_str[feature], hub_addr, hub_port); + TU_LOG_DRV("HUB Clear Feature: %s, addr = %u port = %u\r\n", _hub_feature_str[feature], hub_addr, hub_port); TU_ASSERT( tuh_control_xfer(&xfer) ); return true; } @@ -142,7 +146,7 @@ bool hub_port_set_feature(uint8_t hub_addr, uint8_t hub_port, uint8_t feature, .user_data = user_data }; - TU_LOG2("HUB Set Feature: %s, addr = %u port = %u\r\n", _hub_feature_str[feature], hub_addr, hub_port); + TU_LOG_DRV("HUB Set Feature: %s, addr = %u port = %u\r\n", _hub_feature_str[feature], hub_addr, hub_port); TU_ASSERT( tuh_control_xfer(&xfer) ); return true; } @@ -174,7 +178,7 @@ bool hub_port_get_status(uint8_t hub_addr, uint8_t hub_port, void* resp, .user_data = user_data }; - TU_LOG2("HUB Get Port Status: addr = %u port = %u\r\n", hub_addr, hub_port); + TU_LOG_DRV("HUB Get Port Status: addr = %u port = %u\r\n", hub_addr, hub_port); TU_VERIFY( tuh_control_xfer(&xfer) ); return true; } @@ -183,7 +187,7 @@ bool hub_port_get_status(uint8_t hub_addr, uint8_t hub_port, void* resp, // CLASS-USBH API (don't require to verify parameters) //--------------------------------------------------------------------+ bool hub_init(void) { - tu_memclr(hub_data, sizeof(hub_data)); + tu_memclr(hub_itfs, sizeof(hub_itfs)); return true; } @@ -191,40 +195,32 @@ bool hub_deinit(void) { return true; } -bool hub_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *itf_desc, uint16_t max_len) -{ +bool hub_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *itf_desc, uint16_t max_len) { (void) rhport; TU_VERIFY(TUSB_CLASS_HUB == itf_desc->bInterfaceClass && 0 == itf_desc->bInterfaceSubClass); + TU_VERIFY(itf_desc->bInterfaceProtocol <= 1); // not support multiple TT yet - // hub driver does not support multiple TT yet - TU_VERIFY(itf_desc->bInterfaceProtocol <= 1); - - // msc driver length is fixed uint16_t const drv_len = sizeof(tusb_desc_interface_t) + sizeof(tusb_desc_endpoint_t); TU_ASSERT(drv_len <= max_len); - //------------- Interrupt Status endpoint -------------// + // Interrupt Status endpoint tusb_desc_endpoint_t const *desc_ep = (tusb_desc_endpoint_t const *) tu_desc_next(itf_desc); - TU_ASSERT(TUSB_DESC_ENDPOINT == desc_ep->bDescriptorType && TUSB_XFER_INTERRUPT == desc_ep->bmAttributes.xfer, 0); - TU_ASSERT(tuh_edpt_open(dev_addr, desc_ep)); - hub_interface_t* p_hub = get_itf(dev_addr); - + hub_interface_t* p_hub = get_hub_itf(dev_addr); p_hub->itf_num = itf_desc->bInterfaceNumber; p_hub->ep_in = desc_ep->bEndpointAddress; return true; } -void hub_close(uint8_t dev_addr) -{ +void hub_close(uint8_t dev_addr) { TU_VERIFY(dev_addr > CFG_TUH_DEVICE_MAX, ); - hub_interface_t* p_hub = get_itf(dev_addr); + hub_interface_t* p_hub = get_hub_itf(dev_addr); if (p_hub->ep_in) { TU_LOG_DRV(" HUB close addr = %d\r\n", dev_addr); @@ -232,30 +228,24 @@ void hub_close(uint8_t dev_addr) } } -bool hub_edpt_status_xfer(uint8_t dev_addr) -{ - hub_interface_t* hub_itf = get_itf(dev_addr); +bool hub_edpt_status_xfer(uint8_t dev_addr) { + hub_interface_t* hub_itf = get_hub_itf(dev_addr); return usbh_edpt_xfer(dev_addr, hub_itf->ep_in, &hub_itf->status_change, 1); } - //--------------------------------------------------------------------+ // Set Configure //--------------------------------------------------------------------+ - static void config_set_port_power (tuh_xfer_t* xfer); static void config_port_power_complete (tuh_xfer_t* xfer); -bool hub_set_config(uint8_t dev_addr, uint8_t itf_num) -{ - hub_interface_t* p_hub = get_itf(dev_addr); +bool hub_set_config(uint8_t dev_addr, uint8_t itf_num) { + hub_interface_t* p_hub = get_hub_itf(dev_addr); TU_ASSERT(itf_num == p_hub->itf_num); // Get Hub Descriptor - tusb_control_request_t const request = - { - .bmRequestType_bit = - { + tusb_control_request_t const request = { + .bmRequestType_bit = { .recipient = TUSB_REQ_RCPT_DEVICE, .type = TUSB_REQ_TYPE_CLASS, .direction = TUSB_DIR_IN @@ -263,34 +253,31 @@ bool hub_set_config(uint8_t dev_addr, uint8_t itf_num) .bRequest = HUB_REQUEST_GET_DESCRIPTOR, .wValue = 0, .wIndex = 0, - .wLength = sizeof(descriptor_hub_desc_t) + .wLength = sizeof(hub_desc_cs_t) }; - tuh_xfer_t xfer = - { + tuh_xfer_t xfer = { .daddr = dev_addr, .ep_addr = 0, .setup = &request, - .buffer = _hub_buffer, + .buffer = get_hub_epbuf(dev_addr), .complete_cb = config_set_port_power, .user_data = 0 }; - TU_ASSERT( tuh_control_xfer(&xfer) ); - + TU_ASSERT(tuh_control_xfer(&xfer)); return true; } -static void config_set_port_power (tuh_xfer_t* xfer) -{ +static void config_set_port_power (tuh_xfer_t* xfer) { TU_ASSERT(XFER_RESULT_SUCCESS == xfer->result, ); uint8_t const daddr = xfer->daddr; - hub_interface_t* p_hub = get_itf(daddr); + hub_interface_t* p_hub = get_hub_itf(daddr); // only use number of ports in hub descriptor - descriptor_hub_desc_t const* desc_hub = (descriptor_hub_desc_t const*) _hub_buffer; - p_hub->port_count = desc_hub->bNbrPorts; + hub_desc_cs_t const* desc_hub = (hub_desc_cs_t const*) get_hub_epbuf(daddr); + p_hub->bNbrPorts = desc_hub->bNbrPorts; // May need to GET_STATUS @@ -299,14 +286,13 @@ static void config_set_port_power (tuh_xfer_t* xfer) hub_port_set_feature(daddr, hub_port, HUB_FEATURE_PORT_POWER, config_port_power_complete, 0); } -static void config_port_power_complete (tuh_xfer_t* xfer) -{ +static void config_port_power_complete (tuh_xfer_t* xfer) { TU_ASSERT(XFER_RESULT_SUCCESS == xfer->result, ); uint8_t const daddr = xfer->daddr; - hub_interface_t* p_hub = get_itf(daddr); + hub_interface_t* p_hub = get_hub_itf(daddr); - if (xfer->setup->wIndex == p_hub->port_count) + if (xfer->setup->wIndex == p_hub->bNbrPorts) { // All ports are power -> queue notification status endpoint and // complete the SET CONFIGURATION @@ -334,46 +320,48 @@ static void connection_port_reset_complete (tuh_xfer_t* xfer); bool hub_xfer_cb(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t result, uint32_t xferred_bytes) { (void) xferred_bytes; // TODO can be more than 1 for hub with lots of ports (void) ep_addr; - TU_VERIFY(result == XFER_RESULT_SUCCESS); - hub_interface_t* p_hub = get_itf(dev_addr); + if (result == XFER_RESULT_SUCCESS) { + hub_interface_t* p_hub = get_hub_itf(dev_addr); - uint8_t const status_change = p_hub->status_change; - TU_LOG2(" Hub Status Change = 0x%02X\r\n", status_change); + uint8_t const status_change = p_hub->status_change; + TU_LOG_DRV(" Hub Status Change = 0x%02X\r\n", status_change); - if ( status_change == 0 ) { - // The status change event was neither for the hub, nor for any of its ports. - // This shouldn't happen, but it does with some devices. - // Initiate the next interrupt poll here. - return hub_edpt_status_xfer(dev_addr); - } - - if (tu_bit_test(status_change, 0)) { - // Hub bit 0 is for the hub device events - if (hub_port_get_status(dev_addr, 0, &p_hub->hub_status, hub_get_status_complete, 0) == false) { - //Hub status control transfer failed, retry - hub_edpt_status_xfer(dev_addr); + if ( status_change == 0 ) { + // The status change event was neither for the hub, nor for any of its ports. + // This shouldn't happen, but it does with some devices. Initiate the next interrupt poll here. + return hub_edpt_status_xfer(dev_addr); } - } - else { - // Hub bits 1 to n are hub port events - for (uint8_t port=1; port <= p_hub->port_count; port++) { - if ( tu_bit_test(status_change, port) ) { - if (hub_port_get_status(dev_addr, port, &p_hub->port_status, hub_port_get_status_complete, 0) == false) { - //Hub status control transfer failed, retry - hub_edpt_status_xfer(dev_addr); - } - break; + + if (tu_bit_test(status_change, 0)) { + // Hub bit 0 is for the hub device events + if (hub_port_get_status(dev_addr, 0, &p_hub->hub_status, hub_get_status_complete, 0) == false) { + //Hub status control transfer failed, retry + hub_edpt_status_xfer(dev_addr); } } + else { + // Hub bits 1 to n are hub port events + for (uint8_t port=1; port <= p_hub->bNbrPorts; port++) { + if ( tu_bit_test(status_change, port) ) { + if (hub_port_get_status(dev_addr, port, &p_hub->port_status, hub_port_get_status_complete, 0) == false) { + //Hub status control transfer failed, retry + hub_edpt_status_xfer(dev_addr); + } + break; + } + } + } + } else { + TU_LOG_DRV(" Hub Status Change: failed, retry\r\n"); + hub_edpt_status_xfer(dev_addr); // retry } // NOTE: next status transfer is queued by usbh.c after handling this request return true; } -static void hub_clear_feature_complete_stub(tuh_xfer_t* xfer) -{ +static void hub_clear_feature_complete_stub(tuh_xfer_t* xfer) { TU_ASSERT(xfer->result == XFER_RESULT_SUCCESS, ); hub_edpt_status_xfer(xfer->daddr); } @@ -383,15 +371,15 @@ static void hub_get_status_complete (tuh_xfer_t* xfer) TU_ASSERT(xfer->result == XFER_RESULT_SUCCESS, ); uint8_t const daddr = xfer->daddr; - hub_interface_t* p_hub = get_itf(daddr); + hub_interface_t* p_hub = get_hub_itf(daddr); uint8_t const port_num = (uint8_t) tu_le16toh(xfer->setup->wIndex); TU_ASSERT(port_num == 0 , ); - TU_LOG2("HUB Got hub status, addr = %u, status = %04x\r\n", daddr, p_hub->hub_status.change.value); + TU_LOG_DRV("HUB Got hub status, addr = %u, status = %04x\r\n", daddr, p_hub->hub_status.change.value); if (p_hub->hub_status.change.local_power_source) { - TU_LOG2("HUB Local Power Change, addr = %u\r\n", daddr); + TU_LOG_DRV("HUB Local Power Change, addr = %u\r\n", daddr); hub_port_clear_feature(daddr, port_num, HUB_FEATURE_HUB_LOCAL_POWER_CHANGE, hub_clear_feature_complete_stub, 0); } else if (p_hub->hub_status.change.over_current) @@ -406,7 +394,7 @@ static void hub_port_get_status_complete (tuh_xfer_t* xfer) TU_ASSERT(xfer->result == XFER_RESULT_SUCCESS, ); uint8_t const daddr = xfer->daddr; - hub_interface_t* p_hub = get_itf(daddr); + hub_interface_t* p_hub = get_hub_itf(daddr); uint8_t const port_num = (uint8_t) tu_le16toh(xfer->setup->wIndex); // Connection change @@ -453,7 +441,7 @@ static void connection_clear_conn_change_complete (tuh_xfer_t* xfer) TU_ASSERT(xfer->result == XFER_RESULT_SUCCESS, ); uint8_t const daddr = xfer->daddr; - hub_interface_t* p_hub = get_itf(daddr); + hub_interface_t* p_hub = get_hub_itf(daddr); uint8_t const port_num = (uint8_t) tu_le16toh(xfer->setup->wIndex); if ( p_hub->port_status.status.connection ) diff --git a/src/host/hub.h b/src/host/hub.h index 385efe6b2..59097fb0a 100644 --- a/src/host/hub.h +++ b/src/host/hub.h @@ -24,17 +24,8 @@ * This file is part of the TinyUSB stack. */ -/** \ingroup group_class - * \defgroup ClassDriver_Hub Hub (Host only) - * \details Like most PC's OS, Hub support is completely hidden from Application. In fact, application cannot determine whether - * a device is mounted directly via roothub or via a hub's port. All Hub-related procedures are performed and managed - * by tinyusb stack. Unless you are trying to develop the stack itself, there are nothing else can be used by Application. - * \note Due to my laziness, only 1-level of Hub is supported. In other way, the stack cannot mount a hub via another hub. - * @{ - */ - -#ifndef _TUSB_HUB_H_ -#define _TUSB_HUB_H_ +#ifndef TUSB_HUB_H_ +#define TUSB_HUB_H_ #include "common/tusb_common.h" @@ -42,6 +33,14 @@ extern "C" { #endif +//--------------------------------------------------------------------+ +// Configuration +//--------------------------------------------------------------------+ + +#ifndef CFG_TUH_HUB_BUFSIZE + #define CFG_TUH_HUB_BUFSIZE 12 +#endif + //D1...D0: Logical Power Switching Mode //00: Ganged power switching (all ports’power at //once) @@ -89,16 +88,17 @@ typedef struct TU_ATTR_PACKED{ uint8_t bHubContrCurrent; uint8_t DeviceRemovable; // bitmap each bit for a port (from bit1) uint8_t PortPwrCtrlMask; // just for compatibility, should be 0xff -} descriptor_hub_desc_t; +} hub_desc_cs_t; -TU_VERIFY_STATIC( sizeof(descriptor_hub_desc_t) == 9, "size is not correct"); +TU_VERIFY_STATIC(sizeof(hub_desc_cs_t) == 9, "size is not correct"); +TU_VERIFY_STATIC(CFG_TUH_HUB_BUFSIZE >= sizeof(hub_desc_cs_t), "buffer is not big enough"); enum { HUB_REQUEST_GET_STATUS = 0 , HUB_REQUEST_CLEAR_FEATURE = 1 , - + // 2 is reserved HUB_REQUEST_SET_FEATURE = 3 , - + // 4-5 are reserved HUB_REQUEST_GET_DESCRIPTOR = 6 , HUB_REQUEST_SET_DESCRIPTOR = 7 , HUB_REQUEST_CLEAR_TT_BUFFER = 8 , @@ -118,10 +118,10 @@ enum{ HUB_FEATURE_PORT_SUSPEND = 2, HUB_FEATURE_PORT_OVER_CURRENT = 3, HUB_FEATURE_PORT_RESET = 4, - + // 5-7 are reserved HUB_FEATURE_PORT_POWER = 8, HUB_FEATURE_PORT_LOW_SPEED = 9, - + // 10-15 are reserved HUB_FEATURE_PORT_CONNECTION_CHANGE = 16, HUB_FEATURE_PORT_ENABLE_CHANGE = 17, HUB_FEATURE_PORT_SUSPEND_CHANGE = 18, @@ -172,16 +172,16 @@ typedef struct { TU_VERIFY_STATIC( sizeof(hub_port_status_response_t) == 4, "size is not correct"); // Clear feature -bool hub_port_clear_feature (uint8_t hub_addr, uint8_t hub_port, uint8_t feature, - tuh_xfer_cb_t complete_cb, uintptr_t user_data); +bool hub_port_clear_feature(uint8_t hub_addr, uint8_t hub_port, uint8_t feature, + tuh_xfer_cb_t complete_cb, uintptr_t user_data); // Set feature -bool hub_port_set_feature (uint8_t hub_addr, uint8_t hub_port, uint8_t feature, - tuh_xfer_cb_t complete_cb, uintptr_t user_data); +bool hub_port_set_feature(uint8_t hub_addr, uint8_t hub_port, uint8_t feature, + tuh_xfer_cb_t complete_cb, uintptr_t user_data); // Get port status -bool hub_port_get_status (uint8_t hub_addr, uint8_t hub_port, void* resp, - tuh_xfer_cb_t complete_cb, uintptr_t user_data); +bool hub_port_get_status(uint8_t hub_addr, uint8_t hub_port, void *resp, + tuh_xfer_cb_t complete_cb, uintptr_t user_data); // Get status from Interrupt endpoint bool hub_edpt_status_xfer(uint8_t dev_addr); @@ -198,7 +198,6 @@ bool hub_port_clear_reset_change(uint8_t hub_addr, uint8_t hub_port, tuh_xfer_cb return hub_port_clear_feature(hub_addr, hub_port, HUB_FEATURE_PORT_RESET_CHANGE, complete_cb, user_data); } - //--------------------------------------------------------------------+ // Internal Class Driver API //--------------------------------------------------------------------+ @@ -213,6 +212,4 @@ void hub_close (uint8_t dev_addr); } #endif -#endif /* _TUSB_HUB_H_ */ - -/** @} */ +#endif diff --git a/src/host/usbh.c b/src/host/usbh.c index a2994cde7..5f4f17167 100644 --- a/src/host/usbh.c +++ b/src/host/usbh.c @@ -467,13 +467,11 @@ bool tuh_task_event_ready(void) { * This should be called periodically within the mainloop or rtos thread. * @code - int main(void) - { + int main(void) { application_init(); tusb_init(0, TUSB_ROLE_HOST); - while(1) // the mainloop - { + while(1) { // the mainloop application_code(); tuh_task(); // tinyusb host task } @@ -1657,7 +1655,7 @@ static bool _parse_configuration_descriptor(uint8_t dev_addr, tusb_desc_configur if ( 0 == tu_desc_len(p_desc) ) { // A zero length descriptor indicates that the device is off spec (e.g. wrong wTotalLength). // Parsed interfaces should still be usable - TU_LOG_USBH("Encountered a zero-length descriptor after %u bytes\r\n", (uint32_t)p_desc - (uint32_t)desc_cfg); + TU_LOG_USBH("Encountered a zero-length descriptor after %" PRIu32 "bytes\r\n", (uint32_t)p_desc - (uint32_t)desc_cfg); break; } diff --git a/tools/get_deps.py b/tools/get_deps.py index c8459c1f1..3665904b3 100755 --- a/tools/get_deps.py +++ b/tools/get_deps.py @@ -59,7 +59,7 @@ deps_optional = { '144f1eb7ea8c06512e12f12b27383601c0272410', 'kinetis_k kinetis_k32l2 kinetis_kl lpc51 lpc54 lpc55 mcx imxrt'], 'hw/mcu/raspberry_pi/Pico-PIO-USB': ['https://github.com/sekigon-gonnoc/Pico-PIO-USB.git', - 'fe9133fc513b82cc3dc62c67cb51f2339cf29ef7', + '442af432568f25fb72c5784d9d67b8e85465cb28', 'rp2040'], 'hw/mcu/renesas/fsp': ['https://github.com/renesas/fsp.git', 'edcc97d684b6f716728a60d7a6fea049d9870bd6', @@ -217,7 +217,12 @@ TOP = Path(__file__).parent.parent.resolve() def run_cmd(cmd): - return subprocess.run(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + r = subprocess.run(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + title = f'Command Error: {cmd}' + if r.returncode != 0: + print(title) + print(r.stdout.decode("utf-8")) + return r def get_a_dep(d): From 792a44640509661b11065a8d6ee038d9362a2b9f Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 17 Feb 2025 22:40:19 +0700 Subject: [PATCH 05/11] usbh always retry control transfer (max 3) in case of XFER_RESULT_FAILED. added tuh_connected() --- src/common/tusb_types.h | 6 +- src/host/hub.c | 76 ++++++++------------- src/host/hub.h | 2 +- src/host/usbh.c | 142 ++++++++++++++++++++++++---------------- src/host/usbh.h | 4 ++ src/host/usbh_pvt.h | 4 +- 6 files changed, 125 insertions(+), 109 deletions(-) diff --git a/src/common/tusb_types.h b/src/common/tusb_types.h index 9e4d9380c..42ce5fc12 100644 --- a/src/common/tusb_types.h +++ b/src/common/tusb_types.h @@ -302,9 +302,9 @@ typedef enum { enum { CONTROL_STAGE_IDLE = 0, - CONTROL_STAGE_SETUP, - CONTROL_STAGE_DATA, - CONTROL_STAGE_ACK + CONTROL_STAGE_SETUP, // 1 + CONTROL_STAGE_DATA, // 2 + CONTROL_STAGE_ACK // 3 }; enum { diff --git a/src/host/hub.c b/src/host/hub.c index 611bf71be..1d3e9ae1d 100644 --- a/src/host/hub.c +++ b/src/host/hub.c @@ -120,12 +120,9 @@ bool hub_port_clear_feature(uint8_t hub_addr, uint8_t hub_port, uint8_t feature, } bool hub_port_set_feature(uint8_t hub_addr, uint8_t hub_port, uint8_t feature, - tuh_xfer_cb_t complete_cb, uintptr_t user_data) -{ - tusb_control_request_t const request = - { - .bmRequestType_bit = - { + tuh_xfer_cb_t complete_cb, uintptr_t user_data) { + tusb_control_request_t const request = { + .bmRequestType_bit = { .recipient = (hub_port == 0) ? TUSB_REQ_RCPT_DEVICE : TUSB_REQ_RCPT_OTHER, .type = TUSB_REQ_TYPE_CLASS, .direction = TUSB_DIR_OUT @@ -136,8 +133,7 @@ bool hub_port_set_feature(uint8_t hub_addr, uint8_t hub_port, uint8_t feature, .wLength = 0 }; - tuh_xfer_t xfer = - { + tuh_xfer_t xfer = { .daddr = hub_addr, .ep_addr = 0, .setup = &request, @@ -152,12 +148,9 @@ bool hub_port_set_feature(uint8_t hub_addr, uint8_t hub_port, uint8_t feature, } bool hub_port_get_status(uint8_t hub_addr, uint8_t hub_port, void* resp, - tuh_xfer_cb_t complete_cb, uintptr_t user_data) -{ - tusb_control_request_t const request = - { - .bmRequestType_bit = - { + tuh_xfer_cb_t complete_cb, uintptr_t user_data) { + tusb_control_request_t const request = { + .bmRequestType_bit = { .recipient = (hub_port == 0) ? TUSB_REQ_RCPT_DEVICE : TUSB_REQ_RCPT_OTHER, .type = TUSB_REQ_TYPE_CLASS, .direction = TUSB_DIR_IN @@ -168,8 +161,7 @@ bool hub_port_get_status(uint8_t hub_addr, uint8_t hub_port, void* resp, .wLength = 4 }; - tuh_xfer_t xfer = - { + tuh_xfer_t xfer = { .daddr = hub_addr, .ep_addr = 0, .setup = &request, @@ -228,9 +220,9 @@ void hub_close(uint8_t dev_addr) { } } -bool hub_edpt_status_xfer(uint8_t dev_addr) { - hub_interface_t* hub_itf = get_hub_itf(dev_addr); - return usbh_edpt_xfer(dev_addr, hub_itf->ep_in, &hub_itf->status_change, 1); +bool hub_edpt_status_xfer(uint8_t daddr) { + hub_interface_t* hub_itf = get_hub_itf(daddr); + return usbh_edpt_xfer(daddr, hub_itf->ep_in, &hub_itf->status_change, 1); } //--------------------------------------------------------------------+ @@ -292,15 +284,15 @@ static void config_port_power_complete (tuh_xfer_t* xfer) { uint8_t const daddr = xfer->daddr; hub_interface_t* p_hub = get_hub_itf(daddr); - if (xfer->setup->wIndex == p_hub->bNbrPorts) - { + if (xfer->setup->wIndex == p_hub->bNbrPorts) { // All ports are power -> queue notification status endpoint and // complete the SET CONFIGURATION - TU_ASSERT( usbh_edpt_xfer(daddr, p_hub->ep_in, &p_hub->status_change, 1), ); - + if (!hub_edpt_status_xfer(daddr)) { + TU_MESS_FAILED(); + TU_BREAKPOINT(); + } usbh_driver_set_config_complete(daddr, p_hub->itf_num); - }else - { + } else { // power next port uint8_t const hub_port = (uint8_t) (xfer->setup->wIndex + 1); hub_port_set_feature(daddr, hub_port, HUB_FEATURE_PORT_POWER, config_port_power_complete, 0); @@ -310,7 +302,6 @@ static void config_port_power_complete (tuh_xfer_t* xfer) { //--------------------------------------------------------------------+ // Connection Changes //--------------------------------------------------------------------+ - static void hub_port_get_status_complete (tuh_xfer_t* xfer); static void hub_get_status_complete (tuh_xfer_t* xfer); static void connection_clear_conn_change_complete (tuh_xfer_t* xfer); @@ -389,46 +380,35 @@ static void hub_get_status_complete (tuh_xfer_t* xfer) } } -static void hub_port_get_status_complete (tuh_xfer_t* xfer) -{ +static void hub_port_get_status_complete(tuh_xfer_t *xfer) { TU_ASSERT(xfer->result == XFER_RESULT_SUCCESS, ); uint8_t const daddr = xfer->daddr; - hub_interface_t* p_hub = get_hub_itf(daddr); + hub_interface_t *p_hub = get_hub_itf(daddr); uint8_t const port_num = (uint8_t) tu_le16toh(xfer->setup->wIndex); // Connection change - if (p_hub->port_status.change.connection) - { + if (p_hub->port_status.change.connection) { // Port is powered and enabled //TU_VERIFY(port_status.status_current.port_power && port_status.status_current.port_enable, ); // Acknowledge Port Connection Change hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_CONNECTION_CHANGE, connection_clear_conn_change_complete, 0); - }else - { + } else { // Clear other port status change interrupts. TODO Not currently handled - just cleared. - if (p_hub->port_status.change.port_enable) - { + if (p_hub->port_status.change.port_enable) { hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_ENABLE_CHANGE, hub_clear_feature_complete_stub, 0); - } - else if (p_hub->port_status.change.suspend) - { + } else if (p_hub->port_status.change.suspend) { hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_SUSPEND_CHANGE, hub_clear_feature_complete_stub, 0); - } - else if (p_hub->port_status.change.over_current) - { + } else if (p_hub->port_status.change.over_current) { hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_OVER_CURRENT_CHANGE, hub_clear_feature_complete_stub, 0); - } - else if (p_hub->port_status.change.reset) - { + } else if (p_hub->port_status.change.reset) { hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_RESET_CHANGE, hub_clear_feature_complete_stub, 0); } - // Other changes are: L1 state - // TODO clear change + else { + // Other changes are: L1 state + // TODO clear change - else - { // prepare for next hub status // TODO continue with status_change, or maybe we can do it again with status hub_edpt_status_xfer(daddr); diff --git a/src/host/hub.h b/src/host/hub.h index 59097fb0a..3b19e9838 100644 --- a/src/host/hub.h +++ b/src/host/hub.h @@ -184,7 +184,7 @@ bool hub_port_get_status(uint8_t hub_addr, uint8_t hub_port, void *resp, tuh_xfer_cb_t complete_cb, uintptr_t user_data); // Get status from Interrupt endpoint -bool hub_edpt_status_xfer(uint8_t dev_addr); +bool hub_edpt_status_xfer(uint8_t daddr); // Reset a port TU_ATTR_ALWAYS_INLINE static inline diff --git a/src/host/usbh.c b/src/host/usbh.c index 5f4f17167..ac920f533 100644 --- a/src/host/usbh.c +++ b/src/host/usbh.c @@ -44,6 +44,10 @@ #define CFG_TUH_INTERFACE_MAX 8 #endif +enum { + USBH_CONTROL_RETRY_MAX = 3, +}; + //--------------------------------------------------------------------+ // Weak stubs: invoked if no strong implementation is available //--------------------------------------------------------------------+ @@ -272,9 +276,10 @@ static struct { tuh_xfer_cb_t complete_cb; uintptr_t user_data; - uint8_t daddr; volatile uint8_t stage; + uint8_t daddr; volatile uint16_t actual_len; + uint8_t failed_count; } _ctrl_xfer; typedef struct { @@ -285,7 +290,6 @@ typedef struct { CFG_TUH_MEM_SECTION static usbh_epbuf_t _usbh_epbuf; //------------- Helper Function -------------// - TU_ATTR_ALWAYS_INLINE static inline usbh_device_t* get_device(uint8_t dev_addr) { TU_VERIFY(dev_addr > 0 && dev_addr <= TOTAL_DEVICES, NULL); return &_usbh_devices[dev_addr-1]; @@ -312,6 +316,15 @@ bool tuh_mounted(uint8_t dev_addr) { return dev->configured; } +bool tuh_connected(uint8_t daddr) { + if (daddr == 0) { + return _dev0.enumerating; // dev0 is connected if still enumerating + } else { + const usbh_device_t* dev = get_device(daddr); + return dev && dev->connected; + } +} + bool tuh_vid_pid_get(uint8_t dev_addr, uint16_t *vid, uint16_t *pid) { *vid = *pid = 0; @@ -421,7 +434,9 @@ bool tuh_rhport_init(uint8_t rhport, const tusb_rhport_init_t* rh_init) { } bool tuh_deinit(uint8_t rhport) { - if (!tuh_rhport_is_active(rhport)) return true; + if (!tuh_rhport_is_active(rhport)) { + return true; + } // deinit host controller hcd_int_disable(rhport); @@ -482,7 +497,9 @@ void tuh_task_ext(uint32_t timeout_ms, bool in_isr) { (void) in_isr; // not implemented yet // Skip if stack is not initialized - if (!tuh_inited()) return; + if (!tuh_inited()) { + return; + } // Loop until there is no more events in the queue while (1) { @@ -616,17 +633,9 @@ static void _control_blocking_complete_cb(tuh_xfer_t* xfer) { // TODO timeout_ms is not supported yet bool tuh_control_xfer (tuh_xfer_t* xfer) { - // EP0 with setup packet - TU_VERIFY(xfer->ep_addr == 0 && xfer->setup); - - // Check if device is still connected (enumerating for dev0) + TU_VERIFY(xfer->ep_addr == 0 && xfer->setup); // EP0 with setup packet const uint8_t daddr = xfer->daddr; - if (daddr == 0) { - TU_VERIFY(_dev0.enumerating); - } else { - const usbh_device_t* dev = get_device(daddr); - TU_VERIFY(dev && dev->connected); - } + TU_VERIFY(tuh_connected(daddr)); // Check if device is still connected (enumerating for dev0) // pre-check to help reducing mutex lock TU_VERIFY(_ctrl_xfer.stage == CONTROL_STAGE_IDLE); @@ -634,14 +643,15 @@ bool tuh_control_xfer (tuh_xfer_t* xfer) { bool const is_idle = (_ctrl_xfer.stage == CONTROL_STAGE_IDLE); if (is_idle) { - _ctrl_xfer.stage = CONTROL_STAGE_SETUP; - _ctrl_xfer.daddr = daddr; - _ctrl_xfer.actual_len = 0; + _ctrl_xfer.stage = CONTROL_STAGE_SETUP; + _ctrl_xfer.daddr = daddr; + _ctrl_xfer.actual_len = 0; + _ctrl_xfer.failed_count = 0; - _ctrl_xfer.buffer = xfer->buffer; - _ctrl_xfer.complete_cb = xfer->complete_cb; - _ctrl_xfer.user_data = xfer->user_data; - _usbh_epbuf.request = (*xfer->setup); + _ctrl_xfer.buffer = xfer->buffer; + _ctrl_xfer.complete_cb = xfer->complete_cb; + _ctrl_xfer.user_data = xfer->user_data; + _usbh_epbuf.request = (*xfer->setup); } (void) osal_mutex_unlock(_usbh_mutex); @@ -655,7 +665,7 @@ bool tuh_control_xfer (tuh_xfer_t* xfer) { TU_LOG_BUF_USBH(xfer->setup, 8); if (xfer->complete_cb) { - TU_ASSERT( hcd_setup_send(rhport, daddr, (uint8_t const*) &_usbh_epbuf.request) ); + TU_ASSERT(hcd_setup_send(rhport, daddr, (uint8_t const *) &_usbh_epbuf.request)); }else { // blocking if complete callback is not provided // change callback to internal blocking, and result as user argument @@ -665,7 +675,7 @@ bool tuh_control_xfer (tuh_xfer_t* xfer) { _ctrl_xfer.user_data = (uintptr_t) &result; _ctrl_xfer.complete_cb = _control_blocking_complete_cb; - TU_ASSERT( hcd_setup_send(rhport, daddr, (uint8_t*) &_usbh_epbuf.request) ); + TU_ASSERT(hcd_setup_send(rhport, daddr, (uint8_t *) &_usbh_epbuf.request)); while (result == XFER_RESULT_INVALID) { // Note: this can be called within an callback ie. part of tuh_task() @@ -722,28 +732,46 @@ static bool usbh_control_xfer_cb (uint8_t daddr, uint8_t ep_addr, xfer_result_t const uint8_t rhport = usbh_get_rhport(daddr); tusb_control_request_t const * request = &_usbh_epbuf.request; - if (XFER_RESULT_SUCCESS != result) { - TU_LOG_USBH("[%u:%u] Control %s, xferred_bytes = %" PRIu32 "\r\n", rhport, daddr, result == XFER_RESULT_STALLED ? "STALLED" : "FAILED", xferred_bytes); - TU_LOG_BUF_USBH(request, 8); + switch (result) { + case XFER_RESULT_STALLED: + TU_LOG_USBH("[%u:%u] Control STALLED, xferred_bytes = %" PRIu32 "\r\n", rhport, daddr, xferred_bytes); + TU_LOG_BUF_USBH(request, 8); + _control_xfer_complete(daddr, result); + break; - // terminate transfer if any stage failed - _control_xfer_complete(daddr, result); - }else { - switch(_ctrl_xfer.stage) { - case CONTROL_STAGE_SETUP: - if (request->wLength) { - // DATA stage: initial data toggle is always 1 - _set_control_xfer_stage(CONTROL_STAGE_DATA); - TU_ASSERT( hcd_edpt_xfer(rhport, daddr, tu_edpt_addr(0, request->bmRequestType_bit.direction), _ctrl_xfer.buffer, request->wLength) ); - return true; - } + case XFER_RESULT_FAILED: + if (tuh_connected(daddr) && _ctrl_xfer.failed_count < USBH_CONTROL_RETRY_MAX) { + TU_LOG_USBH("[%u:%u] Control FAILED %u/%u, retrying\r\n", rhport, daddr, _ctrl_xfer.failed_count+1, USBH_CONTROL_RETRY_MAX); + (void) osal_mutex_lock(_usbh_mutex, OSAL_TIMEOUT_WAIT_FOREVER); + _ctrl_xfer.stage = CONTROL_STAGE_SETUP; + _ctrl_xfer.failed_count++; + _ctrl_xfer.actual_len = 0; // reset actual_len + (void) osal_mutex_unlock(_usbh_mutex); + + TU_ASSERT(hcd_setup_send(rhport, daddr, (uint8_t const *) request)); + } else { + TU_LOG_USBH("[%u:%u] Control FAILED, xferred_bytes = %" PRIu32 "\r\n", rhport, daddr, xferred_bytes); + TU_LOG_BUF_USBH(request, 8); + _control_xfer_complete(daddr, result); + } + break; + + case XFER_RESULT_SUCCESS: + switch(_ctrl_xfer.stage) { + case CONTROL_STAGE_SETUP: + if (request->wLength) { + // DATA stage: initial data toggle is always 1 + _set_control_xfer_stage(CONTROL_STAGE_DATA); + TU_ASSERT( hcd_edpt_xfer(rhport, daddr, tu_edpt_addr(0, request->bmRequestType_bit.direction), _ctrl_xfer.buffer, request->wLength) ); + return true; + } TU_ATTR_FALLTHROUGH; - case CONTROL_STAGE_DATA: - if (request->wLength) { - TU_LOG_USBH("[%u:%u] Control data:\r\n", rhport, daddr); - TU_LOG_MEM_USBH(_ctrl_xfer.buffer, xferred_bytes, 2); - } + case CONTROL_STAGE_DATA: + if (request->wLength) { + TU_LOG_USBH("[%u:%u] Control data:\r\n", rhport, daddr); + TU_LOG_MEM_USBH(_ctrl_xfer.buffer, xferred_bytes, 2); + } _ctrl_xfer.actual_len = (uint16_t) xferred_bytes; @@ -752,23 +780,26 @@ static bool usbh_control_xfer_cb (uint8_t daddr, uint8_t ep_addr, xfer_result_t TU_ASSERT( hcd_edpt_xfer(rhport, daddr, tu_edpt_addr(0, 1 - request->bmRequestType_bit.direction), NULL, 0) ); break; - case CONTROL_STAGE_ACK: { - // Abort all pending transfers if SET_CONFIGURATION request - // NOTE: should we force closing all non-control endpoints in the future? - if (request->bRequest == TUSB_REQ_SET_CONFIGURATION && request->bmRequestType == 0x00) { - for(uint8_t epnum=1; epnumbRequest == TUSB_REQ_SET_CONFIGURATION && request->bmRequestType == 0x00) { + for(uint8_t epnum=1; epnum Date: Wed, 19 Feb 2025 11:27:33 +0700 Subject: [PATCH 06/11] move status_change to epbuf improve hub_xfer_cb() rename internal complete function --- src/host/hub.c | 88 ++++++++++++++++++++++++++------------------------ 1 file changed, 46 insertions(+), 42 deletions(-) diff --git a/src/host/hub.c b/src/host/hub.c index 1d3e9ae1d..1acea8828 100644 --- a/src/host/hub.c +++ b/src/host/hub.c @@ -49,13 +49,13 @@ typedef struct { // uint8_t bPwrOn2PwrGood; // uint16_t wHubCharacteristics; - CFG_TUH_MEM_ALIGN uint8_t status_change; CFG_TUH_MEM_ALIGN hub_port_status_response_t port_status; CFG_TUH_MEM_ALIGN hub_status_response_t hub_status; } hub_interface_t; typedef struct { - TUH_EPBUF_DEF(buf, CFG_TUH_HUB_BUFSIZE); + TUH_EPBUF_DEF(status_change, 4); // interrupt endpoint + TUH_EPBUF_DEF(ctrl_buf, CFG_TUH_HUB_BUFSIZE); } hub_epbuf_t; CFG_TUH_MEM_SECTION static hub_interface_t hub_itfs[CFG_TUH_HUB]; @@ -65,8 +65,8 @@ TU_ATTR_ALWAYS_INLINE static inline hub_interface_t* get_hub_itf(uint8_t daddr) return &hub_itfs[daddr-1-CFG_TUH_DEVICE_MAX]; } -TU_ATTR_ALWAYS_INLINE static inline uint8_t* get_hub_epbuf(uint8_t daddr) { - return hub_epbufs[daddr-1-CFG_TUH_DEVICE_MAX].buf; +TU_ATTR_ALWAYS_INLINE static inline hub_epbuf_t* get_hub_epbuf(uint8_t daddr) { + return &hub_epbufs[daddr-1-CFG_TUH_DEVICE_MAX]; } #if CFG_TUSB_DEBUG >= HUB_DEBUG @@ -175,6 +175,10 @@ bool hub_port_get_status(uint8_t hub_addr, uint8_t hub_port, void* resp, return true; } +bool hub_get_status(uint8_t hub_addr, void* resp, tuh_xfer_cb_t complete_cb, uintptr_t user_data) { + return hub_port_get_status(hub_addr, 0, resp, complete_cb, user_data); +} + //--------------------------------------------------------------------+ // CLASS-USBH API (don't require to verify parameters) //--------------------------------------------------------------------+ @@ -222,7 +226,8 @@ void hub_close(uint8_t dev_addr) { bool hub_edpt_status_xfer(uint8_t daddr) { hub_interface_t* hub_itf = get_hub_itf(daddr); - return usbh_edpt_xfer(daddr, hub_itf->ep_in, &hub_itf->status_change, 1); + hub_epbuf_t* p_epbuf = get_hub_epbuf(daddr); + return usbh_edpt_xfer(daddr, hub_itf->ep_in, p_epbuf->status_change, 1); } //--------------------------------------------------------------------+ @@ -234,6 +239,7 @@ static void config_port_power_complete (tuh_xfer_t* xfer); bool hub_set_config(uint8_t dev_addr, uint8_t itf_num) { hub_interface_t* p_hub = get_hub_itf(dev_addr); TU_ASSERT(itf_num == p_hub->itf_num); + hub_epbuf_t* p_epbuf = get_hub_epbuf(dev_addr); // Get Hub Descriptor tusb_control_request_t const request = { @@ -252,7 +258,7 @@ bool hub_set_config(uint8_t dev_addr, uint8_t itf_num) { .daddr = dev_addr, .ep_addr = 0, .setup = &request, - .buffer = get_hub_epbuf(dev_addr), + .buffer = p_epbuf->ctrl_buf, .complete_cb = config_set_port_power, .user_data = 0 }; @@ -266,9 +272,10 @@ static void config_set_port_power (tuh_xfer_t* xfer) { uint8_t const daddr = xfer->daddr; hub_interface_t* p_hub = get_hub_itf(daddr); + hub_epbuf_t* p_epbuf = get_hub_epbuf(daddr); // only use number of ports in hub descriptor - hub_desc_cs_t const* desc_hub = (hub_desc_cs_t const*) get_hub_epbuf(daddr); + hub_desc_cs_t const* desc_hub = (hub_desc_cs_t const*) p_epbuf->ctrl_buf; p_hub->bNbrPorts = desc_hub->bNbrPorts; // May need to GET_STATUS @@ -302,62 +309,59 @@ static void config_port_power_complete (tuh_xfer_t* xfer) { //--------------------------------------------------------------------+ // Connection Changes //--------------------------------------------------------------------+ -static void hub_port_get_status_complete (tuh_xfer_t* xfer); -static void hub_get_status_complete (tuh_xfer_t* xfer); +static void port_get_status_complete (tuh_xfer_t* xfer); +static void get_status_complete (tuh_xfer_t* xfer); static void connection_clear_conn_change_complete (tuh_xfer_t* xfer); static void connection_port_reset_complete (tuh_xfer_t* xfer); // callback as response of interrupt endpoint polling bool hub_xfer_cb(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t result, uint32_t xferred_bytes) { - (void) xferred_bytes; // TODO can be more than 1 for hub with lots of ports + (void) xferred_bytes; (void) ep_addr; + bool processed = false; // true if new status is processed + if (result == XFER_RESULT_SUCCESS) { hub_interface_t* p_hub = get_hub_itf(dev_addr); - - uint8_t const status_change = p_hub->status_change; + hub_epbuf_t* p_epbuf = get_hub_epbuf(dev_addr); + uint8_t const status_change = p_epbuf->status_change[0]; TU_LOG_DRV(" Hub Status Change = 0x%02X\r\n", status_change); - if ( status_change == 0 ) { + if (status_change == 0) { // The status change event was neither for the hub, nor for any of its ports. - // This shouldn't happen, but it does with some devices. Initiate the next interrupt poll here. - return hub_edpt_status_xfer(dev_addr); - } - - if (tu_bit_test(status_change, 0)) { + // This shouldn't happen, but it does with some devices. Re-Initiate the interrupt poll. + processed = false; + } else if (tu_bit_test(status_change, 0)) { // Hub bit 0 is for the hub device events - if (hub_port_get_status(dev_addr, 0, &p_hub->hub_status, hub_get_status_complete, 0) == false) { - //Hub status control transfer failed, retry - hub_edpt_status_xfer(dev_addr); - } - } - else { + processed = hub_get_status(dev_addr, &p_hub->hub_status, get_status_complete, 0); + } else { // Hub bits 1 to n are hub port events for (uint8_t port=1; port <= p_hub->bNbrPorts; port++) { - if ( tu_bit_test(status_change, port) ) { - if (hub_port_get_status(dev_addr, port, &p_hub->port_status, hub_port_get_status_complete, 0) == false) { - //Hub status control transfer failed, retry - hub_edpt_status_xfer(dev_addr); - } - break; + if (tu_bit_test(status_change, port)) { + processed = hub_port_get_status(dev_addr, port, &p_hub->port_status, port_get_status_complete, 0); + break; // after completely processed one port, we will re-queue the status poll and handle next one } } } } else { - TU_LOG_DRV(" Hub Status Change: failed, retry\r\n"); - hub_edpt_status_xfer(dev_addr); // retry + processed = false; + } + + // If new status event is processed: next status pool is queued by usbh.c after handled this request + // Otherwise re-queue the status poll here + if (!processed) { + TU_ASSERT(hub_edpt_status_xfer(dev_addr)); } - // NOTE: next status transfer is queued by usbh.c after handling this request return true; } -static void hub_clear_feature_complete_stub(tuh_xfer_t* xfer) { +static void port_clear_feature_complete_stub(tuh_xfer_t* xfer) { TU_ASSERT(xfer->result == XFER_RESULT_SUCCESS, ); hub_edpt_status_xfer(xfer->daddr); } -static void hub_get_status_complete (tuh_xfer_t* xfer) +static void get_status_complete (tuh_xfer_t* xfer) { TU_ASSERT(xfer->result == XFER_RESULT_SUCCESS, ); @@ -371,16 +375,16 @@ static void hub_get_status_complete (tuh_xfer_t* xfer) if (p_hub->hub_status.change.local_power_source) { TU_LOG_DRV("HUB Local Power Change, addr = %u\r\n", daddr); - hub_port_clear_feature(daddr, port_num, HUB_FEATURE_HUB_LOCAL_POWER_CHANGE, hub_clear_feature_complete_stub, 0); + hub_port_clear_feature(daddr, port_num, HUB_FEATURE_HUB_LOCAL_POWER_CHANGE, port_clear_feature_complete_stub, 0); } else if (p_hub->hub_status.change.over_current) { TU_LOG1("HUB Over Current, addr = %u\r\n", daddr); - hub_port_clear_feature(daddr, port_num, HUB_FEATURE_HUB_OVER_CURRENT_CHANGE, hub_clear_feature_complete_stub, 0); + hub_port_clear_feature(daddr, port_num, HUB_FEATURE_HUB_OVER_CURRENT_CHANGE, port_clear_feature_complete_stub, 0); } } -static void hub_port_get_status_complete(tuh_xfer_t *xfer) { +static void port_get_status_complete(tuh_xfer_t *xfer) { TU_ASSERT(xfer->result == XFER_RESULT_SUCCESS, ); uint8_t const daddr = xfer->daddr; @@ -397,13 +401,13 @@ static void hub_port_get_status_complete(tuh_xfer_t *xfer) { } else { // Clear other port status change interrupts. TODO Not currently handled - just cleared. if (p_hub->port_status.change.port_enable) { - hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_ENABLE_CHANGE, hub_clear_feature_complete_stub, 0); + hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_ENABLE_CHANGE, port_clear_feature_complete_stub, 0); } else if (p_hub->port_status.change.suspend) { - hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_SUSPEND_CHANGE, hub_clear_feature_complete_stub, 0); + hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_SUSPEND_CHANGE, port_clear_feature_complete_stub, 0); } else if (p_hub->port_status.change.over_current) { - hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_OVER_CURRENT_CHANGE, hub_clear_feature_complete_stub, 0); + hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_OVER_CURRENT_CHANGE, port_clear_feature_complete_stub, 0); } else if (p_hub->port_status.change.reset) { - hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_RESET_CHANGE, hub_clear_feature_complete_stub, 0); + hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_RESET_CHANGE, port_clear_feature_complete_stub, 0); } else { // Other changes are: L1 state From 27a4895b79065340c031850b7031eea5b2f60a9b Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 19 Feb 2025 12:58:03 +0700 Subject: [PATCH 07/11] complete separate hub epbuf from itf add hub_get_status(), hub_clear_feature() --- src/host/hub.c | 59 ++++++++++++++++++++------------------------------ src/host/hub.h | 47 ++++++++++++++++++++++++++-------------- 2 files changed, 55 insertions(+), 51 deletions(-) diff --git a/src/host/hub.c b/src/host/hub.c index 1acea8828..41aefc1a7 100644 --- a/src/host/hub.c +++ b/src/host/hub.c @@ -49,8 +49,7 @@ typedef struct { // uint8_t bPwrOn2PwrGood; // uint16_t wHubCharacteristics; - CFG_TUH_MEM_ALIGN hub_port_status_response_t port_status; - CFG_TUH_MEM_ALIGN hub_status_response_t hub_status; + hub_port_status_response_t port_status; } hub_interface_t; typedef struct { @@ -58,7 +57,7 @@ typedef struct { TUH_EPBUF_DEF(ctrl_buf, CFG_TUH_HUB_BUFSIZE); } hub_epbuf_t; -CFG_TUH_MEM_SECTION static hub_interface_t hub_itfs[CFG_TUH_HUB]; +static hub_interface_t hub_itfs[CFG_TUH_HUB]; CFG_TUH_MEM_SECTION static hub_epbuf_t hub_epbufs[CFG_TUH_HUB]; TU_ATTR_ALWAYS_INLINE static inline hub_interface_t* get_hub_itf(uint8_t daddr) { @@ -158,7 +157,7 @@ bool hub_port_get_status(uint8_t hub_addr, uint8_t hub_port, void* resp, .bRequest = HUB_REQUEST_GET_STATUS, .wValue = 0, .wIndex = hub_port, - .wLength = 4 + .wLength = tu_htole16(4) }; tuh_xfer_t xfer = { @@ -175,10 +174,6 @@ bool hub_port_get_status(uint8_t hub_addr, uint8_t hub_port, void* resp, return true; } -bool hub_get_status(uint8_t hub_addr, void* resp, tuh_xfer_cb_t complete_cb, uintptr_t user_data) { - return hub_port_get_status(hub_addr, 0, resp, complete_cb, user_data); -} - //--------------------------------------------------------------------+ // CLASS-USBH API (don't require to verify parameters) //--------------------------------------------------------------------+ @@ -309,8 +304,9 @@ static void config_port_power_complete (tuh_xfer_t* xfer) { //--------------------------------------------------------------------+ // Connection Changes //--------------------------------------------------------------------+ -static void port_get_status_complete (tuh_xfer_t* xfer); static void get_status_complete (tuh_xfer_t* xfer); +static void port_get_status_complete (tuh_xfer_t* xfer); +static void port_clear_feature_complete_stub(tuh_xfer_t* xfer); static void connection_clear_conn_change_complete (tuh_xfer_t* xfer); static void connection_port_reset_complete (tuh_xfer_t* xfer); @@ -323,8 +319,8 @@ bool hub_xfer_cb(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t result, uint32 if (result == XFER_RESULT_SUCCESS) { hub_interface_t* p_hub = get_hub_itf(dev_addr); - hub_epbuf_t* p_epbuf = get_hub_epbuf(dev_addr); - uint8_t const status_change = p_epbuf->status_change[0]; + hub_epbuf_t *p_epbuf = get_hub_epbuf(dev_addr); + const uint8_t status_change = p_epbuf->status_change[0]; TU_LOG_DRV(" Hub Status Change = 0x%02X\r\n", status_change); if (status_change == 0) { @@ -333,12 +329,12 @@ bool hub_xfer_cb(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t result, uint32 processed = false; } else if (tu_bit_test(status_change, 0)) { // Hub bit 0 is for the hub device events - processed = hub_get_status(dev_addr, &p_hub->hub_status, get_status_complete, 0); + processed = hub_get_status(dev_addr, p_epbuf->ctrl_buf, get_status_complete, 0); } else { // Hub bits 1 to n are hub port events for (uint8_t port=1; port <= p_hub->bNbrPorts; port++) { if (tu_bit_test(status_change, port)) { - processed = hub_port_get_status(dev_addr, port, &p_hub->port_status, port_get_status_complete, 0); + processed = hub_port_get_status(dev_addr, port, p_epbuf->ctrl_buf, port_get_status_complete, 0); break; // after completely processed one port, we will re-queue the status poll and handle next one } } @@ -361,38 +357,32 @@ static void port_clear_feature_complete_stub(tuh_xfer_t* xfer) { hub_edpt_status_xfer(xfer->daddr); } -static void get_status_complete (tuh_xfer_t* xfer) -{ +static void get_status_complete(tuh_xfer_t *xfer) { TU_ASSERT(xfer->result == XFER_RESULT_SUCCESS, ); + const uint8_t daddr = xfer->daddr; + hub_status_response_t hub_status = *((const hub_status_response_t *) (uintptr_t) xfer->buffer); - uint8_t const daddr = xfer->daddr; - hub_interface_t* p_hub = get_hub_itf(daddr); - uint8_t const port_num = (uint8_t) tu_le16toh(xfer->setup->wIndex); - TU_ASSERT(port_num == 0 , ); + TU_LOG_DRV("HUB Got hub status, addr = %u, status = %04x\r\n", daddr, hub_status.change.value); - TU_LOG_DRV("HUB Got hub status, addr = %u, status = %04x\r\n", daddr, p_hub->hub_status.change.value); - - if (p_hub->hub_status.change.local_power_source) - { - TU_LOG_DRV("HUB Local Power Change, addr = %u\r\n", daddr); - hub_port_clear_feature(daddr, port_num, HUB_FEATURE_HUB_LOCAL_POWER_CHANGE, port_clear_feature_complete_stub, 0); - } - else if (p_hub->hub_status.change.over_current) - { - TU_LOG1("HUB Over Current, addr = %u\r\n", daddr); - hub_port_clear_feature(daddr, port_num, HUB_FEATURE_HUB_OVER_CURRENT_CHANGE, port_clear_feature_complete_stub, 0); + if (hub_status.change.local_power_source) { + TU_LOG_DRV(" Local Power Change\r\n"); + hub_clear_feature(daddr, HUB_FEATURE_HUB_LOCAL_POWER_CHANGE, port_clear_feature_complete_stub, 0); + } else if (hub_status.change.over_current) { + TU_LOG_DRV(" Over Current\r\n"); + hub_clear_feature(daddr, HUB_FEATURE_HUB_OVER_CURRENT_CHANGE, port_clear_feature_complete_stub, 0); } } static void port_get_status_complete(tuh_xfer_t *xfer) { TU_ASSERT(xfer->result == XFER_RESULT_SUCCESS, ); - uint8_t const daddr = xfer->daddr; + const uint8_t port_num = (uint8_t) tu_le16toh(xfer->setup->wIndex); + const uint8_t daddr = xfer->daddr; hub_interface_t *p_hub = get_hub_itf(daddr); - uint8_t const port_num = (uint8_t) tu_le16toh(xfer->setup->wIndex); + p_hub->port_status = *((const hub_port_status_response_t *) (uintptr_t) xfer->buffer); - // Connection change if (p_hub->port_status.change.connection) { + // Connection change // Port is powered and enabled //TU_VERIFY(port_status.status_current.port_power && port_status.status_current.port_enable, ); @@ -408,8 +398,7 @@ static void port_get_status_complete(tuh_xfer_t *xfer) { hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_OVER_CURRENT_CHANGE, port_clear_feature_complete_stub, 0); } else if (p_hub->port_status.change.reset) { hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_RESET_CHANGE, port_clear_feature_complete_stub, 0); - } - else { + } else { // Other changes are: L1 state // TODO clear change diff --git a/src/host/hub.h b/src/host/hub.h index 3b19e9838..8e1852601 100644 --- a/src/host/hub.h +++ b/src/host/hub.h @@ -148,21 +148,21 @@ TU_VERIFY_STATIC( sizeof(hub_status_response_t) == 4, "size is not correct"); // data in response of HUB_REQUEST_GET_STATUS, wIndex = Port num typedef struct { - union { + union TU_ATTR_PACKED { struct TU_ATTR_PACKED { - uint16_t connection : 1; - uint16_t port_enable : 1; - uint16_t suspend : 1; - uint16_t over_current : 1; - uint16_t reset : 1; + uint16_t connection : 1; // [0] 0 = no device, 1 = device connected + uint16_t port_enable : 1; // [1] port is enabled + uint16_t suspend : 1; // [2] + uint16_t over_current : 1; // [3] over-current exists + uint16_t reset : 1; // [4] 0 = no reset, 1 = resetting - uint16_t : 3; - uint16_t port_power : 1; - uint16_t low_speed : 1; - uint16_t high_speed : 1; - uint16_t port_test_mode : 1; - uint16_t port_indicator_control : 1; - uint16_t TU_RESERVED : 3; + uint16_t rsv5_7 : 3; // [5..7] reserved + uint16_t port_power : 1; // [8] 0 = port is off, 1 = port is on + uint16_t low_speed : 1; // [9] low speed device attached + uint16_t high_speed : 1; // [10] high speed device attached + uint16_t port_test_mode : 1; // [11] port in test mode + uint16_t port_indicator_control : 1; // [12] 0: default color, 1: indicator is software controlled + uint16_t TU_RESERVED : 3; // [13..15] reserved }; uint16_t value; @@ -171,11 +171,15 @@ typedef struct { TU_VERIFY_STATIC( sizeof(hub_port_status_response_t) == 4, "size is not correct"); -// Clear feature +//--------------------------------------------------------------------+ +// HUB API +//--------------------------------------------------------------------+ + +// Clear port feature bool hub_port_clear_feature(uint8_t hub_addr, uint8_t hub_port, uint8_t feature, tuh_xfer_cb_t complete_cb, uintptr_t user_data); -// Set feature +// Set port feature bool hub_port_set_feature(uint8_t hub_addr, uint8_t hub_port, uint8_t feature, tuh_xfer_cb_t complete_cb, uintptr_t user_data); @@ -192,12 +196,23 @@ bool hub_port_reset(uint8_t hub_addr, uint8_t hub_port, tuh_xfer_cb_t complete_c return hub_port_set_feature(hub_addr, hub_port, HUB_FEATURE_PORT_RESET, complete_cb, user_data); } -// Clear Reset Change +// Clear Port Reset Change TU_ATTR_ALWAYS_INLINE static inline bool hub_port_clear_reset_change(uint8_t hub_addr, uint8_t hub_port, tuh_xfer_cb_t complete_cb, uintptr_t user_data) { return hub_port_clear_feature(hub_addr, hub_port, HUB_FEATURE_PORT_RESET_CHANGE, complete_cb, user_data); } +// Get Hub status +TU_ATTR_ALWAYS_INLINE static inline +bool hub_get_status(uint8_t hub_addr, void* resp, tuh_xfer_cb_t complete_cb, uintptr_t user_data) { + return hub_port_get_status(hub_addr, 0, resp, complete_cb, user_data); +} + +// Clear Hub feature +TU_ATTR_ALWAYS_INLINE static inline +bool hub_clear_feature(uint8_t hub_addr, uint8_t feature, tuh_xfer_cb_t complete_cb, uintptr_t user_data) { + return hub_port_clear_feature(hub_addr, 0, feature, complete_cb, user_data); +} //--------------------------------------------------------------------+ // Internal Class Driver API //--------------------------------------------------------------------+ From 70ddb7a8672bb523db79baf090469932127989d2 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 19 Feb 2025 15:50:42 +0700 Subject: [PATCH 08/11] more hub improve, handle more failed transfer with polling interrupt status endpoint --- src/host/hub.c | 156 ++++++++++++++++++++++++++---------------------- src/host/hub.h | 94 +++++++++++++---------------- src/host/usbh.c | 1 - 3 files changed, 123 insertions(+), 128 deletions(-) diff --git a/src/host/hub.c b/src/host/hub.c index 41aefc1a7..93b4a3a84 100644 --- a/src/host/hub.c +++ b/src/host/hub.c @@ -46,7 +46,7 @@ typedef struct { // from hub descriptor uint8_t bNbrPorts; - // uint8_t bPwrOn2PwrGood; + uint8_t bPwrOn2PwrGood; // port power on to good, in 2ms unit // uint16_t wHubCharacteristics; hub_port_status_response_t port_status; @@ -114,7 +114,7 @@ bool hub_port_clear_feature(uint8_t hub_addr, uint8_t hub_port, uint8_t feature, }; TU_LOG_DRV("HUB Clear Feature: %s, addr = %u port = %u\r\n", _hub_feature_str[feature], hub_addr, hub_port); - TU_ASSERT( tuh_control_xfer(&xfer) ); + TU_ASSERT(tuh_control_xfer(&xfer)); return true; } @@ -220,9 +220,16 @@ void hub_close(uint8_t dev_addr) { } bool hub_edpt_status_xfer(uint8_t daddr) { - hub_interface_t* hub_itf = get_hub_itf(daddr); + hub_interface_t* p_hub = get_hub_itf(daddr); hub_epbuf_t* p_epbuf = get_hub_epbuf(daddr); - return usbh_edpt_xfer(daddr, hub_itf->ep_in, p_epbuf->status_change, 1); + + TU_VERIFY(usbh_edpt_claim(daddr, p_hub->ep_in)); + if (!usbh_edpt_xfer(daddr, p_hub->ep_in, p_epbuf->status_change, 1)) { + usbh_edpt_release(daddr, p_hub->ep_in); + return false; + } + + return true; } //--------------------------------------------------------------------+ @@ -272,6 +279,7 @@ static void config_set_port_power (tuh_xfer_t* xfer) { // only use number of ports in hub descriptor hub_desc_cs_t const* desc_hub = (hub_desc_cs_t const*) p_epbuf->ctrl_buf; p_hub->bNbrPorts = desc_hub->bNbrPorts; + p_hub->bPwrOn2PwrGood = desc_hub->bPwrOn2PwrGood; // May need to GET_STATUS @@ -293,6 +301,7 @@ static void config_port_power_complete (tuh_xfer_t* xfer) { TU_MESS_FAILED(); TU_BREAKPOINT(); } + // delay bPwrOn2PwrGood * 2 ms before set configuration complete usbh_driver_set_config_complete(daddr, p_hub->itf_num); } else { // power next port @@ -311,15 +320,15 @@ static void connection_clear_conn_change_complete (tuh_xfer_t* xfer); static void connection_port_reset_complete (tuh_xfer_t* xfer); // callback as response of interrupt endpoint polling -bool hub_xfer_cb(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t result, uint32_t xferred_bytes) { +bool hub_xfer_cb(uint8_t daddr, uint8_t ep_addr, xfer_result_t result, uint32_t xferred_bytes) { (void) xferred_bytes; (void) ep_addr; bool processed = false; // true if new status is processed if (result == XFER_RESULT_SUCCESS) { - hub_interface_t* p_hub = get_hub_itf(dev_addr); - hub_epbuf_t *p_epbuf = get_hub_epbuf(dev_addr); + hub_interface_t* p_hub = get_hub_itf(daddr); + hub_epbuf_t *p_epbuf = get_hub_epbuf(daddr); const uint8_t status_change = p_epbuf->status_change[0]; TU_LOG_DRV(" Hub Status Change = 0x%02X\r\n", status_change); @@ -329,136 +338,137 @@ bool hub_xfer_cb(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t result, uint32 processed = false; } else if (tu_bit_test(status_change, 0)) { // Hub bit 0 is for the hub device events - processed = hub_get_status(dev_addr, p_epbuf->ctrl_buf, get_status_complete, 0); + processed = hub_get_status(daddr, p_epbuf->ctrl_buf, get_status_complete, 0); } else { // Hub bits 1 to n are hub port events for (uint8_t port=1; port <= p_hub->bNbrPorts; port++) { if (tu_bit_test(status_change, port)) { - processed = hub_port_get_status(dev_addr, port, p_epbuf->ctrl_buf, port_get_status_complete, 0); + processed = hub_port_get_status(daddr, port, p_epbuf->ctrl_buf, port_get_status_complete, 0); break; // after completely processed one port, we will re-queue the status poll and handle next one } } } - } else { - processed = false; } // If new status event is processed: next status pool is queued by usbh.c after handled this request // Otherwise re-queue the status poll here if (!processed) { - TU_ASSERT(hub_edpt_status_xfer(dev_addr)); + TU_ASSERT(hub_edpt_status_xfer(daddr)); } return true; } static void port_clear_feature_complete_stub(tuh_xfer_t* xfer) { - TU_ASSERT(xfer->result == XFER_RESULT_SUCCESS, ); hub_edpt_status_xfer(xfer->daddr); } static void get_status_complete(tuh_xfer_t *xfer) { - TU_ASSERT(xfer->result == XFER_RESULT_SUCCESS, ); const uint8_t daddr = xfer->daddr; - hub_status_response_t hub_status = *((const hub_status_response_t *) (uintptr_t) xfer->buffer); - TU_LOG_DRV("HUB Got hub status, addr = %u, status = %04x\r\n", daddr, hub_status.change.value); + bool processed = false; // true if new status is processed + if (xfer->result == XFER_RESULT_SUCCESS) { + hub_status_response_t hub_status = *((const hub_status_response_t *) (uintptr_t) xfer->buffer); - if (hub_status.change.local_power_source) { - TU_LOG_DRV(" Local Power Change\r\n"); - hub_clear_feature(daddr, HUB_FEATURE_HUB_LOCAL_POWER_CHANGE, port_clear_feature_complete_stub, 0); - } else if (hub_status.change.over_current) { - TU_LOG_DRV(" Over Current\r\n"); - hub_clear_feature(daddr, HUB_FEATURE_HUB_OVER_CURRENT_CHANGE, port_clear_feature_complete_stub, 0); + TU_LOG_DRV("HUB Got hub status, addr = %u, status = %04x\r\n", daddr, hub_status.change.value); + + if (hub_status.change.local_power_source) { + TU_LOG_DRV(" Local Power Change\r\n"); + processed = hub_clear_feature(daddr, HUB_FEATURE_HUB_LOCAL_POWER_CHANGE, port_clear_feature_complete_stub, 0); + } else if (hub_status.change.over_current) { + TU_LOG_DRV(" Over Current\r\n"); + processed = hub_clear_feature(daddr, HUB_FEATURE_HUB_OVER_CURRENT_CHANGE, port_clear_feature_complete_stub, 0); + } + } + + if (!processed) { + TU_ASSERT(hub_edpt_status_xfer(daddr), ); } } static void port_get_status_complete(tuh_xfer_t *xfer) { - TU_ASSERT(xfer->result == XFER_RESULT_SUCCESS, ); - - const uint8_t port_num = (uint8_t) tu_le16toh(xfer->setup->wIndex); const uint8_t daddr = xfer->daddr; - hub_interface_t *p_hub = get_hub_itf(daddr); - p_hub->port_status = *((const hub_port_status_response_t *) (uintptr_t) xfer->buffer); + bool processed = false; // true if new status is processed - if (p_hub->port_status.change.connection) { - // Connection change - // Port is powered and enabled - //TU_VERIFY(port_status.status_current.port_power && port_status.status_current.port_enable, ); + if (xfer->result == XFER_RESULT_SUCCESS) { + const uint8_t port_num = (uint8_t) tu_le16toh(xfer->setup->wIndex); + hub_interface_t *p_hub = get_hub_itf(daddr); + p_hub->port_status = *((const hub_port_status_response_t *) (uintptr_t) xfer->buffer); - // Acknowledge Port Connection Change - hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_CONNECTION_CHANGE, connection_clear_conn_change_complete, 0); - } else { - // Clear other port status change interrupts. TODO Not currently handled - just cleared. - if (p_hub->port_status.change.port_enable) { - hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_ENABLE_CHANGE, port_clear_feature_complete_stub, 0); + // Clear port status change interrupts + if (p_hub->port_status.change.connection) { + // Connection change + // Port is powered and enabled + //TU_VERIFY(port_status.status_current.port_power && port_status.status_current.port_enable, ); + + // Acknowledge Port Connection Change + processed = hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_CONNECTION_CHANGE, connection_clear_conn_change_complete, 0); + } else if (p_hub->port_status.change.port_enable) { + processed = hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_ENABLE_CHANGE, port_clear_feature_complete_stub, 0); } else if (p_hub->port_status.change.suspend) { - hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_SUSPEND_CHANGE, port_clear_feature_complete_stub, 0); + processed = hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_SUSPEND_CHANGE, port_clear_feature_complete_stub, 0); } else if (p_hub->port_status.change.over_current) { - hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_OVER_CURRENT_CHANGE, port_clear_feature_complete_stub, 0); + processed = hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_OVER_CURRENT_CHANGE, port_clear_feature_complete_stub, 0); } else if (p_hub->port_status.change.reset) { - hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_RESET_CHANGE, port_clear_feature_complete_stub, 0); - } else { - // Other changes are: L1 state - // TODO clear change - - // prepare for next hub status - // TODO continue with status_change, or maybe we can do it again with status - hub_edpt_status_xfer(daddr); + processed = hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_RESET_CHANGE, port_clear_feature_complete_stub, 0); } } + + if (!processed) { + TU_ASSERT(hub_edpt_status_xfer(daddr), ); + } } -static void connection_clear_conn_change_complete (tuh_xfer_t* xfer) -{ - TU_ASSERT(xfer->result == XFER_RESULT_SUCCESS, ); +static void connection_clear_conn_change_complete (tuh_xfer_t* xfer) { + const uint8_t daddr = xfer->daddr; - uint8_t const daddr = xfer->daddr; - hub_interface_t* p_hub = get_hub_itf(daddr); - uint8_t const port_num = (uint8_t) tu_le16toh(xfer->setup->wIndex); + if (xfer->result != XFER_RESULT_SUCCESS) { + TU_ASSERT(hub_edpt_status_xfer(daddr), ); + return; + } - if ( p_hub->port_status.status.connection ) - { + hub_interface_t *p_hub = get_hub_itf(daddr); + const uint8_t port_num = (uint8_t) tu_le16toh(xfer->setup->wIndex); + + if (p_hub->port_status.status.connection) { // Reset port if attach event hub_port_reset(daddr, port_num, connection_port_reset_complete, 0); - }else - { + } else { // submit detach event - hcd_event_t event = - { + const hcd_event_t event = { .rhport = usbh_get_rhport(daddr), .event_id = HCD_EVENT_DEVICE_REMOVE, - .connection = - { + .connection = { .hub_addr = daddr, .hub_port = port_num } }; - hcd_event_handler(&event, false); } } -static void connection_port_reset_complete (tuh_xfer_t* xfer) -{ - TU_ASSERT(xfer->result == XFER_RESULT_SUCCESS, ); +static void connection_port_reset_complete (tuh_xfer_t* xfer) { + const uint8_t daddr = xfer->daddr; - uint8_t const daddr = xfer->daddr; - // hub_interface_t* p_hub = get_itf(daddr); - uint8_t const port_num = (uint8_t) tu_le16toh(xfer->setup->wIndex); + if (xfer->result != XFER_RESULT_SUCCESS) { + // retry port reset if failed + if (!tuh_control_xfer(xfer)) { + TU_ASSERT(hub_edpt_status_xfer(daddr), ); // back to status poll if failed to queue request + } + return; + } + + const uint8_t port_num = (uint8_t) tu_le16toh(xfer->setup->wIndex); // submit attach event - hcd_event_t event = - { + hcd_event_t event = { .rhport = usbh_get_rhport(daddr), .event_id = HCD_EVENT_DEVICE_ATTACH, - .connection = - { + .connection = { .hub_addr = daddr, .hub_port = port_num } }; - hcd_event_handler(&event, false); } diff --git a/src/host/hub.h b/src/host/hub.h index 8e1852601..e4e576661 100644 --- a/src/host/hub.h +++ b/src/host/hub.h @@ -41,58 +41,9 @@ #define CFG_TUH_HUB_BUFSIZE 12 #endif -//D1...D0: Logical Power Switching Mode -//00: Ganged power switching (all ports’power at -//once) -//01: Individual port power switching -//1X: Reserved. Used only on 1.0 compliant hubs -//that implement no power switching -//D2: Identifies a Compound Device -//0: Hub is not part of a compound device. -//1: Hub is part of a compound device. -//D4...D3: Over-current Protection Mode -//00: Global Over-current Protection. The hub -//reports over-current as a summation of all -//ports’current draw, without a breakdown of -//individual port over-current status. -//01: Individual Port Over-current Protection. The -//hub reports over-current on a per-port basis. -//Each port has an over-current status. -//1X: No Over-current Protection. This option is -//allowed only for bus-powered hubs that do not -//implement over-current protection. +//--------------------------------------------------------------------+ // -//D6...D5: TT Think TIme -//00: TT requires at most 8 FS bit times of inter -//transaction gap on a full-/low-speed -//downstream bus. -//01: TT requires at most 16 FS bit times. -//10: TT requires at most 24 FS bit times. -//11: TT requires at most 32 FS bit times. -//D7: Port Indicators Supported -//0: Port Indicators are not supported on its -//downstream facing ports and the -//PORT_INDICATOR request has no effect. -//1: Port Indicators are supported on its -//downstream facing ports and the -//PORT_INDICATOR request controls the -//indicators. See Section 11.5.3. -//D15...D8: Reserved - -typedef struct TU_ATTR_PACKED{ - uint8_t bLength ; ///< Size of descriptor - uint8_t bDescriptorType ; ///< Other_speed_Configuration Type - uint8_t bNbrPorts; - uint16_t wHubCharacteristics; - uint8_t bPwrOn2PwrGood; - uint8_t bHubContrCurrent; - uint8_t DeviceRemovable; // bitmap each bit for a port (from bit1) - uint8_t PortPwrCtrlMask; // just for compatibility, should be 0xff -} hub_desc_cs_t; - -TU_VERIFY_STATIC(sizeof(hub_desc_cs_t) == 9, "size is not correct"); -TU_VERIFY_STATIC(CFG_TUH_HUB_BUFSIZE >= sizeof(hub_desc_cs_t), "buffer is not big enough"); - +//--------------------------------------------------------------------+ enum { HUB_REQUEST_GET_STATUS = 0 , HUB_REQUEST_CLEAR_FEATURE = 1 , @@ -131,6 +82,41 @@ enum{ HUB_FEATURE_PORT_INDICATOR = 22 }; +enum { + HUB_CHARS_POWER_GANGED_SWITCHING = 0, + HUB_CHARS_POWER_INDIVIDUAL_SWITCHING = 1, +}; + +enum { + HUB_CHARS_OVER_CURRENT_GLOBAL = 0, + HUB_CHARS_OVER_CURRENT_INDIVIDUAL = 1, +}; + +typedef struct TU_ATTR_PACKED{ + uint8_t bLength ; ///< Size of descriptor + uint8_t bDescriptorType ; ///< Other_speed_Configuration Type + uint8_t bNbrPorts; + uint16_t wHubCharacteristics; + uint8_t bPwrOn2PwrGood; + uint8_t bHubContrCurrent; + uint8_t DeviceRemovable; // bitmap each bit for a port (from bit1) + uint8_t PortPwrCtrlMask; // just for compatibility, should be 0xff +} hub_desc_cs_t; +TU_VERIFY_STATIC(sizeof(hub_desc_cs_t) == 9, "size is not correct"); +TU_VERIFY_STATIC(CFG_TUH_HUB_BUFSIZE >= sizeof(hub_desc_cs_t), "buffer is not big enough"); + +typedef struct TU_ATTR_PACKED { + struct TU_ATTR_PACKED { + uint8_t logical_power_switching_mode : 2; // [0..1] gannged or individual power switching + uint8_t compound_device : 1; // [2] hub is part of compound device + uint8_t over_current_protect_mode : 2; // [3..4] global or individual port over-current protection + uint8_t tt_think_time : 2; // [5..6] TT think time + uint8_t port_indicator_supported : 1; // [7] port indicator supported + }; + uint8_t rsv1; +} hub_characteristics_t; +TU_VERIFY_STATIC(sizeof(hub_characteristics_t) == 2, "size is not correct"); + // data in response of HUB_REQUEST_GET_STATUS, wIndex = 0 (hub) typedef struct { union{ @@ -143,19 +129,20 @@ typedef struct { uint16_t value; } status, change; } hub_status_response_t; - TU_VERIFY_STATIC( sizeof(hub_status_response_t) == 4, "size is not correct"); // data in response of HUB_REQUEST_GET_STATUS, wIndex = Port num typedef struct { union TU_ATTR_PACKED { struct TU_ATTR_PACKED { + // Bit 0-4 are for change & status uint16_t connection : 1; // [0] 0 = no device, 1 = device connected uint16_t port_enable : 1; // [1] port is enabled uint16_t suspend : 1; // [2] uint16_t over_current : 1; // [3] over-current exists uint16_t reset : 1; // [4] 0 = no reset, 1 = resetting + // From Bit 5 are for status only uint16_t rsv5_7 : 3; // [5..7] reserved uint16_t port_power : 1; // [8] 0 = port is off, 1 = port is on uint16_t low_speed : 1; // [9] low speed device attached @@ -168,7 +155,6 @@ typedef struct { uint16_t value; } status, change; } hub_port_status_response_t; - TU_VERIFY_STATIC( sizeof(hub_port_status_response_t) == 4, "size is not correct"); //--------------------------------------------------------------------+ @@ -220,7 +206,7 @@ bool hub_init (void); bool hub_deinit (void); bool hub_open (uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *itf_desc, uint16_t max_len); bool hub_set_config (uint8_t dev_addr, uint8_t itf_num); -bool hub_xfer_cb (uint8_t dev_addr, uint8_t ep_addr, xfer_result_t event, uint32_t xferred_bytes); +bool hub_xfer_cb (uint8_t daddr, uint8_t ep_addr, xfer_result_t event, uint32_t xferred_bytes); void hub_close (uint8_t dev_addr); #ifdef __cplusplus diff --git a/src/host/usbh.c b/src/host/usbh.c index ac920f533..c7a9a868f 100644 --- a/src/host/usbh.c +++ b/src/host/usbh.c @@ -920,7 +920,6 @@ bool usbh_edpt_release(uint8_t dev_addr, uint8_t ep_addr) { } // Submit an transfer -// TODO call usbh_edpt_release if failed bool usbh_edpt_xfer_with_callback(uint8_t dev_addr, uint8_t ep_addr, uint8_t* buffer, uint16_t total_bytes, tuh_xfer_cb_t complete_cb, uintptr_t user_data) { (void) complete_cb; From 6572c1da0d6ad2f298ef97189ca4b288f710f49a Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 20 Feb 2025 15:47:29 +0700 Subject: [PATCH 09/11] add fruitjam bsp --- hw/bsp/family_support.cmake | 4 + .../adafruit_feather_rp2040_usb_host/board.h | 64 ++++++++++ .../adafruit_fruit_jam/adafruit_fruit_jam.h | 113 ++++++++++++++++++ .../boards/adafruit_fruit_jam/board.cmake | 4 + .../rp2040/boards/adafruit_fruit_jam/board.h | 52 ++++++++ .../boards/feather_rp2040_max3421/board.h | 64 ++++++++++ .../{ => boards/raspberry_pi_pico}/board.h | 45 +------ .../boards/raspberry_pi_pico2/board.cmake | 1 + .../rp2040/boards/raspberry_pi_pico2/board.h | 69 +++++++++++ hw/bsp/rp2040/family.c | 38 ++++-- hw/bsp/rp2040/family.cmake | 5 +- hw/bsp/rp2040/rp2350-openocd.cfg | 3 + 12 files changed, 415 insertions(+), 47 deletions(-) create mode 100644 hw/bsp/rp2040/boards/adafruit_feather_rp2040_usb_host/board.h create mode 100644 hw/bsp/rp2040/boards/adafruit_fruit_jam/adafruit_fruit_jam.h create mode 100644 hw/bsp/rp2040/boards/adafruit_fruit_jam/board.cmake create mode 100644 hw/bsp/rp2040/boards/adafruit_fruit_jam/board.h create mode 100644 hw/bsp/rp2040/boards/feather_rp2040_max3421/board.h rename hw/bsp/rp2040/{ => boards/raspberry_pi_pico}/board.h (65%) create mode 100644 hw/bsp/rp2040/boards/raspberry_pi_pico2/board.h create mode 100644 hw/bsp/rp2040/rp2350-openocd.cfg diff --git a/hw/bsp/family_support.cmake b/hw/bsp/family_support.cmake index 409fb9c75..562d4995b 100644 --- a/hw/bsp/family_support.cmake +++ b/hw/bsp/family_support.cmake @@ -476,6 +476,10 @@ function(family_flash_openocd TARGET) set(OPENOCD_OPTION2 "") endif () + if (DEFINED OPENOCD_SERIAL) + set(OPENOCD_OPTION "-c \"adapter serial ${OPENOCD_SERIAL}\" ${OPENOCD_OPTION}") + endif () + separate_arguments(OPTION_LIST UNIX_COMMAND ${OPENOCD_OPTION}) separate_arguments(OPTION_LIST2 UNIX_COMMAND ${OPENOCD_OPTION2}) diff --git a/hw/bsp/rp2040/boards/adafruit_feather_rp2040_usb_host/board.h b/hw/bsp/rp2040/boards/adafruit_feather_rp2040_usb_host/board.h new file mode 100644 index 000000000..f36ca14c9 --- /dev/null +++ b/hw/bsp/rp2040/boards/adafruit_feather_rp2040_usb_host/board.h @@ -0,0 +1,64 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2025 Ha Thach (tinyusb.org) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * This file is part of the TinyUSB stack. + */ + +#ifndef TUSB_BOARD_H +#define TUSB_BOARD_H + +#ifdef __cplusplus + extern "C" { +#endif + +// UART and LED are already defined in pico-sdk board + +//--------------------------------------------------------------------+ +// PIO_USB +//--------------------------------------------------------------------+ + +#define PICO_DEFAULT_PIO_USB_DP_PIN 16 +#define PICO_DEFAULT_PIO_USB_VBUSEN_PIN 18 +#define PICO_DEFAULT_PIO_USB_VBUSEN_STATE 1 + +//-------------------------------------------------------------------- +// USB Host MAX3421E +//-------------------------------------------------------------------- + +#ifdef PICO_DEFAULT_SPI +#define MAX3421_SPI PICO_DEFAULT_SPI // sdk v2 +#else +#define MAX3421_SPI PICO_DEFAULT_SPI_INSTANCE // sdk v1 +#endif + +#define MAX3421_SCK_PIN PICO_DEFAULT_SPI_SCK_PIN +#define MAX3421_MOSI_PIN PICO_DEFAULT_SPI_TX_PIN +#define MAX3421_MISO_PIN PICO_DEFAULT_SPI_RX_PIN +#define MAX3421_CS_PIN 10 +#define MAX3421_INTR_PIN 9 + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/hw/bsp/rp2040/boards/adafruit_fruit_jam/adafruit_fruit_jam.h b/hw/bsp/rp2040/boards/adafruit_fruit_jam/adafruit_fruit_jam.h new file mode 100644 index 000000000..2d4c689de --- /dev/null +++ b/hw/bsp/rp2040/boards/adafruit_fruit_jam/adafruit_fruit_jam.h @@ -0,0 +1,113 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2025 Ha Thach (tinyusb.org) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * This file is part of the TinyUSB stack. + */ +#ifndef BOARDS_ADAFRUIT_FRUIT_JAM_H +#define BOARDS_ADAFRUIT_FRUIT_JAM_H + +// required for board that is not part of pico-sdk + +// ----------------------------------------------------- +// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO +// SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES +// ----------------------------------------------------- + +// pico_cmake_set PICO_PLATFORM=rp2350 + +// On some samples, the xosc can take longer to stabilize than is usual +#ifndef PICO_XOSC_STARTUP_DELAY_MULTIPLIER +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 +#endif + +// For board detection +#define ADAFRUIT_FRUIT_JAM + +// --- RP2350 VARIANT --- +#define PICO_RP2350A 0 + +// --- UART --- +#ifndef PICO_DEFAULT_UART +#define PICO_DEFAULT_UART 1 +#endif +#ifndef PICO_DEFAULT_UART_TX_PIN +#define PICO_DEFAULT_UART_TX_PIN 8 +#endif +#ifndef PICO_DEFAULT_UART_RX_PIN +#define PICO_DEFAULT_UART_RX_PIN 9 +#endif + +// --- LED --- +#ifndef PICO_DEFAULT_LED_PIN +#define PICO_DEFAULT_LED_PIN 29 +#endif + +#ifndef PICO_DEFAULT_WS2812_PIN +#define PICO_DEFAULT_WS2812_PIN 32 +#endif + +// --- I2C --- +#ifndef PICO_DEFAULT_I2C +#define PICO_DEFAULT_I2C 0 +#endif +#ifndef PICO_DEFAULT_I2C_SDA_PIN +#define PICO_DEFAULT_I2C_SDA_PIN 20 +#endif +#ifndef PICO_DEFAULT_I2C_SCL_PIN +#define PICO_DEFAULT_I2C_SCL_PIN 21 +#endif + +// --- SPI --- +#ifndef PICO_DEFAULT_SPI +#define PICO_DEFAULT_SPI 1 +#endif +#ifndef PICO_DEFAULT_SPI_SCK_PIN +#define PICO_DEFAULT_SPI_SCK_PIN 30 +#endif +#ifndef PICO_DEFAULT_SPI_TX_PIN +#define PICO_DEFAULT_SPI_TX_PIN 31 +#endif +#ifndef PICO_DEFAULT_SPI_RX_PIN +#define PICO_DEFAULT_SPI_RX_PIN 28 +#endif + +// --- FLASH --- + +// FruitJam use w25q128 but sdk does not have .s for it, use q080 instead +#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1 + +#ifndef PICO_FLASH_SPI_CLKDIV +#define PICO_FLASH_SPI_CLKDIV 2 +#endif + +// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024) +#ifndef PICO_FLASH_SIZE_BYTES +#define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) +#endif + +// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +#ifndef PICO_RP2350_A2_SUPPORTED +#define PICO_RP2350_A2_SUPPORTED 1 +#endif + +#endif diff --git a/hw/bsp/rp2040/boards/adafruit_fruit_jam/board.cmake b/hw/bsp/rp2040/boards/adafruit_fruit_jam/board.cmake new file mode 100644 index 000000000..4ab8a5477 --- /dev/null +++ b/hw/bsp/rp2040/boards/adafruit_fruit_jam/board.cmake @@ -0,0 +1,4 @@ +set(PICO_PLATFORM rp2350-arm-s) +set(PICO_BOARD adafruit_fruit_jam) +set(PICO_BOARD_HEADER_DIRS ${CMAKE_CURRENT_LIST_DIR}) +#set(OPENOCD_SERIAL E6614103E78E8324) diff --git a/hw/bsp/rp2040/boards/adafruit_fruit_jam/board.h b/hw/bsp/rp2040/boards/adafruit_fruit_jam/board.h new file mode 100644 index 000000000..f81da3b70 --- /dev/null +++ b/hw/bsp/rp2040/boards/adafruit_fruit_jam/board.h @@ -0,0 +1,52 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2025 Ha Thach (tinyusb.org) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * This file is part of the TinyUSB stack. + */ + +#ifndef TUSB_BOARD_H +#define TUSB_BOARD_H + +#ifdef __cplusplus + extern "C" { +#endif + +// UART and LED are already defined in pico-sdk board + +//--------------------------------------------------------------------+ +// PIO_USB +//--------------------------------------------------------------------+ +// default to pico brain tester +#define PICO_DEFAULT_PIO_USB_DP_PIN 1 +#define PICO_DEFAULT_PIO_USB_VBUSEN_PIN 11 +#define PICO_DEFAULT_PIO_USB_VBUSEN_STATE 1 + +//-------------------------------------------------------------------- +// USB Host MAX3421E +//-------------------------------------------------------------------- + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/hw/bsp/rp2040/boards/feather_rp2040_max3421/board.h b/hw/bsp/rp2040/boards/feather_rp2040_max3421/board.h new file mode 100644 index 000000000..f36ca14c9 --- /dev/null +++ b/hw/bsp/rp2040/boards/feather_rp2040_max3421/board.h @@ -0,0 +1,64 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2025 Ha Thach (tinyusb.org) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * This file is part of the TinyUSB stack. + */ + +#ifndef TUSB_BOARD_H +#define TUSB_BOARD_H + +#ifdef __cplusplus + extern "C" { +#endif + +// UART and LED are already defined in pico-sdk board + +//--------------------------------------------------------------------+ +// PIO_USB +//--------------------------------------------------------------------+ + +#define PICO_DEFAULT_PIO_USB_DP_PIN 16 +#define PICO_DEFAULT_PIO_USB_VBUSEN_PIN 18 +#define PICO_DEFAULT_PIO_USB_VBUSEN_STATE 1 + +//-------------------------------------------------------------------- +// USB Host MAX3421E +//-------------------------------------------------------------------- + +#ifdef PICO_DEFAULT_SPI +#define MAX3421_SPI PICO_DEFAULT_SPI // sdk v2 +#else +#define MAX3421_SPI PICO_DEFAULT_SPI_INSTANCE // sdk v1 +#endif + +#define MAX3421_SCK_PIN PICO_DEFAULT_SPI_SCK_PIN +#define MAX3421_MOSI_PIN PICO_DEFAULT_SPI_TX_PIN +#define MAX3421_MISO_PIN PICO_DEFAULT_SPI_RX_PIN +#define MAX3421_CS_PIN 10 +#define MAX3421_INTR_PIN 9 + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/hw/bsp/rp2040/board.h b/hw/bsp/rp2040/boards/raspberry_pi_pico/board.h similarity index 65% rename from hw/bsp/rp2040/board.h rename to hw/bsp/rp2040/boards/raspberry_pi_pico/board.h index 5dbb1dd37..12c772b84 100644 --- a/hw/bsp/rp2040/board.h +++ b/hw/bsp/rp2040/boards/raspberry_pi_pico/board.h @@ -1,7 +1,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2021, Ha Thach (tinyusb.org) + * Copyright (c) 2025 Ha Thach (tinyusb.org) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -29,55 +29,22 @@ url: https://www.raspberrypi.org/products/raspberry-pi-pico/ */ -#ifndef BOARD_H_ -#define BOARD_H_ +#ifndef TUSB_BOARD_H +#define TUSB_BOARD_H #ifdef __cplusplus extern "C" { #endif -// LED -#ifdef PICO_DEFAULT_LED_PIN -#define LED_PIN PICO_DEFAULT_LED_PIN -#define LED_STATE_ON (!(PICO_DEFAULT_LED_PIN_INVERTED)) -#endif - -// Button pin is BOOTSEL which is flash CS pin -#define BUTTON_BOOTSEL -#define BUTTON_STATE_ACTIVE 0 - -// UART -#if defined(PICO_DEFAULT_UART_TX_PIN) && defined(PICO_DEFAULT_UART_RX_PIN) && \ - defined(PICO_DEFAULT_UART) && defined(LIB_PICO_STDIO_UART) -#define UART_DEV PICO_DEFAULT_UART -#define UART_TX_PIN PICO_DEFAULT_UART_TX_PIN -#define UART_RX_PIN PICO_DEFAULT_UART_RX_PIN -#endif +// UART and LED are already defined in pico-sdk board //--------------------------------------------------------------------+ // PIO_USB -// default to pin on Adafruit Feather rp2040 USB Host or Tester if defined //--------------------------------------------------------------------+ - -// #define USE_ADAFRUIT_FEATHER_RP2040_USBHOST -#ifdef USE_ADAFRUIT_FEATHER_RP2040_USBHOST -#define PICO_DEFAULT_PIO_USB_DP_PIN 16 -#define PICO_DEFAULT_PIO_USB_VBUSEN_PIN 18 -#endif - -#ifndef PICO_DEFAULT_PIO_USB_DP_PIN +// default to pico brain tester #define PICO_DEFAULT_PIO_USB_DP_PIN 20 -#endif - -// VBUS enable pin and its active state -#ifndef PICO_DEFAULT_PIO_USB_VBUSEN_PIN #define PICO_DEFAULT_PIO_USB_VBUSEN_PIN 22 -#endif - -// VBUS enable state -#ifndef PICO_DEFAULT_PIO_USB_VBUSEN_STATE #define PICO_DEFAULT_PIO_USB_VBUSEN_STATE 1 -#endif //-------------------------------------------------------------------- // USB Host MAX3421E @@ -99,4 +66,4 @@ } #endif -#endif /* BOARD_H_ */ +#endif diff --git a/hw/bsp/rp2040/boards/raspberry_pi_pico2/board.cmake b/hw/bsp/rp2040/boards/raspberry_pi_pico2/board.cmake index 3482e2674..0a7dd4d23 100644 --- a/hw/bsp/rp2040/boards/raspberry_pi_pico2/board.cmake +++ b/hw/bsp/rp2040/boards/raspberry_pi_pico2/board.cmake @@ -1,2 +1,3 @@ set(PICO_PLATFORM rp2350-arm-s) set(PICO_BOARD pico2) +#set(OPENOCD_SERIAL E6614103E77C5A24) diff --git a/hw/bsp/rp2040/boards/raspberry_pi_pico2/board.h b/hw/bsp/rp2040/boards/raspberry_pi_pico2/board.h new file mode 100644 index 000000000..139b58ceb --- /dev/null +++ b/hw/bsp/rp2040/boards/raspberry_pi_pico2/board.h @@ -0,0 +1,69 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2025 Ha Thach (tinyusb.org) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * This file is part of the TinyUSB stack. + */ + +/* metadata: + name: Pico2 + url: https://www.raspberrypi.org/products/raspberry-pi-pico/ +*/ + +#ifndef TUSB_BOARD_H +#define TUSB_BOARD_H + +#ifdef __cplusplus + extern "C" { +#endif + +// UART and LED are already defined in pico-sdk board + +//--------------------------------------------------------------------+ +// PIO_USB +//--------------------------------------------------------------------+ +// default to pico brain tester +#define PICO_DEFAULT_PIO_USB_DP_PIN 20 +#define PICO_DEFAULT_PIO_USB_VBUSEN_PIN 22 +#define PICO_DEFAULT_PIO_USB_VBUSEN_STATE 1 + +//-------------------------------------------------------------------- +// USB Host MAX3421E +//-------------------------------------------------------------------- + +#ifdef PICO_DEFAULT_SPI +#define MAX3421_SPI PICO_DEFAULT_SPI // sdk v2 +#else +#define MAX3421_SPI PICO_DEFAULT_SPI_INSTANCE // sdk v1 +#endif + +#define MAX3421_SCK_PIN PICO_DEFAULT_SPI_SCK_PIN +#define MAX3421_MOSI_PIN PICO_DEFAULT_SPI_TX_PIN +#define MAX3421_MISO_PIN PICO_DEFAULT_SPI_RX_PIN +#define MAX3421_CS_PIN 10 +#define MAX3421_INTR_PIN 9 + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/hw/bsp/rp2040/family.c b/hw/bsp/rp2040/family.c index 24aa0b616..0c97d6ed0 100644 --- a/hw/bsp/rp2040/family.c +++ b/hw/bsp/rp2040/family.c @@ -42,10 +42,6 @@ #include "bsp/board_api.h" #include "board.h" -#ifdef UART_DEV -static uart_inst_t *uart_inst; -#endif - #if (CFG_TUH_ENABLED && CFG_TUH_RPI_PIO_USB) || (CFG_TUD_ENABLED && CFG_TUD_RPI_PIO_USB) #include "pio_usb.h" #endif @@ -55,6 +51,36 @@ static uart_inst_t *uart_inst; static void max3421_init(void); #endif +//--------------------------------------------------------------------+ +// +//--------------------------------------------------------------------+ +// LED +#if !defined(LED_PIN) && defined(PICO_DEFAULT_LED_PIN) +#define LED_PIN PICO_DEFAULT_LED_PIN +#define LED_STATE_ON (!(PICO_DEFAULT_LED_PIN_INVERTED)) +#endif + +// Button, if not defined use BOOTSEL button +#ifndef BUTTON_PIN +#define BUTTON_BOOTSEL +#define BUTTON_STATE_ACTIVE 0 +#endif + +// UART +#if !defined(UART_DEV) && defined(PICO_DEFAULT_UART) && defined(LIB_PICO_STDIO_UART) && \ + defined(PICO_DEFAULT_UART_TX_PIN) && defined(PICO_DEFAULT_UART_RX_PIN) +#define UART_DEV PICO_DEFAULT_UART +#define UART_TX_PIN PICO_DEFAULT_UART_TX_PIN +#define UART_RX_PIN PICO_DEFAULT_UART_RX_PIN +#endif + +#ifdef UART_DEV +static uart_inst_t *uart_inst; +#endif + +//--------------------------------------------------------------------+ +// +//--------------------------------------------------------------------+ #ifdef BUTTON_BOOTSEL // This example blinks the Picoboard LED when the BOOTSEL button is pressed. // @@ -79,7 +105,7 @@ bool __no_inline_not_in_flash_func(get_bootsel_button)(void) { IO_QSPI_GPIO_QSPI_SS_CTRL_OEOVER_BITS); // Note we can't call into any sleep functions in flash right now - for (volatile int i = 0; i < 1000; ++i); + for (volatile int i = 0; i < 1000; ++i) {} // The HI GPIO registers in SIO can observe and control the 6 QSPI pins. // Note the button pulls the pin *low* when pressed. @@ -133,7 +159,6 @@ void stdio_rtt_init(void) { //--------------------------------------------------------------------+ // //--------------------------------------------------------------------+ - void board_init(void) { #if (CFG_TUH_ENABLED && CFG_TUH_RPI_PIO_USB) || (CFG_TUD_ENABLED && CFG_TUD_RPI_PIO_USB) @@ -193,7 +218,6 @@ void board_init(void) //--------------------------------------------------------------------+ // Board porting API //--------------------------------------------------------------------+ - void board_led_write(bool state) { (void) state; diff --git a/hw/bsp/rp2040/family.cmake b/hw/bsp/rp2040/family.cmake index b2b01b1cf..384b06933 100644 --- a/hw/bsp/rp2040/family.cmake +++ b/hw/bsp/rp2040/family.cmake @@ -31,7 +31,9 @@ elseif (PICO_PLATFORM STREQUAL "rp2350-riscv") set(OPENOCD_TARGET rp2350-riscv) endif() -set(OPENOCD_OPTION "-f interface/cmsis-dap.cfg -f target/${OPENOCD_TARGET}.cfg -c \"adapter speed 5000\"") +if (NOT OPENOCD_OPTION) + set(OPENOCD_OPTION "-f interface/cmsis-dap.cfg -f target/${OPENOCD_TARGET}.cfg -c \"adapter speed 5000\"") +endif() if (NOT PICO_TINYUSB_PATH) set(PICO_TINYUSB_PATH ${TOP}) @@ -143,6 +145,7 @@ target_sources(tinyusb_bsp INTERFACE ) target_include_directories(tinyusb_bsp INTERFACE ${TOP}/hw + ${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD} ) target_link_libraries(tinyusb_bsp INTERFACE pico_unique_id diff --git a/hw/bsp/rp2040/rp2350-openocd.cfg b/hw/bsp/rp2040/rp2350-openocd.cfg new file mode 100644 index 000000000..52c71cd99 --- /dev/null +++ b/hw/bsp/rp2040/rp2350-openocd.cfg @@ -0,0 +1,3 @@ +source [find interface/cmsis-dap.cfg] +adapter speed 5000 +source [find target/rp2350.cfg] From cafc788508834b71248a91773a262542fc2cad37 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 20 Feb 2025 16:01:06 +0700 Subject: [PATCH 10/11] change pio-usb to wip fork for testing --- .../boards/adafruit_feather_rp2040_usb_host/board.cmake | 2 ++ tools/get_deps.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 hw/bsp/rp2040/boards/adafruit_feather_rp2040_usb_host/board.cmake diff --git a/hw/bsp/rp2040/boards/adafruit_feather_rp2040_usb_host/board.cmake b/hw/bsp/rp2040/boards/adafruit_feather_rp2040_usb_host/board.cmake new file mode 100644 index 000000000..41897f644 --- /dev/null +++ b/hw/bsp/rp2040/boards/adafruit_feather_rp2040_usb_host/board.cmake @@ -0,0 +1,2 @@ +set(PICO_PLATFORM rp2040) +set(PICO_BOARD adafruit_feather_rp2040_usb_host) diff --git a/tools/get_deps.py b/tools/get_deps.py index 3665904b3..b82abac4f 100755 --- a/tools/get_deps.py +++ b/tools/get_deps.py @@ -58,8 +58,8 @@ deps_optional = { 'hw/mcu/nxp/mcux-sdk': ['https://github.com/hathach/mcux-sdk.git', '144f1eb7ea8c06512e12f12b27383601c0272410', 'kinetis_k kinetis_k32l2 kinetis_kl lpc51 lpc54 lpc55 mcx imxrt'], - 'hw/mcu/raspberry_pi/Pico-PIO-USB': ['https://github.com/sekigon-gonnoc/Pico-PIO-USB.git', - '442af432568f25fb72c5784d9d67b8e85465cb28', + 'hw/mcu/raspberry_pi/Pico-PIO-USB': ['https://github.com/hathach/Pico-PIO-USB.git', + '9c8df3083b62c0a678f3bd3d8a7e773932622d4b', 'rp2040'], 'hw/mcu/renesas/fsp': ['https://github.com/renesas/fsp.git', 'edcc97d684b6f716728a60d7a6fea049d9870bd6', From 61aab7a86aaaf5c254ba5d14a04ff44aec8623d3 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 20 Feb 2025 22:16:05 +0700 Subject: [PATCH 11/11] pio-usb now only need sysclk to be multiple of 12Mhz --- hw/bsp/rp2040/boards/raspberry_pi_pico/board.cmake | 1 + hw/bsp/rp2040/family.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/bsp/rp2040/boards/raspberry_pi_pico/board.cmake b/hw/bsp/rp2040/boards/raspberry_pi_pico/board.cmake index 804cdb50a..2d739291c 100644 --- a/hw/bsp/rp2040/boards/raspberry_pi_pico/board.cmake +++ b/hw/bsp/rp2040/boards/raspberry_pi_pico/board.cmake @@ -1,2 +1,3 @@ set(PICO_PLATFORM rp2040) set(PICO_BOARD pico) +#set(OPENOCD_SERIAL E6614103E719612F) diff --git a/hw/bsp/rp2040/family.c b/hw/bsp/rp2040/family.c index 0c97d6ed0..a6e176308 100644 --- a/hw/bsp/rp2040/family.c +++ b/hw/bsp/rp2040/family.c @@ -162,8 +162,12 @@ void stdio_rtt_init(void) { void board_init(void) { #if (CFG_TUH_ENABLED && CFG_TUH_RPI_PIO_USB) || (CFG_TUD_ENABLED && CFG_TUD_RPI_PIO_USB) - // Set the system clock to a multiple of 120mhz for bitbanging USB with pico-usb + // Set the system clock to a multiple of 12mhz for bit-banging USB with pico-usb set_sys_clock_khz(120000, true); + // set_sys_clock_khz(180000, true); + // set_sys_clock_khz(192000, true); + // set_sys_clock_khz(240000, true); + // set_sys_clock_khz(264000, true); #ifdef PICO_DEFAULT_PIO_USB_VBUSEN_PIN gpio_init(PICO_DEFAULT_PIO_USB_VBUSEN_PIN);