Skip to content

Commit eda3cce

Browse files
authored
Merge pull request #2818 from hathach/add-esp32p4
Add esp32p4 OTG HS support
2 parents ad6e1ec + 49d250b commit eda3cce

File tree

36 files changed

+720
-391
lines changed

36 files changed

+720
-391
lines changed

.circleci/config2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ commands:
105105
name: Build
106106
command: |
107107
if [ << parameters.toolchain >> == esp-idf ]; then
108-
docker run --rm -v $PWD:/project -w /project espressif/idf:v5.1.1 python tools/build.py << parameters.family >>
108+
docker run --rm -v $PWD:/project -w /project espressif/idf:v5.3.1 python tools/build.py << parameters.family >>
109109
else
110110
# Toolchain option default is gcc
111111
if [ << parameters.toolchain >> == arm-clang ]; then

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
- 'msp430-gcc'
8686
- 'riscv-gcc'
8787
- 'rx-gcc'
88-
- 'esp-idf' # buid-system is ignored
88+
- 'esp-idf' # build-system is ignored
8989
with:
9090
build-system: 'make'
9191
toolchain: ${{ matrix.toolchain }}

.github/workflows/build_util.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
uses: ./.github/actions/setup_toolchain
4242
with:
4343
toolchain: ${{ inputs.toolchain }}
44-
toolchain_version: 'v5.1.1'
44+
toolchain_version: 'v5.3.1'
4545

4646
- name: Get Dependencies
4747
uses: ./.github/actions/get_deps
@@ -61,7 +61,7 @@ jobs:
6161
- name: Build
6262
run: |
6363
if [ "${{ inputs.toolchain }}" == "esp-idf" ]; then
64-
docker run --rm -v $PWD:/project -w /project espressif/idf:v5.1.1 python tools/build.py ${{ matrix.arg }}
64+
docker run --rm -v $PWD:/project -w /project espressif/idf:v5.3.1 python tools/build.py ${{ matrix.arg }}
6565
else
6666
python tools/build.py -s ${{ inputs.build-system }} ${{ steps.setup-toolchain.outputs.build_option }} ${{ steps.set-one-per-family.outputs.build_option }} ${{ matrix.arg }}
6767
fi

.github/workflows/ci_set_matrix.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"xmc4000": ["arm-gcc"],
4646
"-bespressif_kaluga_1": ["esp-idf"],
4747
"-bespressif_s3_devkitm": ["esp-idf"],
48+
"-bespressif_p4_function_ev": ["esp-idf"],
4849
}
4950

5051

.idea/cmake.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/device/audio_4_channel_mic_freertos/skip.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ mcu:CH32V307
44
mcu:CXD56
55
mcu:F1C100S
66
mcu:GD32VF103
7+
mcu:MCXA15
78
mcu:MKL25ZXX
89
mcu:MSP430x5xx
910
mcu:RP2040

examples/device/audio_test_freertos/skip.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ mcu:CH32V307
44
mcu:CXD56
55
mcu:F1C100S
66
mcu:GD32VF103
7+
mcu:MCXA15
78
mcu:MKL25ZXX
89
mcu:MSP430x5xx
910
mcu:RP2040

examples/device/cdc_msc_freertos/skip.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ mcu:CH32V307
44
mcu:CXD56
55
mcu:F1C100S
66
mcu:GD32VF103
7+
mcu:MCXA15
78
mcu:MKL25ZXX
89
mcu:MSP430x5xx
910
mcu:RP2040

examples/device/hid_composite_freertos/skip.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ mcu:CH32V307
44
mcu:CXD56
55
mcu:F1C100S
66
mcu:GD32VF103
7+
mcu:MCXA15
78
mcu:MKL25ZXX
89
mcu:MSP430x5xx
910
mcu:RP2040

