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

Fix esp8266 'no network' build of HostTests #2702

Merged
merged 1 commit into from
Jan 10, 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
6 changes: 5 additions & 1 deletion Sming/Arch/Esp8266/Components/esp_no_wifi/component.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ EXTRA_OBJ := extra.o
$(COMPONENT_RULE)$(EXTRA_OBJ): sdk/user_interface.o
$(Q) $(OBJCOPY) \
-j *UND* \
-j .sdk.version.* \
$(addprefix -j .text.,$(NOWIFI_SYMS)) \
$(foreach f,$(NOWIFI_SYMS),--rename-section .text.$f=.iram.text) \
$< $@
Expand All @@ -40,7 +41,10 @@ endef
LIBMAIN_COMMANDS += $(NOWIFI_LIBMAIN_COMMANDS)

LIBDIRS += $(COMPONENT_PATH)
EXTRA_LDFLAGS := -Tno.wifi.ld -u call_user_start_local
EXTRA_LDFLAGS := \
-Tno.wifi.ld \
-u call_user_start_local \
-u SDK_VERSION

##

Expand Down
13 changes: 13 additions & 0 deletions Sming/Arch/Esp8266/Components/esp_no_wifi/user_interface.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <esp_systemapi.h>
#include <spi_flash.h>
#include <eagle_soc.h>
#include <esp8266_peri.h>

bool protect_flag;
bool timer2_ms_flag;
Expand Down Expand Up @@ -337,3 +338,15 @@ int os_printf_plus(const char* format, ...)

return n;
}

const char* system_get_sdk_version()
{
extern char SDK_VERSION[];
return SDK_VERSION;
}

uint32_t system_get_chip_id()
{
// from chip_id() method in esptool.py
return (MAC0 >> 24) | ((MAC1 & 0x00ffffff) << 8);
}
Loading