This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

openthread cli uart in custom board

I am trying to implement cli uart in custom board, for which there comes need for me to recompile openthread stack (in order to change UART and LED pin configuration) in GCC compiler, when I compile  import_libs.py  , I encountered an error which is given below

C:\Users\admin\Downloads\nRF5_SDK_for_Thread_and_Zigbee_v4.1.0_32ce5f8\external\openthread\project>py -3 import_libs.py
import_libs.py:88: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if len(bad_libs) is not 0:
INFO - root - Copying nrf52840\cli\ftd\armgcc\libopenthread-cli-ftd-nrf52840.a to ..\lib\nrf52840\gcc\libopenthread-cli-ftd.a
INFO - root - Copying nrf52840\cli\mtd\armgcc\libopenthread-cli-mtd-nrf52840.a to ..\lib\nrf52840\gcc\libopenthread-cli-mtd.a
INFO - root - Copying nrf52840\core\ftd\armgcc\libopenthread-ftd-nrf52840.a to ..\lib\nrf52840\gcc\libopenthread-ftd.a
INFO - root - Copying nrf52840\core\mtd\armgcc\libopenthread-mtd-nrf52840.a to ..\lib\nrf52840\gcc\libopenthread-mtd.a
INFO - root - Copying nrf52840\core\radio\armgcc\libopenthread-radio-nrf52840.a to ..\lib\nrf52840\gcc\libopenthread-radio.a
INFO - root - Copying nrf52840\ncp\ftd\uart\armgcc\libopenthread-ncp-ftd-nrf52840.a to ..\lib\nrf52840\gcc\libopenthread-ncp-ftd.a
INFO - root - Copying nrf52840\ncp\ftd\spi\armgcc\libopenthread-ncp-ftd-spi-nrf52840.a to ..\lib\nrf52840\gcc\libopenthread-ncp-ftd-spi.a
INFO - root - Copying nrf52840\ncp\mtd\uart\armgcc\libopenthread-ncp-mtd-nrf52840.a to ..\lib\nrf52840\gcc\libopenthread-ncp-mtd.a
INFO - root - Copying nrf52840\ncp\mtd\spi\armgcc\libopenthread-ncp-mtd-spi-nrf52840.a to ..\lib\nrf52840\gcc\libopenthread-ncp-mtd-spi.a
INFO - root - Copying nrf52840\rcp\uart\armgcc\libopenthread-rcp-nrf52840.a to ..\lib\nrf52840\gcc\libopenthread-rcp.a
INFO - root - Copying nrf52840\rcp\spi\armgcc\libopenthread-rcp-spi-nrf52840.a to ..\lib\nrf52840\gcc\libopenthread-rcp-spi.a
INFO - root - Copying nrf52840\plat_nrf52840\sdk-nosd\armgcc\libopenthread-nrf52840-sdk.a to ..\lib\nrf52840\gcc\libopenthread-nrf52840-sdk.a
INFO - root - Copying nrf52840\plat_nrf52840\sdk-sd\armgcc\libopenthread-nrf52840-softdevice-sdk.a to ..\lib\nrf52840\gcc\libopenthread-nrf52840-softdevice-sdk.a
INFO - root - Copying nrf52840\plat_nrf52840\sdk-nodiag\armgcc\libopenthread-nrf52840-sdk-nodiag.a to ..\lib\nrf52840\gcc\libopenthread-nrf52840-sdk-nodiag.a
Traceback (most recent call last):
File "import_libs.py", line 180, in <module>
shutil.copy(from_path, to_path)
File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\shutil.py", line 415, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\shutil.py", line 261, in copyfile
with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: 'nrf52840\\plat_nrf52840\\sdk-nodiag\\armgcc\\libopenthread-nrf52840-sdk-nodiag.a'

Parents
  • Hello,

    Did you check that the library in SDK\external\openthread\project\nrf52840\plat_nrf527840\sdk-nodiag\armgcc\libopenthread-nrf52840-sdk-nodiag.a is present? If not, did you try to build it?

    One reason why it didn't build may be that you didn't import the correct commit. Remember to check what version that was used for the SDK in the file:

    SDK\external\openthread\readme.txt. For SDK for Thread and Zigbee 4.1.0, that would be:

    Then remember to run the script:

    SDK\external\openthread\project\build_gcc_libs.py

    before you call "py -3 import_libs.py gcc" (remember the gcc argument).

    If it still returns the same as you describe, what does it return if you manually try to build the library in nrf52840\plat_nrf52840\sdk-nodiag\armgcc (make the makefile)?

    BR,

    Edvin

  • I left the argument gcc in"py -3 import_libs.py gcc"  , now I am able to compile properly , thanks

Reply Children
No Data
Related