XIAO nRF52840 - Problem compiling

When I try to compile and upload a program to the XIAO nRF52840 I get the error:

[16415] Error loading Python lib '/var/folders/x7/_nwwqxs17m5fylrm6vpnkxkw0000gn/T/_MEIElzWvC/libpython3.8.dylib': dlopen: dlopen(/var/folders/x7/_nwwqxs17m5fylrm6vpnkxkw0000gn/T/_MEIElzWvC/libpython3.8.dylib, 10): Symbol not found: _preadv
  Referenced from: /var/folders/x7/_nwwqxs17m5fylrm6vpnkxkw0000gn/T/_MEIElzWvC/libpython3.8.dylib (which was built for Mac OS X 11.1)
  Expected in: /usr/lib/libSystem.B.dylib
 in /var/folders/x7/_nwwqxs17m5fylrm6vpnkxkw0000gn/T/_MEIElzWvC/libpython3.8.dylib
Using library SPI at version 1.0 in folder: /Users/david/Library/Arduino15/packages/Seeeduino/hardware/nrf52/1.1.1/libraries/SPI 
Using library Wire at version 1.0 in folder: /Users/david/Library/Arduino15/packages/Seeeduino/hardware/nrf52/1.1.1/libraries/Wire 
Using library Adafruit_TinyUSB_Arduino at version 1.7.0 in folder: /Users/david/Library/Arduino15/packages/Seeeduino/hardware/nrf52/1.1.1/libraries/Adafruit_TinyUSB_Arduino 
exit status 255
/Applications/Arduino.app/Contents/Java/arduino-builder returned 255
Error compiling for board Seeed XIAO nRF52840.

I get the same error if I try Export Compiled Binary.

I’m using Arduino IDE 1.8.13 on a MacBook Pro with Macos Catalina 10.15.7, and Version 1.1.1 of the Seeed nRF52 Boards core.

Any suggestions?

Deleted the /Users/jrr/Library/Arduino15/packages/Seeeduino directory and it’s children. Reinstalled the “Seeed SAMD Boards” in the board manager, and everything worked fine.

Regards,
Rachel Gomez

@rachel_gomez Thank you for the suggestion. I tried that but unfortunately got exactly the same result.

OK, I’ve found a solution:

  • Use Boards Manager to install version 0.20.5 of the Adafruit nRF52 Boards core.

  • Locate the folder:

    /Users/david/Library/Arduino15/packages/adafruit/hardware/nrf52/0.20.5/tools/adafruit-nrfutil
    
  • Copy the file adafruit-nrfutil from that folder to:

    /Users/david/Library/Arduino15/packages/Seeeduino/hardware/nrf52/1.1.1/tools/adafruit-nrfutil
    

    replacing the newer version of the same file there.

Then I can compile without errors.

2 Likes

@admin please change the heading to make this solution more useful:

XIAO nRF52840 - Problem compiling - Error loading libpython3.8.dylib

You, sir, are appreciated. This solved the problem perfectly.