examples/device/net_lwip_webserver/skip.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ mcu:CH32V20X
33
mcu:LPC11UXX
44
mcu:LPC13XX
55
mcu:LPC15XX
6+
mcu:MCXA15
67
mcu:MSP430x5xx
78
mcu:NUC121
89
mcu:SAMD11
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
mcu:CH32V103
22
mcu:CH32V20X
3+
mcu:MCXA15
34
mcu:MSP430x5xx
45
mcu:NUC121
56
mcu:SAMD11

examples/device/video_capture_2ch/skip.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ mcu:CH32V103
66
mcu:CH32V20X
77
mcu:CH32V307
88
mcu:STM32L0
9+
mcu:MCXA15
910
family:espressif
1011
board:curiosity_nano
1112
board:kuiic

hw/bsp/espressif/boards/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@ set(hw_dir "${CMAKE_CURRENT_LIST_DIR}/../../../")
22

33
idf_component_register(SRCS family.c
44
INCLUDE_DIRS "." ${BOARD} ${hw_dir}
5-
PRIV_REQUIRES "driver"
5+
PRIV_REQUIRES driver usb
66
REQUIRES led_strip src tinyusb_src)
7-
8-
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-error=format)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Apply board specific content here
22
set(IDF_TARGET "esp32")
3+
set(MAX3421_HOST 1)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Apply board specific content here
22
set(IDF_TARGET "esp32s2")
3+
set(MAX3421_HOST 1)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Apply board specific content here
2+
set(IDF_TARGET "esp32s3")
3+
set(MAX3421_HOST 1)
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* The MIT License (MIT)
3+
*
4+
* Copyright (c) 2020, Ha Thach (tinyusb.org)
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in
14+
* all copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
* THE SOFTWARE.
23+
*
24+
* This file is part of the TinyUSB stack.
25+
*/
26+
27+
#ifndef BOARD_H_
28+
#define BOARD_H_
29+
30+
#ifdef __cplusplus
31+
extern "C" {
32+
#endif
33+
34+
#define NEOPIXEL_PIN 33
35+
#define NEOPIXEL_POWER_PIN 21
36+
#define NEOPIXEL_POWER_STATE 1
37+
38+
#define BUTTON_PIN 0
39+
#define BUTTON_STATE_ACTIVE 0
40+
41+
// SPI for USB host shield
42+
#define MAX3421_SPI_HOST SPI2_HOST
43+
#define MAX3421_SCK_PIN 36
44+
#define MAX3421_MOSI_PIN 35
45+
#define MAX3421_MISO_PIN 37
46+
#define MAX3421_CS_PIN 10
47+
#define MAX3421_INTR_PIN 9
48+
49+
#ifdef __cplusplus
50+
}
51+
#endif
52+
53+
#endif /* BOARD_H_ */
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Apply board specific content here
22
set(IDF_TARGET "esp32s2")
3+
set(MAX3421_HOST 1)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Apply board specific content here
22
set(IDF_TARGET "esp32c3")
3+
set(MAX3421_HOST 1)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Apply board specific content here
22
set(IDF_TARGET "esp32c6")
3+
set(MAX3421_HOST 1)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Apply board specific content here
2+
set(IDF_TARGET "esp32p4")
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* The MIT License (MIT)
3+
*
4+
* Copyright (c) 2020, Ha Thach (tinyusb.org)
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in
14+
* all copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
* THE SOFTWARE.
23+
*
24+
* This file is part of the TinyUSB stack.
25+
*/
26+
27+
#ifndef BOARD_H_
28+
#define BOARD_H_
29+
30+
#ifdef __cplusplus
31+
extern "C" {
32+
#endif
33+
34+
// #define NEOPIXEL_PIN 48
35+
36+
#define BUTTON_PIN 0
37+
#define BUTTON_STATE_ACTIVE 0
38+
39+
#ifdef __cplusplus
40+
}
41+
#endif
42+
43+
#endif /* BOARD_H_ */

0 commit comments

Comments
 (0)