Skip to content

Commit 4b00b10

Browse files
authored
Merge pull request #82 from espressif/release/v4.4
update 06072022
2 parents 4c3d922 + c9140ca commit 4b00b10

File tree

155 files changed

+3926
-3110
lines changed

Some content is hidden

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

155 files changed

+3926
-3110
lines changed

CMakeLists.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@ if(CMAKE_CURRENT_LIST_DIR STREQUAL CMAKE_SOURCE_DIR)
77
"again.")
88
endif()
99

10-
unset(compile_options)
11-
unset(c_compile_options)
12-
unset(cxx_compile_options)
13-
unset(compile_definitions)
14-
unset(link_options)
10+
# Variables compile_options, c_compile_options, cxx_compile_options, compile_definitions, link_options shall
11+
# not be unset as they may already contain flags, set by toolchain-TARGET.cmake files.
1512

1613
# Add the following build specifications here, since these seem to be dependent
1714
# on config values on the root Kconfig.
@@ -184,6 +181,7 @@ endif()
184181
idf_build_set_property(COMPILE_OPTIONS "${compile_options}" APPEND)
185182
idf_build_set_property(C_COMPILE_OPTIONS "${c_compile_options}" APPEND)
186183
idf_build_set_property(CXX_COMPILE_OPTIONS "${cxx_compile_options}" APPEND)
184+
idf_build_set_property(ASM_COMPILE_OPTIONS "${asm_compile_options}" APPEND)
187185
idf_build_set_property(COMPILE_DEFINITIONS "${compile_definitions}" APPEND)
188186
idf_build_set_property(LINK_OPTIONS "${link_options}" APPEND)
189187

components/app_trace/linker.lf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ archive: libapp_trace.a
33
entries:
44
app_trace (noflash)
55
app_trace_util (noflash)
6+
if APPTRACE_MEMBUFS_APPTRACE_PROTO_ENABLE:
7+
app_trace_membufs_proto (noflash)
8+
if APPTRACE_DEST_JTAG = y:
9+
port (noflash)
610
if APPTRACE_SV_ENABLE = y:
711
SEGGER_SYSVIEW (noflash)
812
SEGGER_RTT_esp (noflash)

components/bootloader/subproject/main/ld/esp32s3/bootloader.ld

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,51 @@
11
/** Simplified memory map for the bootloader.
22
* Make sure the bootloader can load into main memory without overwriting itself.
3-
* We put 2nd bootloader in the high address space (before ROM stack/data/bss).
4-
* See memory usage for ROM bootloader at the end of this file.
3+
*
4+
* ESP32-S3 ROM static data usage is as follows:
5+
* - 0x3fcd7e00 - 0x3fce9704: Shared buffers, used in UART/USB/SPI download mode only
6+
* - 0x3fce9710 - 0x3fceb710: PRO CPU stack, can be reclaimed as heap after RTOS startup
7+
* - 0x3fceb710 - 0x3fced710: APP CPU stack, can be reclaimed as heap after RTOS startup
8+
* - 0x3fced710 - 0x3fcf0000: ROM .bss and .data (not easily reclaimable)
9+
*
10+
* The 2nd stage bootloader can take space up to the end of ROM shared
11+
* buffers area (0x3fce9704). For alignment purpose we shall use value (0x3fce9700).
512
*/
613

