Hi all, I tried to modify the OpenThread's source codes(Just modify an API) and then built them.
- Run the
build_gcc_libs.bat
script to build all of the libraries. That's OK. - After the libraries are built, use the provided script (
<InstallFolder>/external/openthread/project/import_gcc_libs.bat
) to copy the compiled libraries to the output folder. - Copy the
/external/project/openthread/include
folder into the/external/openthread
folder.
Everything was fine until I tried to recompile the examples with the latest libraries. I don't know what is wrong, please find here below the error log. Such as:
openthread/src/core/thread/mle.cpp:403: undefined reference to `otPlatSettingsSet'
E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\examples\thread\experimental\cli\uart\pca10056\blank\armgcc>make Compiling file: thread_utils.c Linking target: _build/nrf52840_xxaa.out ../../../../../../../../external/openthread/lib/gcc/libopenthread-cli-ftd.a(cli_uart.cpp.o):(.rodata._ZTIN2ot3Cli6ServerE[_ZTIN2ot3Cli6ServerE]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info' ../../../../../../../../external/openthread/lib/gcc/libopenthread-cli-ftd.a(cli_uart.cpp.o):(.rodata._ZTIN2ot3Cli4UartE+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(dataset_local.cpp.o): In function `ot::MeshCoP::DatasetLocal::Clear()': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/meshcop/dataset_local.cpp:63: undefined reference to `otPlatSettingsDelete' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(dataset_local.cpp.o): In function `ot::MeshCoP::DatasetLocal::IsPresent() const': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/meshcop/dataset_local.cpp:68: undefined reference to `otPlatSettingsGet' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(dataset_local.cpp.o): In function `ot::MeshCoP::DatasetLocal::Get(ot::MeshCoP::Dataset&)': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/meshcop/dataset_local.cpp:78: undefined reference to `otPlatSettingsGet' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(dataset_local.cpp.o): In function `ot::MeshCoP::DatasetLocal::Get(otOperationalDataset&) const': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/meshcop/dataset_local.cpp:111: undefined reference to `otPlatSettingsGet' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(dataset_local.cpp.o): In function `ot::MeshCoP::DatasetLocal::Set(otOperationalDataset const&)': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/meshcop/dataset_local.cpp:367: undefined reference to `otPlatSettingsDelete' E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/meshcop/dataset_local.cpp:372: undefined reference to `otPlatSettingsSet' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(dataset_local.cpp.o): In function `ot::MeshCoP::DatasetLocal::Set(ot::MeshCoP::Dataset const&)': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/meshcop/dataset_local.cpp:395: undefined reference to `otPlatSettingsDelete' E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/meshcop/dataset_local.cpp:400: undefined reference to `otPlatSettingsSet' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(instance.cpp.o): In function `ot::Instance::AfterInit()': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/common/instance.cpp:128: undefined reference to `otPlatSettingsInit' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(instance.cpp.o): In function `ot::Instance::FactoryReset()': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/common/instance.cpp:199: undefined reference to `otPlatSettingsWipe' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(key_manager.cpp.o): In function `ot::KeyManager::ComputeKey(unsigned long, unsigned char*)': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/thread/key_manager.cpp:156: undefined reference to `__cxa_end_cleanup' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(key_manager.cpp.o):(.ARM.extab.text._ZN2ot10KeyManager10ComputeKeyEmPh+0x0): undefined reference to `__gxx_personality_v0' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(mac.cpp.o): In function `~AesCcm': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/crypto/aes_ccm.hpp:59: undefined reference to `__cxa_end_cleanup' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(mac.cpp.o):(.ARM.extab.text._ZN2ot3Mac3Mac23ProcessTransmitSecurityERNS0_5FrameE+0x0): undefined reference to `__gxx_personality_v0' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(mac.cpp.o): In function `~AesCcm': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/crypto/aes_ccm.hpp:59: undefined reference to `__cxa_end_cleanup' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(mac.cpp.o):(.ARM.extab.text._ZN2ot3Mac3Mac22ProcessReceiveSecurityERNS0_5FrameERKNS0_7AddressEPNS_8NeighborE+0x0): undefined reference to `__gxx_personality_v0' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(mle.cpp.o): In function `ot::Mle::Mle::Store()': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/thread/mle.cpp:403: undefined reference to `otPlatSettingsSet' E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/thread/mle.cpp:411: undefined reference to `otPlatSettingsGet' E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/thread/mle.cpp:422: undefined reference to `otPlatSettingsSet' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(mle.cpp.o): In function `ot::Mle::Mle::Restore()': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/thread/mle.cpp:303: undefined reference to `otPlatSettingsGet' E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/thread/mle.cpp:330: undefined reference to `otPlatSettingsGet' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(mle.cpp.o): In function `~AesCcm': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/crypto/aes_ccm.hpp:59: undefined reference to `__cxa_end_cleanup' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(mle.cpp.o):(.ARM.extab.text._ZN2ot3Mle3Mle11SendMessageERNS_7MessageERKNS_3Ip67AddressE+0x0): undefined reference to `__gxx_personality_v0' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(mle.cpp.o): In function `~AesCcm': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/crypto/aes_ccm.hpp:59: undefined reference to `__cxa_end_cleanup' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(mle.cpp.o):(.ARM.extab.text._ZN2ot3Mle3Mle16HandleUdpReceiveERNS_7MessageERKNS_3Ip611MessageInfoE+0x0): undefined reference to `__gxx_personality_v0' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(mle_router.cpp.o): In function `ot::Mle::MleRouter::RestoreChildren()': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/thread/mle_router.cpp:3655: undefined reference to `otPlatSettingsGet' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(mle_router.cpp.o): In function `ot::Mle::MleRouter::RemoveStoredChild(unsigned short)': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/thread/mle_router.cpp:3690: undefined reference to `otPlatSettingsGet' E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/thread/mle_router.cpp:3696: undefined reference to `otPlatSettingsDelete' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(mle_router.cpp.o): In function `ot::Mle::MleRouter::StoreChild(unsigned short)': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/thread/mle_router.cpp:3723: undefined reference to `otPlatSettingsAdd' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(mle_router.cpp.o): In function `ot::Mle::MleRouter::RefreshStoredChildren()': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/thread/mle_router.cpp:3733: undefined reference to `otPlatSettingsDelete' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(netif.cpp.o):(.rodata._ZTIN2ot15InstanceLocatorE[_ZTIN2ot15InstanceLocatorE]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(netif.cpp.o):(.rodata._ZTIN2ot3Ip65NetifE[_ZTIN2ot3Ip65NetifE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(thread_api.cpp.o): In function `otThreadGetAutoStart': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/api/thread_api.cpp:508: undefined reference to `otPlatSettingsGet' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(thread_api.cpp.o): In function `otThreadSetAutoStart': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/api/thread_api.cpp:525: undefined reference to `otPlatSettingsSet' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(thread_netif.cpp.o):(.rodata._ZTIN2ot11ThreadNetifE+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(coap.cpp.o):(.rodata._ZTIN2ot4Coap4CoapE[_ZTIN2ot4Coap4CoapE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(coap.cpp.o):(.rodata._ZTIN2ot4Coap15ApplicationCoapE[_ZTIN2ot4Coap15ApplicationCoapE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(coap.cpp.o):(.rodata._ZTIN2ot4Coap8CoapBaseE+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(coap_secure.cpp.o):(.rodata._ZTIN2ot4Coap10CoapSecureE+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(dtls.cpp.o): In function `ot::MeshCoP::Dtls::HandleMbedtlsExportKeys(unsigned char const*, unsigned char const*, unsigned int, unsigned int, unsigned int)': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/meshcop/dtls.cpp:374: undefined reference to `__cxa_end_cleanup' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(dtls.cpp.o):(.ARM.extab.text._ZN2ot7MeshCoP4Dtls23HandleMbedtlsExportKeysEPKhS3_jjj+0x0): undefined reference to `__gxx_personality_v0' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(meshcop.cpp.o): In function `ot::MeshCoP::ComputeJoinerId(ot::Mac::ExtAddress const&, ot::Mac::ExtAddress&)': E:\Git\w-repo\nRF5_SDK_for_Thread_v0.11.0_84a130f\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/meshcop/meshcop.cpp:50: undefined reference to `__cxa_end_cleanup' ../../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(meshcop.cpp.o):(.ARM.extab.text._ZN2ot7MeshCoP15ComputeJoinerIdERKNS_3Mac10ExtAddressERS2_+0x0): undefined reference to `__gxx_personality_v0' collect2.exe: error: ld returned 1 exit status ../../../../../../../../components/toolchain/gcc/Makefile.common:292: recipe for target '_build/nrf52840_xxaa.out' failed make: *** [_build/nrf52840_xxaa.out] Error 1
Thank you!