Skip to content

Commit 54bf263

Browse files
committed
IDF release/v4.4 f546d5e493
1 parent cbe8a7e commit 54bf263

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+850
-30
lines changed

platform.txt

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

tools/platformio-build-esp32.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@
303303
"UNITY_INCLUDE_CONFIG_H",
304304
"WITH_POSIX",
305305
"_GNU_SOURCE",
306-
("IDF_VER", '\\"v4.4-rc1-8-g0b46ac1732\\"'),
306+
("IDF_VER", '\\"v4.4-22-gf546d5e493\\"'),
307307
"ESP_PLATFORM",
308308
"_POSIX_READER_WRITER_LOCKS",
309309
"ARDUINO_ARCH_ESP32",

tools/platformio-build-esp32c3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@
293293
"UNITY_INCLUDE_CONFIG_H",
294294
"WITH_POSIX",
295295
"_GNU_SOURCE",
296-
("IDF_VER", '\\"v4.4-rc1-8-g0b46ac1732\\"'),
296+
("IDF_VER", '\\"v4.4-22-gf546d5e493\\"'),
297297
"ESP_PLATFORM",
298298
"_POSIX_READER_WRITER_LOCKS",
299299
"ARDUINO_ARCH_ESP32",

tools/platformio-build-esp32s2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@
290290
"UNITY_INCLUDE_CONFIG_H",
291291
"WITH_POSIX",
292292
"_GNU_SOURCE",
293-
("IDF_VER", '\\"v4.4-rc1-8-g0b46ac1732\\"'),
293+
("IDF_VER", '\\"v4.4-22-gf546d5e493\\"'),
294294
"ESP_PLATFORM",
295295
"_POSIX_READER_WRITER_LOCKS",
296296
"ARDUINO_ARCH_ESP32",

tools/sdk/esp32/include/config/sdkconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,5 +681,5 @@
681681
#define CONFIG_ULP_COPROC_RESERVE_MEM CONFIG_ESP32_ULP_COPROC_RESERVE_MEM
682682
#define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS
683683
#define CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP
684-
#define CONFIG_ARDUINO_IDF_COMMIT "0b46ac1732"
684+
#define CONFIG_ARDUINO_IDF_COMMIT "f546d5e493"
685685
#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4"

tools/sdk/esp32/include/freertos/include/freertos/projdefs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ typedef void (* TaskFunction_t)( void * );
4141
#endif
4242
#ifdef ESP_PLATFORM
4343
#ifndef pdTICKS_TO_MS
44-
#define pdTICKS_TO_MS( xTicks ) ( ( uint32_t ) ( xTicks ) * 1000 / configTICK_RATE_HZ )
44+
#define pdTICKS_TO_MS( xTicks ) ( ( TickType_t ) ( ( uint64_t ) ( xTicks ) * 1000 / configTICK_RATE_HZ ) )
4545
#endif
4646
#endif // ESP_PLATFORM
4747

tools/sdk/esp32/lib/libapp_update.a

0 Bytes
Binary file not shown.
236 Bytes
Binary file not shown.
556 Bytes
Binary file not shown.
868 Bytes
Binary file not shown.

tools/sdk/esp32/lib/libesp_littlefs.a

4 Bytes
Binary file not shown.
380 Bytes
Binary file not shown.

tools/sdk/esp32/lib/libesp_system.a

-104 Bytes
Binary file not shown.

tools/sdk/esp32/lib/libmdns.a

0 Bytes
Binary file not shown.
760 Bytes
Binary file not shown.

tools/sdk/esp32c3/include/config/sdkconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,5 +632,5 @@
632632
#define CONFIG_TIMER_TASK_STACK_SIZE CONFIG_ESP_TIMER_TASK_STACK_SIZE
633633
#define CONFIG_TOOLPREFIX CONFIG_SDK_TOOLPREFIX
634634
#define CONFIG_UDP_RECVMBOX_SIZE CONFIG_LWIP_UDP_RECVMBOX_SIZE
635-
#define CONFIG_ARDUINO_IDF_COMMIT "0b46ac1732"
635+
#define CONFIG_ARDUINO_IDF_COMMIT "f546d5e493"
636636
#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4"