14+
/* The offset between Dbus and Ibus. Used to convert between 0x403xxxxx and 0x3fcxxxxx addresses. */
15+
iram_dram_offset = 0x6f0000;
16+
17+
/* We consider 0x3fce9700 to be the last usable address for 2nd stage bootloader stack overhead, dram_seg,
18+
* and work out iram_seg and iram_loader_seg addresses from there, backwards.
19+
*/
20+
21+
/* These lengths can be adjusted, if necessary: */
22+
bootloader_usable_dram_end = 0x3fce9700;
23+
bootloader_stack_overhead = 0x2000; /* For safety margin between bootloader data section and startup stacks */
24+
bootloader_dram_seg_len = 0x4000;
25+
bootloader_iram_loader_seg_len = 0x7000;
26+
bootloader_iram_seg_len = 0x3000;
27+
28+
/* Start of the lower region is determined by region size and the end of the higher region */
29+
bootloader_dram_seg_end = bootloader_usable_dram_end - bootloader_stack_overhead;
30+
bootloader_dram_seg_start = bootloader_dram_seg_end - bootloader_dram_seg_len;
31+
bootloader_iram_loader_seg_start = bootloader_dram_seg_start - bootloader_iram_loader_seg_len + iram_dram_offset;
32+
bootloader_iram_seg_start = bootloader_iram_loader_seg_start - bootloader_iram_seg_len;
33+
734
MEMORY
835
{
9-
iram_seg (RWX) : org = 0x403B6000, len = 0x4000
10-
iram_loader_seg (RWX) : org = 0x403BA000, len = 0x6000
11-
dram_seg (RW) : org = 0x3FCD0000, len = 0x4000
36+
iram_seg (RWX) : org = bootloader_iram_seg_start, len = bootloader_iram_seg_len
37+
iram_loader_seg (RWX) : org = bootloader_iram_loader_seg_start, len = bootloader_iram_loader_seg_len
38+
dram_seg (RW) : org = bootloader_dram_seg_start, len = bootloader_dram_seg_len
1239
}
1340

41+
/* The app may use RAM for static allocations up to the start of iram_loader_seg.
42+
* If you have changed something above and this assert fails:
43+
* 1. Check what the new value of bootloader_iram_loader_seg start is.
44+
* 2. Update the value in this assert.
45+
* 3. Update SRAM_IRAM_END in components/esp_system/ld/esp32s3/memory.ld.in to the same value.
46+
*/
47+
ASSERT(bootloader_iram_loader_seg_start == 0x403cc700, "bootloader_iram_loader_seg_start inconsistent with SRAM_IRAM_END");
48+
1449
/* Default entry point: */
1550
ENTRY(call_start_cpu0);
1651

@@ -172,28 +207,3 @@ SECTIONS
172207
} > iram_seg
173208

174209
}
175-
176-
177-
/**
178-
* Appendix: Memory Usage of ROM bootloader
179-
*
180-
* +--------+--------------+------+ 0x3FCD_8000
181-
* | ^ |
182-
* | | |
183-
* | | data/bss |
184-
* | | |
185-
* | v |
186-
* +------------------------------+ 0x3FCE_9910
187-
* | ^ |
188-
* | | |
189-
* | | stack (pro) |
190-
* | | |
191-
* | v |
192-
* +------------------------------+ 0x3FCE_B910
193-
* | ^ |
194-
* | | |
195-
* | | stack (app) |
196-
* | | |
197-
* | v |
198-
* +--------+--------------+------+ 0x3FCE_D910
199-
*/

components/bootloader_support/src/esp_image_format.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,11 @@ esp_err_t bootloader_load_image(const esp_partition_pos_t *part, esp_image_metad
250250
#if CONFIG_BOOTLOADER_SKIP_VALIDATE_ALWAYS
251251
mode = ESP_IMAGE_LOAD_NO_VALIDATE;
252252
#elif CONFIG_BOOTLOADER_SKIP_VALIDATE_ON_POWER_ON
253-
if (esp_rom_get_reset_reason(0) == RESET_REASON_CHIP_POWER_ON) {
253+
if (esp_rom_get_reset_reason(0) == RESET_REASON_CHIP_POWER_ON
254+
#if SOC_EFUSE_HAS_EFUSE_RST_BUG
255+
|| esp_rom_get_reset_reason(0) == RESET_REASON_CORE_EFUSE_CRC
256+
#endif
257+
) {
254258
mode = ESP_IMAGE_LOAD_NO_VALIDATE;
255259
}
256260
#endif // CONFIG_BOOTLOADER_SKIP_...

components/bt/esp_ble_mesh/Kconfig.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,13 @@ if BLE_MESH
10941094
lets the state to be changed at any time.
10951095
If IV Update test mode is going to be used, this option should be enabled.
10961096

1097+
config BLE_MESH_DISCARD_OLD_SEQ_AUTH
1098+
bool
1099+
default y
1100+
help
1101+
This option is used to decide whether discarding the old SeqAuth when
1102+
receiving a segmented message.
1103+
10971104
menu "BLE Mesh specific test option"
10981105

10991106
config BLE_MESH_SELF_TEST

components/bt/esp_ble_mesh/mesh_core/proxy_server.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,7 @@ static struct bt_mesh_proxy_client {
9292
#endif
9393
struct k_delayed_work sar_timer;
9494
struct net_buf_simple buf;
95-
} clients[BLE_MESH_MAX_CONN] = {
96-
[0 ... (BLE_MESH_MAX_CONN - 1)] = {
97-
#if defined(CONFIG_BLE_MESH_GATT_PROXY_SERVER)
98-
.send_beacons = _K_WORK_INITIALIZER(proxy_send_beacons),
99-
#endif
100-
},
101-
};
95+
} clients[BLE_MESH_MAX_CONN];
10296

10397
static uint8_t client_buf_data[CLIENT_BUF_SIZE * BLE_MESH_MAX_CONN];
10498

@@ -1459,7 +1453,9 @@ int bt_mesh_proxy_server_init(void)
14591453

14601454
client->buf.size = CLIENT_BUF_SIZE;
14611455
client->buf.__buf = client_buf_data + (i * CLIENT_BUF_SIZE);
1462-
1456+
#if defined(CONFIG_BLE_MESH_GATT_PROXY_SERVER)
1457+
k_work_init(&client->send_beacons, proxy_send_beacons);
1458+
#endif
14631459
k_delayed_work_init(&client->sar_timer, proxy_sar_timeout);
14641460
}
14651461

