diff --git a/tools/sdk/include/user_interface.h b/tools/sdk/include/user_interface.h index 314c24d025..f80d9c057d 100644 --- a/tools/sdk/include/user_interface.h +++ b/tools/sdk/include/user_interface.h @@ -729,8 +729,8 @@ typedef struct { * * @param wifi_country_t *country: the configured country info * - * @return 0 : succeed - * @return -1 : fail + * @return true : succeed + * @return false : fail */ bool wifi_set_country(wifi_country_t *country); @@ -739,8 +739,8 @@ bool wifi_set_country(wifi_country_t *country); * * @param wifi_country_t *country: country info * - * @return 0 : succeed - * @return -1 : fail + * @return true : succeed + * @return false : fail */ bool wifi_get_country(wifi_country_t *country); diff --git a/tools/sdk/lib/README.md b/tools/sdk/lib/README.md index 8d1fd141a5..6b92d04307 100644 --- a/tools/sdk/lib/README.md +++ b/tools/sdk/lib/README.md @@ -1,25 +1,7 @@ ## Updating SDK libraries -After updating SDK libraries to a new version, do the following changes. - - -Remove mem_manager.o from libmain.a to use custom heap implementation, and time.o to fix redefinition of time-related functions: - -```bash -xtensa-lx106-elf-ar -d libmain.a mem_manager.o -xtensa-lx106-elf-ar -d libmain.a time.o -``` - -Rename `hostname` and `default_hostname` symbols: - -```bash -xtensa-lx106-elf-ar x libmain.a eagle_lwip_if.o user_interface.o -xtensa-lx106-elf-objcopy --redefine-sym hostname=wifi_station_hostname user_interface.o -xtensa-lx106-elf-objcopy --redefine-sym hostname=wifi_station_hostname eagle_lwip_if.o -xtensa-lx106-elf-objcopy --redefine-sym default_hostname=wifi_station_default_hostname user_interface.o -xtensa-lx106-elf-objcopy --redefine-sym default_hostname=wifi_station_default_hostname eagle_lwip_if.o -xtensa-lx106-elf-ar r libmain.a eagle_lwip_if.o user_interface.o -``` +- Copy .a files from SDK `lib` directory to this directory +- Run `fix_sdk_libs.sh` ## Updating libstdc++ diff --git a/tools/sdk/lib/fix_sdk_libs.sh b/tools/sdk/lib/fix_sdk_libs.sh new file mode 100755 index 0000000000..d0c162d39e --- /dev/null +++ b/tools/sdk/lib/fix_sdk_libs.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -e + +# Remove mem_manager.o from libmain.a to use custom heap implementation, +# and time.o to fix redefinition of time-related functions: +xtensa-lx106-elf-ar d libmain.a mem_manager.o +xtensa-lx106-elf-ar d libmain.a time.o + +# Rename `hostname` and `default_hostname` symbols: +xtensa-lx106-elf-ar x libmain.a eagle_lwip_if.o user_interface.o +xtensa-lx106-elf-objcopy --redefine-sym hostname=wifi_station_hostname user_interface.o +xtensa-lx106-elf-objcopy --redefine-sym hostname=wifi_station_hostname eagle_lwip_if.o +xtensa-lx106-elf-objcopy --redefine-sym default_hostname=wifi_station_default_hostname user_interface.o +xtensa-lx106-elf-objcopy --redefine-sym default_hostname=wifi_station_default_hostname eagle_lwip_if.o +xtensa-lx106-elf-ar r libmain.a eagle_lwip_if.o user_interface.o +rm eagle_lwip_if.o user_interface.o diff --git a/tools/sdk/lib/libmain.a b/tools/sdk/lib/libmain.a index 8886b1956a..c0e70cafef 100644 Binary files a/tools/sdk/lib/libmain.a and b/tools/sdk/lib/libmain.a differ diff --git a/tools/sdk/lib/libpp.a b/tools/sdk/lib/libpp.a index 50f5cf1177..6135231c79 100644 Binary files a/tools/sdk/lib/libpp.a and b/tools/sdk/lib/libpp.a differ