summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakimisu <[email protected]>2023-02-18 19:12:32 +0800
committersakimisu <[email protected]>2023-02-18 19:16:56 +0800
commit6ada1e0260663cf035dab12728f01cf8f3c4dbde (patch)
tree0d43d68bee599bd6977eb0e9062e83814905fafd
parent75ddfc8e4dd708cbd95df75ffb3df2fb1da639ff (diff)
update demo url
-rw-r--r--README.md10
-rw-r--r--README_zh.md10
-rw-r--r--demo/bouffalolab/README.md1
-rw-r--r--demo/hpm/usb_device/CMakeLists.txt20
-rw-r--r--demo/hpm/usb_device/src/hello_world.c35
-rw-r--r--demo/hpm/usb_device/src/usb_config.h134
-rw-r--r--demo/hpm/usb_host/CMakeLists.txt21
-rw-r--r--demo/hpm/usb_host/flash_xip.icf109
-rw-r--r--demo/hpm/usb_host/ram.icf84
-rw-r--r--demo/hpm/usb_host/src/FreeRTOSConfig.h147
-rw-r--r--demo/hpm/usb_host/src/main.c38
-rw-r--r--demo/hpm/usb_host/src/usb_config.h133
-rw-r--r--demo/hpm/usb_host/替换 icf 到 hpm sdk 中.txt0
13 files changed, 8 insertions, 734 deletions
diff --git a/README.md b/README.md
index 648e277d..e7410326 100644
--- a/README.md
+++ b/README.md
@@ -135,21 +135,19 @@ Note: After version 0.4.1, the dcd drivers have been refactored and some reposit
| Manufacturer | CHIP or Series | USB IP| Repo Url |Corresponds to master version|
|:--------------------:|:------------------:|:-----:|:--------:|:---------------------------:|
-|Bouffalolab | BL702 | bouffalolab|[bl_mcu_sdk](https://github.com/bouffalolab/bl_mcu_sdk/tree/master/examples/usb)| latest |
-|Essemi | ES32F36xx | musb |[es32f369_repo](https://github.com/sakumisu/CherryUSB/tree/master/demo/es32)|latest |
-|AllwinnerTech | F1C100S | musb |[cherryusb_rtt_f1c100s](https://github.com/CherryUSB/cherryusb_rtt_f1c100s)|latest |
+|Bouffalolab | BL702/BL616/BL808 | bouffalolab/ehci|[bl_mcu_sdk](https://github.com/CherryUSB/cherryusb_bouffalolab)| latest |
|ST | STM32F103C8T6 | fsdev |[stm32f103_repo](https://github.com/sakumisu/CherryUSB/tree/master/demo/stm32/usb_device/stm32f103c8t6)|latest |
|ST | STM32F4 | dwc2 |[stm32f429_device_repo](https://github.com/sakumisu/CherryUSB/tree/master/demo/stm32/usb_device/stm32f429igt6) [stm32f429_host_repo](https://github.com/sakumisu/CherryUSB/tree/master/demo/stm32/usb_host/stm32f429igt6)|latest |
|ST | STM32H7 | dwc2 |[stm32h743_device_repo](https://github.com/sakumisu/CherryUSB/tree/master/demo/stm32/usb_device/stm32h743vbt6) [stm32h743_host_repo](https://github.com/sakumisu/CherryUSB/tree/master/demo/stm32/usb_host/stm32h743xih6)|latest |
|HPMicro | HPM6750 | hpm/ehci |[hpm_repo](https://github.com/CherryUSB/cherryusb_hpmicro)|v0.6.0 |
+|Essemi | ES32F36xx | musb |[es32f369_repo](https://github.com/sakumisu/CherryUSB/tree/master/demo/es32)|latest |
+|AllwinnerTech | F1C100S | musb |[cherryusb_rtt_f1c100s](https://github.com/CherryUSB/cherryusb_rtt_f1c100s)|latest |
|Phytium | e2000 | xhci |[phytium _repo](https://gitee.com/phytium_embedded/phytium-standalone-sdk)|latest |
|Raspberry pi | rp2040 | rp2040 |[rp2040_repo](https://github.com/sakumisu/CherryUSB/tree/master/demo/rp2040)|latest |
|WCH | CH32V307/ch58x | ch32_usbfs/ch32_usbhs/ch58x |[wch_repo](https://github.com/CherryUSB/cherryusb_wch)|latest |
-|WCH | CH32V307 | ch32_usbfs/ch32_usbhs|[ch32v307_repo](https://github.com/CherryUSB/cherryusb_ch32v307)|v0.6.0 |
-|WCH | CH57x | ch58x |[ch57x_repo](https://github.com/CherryUSB/cherryusb_ch57x)|v0.4.1 |
+|Nordicsemi | Nrf52840 | nrf5x |[nrf5x_repo](https://github.com/CherryUSB/cherryusb_nrf5x)|latest |
|Nuvoton | Nuc442 | nuvoton |[nuc442_repo](https://github.com/CherryUSB/cherryusb_nuc442)|v0.4.1 |
|Geehy | APM32E10x APM32F0xx| fsdev |[apm32_repo](https://github.com/CherryUSB/cherryusb_apm32)|v0.4.1 |
-|Nordicsemi | Nrf52840 | nrf5x |[nrf5x_repo](https://github.com/CherryUSB/cherryusb_nrf5x)|latest |
|Espressif | esp32 | dwc2 |[esp32_repo](https://github.com/CherryUSB/cherryusb_esp32)|v0.4.1 |
|Mindmotion | MM32L3xx | mm32 |[mm32_repo](https://github.com/CherryUSB/cherryusb_mm32)|v0.4.1 |
diff --git a/README_zh.md b/README_zh.md
index d79e2c8c..e974544a 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -134,21 +134,19 @@ USB 基本知识点与 CherryUSB Device 协议栈是如何编写的,参考 [Ch
| 厂商 | 芯片或者系列 | USB IP| 仓库链接 | 对应 master 版本 |
|:--------------------:|:------------------:|:-----:|:--------:|:---------------------------:|
-|Bouffalolab | BL702 | bouffalolab|[bl_mcu_sdk](https://github.com/bouffalolab/bl_mcu_sdk/tree/master/examples/usb)| latest |
-|Essemi | ES32F36xx | musb |[es32f369_repo](https://github.com/sakumisu/CherryUSB/tree/master/demo/es32)|latest |
-|AllwinnerTech | F1C100S | musb |[cherryusb_rtt_f1c100s](https://github.com/CherryUSB/cherryusb_rtt_f1c100s)|latest |
+|Bouffalolab | BL702/BL616/BL808 | bouffalolab/ehci|[bl_mcu_sdk](https://github.com/CherryUSB/cherryusb_bouffalolab)| latest |
|ST | STM32F103C8T6 | fsdev |[stm32f103_repo](https://github.com/sakumisu/CherryUSB/tree/master/demo/stm32/usb_device/stm32f103c8t6)|latest |
|ST | STM32F4 | dwc2 |[stm32f429_device_repo](https://github.com/sakumisu/CherryUSB/tree/master/demo/stm32/usb_device/stm32f429igt6) [stm32f429_host_repo](https://github.com/sakumisu/CherryUSB/tree/master/demo/stm32/usb_host/stm32f429igt6)|latest |
|ST | STM32H7 | dwc2 |[stm32h743_device_repo](https://github.com/sakumisu/CherryUSB/tree/master/demo/stm32/usb_device/stm32h743vbt6) [stm32h743_host_repo](https://github.com/sakumisu/CherryUSB/tree/master/demo/stm32/usb_host/stm32h743xih6)|latest |
|HPMicro | HPM6750 | hpm/ehci |[hpm_repo](https://github.com/CherryUSB/cherryusb_hpmicro)|v0.6.0 |
+|Essemi | ES32F36xx | musb |[es32f369_repo](https://github.com/sakumisu/CherryUSB/tree/master/demo/es32)|latest |
+|AllwinnerTech | F1C100S | musb |[cherryusb_rtt_f1c100s](https://github.com/CherryUSB/cherryusb_rtt_f1c100s)|latest |
|Phytium | e2000 | xhci |[phytium _repo](https://gitee.com/phytium_embedded/phytium-standalone-sdk)|latest |
|Raspberry pi | rp2040 | rp2040 |[rp2040_repo](https://github.com/sakumisu/CherryUSB/tree/master/demo/rp2040)|latest |
|WCH | CH32V307/ch58x | ch32_usbfs/ch32_usbhs/ch58x |[wch_repo](https://github.com/CherryUSB/cherryusb_wch)|latest |
-|WCH | CH32V307 | ch32_usbfs/ch32_usbhs|[ch32v307_repo](https://github.com/CherryUSB/cherryusb_ch32v307)|v0.6.0 |
-|WCH | CH57x | ch58x |[ch57x_repo](https://github.com/CherryUSB/cherryusb_ch57x)|v0.4.1 |
+|Nordicsemi | Nrf52840 | nrf5x |[nrf5x_repo](https://github.com/CherryUSB/cherryusb_nrf5x)|latest |
|Nuvoton | Nuc442 | nuvoton |[nuc442_repo](https://github.com/CherryUSB/cherryusb_nuc442)|v0.4.1 |
|Geehy | APM32E10x APM32F0xx| fsdev |[apm32_repo](https://github.com/CherryUSB/cherryusb_apm32)|v0.4.1 |
-|Nordicsemi | Nrf52840 | nrf5x |[nrf5x_repo](https://github.com/CherryUSB/cherryusb_nrf5x)|latest |
|Espressif | esp32 | dwc2 |[esp32_repo](https://github.com/CherryUSB/cherryusb_esp32)|v0.4.1 |
|Mindmotion | MM32L3xx | mm32 |[mm32_repo](https://github.com/CherryUSB/cherryusb_mm32)|v0.4.1 |
diff --git a/demo/bouffalolab/README.md b/demo/bouffalolab/README.md
deleted file mode 100644
index 16287770..00000000
--- a/demo/bouffalolab/README.md
+++ /dev/null
@@ -1 +0,0 @@
-[bl_mcu_sdk_usb_examples](https://github.com/bouffalolab/bl_mcu_sdk/tree/master/examples/usb) \ No newline at end of file
diff --git a/demo/hpm/usb_device/CMakeLists.txt b/demo/hpm/usb_device/CMakeLists.txt
deleted file mode 100644
index 258a3f07..00000000
--- a/demo/hpm/usb_device/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright 2021 hpmicro
-# SPDX-License-Identifier: BSD-3-Clause
-
-cmake_minimum_required(VERSION 3.13)
-
-set(CONFIG_CHERRYUSB 1)
-set(CONFIG_USB_DEVICE 1)
-set(CONFIG_CHERRYUSB_DEVICE 1)
-set(CONFIG_CHERRYUSB_DEVICE_CDC 1)
-set(CONFIG_CHERRYUSB_DEVICE_HID 1)
-set(CONFIG_CHERRYUSB_DEVICE_MSC 1)
-set(CONFIG_CHERRYUSB_DEVICE_DEMO_CDC_MSC 1)
-
-find_package(hpm-sdk REQUIRED HINTS $ENV{HPM_SDK_BASE})
-
-project(cherryusb)
-
-sdk_app_inc(src)
-sdk_app_src(src/hello_world.c)
-generate_ses_project()
diff --git a/demo/hpm/usb_device/src/hello_world.c b/demo/hpm/usb_device/src/hello_world.c
deleted file mode 100644
index f091f92f..00000000
--- a/demo/hpm/usb_device/src/hello_world.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2021 hpmicro
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-
-#include <stdio.h>
-#include "board.h"
-#include "hpm_debug_console.h"
-
-#define LED_FLASH_PERIOD_IN_MS 300
-
-int main(void)
-{
- int u;
-
- board_init();
- board_init_led_pins();
- board_init_usb_pins();
-
- board_timer_create(LED_FLASH_PERIOD_IN_MS, board_led_toggle);
-
- printf("hello world\n");
-
- extern void cdc_acm_msc_init(void);
-
- cdc_acm_msc_init();
- while(1)
- {
- extern void cdc_acm_data_send_with_dtr_test(void);
- cdc_acm_data_send_with_dtr_test();
- }
- return 0;
-}
diff --git a/demo/hpm/usb_device/src/usb_config.h b/demo/hpm/usb_device/src/usb_config.h
deleted file mode 100644
index f49cc566..00000000
--- a/demo/hpm/usb_device/src/usb_config.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 2022, sakumisu
- *
- * SPDX-License-Identifier: Apache-2.0
- */
-#ifndef CHERRYUSB_CONFIG_H
-#define CHERRYUSB_CONFIG_H
-
-#define CHERRYUSB_VERSION 0x000700
-
-/* ================ USB common Configuration ================ */
-
-#define CONFIG_USB_PRINTF(...) printf(__VA_ARGS__)
-
-#define usb_malloc(size) malloc(size)
-#define usb_free(ptr) free(ptr)
-
-#ifndef CONFIG_USB_DBG_LEVEL
-#define CONFIG_USB_DBG_LEVEL USB_DBG_INFO
-#endif
-
-/* Enable print with color */
-#define CONFIG_USB_PRINTF_COLOR_ENABLE
-
-/* data align size when use dma */
-#ifndef CONFIG_USB_ALIGN_SIZE
-#define CONFIG_USB_ALIGN_SIZE 4
-#endif
-
-/* attribute data into no cache ram */
-#define USB_NOCACHE_RAM_SECTION __attribute__((section(".noncacheable")))
-
-/* ================= USB Device Stack Configuration ================ */
-
-/* Ep0 max transfer buffer, specially for receiving data from ep0 out */
-#define CONFIG_USBDEV_REQUEST_BUFFER_LEN 256
-
-/* Setup packet log for debug */
-// #define CONFIG_USBDEV_SETUP_LOG_PRINT
-
-/* Check if the input descriptor is correct */
-// #define CONFIG_USBDEV_DESC_CHECK
-
-/* Enable test mode */
-// #define CONFIG_USBDEV_TEST_MODE
-
-#ifndef CONFIG_USBDEV_MSC_BLOCK_SIZE
-#define CONFIG_USBDEV_MSC_BLOCK_SIZE 512
-#endif
-
-#ifndef CONFIG_USBDEV_MSC_MANUFACTURER_STRING
-#define CONFIG_USBDEV_MSC_MANUFACTURER_STRING ""
-#endif
-
-#ifndef CONFIG_USBDEV_MSC_PRODUCT_STRING
-#define CONFIG_USBDEV_MSC_PRODUCT_STRING ""
-#endif
-
-#ifndef CONFIG_USBDEV_MSC_VERSION_STRING
-#define CONFIG_USBDEV_MSC_VERSION_STRING "0.01"
-#endif
-
-// #define CONFIG_USBDEV_MSC_THREAD
-
-#ifdef CONFIG_USBDEV_MSC_THREAD
-#ifndef CONFIG_USBDEV_MSC_STACKSIZE
-#define CONFIG_USBDEV_MSC_STACKSIZE 2048
-#endif
-
-#ifndef CONFIG_USBDEV_MSC_PRIO
-#define CONFIG_USBDEV_MSC_PRIO 4
-#endif
-#endif
-
-#ifndef CONFIG_USBDEV_AUDIO_VERSION
-#define CONFIG_USBDEV_AUDIO_VERSION 0x0100
-#endif
-
-#ifndef CONFIG_USBDEV_AUDIO_MAX_CHANNEL
-#define CONFIG_USBDEV_AUDIO_MAX_CHANNEL 8
-#endif
-
-/* ================ USB HOST Stack Configuration ================== */
-
-#define CONFIG_USBHOST_MAX_RHPORTS 1
-#define CONFIG_USBHOST_MAX_EXTHUBS 1
-#define CONFIG_USBHOST_MAX_EHPORTS 4
-#define CONFIG_USBHOST_MAX_INTERFACES 6
-#define CONFIG_USBHOST_MAX_INTF_ALTSETTINGS 1
-#define CONFIG_USBHOST_MAX_ENDPOINTS 4
-
-#define CONFIG_USBHOST_DEV_NAMELEN 16
-
-#ifndef CONFIG_USBHOST_PSC_PRIO
-#define CONFIG_USBHOST_PSC_PRIO 4
-#endif
-#ifndef CONFIG_USBHOST_PSC_STACKSIZE
-#define CONFIG_USBHOST_PSC_STACKSIZE 2048
-#endif
-
-//#define CONFIG_USBHOST_GET_STRING_DESC
-
-/* Ep0 max transfer buffer */
-#define CONFIG_USBHOST_REQUEST_BUFFER_LEN 512
-
-#ifndef CONFIG_USBHOST_CONTROL_TRANSFER_TIMEOUT
-#define CONFIG_USBHOST_CONTROL_TRANSFER_TIMEOUT 500
-#endif
-
-#ifndef CONFIG_USBHOST_MSC_TIMEOUT
-#define CONFIG_USBHOST_MSC_TIMEOUT 5000
-#endif
-
-/* ================ USB Device Port Configuration ================*/
-
-//#define USBD_IRQHandler USBD_IRQHandler
-//#define USB_BASE (0x40080000UL)
-//#define USB_NUM_BIDIR_ENDPOINTS 4
-
-/* ================ USB Host Port Configuration ==================*/
-
-#define CONFIG_USBHOST_PIPE_NUM 10
-
-/* ================ EHCI Configuration ================ */
-
-#define CONFIG_USB_EHCI_HCCR_BASE (0)
-#define CONFIG_USB_EHCI_HCOR_BASE (0xF2020000UL + 0x140)
-#define CONFIG_EHCI_FRAME_LIST_SIZE 1024
-// #define CONFIG_USB_EHCI_INFO_ENABLE
-// #define CONFIG_USB_ECHI_HCOR_RESERVED_DISABLE
-// #define CONFIG_USB_EHCI_CONFIGFLAG
-#define CONFIG_USB_EHCI_PORT_POWER
-
-#endif
diff --git a/demo/hpm/usb_host/CMakeLists.txt b/demo/hpm/usb_host/CMakeLists.txt
deleted file mode 100644
index 69b6b0b8..00000000
--- a/demo/hpm/usb_host/CMakeLists.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright 2021 hpmicro
-# SPDX-License-Identifier: BSD-3-Clause
-
-cmake_minimum_required(VERSION 3.13)
-
-set(CONFIG_FREERTOS 1)
-set(CONFIG_CHERRYUSB 1)
-set(CONFIG_USB_HOST 1)
-set(CONFIG_CHERRYUSB_HOST 1)
-set(CONFIG_CHERRYUSB_HOST_DEMO 1)
-
-find_package(hpm-sdk REQUIRED HINTS $ENV{HPM_SDK_BASE})
-project(cherryusb_host)
-sdk_compile_definitions(-DUSB_HOST_MCU_CORE=HPM_CORE0)
-sdk_inc(src)
-sdk_compile_definitions(-D__freertos_irq_stack_top=_stack)
-sdk_compile_definitions(-DCONFIG_FREERTOS=1)
-sdk_compile_definitions(-DUSE_NONVECTOR_MODE=1)
-sdk_compile_definitions(-DDISABLE_IRQ_PREEMPTIVE=1)
-sdk_app_src(src/main.c)
-generate_ses_project()
diff --git a/demo/hpm/usb_host/flash_xip.icf b/demo/hpm/usb_host/flash_xip.icf
deleted file mode 100644
index a338d96d..00000000
--- a/demo/hpm/usb_host/flash_xip.icf
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright 2021 hpmicro
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-
-define memory with size = 4G;
-
-/* Regions */
-define region NOR_CFG_OPTION = [ from 0x80000400 size 0x1000 ];
-define region BOOT_HEADER = [ from 0x80001000 size 0x3000 ];
-define region XPI0 = [from 0x80003000 size _flash_size - 0x3000 ]; /* XPI0 */
-define region ILM_SLV = [from 0x1000000 size 256k]; /* ILM slave */
-define region DLM = [from 0x80000 size 256k]; /* DLM */
-define region AXI_SRAM = [from 0x1080000 size 700k]; /* reserve 256K for noncacheable region */
-define region SDRAM = [from 0x40000000 size _extram_size];
-define region NONCACHEABLE_RAM = [from 0x1140000 size 256k];
-define region CHERRYUSB_FLASH = [start(XPI0)+4096k size 72];
-
-/* Blocks */
-define block vectors { section .isr_vector, section .vector_table };
-define block ctors { section .ctors, section .ctors.*, block with alphabetical order { init_array } };
-define block dtors { section .dtors, section .dtors.*, block with reverse alphabetical order { fini_array } };
-define block eh_frame { section .eh_frame, section .eh_frame.* };
-define block tbss { section .tbss, section .tbss.* };
-define block tdata { section .tdata, section .tdata.* };
-define block tls { block tbss, block tdata };
-define block tdata_load { copy of block tdata };
-define block heap with size = __HEAPSIZE__, alignment = 8, /* fill =0x00, */ readwrite access { };
-define block stack with size = __STACKSIZE__, alignment = 8, /* fill =0xCD, */ readwrite access { };
-
-define block framebuffer with alignment = 8 { section .framebuffer };
-define block safe_stack with size = 512, readwrite access {};
-
-define block boot_header with fixed order { section .boot_header, section .fw_info_table, section .dc_info };
-
-/* Symbols */
-define exported symbol __nor_cfg_option_load_addr__ = start of region NOR_CFG_OPTION;
-define exported symbol __boot_header_load_addr__ = start of region BOOT_HEADER;
-define exported symbol __app_load_addr__ = start of region XPI0;
-define exported symbol __app_offset__ = __app_load_addr__ - __boot_header_load_addr__;
-define exported symbol __boot_header_length__ = size of block boot_header;
-define exported symbol __fw_size__ = 0x1000;
-
-define exported symbol __noncacheable_start__ = start of region NONCACHEABLE_RAM;
-define exported symbol __noncacheable_end__ = end of region NONCACHEABLE_RAM + 1;
-
-define exported symbol __usbh_class_info_start__ = start of region CHERRYUSB_FLASH;
-define exported symbol __usbh_class_info_end__ = end of region CHERRYUSB_FLASH + 1;
-
-define exported symbol _stack_safe = end of block safe_stack + 1;
-define exported symbol _stack = end of block stack + 1;
-
-do not initialize { section .noncacheable };
-do not initialize { section .non_init, section .non_init.*, section .*.non_init, section .*.non_init.* };
-do not initialize { section .no_init, section .no_init.*, section .*.no_init, section .*.no_init.* }; // Legacy sections, kept for backwards compatibility
-do not initialize { section .noinit, section .noinit.*, section .*.noinit, section .*.noinit.* }; // Legacy sections, used by some SDKs/HALs
-
-initialize by copy with packing=auto { section .noncacheable.init };
-initialize by copy with packing=none { section .data, section .data.*, section .*.data, section .*.data.* }; // Static data sections
-initialize by copy with packing=auto { section .sdata, section .sdata.* };
-initialize by copy with packing=auto { section .fast, section .fast.*, section .*.fast, section .*.fast.* }; // "RAM Code" sections
-
-initialize by symbol __SEGGER_init_heap { block heap }; // Init the heap if there is one
-initialize by symbol __SEGGER_init_ctors { block ctors }; // Call constructors for global objects which need to be constructed before reaching main (if any). Make sure this is done after setting up heap.
-
-keep { section .nor_cfg_option, section .boot_header, section .fw_info_table, section .dc_info };
-place in NOR_CFG_OPTION { section .nor_cfg_option };
-place in BOOT_HEADER with fixed order { block boot_header };
-place at start of XPI0 with fixed order { symbol _start};
-
-place at start of ILM_SLV with fixed order { block vectors };
-initialize by copy { block vectors };
-
-place in XPI0 with minimum size order {
- block tdata_load, // Thread-local-storage load image
- block ctors, // Constructors block
- block dtors, // Destructors block
- block eh_frame, // Exception frames placed directly into flash overriding default placement (sections writable)
- readonly, // Catch-all for readonly data (e.g. .rodata, .srodata)
- readexec // Catch-all for (readonly) executable code (e.g. .text)
- };
-
-//
-// The GNU compiler creates these exception-related sections as writeable.
-// Override the section header flag and make them readonly so they can be
-// placed into flash.
-//
-define access readonly { section .gcc_except_table, section .gcc_except_table.* };
-define access readonly { section .eh_frame, section .eh_frame.* };
-define access readonly { section .sdata.DW.* };
-
-place in ILM_SLV {
- section .fast, section .fast.*, // "ramfunc" section
- };
-
-place in DLM with auto order {
- block tls, // Thread-local-storage block
- readwrite, // Catch-all for initialized/uninitialized data sections (e.g. .data, .noinit)
- zeroinit // Catch-all for zero-initialized data sections (e.g. .bss)
- };
-
-place in AXI_SRAM { block framebuffer };
-place in NONCACHEABLE_RAM { section .noncacheable, section .noncacheable.init, section .noncacheable.bss };
-place in AXI_SRAM { block heap }; // Heap reserved block
-place at end of AXI_SRAM { block stack }; // Stack reserved block at the end
-place at end of DLM { block safe_stack }; // Safe stack reserved block at the end
-place in CHERRYUSB_FLASH { section .usbh_class_info };
-keep { section .usbh_class_info}; \ No newline at end of file
diff --git a/demo/hpm/usb_host/ram.icf b/demo/hpm/usb_host/ram.icf
deleted file mode 100644
index 5228b442..00000000
--- a/demo/hpm/usb_host/ram.icf
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright 2021 hpmicro
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-
-define memory with size = 4G;
-
-/* Regions */
-define region CORE0_LM_SLV = [from 0x1000000 size 512k]; /* CORE0 LM slave */
-define region CORE1_LM_SLV = [from 0x1180000 size 512k]; /* CORE1 LM slave */
-define region AXI_SRAM = [from 0x1080000 size 700k]; /* reserve 256K for noncacheable region */
-define region CHERRYUSB_RAM = [from 0x1080000 + 700k size 72]; /* reserve 64B for cherryusb region */
-define region NONCACHEABLE_RAM = [from 0x1140000 size 256K];
-
-define exported symbol __noncacheable_start__ = start of region NONCACHEABLE_RAM;
-define exported symbol __noncacheable_end__ = end of region NONCACHEABLE_RAM + 1;
-define exported symbol _stack = end of block stack + 1;
-
-define exported symbol __usbh_class_info_start__ = start of region CHERRYUSB_RAM;
-define exported symbol __usbh_class_info_end__ = end of region CHERRYUSB_RAM + 1;
-
-/* Blocks */
-define block vectors { section .isr_vector, section .vector_table };
-define block ctors { section .ctors, section .ctors.*, block with alphabetical order { init_array } };
-define block dtors { section .dtors, section .dtors.*, block with reverse alphabetical order { fini_array } };
-define block eh_frame { section .eh_frame, section .eh_frame.* };
-define block tbss { section .tbss, section .tbss.* };
-define block tdata { section .tdata, section .tdata.* };
-define block tls { block tbss, block tdata };
-define block tdata_load { copy of block tdata };
-define block heap with size = __HEAPSIZE__, alignment = 8, /* fill =0x00, */ readwrite access { };
-define block stack with size = __STACKSIZE__, alignment = 8, /* fill =0xCD, */ readwrite access { };
-define block framebuffer { section .framebuffer };
-define block safe_stack with size = 512, readwrite access {};
-define exported symbol _stack_safe = end of block safe_stack + 1;
-
-do not initialize { section .noncacheable };
-do not initialize { section .non_init, section .non_init.*, section .*.non_init, section .*.non_init.* };
-do not initialize { section .no_init, section .no_init.*, section .*.no_init, section .*.no_init.* }; // Legacy sections, kept for backwards compatibility
-do not initialize { section .noinit, section .noinit.*, section .*.noinit, section .*.noinit.* }; // Legacy sections, used by some SDKs/HALs
-
-initialize by copy with packing=auto { section .noncacheable.init };
-initialize by copy with packing=none { section .data, section .data.*, section .*.data, section .*.data.* }; // Static data sections
-initialize by copy with packing=auto { section .sdata, section .sdata.* };
-initialize by copy with packing=auto { section .fast, section .fast.*, section .*.fast, section .*.fast.* }; // "RAM Code" sections
-
-initialize by symbol __SEGGER_init_heap { block heap }; // Init the heap if there is one
-initialize by symbol __SEGGER_init_ctors { block ctors }; // Call constructors for global objects which need to be constructed before reaching main (if any). Make sure this is done after setting up heap.
-
-place at start of CORE0_LM_SLV { symbol _start };
-place in CORE0_LM_SLV { block vectors }; // Vector table section
-place in CORE0_LM_SLV with minimum size order {
- block tdata_load, // Thread-local-storage load image
- block ctors, // Constructors block
- block dtors, // Destructors block
- block eh_frame, // Exception frames placed directly into flash overriding default placement (sections writable)
- readonly, // Catch-all for readonly data (e.g. .rodata, .srodata)
- readexec, // Catch-all for (readonly) executable code (e.g. .text)
- section .fast, section .fast.*, // "ramfunc" section
- };
-
-//
-// The GNU compiler creates these exception-related sections as writeable.
-// Override the section header flag and make them readonly so they can be
-// placed into flash.
-//
-define access readonly { section .gcc_except_table, section .gcc_except_table.* };
-define access readonly { section .eh_frame, section .eh_frame.* };
-define access readonly { section .sdata.DW.* };
-
-/* Explicit placement in AXI_SRAM */
-place in AXI_SRAM { block framebuffer };
-
-place in AXI_SRAM with auto order {
- block tls, // Thread-local-storage block
- readwrite, // Catch-all for initialized/uninitialized data sections (e.g. .data, .noinit)
- zeroinit, // Catch-all for zero-initialized data sections (e.g. .bss)
- };
-place in NONCACHEABLE_RAM { section .noncacheable, section .noncacheable.init, section .noncacheable.bss }; // Noncacheable
-place in AXI_SRAM { block heap }; // Heap reserved block
-place at end of AXI_SRAM { block stack, block safe_stack }; // Stack reserved block at the end
-place in CHERRYUSB_RAM { section .usbh_class_info };
-keep { section .usbh_class_info}; \ No newline at end of file
diff --git a/demo/hpm/usb_host/src/FreeRTOSConfig.h b/demo/hpm/usb_host/src/FreeRTOSConfig.h
deleted file mode 100644
index 95566306..00000000
--- a/demo/hpm/usb_host/src/FreeRTOSConfig.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 2021 hpmicro
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-
-#ifndef FREERTOS_CONFIG_H
-#define FREERTOS_CONFIG_H
-
-/*
- * Application specific definitions.
- *
- * These definitions should be adjusted for your particular hardware and
- * application requirements.
- *
- * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
- * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
- *
- * See http://www.freertos.org/a00110.html.
- */
-
-#define configMTIME_BASE_ADDRESS (0xE6000000UL)
-#define configMTIMECMP_BASE_ADDRESS (0xE6000008UL)
-
-#define configUSE_PREEMPTION 1
-#define configCPU_CLOCK_HZ ((uint32_t) 24000000)
-#define configTICK_RATE_HZ ((TickType_t) 1000)
-#define configMAX_PRIORITIES (7)
-#define configMINIMAL_STACK_SIZE (256)
-#define configMAX_TASK_NAME_LEN 16
-#define configUSE_16_BIT_TICKS 0
-#define configIDLE_SHOULD_YIELD 0
-#define configUSE_APPLICATION_TASK_TAG 0
-#define configGENERATE_RUN_TIME_STATS 0
-
-//为1时使用计数信号量
-#define configUSE_COUNTING_SEMAPHORES 1
-//使用互斥信号量
-#define configUSE_MUTEXES 1
-
-/* Memory allocation definitions. */
-#define configSUPPORT_STATIC_ALLOCATION 0
-#define configSUPPORT_DYNAMIC_ALLOCATION 1
-#define configTOTAL_HEAP_SIZE ((size_t) (20 * 1024))
-
-/* Hook function definitions. */
-#define configUSE_IDLE_HOOK 0
-#define configUSE_TICK_HOOK 0
-#define configCHECK_FOR_STACK_OVERFLOW 0
-#define configUSE_MALLOC_FAILED_HOOK 0
-#define configUSE_DAEMON_TASK_STARTUP_HOOK 0
-
-/* Run time and task stats gathering definitions. */
-#define configGENERATE_RUN_TIME_STATS 0
-#define configUSE_TRACE_FACILITY 1
-#define configUSE_STATS_FORMATTING_FUNCTIONS 0
-
-/* Set the following definitions to 1 to include the API function, or zero to exclude the API function. */
-#define INCLUDE_vTaskPrioritySet 1
-#define INCLUDE_uxTaskPriorityGet 1
-#define INCLUDE_vTaskDelete 1
-#define INCLUDE_vTaskCleanUpResources 1
-#define INCLUDE_vTaskSuspend 1
-#define INCLUDE_vTaskDelayUntil 1
-#define INCLUDE_vTaskDelay 1
-#define INCLUDE_xTaskGetCurrentTaskHandle 1
-#define INCLUDE_xTimerPendFunctionCall 1
-#define INCLUDE_eTaskGetState 1
-#define INCLUDE_xTaskAbortDelay 1
-#define INCLUDE_xTaskGetHandle 1
-#define INCLUDE_xSemaphoreGetMutexHolder 1
-
-/* Co-routine definitions. */
-#define configUSE_CO_ROUTINES 0
-#define configMAX_CO_ROUTINE_PRIORITIES 2
-
-/* Software timer definitions. */
-#define configUSE_TIMERS 1
-#define configTIMER_TASK_PRIORITY (configMAX_PRIORITIES - 1)
-#define configTIMER_QUEUE_LENGTH 4
-#define configTIMER_TASK_STACK_DEPTH (configMINIMAL_STACK_SIZE)
-
-/* Task priorities.*/
-#ifndef uartPRIMARY_PRIORITY
- #define uartPRIMARY_PRIORITY (configMAX_PRIORITIES - 3)
-#endif
-
-/* Normal assert() semantics without relying on the provision of an assert.h header file. */
-#define configASSERT(x) if ((x) == 0) { taskDISABLE_INTERRUPTS(); __asm volatile("ebreak"); for (;;); }
-
-/*
- * The size of the global output buffer that is available for use when there
- * are multiple command interpreters running at once (for example, one on a UART
- * and one on TCP/IP). This is done to prevent an output buffer being defined by
- * each implementation - which would waste RAM. In this case, there is only one
- * command interpreter running.
- */
-
-/*
- * The buffer into which output generated by FreeRTOS+CLI is placed. This must
- * be at least big enough to contain the output of the task-stats command, as the
- * example implementation does not include buffer overlow checking.
- */
-#define configCOMMAND_INT_MAX_OUTPUT_SIZE 2096
-#define configINCLUDE_QUERY_HEAP_COMMAND 1
-
-/* This file is included from assembler files - make sure C code is not included in assembler files. */
-#ifndef __ASSEMBLER__
- void vAssertCalled(const char *pcFile, unsigned long ulLine);
- void vConfigureTickInterrupt(void);
- void vClearTickInterrupt(void);
- void vPreSleepProcessing(unsigned long uxExpectedIdleTime);
- void vPostSleepProcessing(unsigned long uxExpectedIdleTime);
-#endif /* __ASSEMBLER__ */
-
-/****** Hardware/compiler specific settings. *******/
-/*
- * The application must provide a function that configures a peripheral to
- * create the FreeRTOS tick interrupt, then define configSETUP_TICK_INTERRUPT()
- * in FreeRTOSConfig.h to call the function.
- */
-#define configSETUP_TICK_INTERRUPT() vConfigureTickInterrupt()
-#define configCLEAR_TICK_INTERRUPT() vClearTickInterrupt()
-
-/*
- * The configPRE_SLEEP_PROCESSING() and configPOST_SLEEP_PROCESSING() macros
- * allow the application writer to add additional code before and after the MCU is
- * placed into the low power state respectively. The empty implementations
- * provided in this demo can be extended to save even more power.
- */
-#define configPRE_SLEEP_PROCESSING(uxExpectedIdleTime) vPreSleepProcessing(uxExpectedIdleTime);
-#define configPOST_SLEEP_PROCESSING(uxExpectedIdleTime) vPostSleepProcessing(uxExpectedIdleTime);
-
-
-/* Compiler specifics. */
-#define fabs(x) __builtin_fabs(x)
-
-/* Enable Hardware Stack Protection and Recording mechanism. */
-#define configHSP_ENABLE 0
-
-/* Record the highest address of stack. */
-#if (configHSP_ENABLE == 1 && configRECORD_STACK_HIGH_ADDRESS != 1)
-#define configRECORD_STACK_HIGH_ADDRESS 1
-#endif
-
-#endif /* FREERTOS_CONFIG_H */
diff --git a/demo/hpm/usb_host/src/main.c b/demo/hpm/usb_host/src/main.c
deleted file mode 100644
index 3b50fbad..00000000
--- a/demo/hpm/usb_host/src/main.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2021 hpmicro
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-
-/* FreeRTOS kernel includes. */
-#include "FreeRTOS.h"
-#include "task.h"
-
-/* HPM example includes. */
-#include <stdio.h>
-#include "board.h"
-#include "hpm_gpio_drv.h"
-#include "usbh_core.h"
-
-extern void usbh_class_test();
-
-int main(void)
-{
- board_init();
- board_init_gpio_pins();
- board_init_usb_pins();
-#ifdef BOARD_LED_GPIO_CTRL
- gpio_set_pin_output(BOARD_LED_GPIO_CTRL, BOARD_LED_GPIO_INDEX, BOARD_LED_GPIO_PIN);
- gpio_write_pin(BOARD_LED_GPIO_CTRL, BOARD_LED_GPIO_INDEX, BOARD_LED_GPIO_PIN, BOARD_LED_ON_LEVEL);
-#endif
-
- printf("Start usb host task...\r\n");
- usbh_initialize();
- usbh_class_test();
- vTaskStartScheduler();
- for (;;) {
- ;
- }
- return 0;
-} \ No newline at end of file
diff --git a/demo/hpm/usb_host/src/usb_config.h b/demo/hpm/usb_host/src/usb_config.h
deleted file mode 100644
index f72fa216..00000000
--- a/demo/hpm/usb_host/src/usb_config.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 2022, sakumisu
- *
- * SPDX-License-Identifier: Apache-2.0
- */
-#ifndef CHERRYUSB_CONFIG_H
-#define CHERRYUSB_CONFIG_H
-
-#define CHERRYUSB_VERSION 0x000700
-
-/* ================ USB common Configuration ================ */
-
-#ifndef CONFIG_USB_DBG_LEVEL
-#define CONFIG_USB_DBG_LEVEL USB_DBG_INFO
-#endif
-
-#ifndef CONFIG_USB_PRINTF
-#define CONFIG_USB_PRINTF printf
-#endif
-
-/* Enable print with color */
-#define CONFIG_USB_PRINTF_COLOR_ENABLE
-
-/* data align size when use dma */
-#ifndef CONFIG_USB_ALIGN_SIZE
-#define CONFIG_USB_ALIGN_SIZE 4
-#endif
-
-/* attribute data into no cache ram */
-#define USB_NOCACHE_RAM_SECTION __attribute__((section(".noncacheable")))
-
-/* ================= USB Device Stack Configuration ================ */
-
-/* Ep0 max transfer buffer, specially for receiving data from ep0 out */
-#define CONFIG_USBDEV_REQUEST_BUFFER_LEN 256
-
-/* Setup packet log for debug */
-// #define CONFIG_USBDEV_SETUP_LOG_PRINT
-
-/* Check if the input descriptor is correct */
-// #define CONFIG_USBDEV_DESC_CHECK
-
-/* Enable test mode */
-// #define CONFIG_USBDEV_TEST_MODE
-
-#ifndef CONFIG_USBDEV_MSC_BLOCK_SIZE
-#define CONFIG_USBDEV_MSC_BLOCK_SIZE 512
-#endif
-
-#ifndef CONFIG_USBDEV_MSC_MANUFACTURER_STRING
-#define CONFIG_USBDEV_MSC_MANUFACTURER_STRING ""
-#endif
-
-#ifndef CONFIG_USBDEV_MSC_PRODUCT_STRING
-#define CONFIG_USBDEV_MSC_PRODUCT_STRING ""
-#endif
-
-#ifndef CONFIG_USBDEV_MSC_VERSION_STRING
-#define CONFIG_USBDEV_MSC_VERSION_STRING "0.01"
-#endif
-
-// #define CONFIG_USBDEV_MSC_THREAD
-
-#ifdef CONFIG_USBDEV_MSC_THREAD
-#ifndef CONFIG_USBDEV_MSC_STACKSIZE
-#define CONFIG_USBDEV_MSC_STACKSIZE 2048
-#endif
-
-#ifndef CONFIG_USBDEV_MSC_PRIO
-#define CONFIG_USBDEV_MSC_PRIO 4
-#endif
-#endif
-
-#ifndef CONFIG_USBDEV_AUDIO_VERSION
-#define CONFIG_USBDEV_AUDIO_VERSION 0x0100
-#endif
-
-#ifndef CONFIG_USBDEV_AUDIO_MAX_CHANNEL
-#define CONFIG_USBDEV_AUDIO_MAX_CHANNEL 8
-#endif
-
-/* ================ USB HOST Stack Configuration ================== */
-
-#define CONFIG_USBHOST_MAX_RHPORTS 1
-#define CONFIG_USBHOST_MAX_EXTHUBS 1
-#define CONFIG_USBHOST_MAX_EHPORTS 4
-#define CONFIG_USBHOST_MAX_INTERFACES 6
-#define CONFIG_USBHOST_MAX_INTF_ALTSETTINGS 1
-#define CONFIG_USBHOST_MAX_ENDPOINTS 4
-
-#define CONFIG_USBHOST_DEV_NAMELEN 16
-
-#ifndef CONFIG_USBHOST_PSC_PRIO
-#define CONFIG_USBHOST_PSC_PRIO 4
-#endif
-#ifndef CONFIG_USBHOST_PSC_STACKSIZE
-#define CONFIG_USBHOST_PSC_STACKSIZE 2048
-#endif
-
-//#define CONFIG_USBHOST_GET_STRING_DESC
-
-/* Ep0 max transfer buffer */
-#define CONFIG_USBHOST_REQUEST_BUFFER_LEN 512
-
-#ifndef CONFIG_USBHOST_CONTROL_TRANSFER_TIMEOUT
-#define CONFIG_USBHOST_CONTROL_TRANSFER_TIMEOUT 500
-#endif
-
-#ifndef CONFIG_USBHOST_MSC_TIMEOUT
-#define CONFIG_USBHOST_MSC_TIMEOUT 5000
-#endif
-
-/* ================ USB Device Port Configuration ================*/
-
-//#define USBD_IRQHandler USBD_IRQHandler
-//#define USB_BASE (0x40080000UL)
-//#define USB_NUM_BIDIR_ENDPOINTS 4
-
-/* ================ USB Host Port Configuration ==================*/
-
-#define CONFIG_USBHOST_PIPE_NUM 10
-
-/* ================ EHCI Configuration ================ */
-
-#define CONFIG_USB_EHCI_HCCR_BASE (0)
-#define CONFIG_USB_EHCI_HCOR_BASE (0xF2020000UL + 0x140)
-#define CONFIG_EHCI_FRAME_LIST_SIZE 1024
-// #define CONFIG_USB_EHCI_INFO_ENABLE
-// #define CONFIG_USB_ECHI_HCOR_RESERVED_DISABLE
-// #define CONFIG_USB_EHCI_CONFIGFLAG
-#define CONFIG_USB_EHCI_PORT_POWER
-
-#endif
diff --git a/demo/hpm/usb_host/替换 icf 到 hpm sdk 中.txt b/demo/hpm/usb_host/替换 icf 到 hpm sdk 中.txt
deleted file mode 100644
index e69de29b..00000000
--- a/demo/hpm/usb_host/替换 icf 到 hpm sdk 中.txt
+++ /dev/null