components/bt/esp_ble_mesh/mesh_core/transport.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,13 +1396,14 @@ static struct seg_rx *seg_rx_find(struct bt_mesh_net_rx *net_rx,
13961396
continue;
13971397
}
13981398

1399-
/* Return newer RX context in addition to an exact match, so
1400-
* the calling function can properly discard an old SeqAuth.
1401-
* Note: in Zephyr v1.14.0, ">=" is used here which does not
1402-
* seem to be a right operation, hence we still use the original
1403-
* "==" here.
1399+
/* When ">=" is used, return newer RX context in addition to an exact match,
1400+
* so the calling function can properly discard an old SeqAuth.
14041401
*/
1402+
#if CONFIG_BLE_MESH_DISCARD_OLD_SEQ_AUTH
1403+
if (rx->seq_auth >= *seq_auth) {
1404+
#else
14051405
if (rx->seq_auth == *seq_auth) {
1406+
#endif
14061407
return rx;
14071408
}
14081409

components/bt/host/bluedroid/api/include/api/esp_hf_ag_api.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ extern "C" {
3434
#define ESP_HF_PEER_FEAT_ECC 0x80 /* Enhanced Call Control */
3535
#define ESP_HF_PEER_FEAT_EXTERR 0x100 /* Extended error codes */
3636
#define ESP_HF_PEER_FEAT_CODEC 0x200 /* Codec Negotiation */
37+
/* HFP 1.7+ */
38+
#define ESP_HF_PEER_FEAT_HF_IND 0x400 /* HF Indicators */
39+
#define ESP_HF_PEER_FEAT_ESCO_S4 0x800 /* eSCO S4 Setting Supported */
40+
3741

3842
/* CHLD feature masks of HF AG */
3943
#define ESP_HF_CHLD_FEAT_REL 0x01 /* 0 Release waiting call or held calls */

components/bt/host/bluedroid/bta/hf_ag/bta_ag_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ const tBTA_AG_ST_TBL bta_ag_st_tbl[] =
272272
/*****************************************************************************
273273
** Global data
274274
*****************************************************************************/
275-
const char *bta_ag_version = "1.6";
275+
const uint16_t bta_ag_version = HFP_VERSION_1_7;
276276
/* AG control block */
277277
#if BTA_DYNAMIC_MEMORY == FALSE
278278
tBTA_AG_CB bta_ag_cb;
@@ -758,7 +758,7 @@ static void bta_ag_api_enable(tBTA_AG_DATA *p_data)
758758
bta_ag_cb.p_cback = p_data->api_enable.p_cback;
759759
bta_ag_cb.parse_mode = p_data->api_enable.parse_mode;
760760
/* check if mSBC support enabled */
761-
if (strcmp(bta_ag_version, "1.6") == 0) {
761+
if (bta_ag_version >= HFP_VERSION_1_6) {
762762
bta_ag_cb.msbc_enabled = TRUE;
763763
bta_ag_cb.scb->negotiated_codec = BTM_SCO_CODEC_MSBC;
764764
} else{

0 commit comments

Comments
 (0)