mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-22 02:29:41 +00:00
ci: run Example_GENERIC for C3
Add support for running example_GENERIC tests for C3 on label. Fix examples that fail.
This commit is contained in:

committed by
Angus Gratton

parent
c270a9f0b9
commit
8efb2bb1ed
@@ -53,20 +53,27 @@ menu "ESP32C3-Specific"
|
||||
default ESP32C3_UNIVERSAL_MAC_ADDRESSES_FOUR
|
||||
help
|
||||
Configure the number of universally administered (by IEEE) MAC addresses.
|
||||
|
||||
During initialization, MAC addresses for each network interface are generated or derived from a
|
||||
single base MAC address.
|
||||
- If the number of universal MAC addresses is Three, all interfaces (WiFi station, WiFi softap
|
||||
and Bluetooth) receive a universally administered MAC address. They are generated sequentially by adding
|
||||
0, 1 and 2 (respectively) to the final octet of the base MAC address. The remaining one interface
|
||||
(Ethernet) receives local MAC addresses which is derived from the universal WiFi softap MAC.
|
||||
- If the number of universal MAC addresses is Two, only two interfaces (WiFi station and Bluetooth)
|
||||
|
||||
If the number of universal MAC addresses is four, all four interfaces (WiFi station, WiFi softap,
|
||||
Bluetooth and Ethernet) receive a universally administered MAC address. These are generated
|
||||
sequentially by adding 0, 1, 2 and 3 (respectively) to the final octet of the base MAC address.
|
||||
|
||||
If the number of universal MAC addresses is two, only two interfaces (WiFi station and Bluetooth)
|
||||
receive a universally administered MAC address. These are generated sequentially by adding 0
|
||||
and 1 (respectively) to the base MAC address. The remaining two interfaces (WiFi softap and Ethernet)
|
||||
receive local MAC addresses. These are derived from the universal WiFi station and Bluetooth MAC
|
||||
addresses, respectively.
|
||||
|
||||
When using the default (Espressif-assigned) base MAC address, either setting can be used. When using
|
||||
a custom universal MAC address range, the correct setting will depend on the allocation of MAC
|
||||
addresses in this range (either 2 or 3 per device.)
|
||||
addresses in this range (either 2 or 4 per device.)
|
||||
|
||||
Note that ESP32-C3 has no integrated Ethernet MAC. Although it's possible to use the esp_read_mac()
|
||||
API to return a MAC for Ethernet, this can only be used with an external MAC peripheral.
|
||||
|
||||
|
||||
config ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO
|
||||
bool "Two"
|
||||
@@ -85,11 +92,6 @@ menu "ESP32C3-Specific"
|
||||
default 2 if ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO
|
||||
default 4 if ESP32C3_UNIVERSAL_MAC_ADDRESSES_FOUR
|
||||
|
||||
config ESP_MAC_ADDR_UNIVERSE_BT_OFFSET
|
||||
int
|
||||
default 2 if ESP32C3_UNIVERSAL_MAC_ADDRESSES_FOUR
|
||||
default 1 if ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO
|
||||
|
||||
config ESP32C3_DEBUG_OCDAWARE
|
||||
bool "Make exception and panic handlers JTAG/OCD aware"
|
||||
default y
|
||||
|
@@ -284,41 +284,39 @@ menu "ESP32S3-Specific"
|
||||
|
||||
choice ESP32S3_UNIVERSAL_MAC_ADDRESSES
|
||||
bool "Number of universally administered (by IEEE) MAC address"
|
||||
default ESP32S3_UNIVERSAL_MAC_ADDRESSES_TWO
|
||||
default ESP32S3_UNIVERSAL_MAC_ADDRESSES_FOUR
|
||||
help
|
||||
Configure the number of universally administered (by IEEE) MAC addresses.
|
||||
During initialization, MAC addresses for each network interface are generated or derived from a
|
||||
single base MAC address.
|
||||
If the number of universal MAC addresses is Two, all interfaces (WiFi station, WiFi softap) receive a
|
||||
universally administered MAC address. They are generated sequentially by adding 0, and 1 (respectively)
|
||||
to the final octet of the base MAC address. If the number of universal MAC addresses is one,
|
||||
only WiFi station receives a universally administered MAC address.
|
||||
It's generated by adding 0 to the base MAC address.
|
||||
The WiFi softap receives local MAC addresses. It's derived from the universal WiFi station MAC addresses.
|
||||
If the number of universal MAC addresses is four, all four interfaces (WiFi station, WiFi softap,
|
||||
Bluetooth and Ethernet) receive a universally administered MAC address. These are generated
|
||||
sequentially by adding 0, 1, 2 and 3 (respectively) to the final octet of the base MAC address.
|
||||
If the number of universal MAC addresses is two, only two interfaces (WiFi station and Bluetooth)
|
||||
receive a universally administered MAC address. These are generated sequentially by adding 0
|
||||
and 1 (respectively) to the base MAC address. The remaining two interfaces (WiFi softap and Ethernet)
|
||||
receive local MAC addresses. These are derived from the universal WiFi station and Bluetooth MAC
|
||||
addresses, respectively.
|
||||
When using the default (Espressif-assigned) base MAC address, either setting can be used. When using
|
||||
a custom universal MAC address range, the correct setting will depend on the allocation of MAC
|
||||
addresses in this range (either 1 or 2 per device.)
|
||||
addresses in this range (either 2 or 4 per device.)
|
||||
|
||||
config ESP32S3_UNIVERSAL_MAC_ADDRESSES_TWO
|
||||
bool "Two"
|
||||
select ESP_MAC_ADDR_UNIVERSE_WIFI_STA
|
||||
select ESP_MAC_ADDR_UNIVERSE_BT
|
||||
config ESP32S3_UNIVERSAL_MAC_ADDRESSES_THREE
|
||||
bool "Three"
|
||||
config ESP32S3_UNIVERSAL_MAC_ADDRESSES_FOUR
|
||||
bool "Four"
|
||||
select ESP_MAC_ADDR_UNIVERSE_WIFI_STA
|
||||
select ESP_MAC_ADDR_UNIVERSE_WIFI_AP
|
||||
select ESP_MAC_ADDR_UNIVERSE_BT
|
||||
select ESP_MAC_ADDR_UNIVERSE_ETH
|
||||
endchoice
|
||||
|
||||
config ESP32S3_UNIVERSAL_MAC_ADDRESSES
|
||||
int
|
||||
default 2 if ESP32S3_UNIVERSAL_MAC_ADDRESSES_TWO
|
||||
default 3 if ESP32S3_UNIVERSAL_MAC_ADDRESSES_THREE
|
||||
|
||||
config ESP_MAC_ADDR_UNIVERSE_BT_OFFSET
|
||||
int
|
||||
default 2 if ESP32S3_UNIVERSAL_MAC_ADDRESSES_THREE
|
||||
default 1 if ESP32S3_UNIVERSAL_MAC_ADDRESSES_TWO
|
||||
default 4 if ESP32S3_UNIVERSAL_MAC_ADDRESSES_FOUR
|
||||
|
||||
config ESP32S3_ULP_COPROC_ENABLED
|
||||
bool "Enable Ultra Low Power (ULP) Coprocessor"
|
||||
|
@@ -295,12 +295,6 @@ menu "Common ESP-related"
|
||||
config ESP_MAC_ADDR_UNIVERSE_BT
|
||||
bool
|
||||
|
||||
config ESP_MAC_ADDR_UNIVERSE_BT_OFFSET
|
||||
int
|
||||
default 2 if ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR
|
||||
default 1 if ESP32_UNIVERSAL_MAC_ADDRESSES_TWO
|
||||
default 1
|
||||
|
||||
config ESP_MAC_ADDR_UNIVERSE_ETH
|
||||
bool
|
||||
|
||||
|
@@ -20,6 +20,14 @@
|
||||
|
||||
/* esp_system.h APIs relating to MAC addresses */
|
||||
|
||||
#if CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR || \
|
||||
CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES_FOUR || \
|
||||
CONFIG_ESP32C3_UNIVERSAL_MAC_ADDRESSES_FOUR
|
||||
#define MAC_ADDR_UNIVERSE_BT_OFFSET 2
|
||||
#else
|
||||
#define MAC_ADDR_UNIVERSE_BT_OFFSET 1
|
||||
#endif
|
||||
|
||||
static const char* TAG = "system_api";
|
||||
|
||||
static uint8_t base_mac_addr[6] = { 0 };
|
||||
@@ -180,7 +188,7 @@ esp_err_t esp_read_mac(uint8_t* mac, esp_mac_type_t type)
|
||||
case ESP_MAC_BT:
|
||||
#if CONFIG_ESP_MAC_ADDR_UNIVERSE_BT
|
||||
memcpy(mac, efuse_mac, 6);
|
||||
mac[5] += CONFIG_ESP_MAC_ADDR_UNIVERSE_BT_OFFSET;
|
||||
mac[5] += MAC_ADDR_UNIVERSE_BT_OFFSET;
|
||||
#endif
|
||||
break;
|
||||
case ESP_MAC_ETH:
|
||||
|
@@ -42,6 +42,8 @@ typedef enum {
|
||||
#define UNIVERSAL_MAC_ADDR_NUM CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES
|
||||
#elif CONFIG_IDF_TARGET_ESP32S2
|
||||
#define UNIVERSAL_MAC_ADDR_NUM CONFIG_ESP32S2_UNIVERSAL_MAC_ADDRESSES
|
||||
#elif CONFIG_IDF_TARGET_ESP32S3
|
||||
#define UNIVERSAL_MAC_ADDR_NUM CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES
|
||||
#elif CONFIG_IDF_TARGET_ESP32C3
|
||||
#define UNIVERSAL_MAC_ADDR_NUM CONFIG_ESP32C3_UNIVERSAL_MAC_ADDRESSES
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user