forked from emfcamp/TiDAL-Firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmicropython.diff
58 lines (52 loc) · 1.71 KB
/
micropython.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
diff --git a/ports/esp32/CMakeLists.txt b/ports/esp32/CMakeLists.txt
index 8b2f09a72..bc4af823a 100644
--- a/ports/esp32/CMakeLists.txt
+++ b/ports/esp32/CMakeLists.txt
@@ -18,6 +18,10 @@ if(NOT EXISTS ${MICROPY_BOARD_DIR}/mpconfigboard.cmake)
message(FATAL_ERROR "Invalid MICROPY_BOARD specified: ${MICROPY_BOARD}")
endif()
+
+set(IDF_TARGET esp32s3)
+include($ENV{IOT_SOLUTION_PATH}/component.cmake)
+
# Include main IDF cmake file.
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
diff --git a/ports/esp32/main.c b/ports/esp32/main.c
index a1c27c0a2..56b145478 100644
--- a/ports/esp32/main.c
+++ b/ports/esp32/main.c
@@ -95,6 +95,7 @@ void mp_task(void *pvParameter) {
#else
uart_stdout_init();
#endif
+
machine_init();
size_t mp_task_heap_size;
diff --git a/ports/esp32/mphalport.c b/ports/esp32/mphalport.c
index 41e6e6ec0..085af7441 100644
--- a/ports/esp32/mphalport.c
+++ b/ports/esp32/mphalport.c
@@ -107,13 +107,7 @@ void mp_hal_stdout_tx_strn(const char *str, size_t len) {
if (release_gil) {
MP_THREAD_GIL_EXIT();
}
- #if CONFIG_USB_ENABLED
usb_tx_strn(str, len);
- #elif CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG
- usb_serial_jtag_tx_strn(str, len);
- #else
- uart_stdout_tx_strn(str, len);
- #endif
if (release_gil) {
MP_THREAD_GIL_ENTER();
}
diff --git a/ports/esp32/usb.c b/ports/esp32/usb.c
index 5a613d244..b1047c230 100644
--- a/ports/esp32/usb.c
+++ b/ports/esp32/usb.c
@@ -35,7 +35,7 @@
#define CDC_ITF TINYUSB_CDC_ACM_0
-static uint8_t usb_rx_buf[CONFIG_USB_CDC_RX_BUFSIZE];
+static uint8_t usb_rx_buf[CONFIG_TINYUSB_CDC_RX_BUFSIZE];
static uint8_t usb_cdc_connected;
static void usb_callback_rx(int itf, cdcacm_event_t *event) {