Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Esp32 build fixes #2836

Merged
merged 5 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Sming/Arch/Esp32/Components/esp32/component.mk
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ endif
ESP32_COMPONENT_PATH := $(COMPONENT_PATH)
SDK_DEFAULT_PATH := $(ESP32_COMPONENT_PATH)/sdk

SDK_PROJECT_PATH := $(ESP32_COMPONENT_PATH)/project/$(ESP_VARIANT)/$(BUILD_TYPE)
SDK_CONFIG_DEFAULTS := $(SDK_PROJECT_PATH)/sdkconfig.defaults

SDKCONFIG_MAKEFILE := $(SDK_PROJECT_PATH)/sdkconfig
ifeq ($(MAKE_DOCS),)
-include $(SDKCONFIG_MAKEFILE)
endif
export SDKCONFIG_MAKEFILE # sub-makes (like bootloader) will reuse this path

ifdef IDF_VERSION_52
GLOBAL_CFLAGS += \
-DSOC_XTAL_FREQ_MHZ=CONFIG_XTAL_FREQ \
Expand Down Expand Up @@ -413,15 +422,6 @@ EXTRA_LDFLAGS += \
-T sections.ld
endif

SDK_PROJECT_PATH := $(ESP32_COMPONENT_PATH)/project/$(ESP_VARIANT)/$(BUILD_TYPE)
SDK_CONFIG_DEFAULTS := $(SDK_PROJECT_PATH)/sdkconfig.defaults

SDKCONFIG_MAKEFILE := $(SDK_PROJECT_PATH)/sdkconfig
ifeq ($(MAKE_DOCS),)
-include $(SDKCONFIG_MAKEFILE)
endif
export SDKCONFIG_MAKEFILE # sub-makes (like bootloader) will reuse this path

FLASH_BOOT_LOADER := $(SDK_BUILD_BASE)/bootloader/bootloader.bin
FLASH_BOOT_CHUNKS := $(CONFIG_BOOTLOADER_OFFSET_IN_FLASH)=$(FLASH_BOOT_LOADER)

Expand Down
5 changes: 5 additions & 0 deletions Sming/Arch/Esp32/Components/esp32/sdk/config/common
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ CONFIG_ETH_USE_SPI_ETHERNET=y
CONFIG_ETH_SPI_ETHERNET_W5500=y
CONFIG_ETH_SPI_ETHERNET_DM9051=y

# WiFi
CONFIG_ESP_WIFI_ENABLE_WPA3_SAE=n
CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA=n
CONFIG_ESP_WIFI_SOFTAP_SAW_SUPPORT=n

# Bluetooth
CONFIG_BT_ENABLED=y
CONFIG_BT_BLUEDROID_ENABLED=n
Expand Down
3 changes: 3 additions & 0 deletions Sming/Arch/Esp32/Components/esp32/sdk/esp_system.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ endif
# linker will ignore panic_highint_hdl.S as it has no other files depending on any
# symbols in it.
SDK_UNDEF_SYMBOLS += ld_include_panic_highint_hdl

# IDF 5.2
SDK_WRAP_SYMBOLS += esp_newlib_init_global_stdio
4 changes: 4 additions & 0 deletions Sming/Arch/Esp32/Components/esp32/src/startup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ void main(void*)

} // namespace

extern "C" void __wrap_esp_newlib_init_global_stdio(const char*)
{
}

extern void sming_create_task(TaskFunction_t);

extern "C" void app_main(void)
Expand Down
1 change: 1 addition & 0 deletions Sming/Arch/Esp32/Components/esp32/src/system.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <esp_system.h>
#include <sys/time.h>
#include <esp_timer.h>
#include <esp_task_wdt.h>
#include <sming_attr.h>
#include <string.h>
Expand Down
18 changes: 13 additions & 5 deletions Tools/ci/scanlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ def __next__(self):


def scan_log(filename: str):
BUILD_PREFIX = 'Building /home/runner/'
IGNORE_PREFIX = ['projects/', 'work/Sming/Sming/Sming/']
state = State.searching
table = Table(os.path.basename(filename))
target = None
Expand All @@ -97,10 +99,15 @@ def scan_log(filename: str):
dtstr, _, line = line.strip().partition(' ')
if not dtstr:
continue
_, sep, c = line.partition('** Building ')
if sep:
target, _, _ = c.partition(' ')
target = target.removeprefix('/home/runner/projects/')
if state == State.searching:
if not line.startswith(BUILD_PREFIX):
continue
if 'clib-App' not in line:
continue
c = line[len(BUILD_PREFIX):]
for prefix in IGNORE_PREFIX:
c = c.removeprefix(prefix)
target, _, _ = c.partition('/out/')
row = {
'target': target
}
Expand All @@ -121,7 +128,8 @@ def scan_log(filename: str):
elif ' : ' in line:
k, v = line.split(':')
else:
table.append(row)
if len(row) > 1: # Not just target (discard host builds)
table.append(row)
row = None
state = State.searching
continue
Expand Down
Loading