tools/sdk/esp32c3/include/freertos/include/freertos/projdefs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ typedef void (* TaskFunction_t)( void * );
4141
#endif
4242
#ifdef ESP_PLATFORM
4343
#ifndef pdTICKS_TO_MS
44-
#define pdTICKS_TO_MS( xTicks ) ( ( uint32_t ) ( xTicks ) * 1000 / configTICK_RATE_HZ )
44+
#define pdTICKS_TO_MS( xTicks ) ( ( TickType_t ) ( ( uint64_t ) ( xTicks ) * 1000 / configTICK_RATE_HZ ) )
4545
#endif
4646
#endif // ESP_PLATFORM
4747

tools/sdk/esp32c3/include/soc/esp32c3/include/soc/efuse_reg.h

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
1-
// Copyright 2020 Espressif Systems (Shanghai) PTE LTD
2-
//
3-
// Licensed under the Apache License, Version 2.0 (the "License");
4-
// you may not use this file except in compliance with the License.
5-
// You may obtain a copy of the License at
6-
//
7-
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
9-
// Unless required by applicable law or agreed to in writing, software
10-
// distributed under the License is distributed on an "AS IS" BASIS,
11-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
// See the License for the specific language governing permissions and
13-
// limitations under the License.
1+
/*
2+
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
146
#ifndef _SOC_EFUSE_REG_H_
157
#define _SOC_EFUSE_REG_H_
168

@@ -1867,6 +1859,9 @@ extern "C" {
18671859
#define EFUSE_OP_CODE_V 0xFFFF
18681860
#define EFUSE_OP_CODE_S 0
18691861

1862+
#define EFUSE_WRITE_OP_CODE 0x5a5a
1863+
#define EFUSE_READ_OP_CODE 0x5aa5
1864+
18701865
#define EFUSE_STATUS_REG (DR_REG_EFUSE_BASE + 0x1D0)
18711866
/* EFUSE_REPEAT_ERR_CNT : RO ;bitpos:[17:10] ;default: 8'h0 ; */
18721867
/*description: Indicates the number of error bits during programming BLOCK0.*/

tools/sdk/esp32c3/lib/libapp_update.a

0 Bytes
Binary file not shown.
1.17 KB
Binary file not shown.

tools/sdk/esp32c3/lib/libefuse.a

2.52 KB
Binary file not shown.
992 Bytes
Binary file not shown.
1.44 KB
Binary file not shown.
4 Bytes
Binary file not shown.
208 Bytes
Binary file not shown.

tools/sdk/esp32c3/lib/libesp_system.a

-4 Bytes
Binary file not shown.

tools/sdk/esp32c3/lib/libmdns.a

0 Bytes
Binary file not shown.
1.45 KB
Binary file not shown.

tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_compiler.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,11 @@
137137
#define TU_BSWAP16(u16) (__builtin_bswap16(u16))
138138
#define TU_BSWAP32(u32) (__builtin_bswap32(u32))
139139

140+
#ifndef __ARMCC_VERSION
140141
// List of obsolete callback function that is renamed and should not be defined.
141142
// Put it here since only gcc support this pragma
142-
#pragma GCC poison tud_vendor_control_request_cb
143+
#pragma GCC poison tud_vendor_control_request_cb
144+
#endif
143145

144146
#elif defined(__TI_COMPILER_VERSION__)
145147
#define TU_ATTR_ALIGNED(Bytes) __attribute__ ((aligned(Bytes)))

tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/device/dcd.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ typedef struct TU_ATTR_ALIGNED(4)
106106
void dcd_init (uint8_t rhport);
107107

108108
// Interrupt Handler
109-
#if __GNUC__
109+
#if __GNUC__ && !defined(__ARMCC_VERSION)
110110
#pragma GCC diagnostic push
111111
#pragma GCC diagnostic ignored "-Wredundant-decls"
112112
#endif
113113
void dcd_int_handler(uint8_t rhport);
114-
#if __GNUC__
114+
#if __GNUC__ && !defined(__ARMCC_VERSION)
115115
#pragma GCC diagnostic pop
116116
#endif
117117

tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/device/dcd_attr.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@
208208
#elif TU_CHECK_MCU(OPT_MCU_FT93X)
209209
#define DCD_ATTR_ENDPOINT_MAX 16
210210

211+
//------------ Allwinner -------------//
212+
#elif TU_CHECK_MCU(OPT_MCU_F1C100S)
213+
#define DCD_ATTR_ENDPOINT_MAX 4
214+
211215
#else
212216
#warning "DCD_ATTR_ENDPOINT_MAX is not defined for this MCU, default to 8"
213217
#define DCD_ATTR_ENDPOINT_MAX 8

tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/osal/osal.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ typedef void (*osal_task_func_t)( void * );
5757
#include "osal_pico.h"
5858
#elif CFG_TUSB_OS == OPT_OS_RTTHREAD
5959
#include "osal_rtthread.h"
60+
#elif CFG_TUSB_OS == OPT_OS_RTX4
61+
#include "osal_rtx4.h"
6062
#elif CFG_TUSB_OS == OPT_OS_CUSTOM
6163
#include "tusb_os_custom.h" // implemented by application
6264
#else
@@ -67,7 +69,7 @@ typedef void (*osal_task_func_t)( void * );
6769
// OSAL Porting API
6870
//--------------------------------------------------------------------+
6971

70-
#if __GNUC__
72+
#if __GNUC__ && !defined(__ARMCC_VERSION)
7173
#pragma GCC diagnostic push
7274
#pragma GCC diagnostic ignored "-Wredundant-decls"
7375
#endif
@@ -88,7 +90,7 @@ static inline osal_queue_t osal_queue_create(osal_queue_def_t* qdef);
8890
static inline bool osal_queue_receive(osal_queue_t qhdl, void* data);
8991
static inline bool osal_queue_send(osal_queue_t qhdl, void const * data, bool in_isr);
9092
static inline bool osal_queue_empty(osal_queue_t qhdl);
91-
#if __GNUC__
93+
#if __GNUC__ && !defined(__ARMCC_VERSION)
9294
#pragma GCC diagnostic pop
9395
#endif
9496

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
/*
2+
* The MIT License (MIT)
3+
*
4+
* Copyright (c) 2021 Tian Yunhao (t123yh)
5+
* Copyright (c) 2019 Ha Thach (tinyusb.org)
6+
*
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in
15+
* all copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23+
* THE SOFTWARE.
24+
*
25+
* This file is part of the TinyUSB stack.
26+
*/
27+
28+
#ifndef _TUSB_OSAL_RTX4_H_
29+
#define _TUSB_OSAL_RTX4_H_
30+
31+
#include <rtl.h>
32+
33+
#ifdef __cplusplus
34+
extern "C" {
35+
#endif
36+
37+
//--------------------------------------------------------------------+
38+
// TASK API
39+
//--------------------------------------------------------------------+
40+
static inline void osal_task_delay(uint32_t msec)
41+
{
42+
uint16_t hi = msec >> 16;
43+
uint16_t lo = msec;
44+
while (hi--) {
45+
os_dly_wait(0xFFFE);
46+
}
47+
os_dly_wait(lo);
48+
}
49+
50+
static inline uint16_t msec2wait(uint32_t msec) {
51+
if (msec == OSAL_TIMEOUT_WAIT_FOREVER)
52+
return 0xFFFF;
53+
else if (msec >= 0xFFFE)
54+
return 0xFFFE;
55+
else
56+
return msec;
57+
}
58+
59+
//--------------------------------------------------------------------+
60+
// Semaphore API
61+
//--------------------------------------------------------------------+
62+
typedef OS_SEM osal_semaphore_def_t;
63+
typedef OS_ID osal_semaphore_t;
64+
65+
static inline OS_ID osal_semaphore_create(osal_semaphore_def_t* semdef) {
66+
os_sem_init(semdef, 0);
67+
return semdef;
68+
}
69+
70+
static inline bool osal_semaphore_post(osal_semaphore_t sem_hdl, bool in_isr) {
71+
if ( !in_isr ) {
72+
os_sem_send(sem_hdl);
73+
} else {
74+
isr_sem_send(sem_hdl);
75+
}
76+
return true;
77+
}
78+
79+
static inline bool osal_semaphore_wait (osal_semaphore_t sem_hdl, uint32_t msec) {
80+
return os_sem_wait(sem_hdl, msec2wait(msec)) != OS_R_TMO;
81+
}
82+
83+
static inline void osal_semaphore_reset(osal_semaphore_t const sem_hdl) {
84+
// TODO: implement
85+
}
86+
87+
//--------------------------------------------------------------------+
88+
// MUTEX API (priority inheritance)
89+
//--------------------------------------------------------------------+
90+
typedef OS_MUT osal_mutex_def_t;
91+
typedef OS_ID osal_mutex_t;
92+
93+
static inline osal_mutex_t osal_mutex_create(osal_mutex_def_t* mdef)
94+
{
95+
os_mut_init(mdef);
96+
return mdef;
97+
}
98+
99+
static inline bool osal_mutex_lock (osal_mutex_t mutex_hdl, uint32_t msec)
100+
{
101+
return os_mut_wait(mutex_hdl, msec2wait(msec)) != OS_R_TMO;
102+
}
103+
104+
static inline bool osal_mutex_unlock(osal_mutex_t mutex_hdl)
105+
{
106+
return os_mut_release(mutex_hdl) == OS_R_OK;
107+
}
108+
109+
//--------------------------------------------------------------------+
110+
// QUEUE API
111+
//--------------------------------------------------------------------+
112+
113+
// role device/host is used by OS NONE for mutex (disable usb isr) only
114+
#define OSAL_QUEUE_DEF(_role, _name, _depth, _type) \
115+
os_mbx_declare(_name##__mbox, _depth); \
116+
_declare_box(_name##__pool, sizeof(_type), _depth); \
117+
osal_queue_def_t _name = { .depth = _depth, .item_sz = sizeof(_type), .pool = _name##__pool, .mbox = _name##__mbox };
118+
119+
120+
typedef struct
121+
{
122+
uint16_t depth;
123+
uint16_t item_sz;
124+
U32* pool;
125+
U32* mbox;
126+
}osal_queue_def_t;
127+
128+
typedef osal_queue_def_t* osal_queue_t;
129+
130+
static inline osal_queue_t osal_queue_create(osal_queue_def_t* qdef)
131+
{
132+
os_mbx_init(qdef->mbox, (qdef->depth + 4) * 4);
133+
_init_box(qdef->pool, ((qdef->item_sz+3)/4)*(qdef->depth) + 3, qdef->item_sz);
134+
return qdef;
135+
}
136+
137+
static inline bool osal_queue_receive(osal_queue_t qhdl, void* data)
138+
{
139+
void* buf;
140+
os_mbx_wait(qhdl->mbox, &buf, 0xFFFF);
141+
memcpy(data, buf, qhdl->item_sz);
142+
_free_box(qhdl->pool, buf);
143+
return true;
144+
}
145+
146+
static inline bool osal_queue_send(osal_queue_t qhdl, void const * data, bool in_isr)
147+
{
148+
void* buf = _alloc_box(qhdl->pool);
149+
memcpy(buf, data, qhdl->item_sz);
150+
if ( !in_isr )
151+
{
152+
os_mbx_send(qhdl->mbox, buf, 0xFFFF);
153+
}
154+
else
155+
{
156+
isr_mbx_send(qhdl->mbox, buf);
157+
}
158+
return true;
159+
}
160+
161+
static inline bool osal_queue_empty(osal_queue_t qhdl)
162+
{
163+
return os_mbx_check(qhdl->mbox) == qhdl->depth;
164+
}
165+
166+
#ifdef __cplusplus
167+
}
168+
#endif
169+
170+
#endif /* _TUSB_OSAL_FREERTOS_H_ */

0 commit comments

Comments
 (0)