"Seeed nRF52 Boards" update to 1.1.3 causes compile error

LOL, Yes it’s a Good application project for mid level Technical abilities of tiny hardware with smart firmware, I agree with the conclusions though in the article.

Step 4: Conclusion
Seeed has wonderful products, however the software support is lacking. I was able to show that the 
advertised XIAO BLE functions work if you find the suitable library. I’m not a software programmer and
 I need simple libraries. That is lacking at the moment with XIAO BLE boards, especially compared to
 the competitors. Maybe it will change in the near future.

I’m sure AdaFruit loves the free positive press… :grinning: I can only hope the Seeed firmware/software & testing of their library’s gets better :upside_down_face: or catches up with there AWESOME hardware. :wink:

my .02
GL :slight_smile: PJ

yea i probably did not pace part in right places… i don’t know locations so i was guessing

where do i put softdevice folder? to nordic one? thats one place i see existing folder

so reintalled everything now it compiles :slight_smile: yay
but does not upload :frowning: when i try to upload com port goes offline right away and i get message below…

note i did have driver problem there was no driver so i used zusb to install CDC driver

any recomendations?

Sketch uses 43024 bytes (5%) of program storage space. Maximum is 811008 bytes.
Global variables use 7188 bytes (3%) of dynamic memory, leaving 230380 bytes for local variables. Maximum is 237568 bytes.
Upgrading target on COM15 with DFU package C:\Users\LZ-Main\AppData\Local\Temp\arduino\sketches\1A3674CF2911C8028729E7223A0DE2E5\blinky.ino.zip. Flow control is disabled, Single bank, Touch disabled

Failed to upgrade target. Error is: Serial port could not be opened on COM15. Reason: could not open port 'COM15': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2)
Traceback (most recent call last):
  File "dfu\dfu_transport_serial.py", line 113, in open
  File "serial\serialwin32.py", line 33, in __init__
  File "serial\serialutil.py", line 244, in __init__
  File "serial\serialwin32.py", line 64, in open
serial.serialutil.SerialException: could not open port 'COM15': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "__main__.py", line 296, in serial
  File "dfu\dfu.py", line 235, in dfu_send_images
  File "dfu\dfu.py", line 157, in _dfu_send_image
  File "dfu\dfu_transport_serial.py", line 115, in open
nordicsemi.exceptions.NordicSemiException: Serial port could not be opened on COM15. Reason: could not open port 'COM15': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2)

Possible causes:
- Selected Bootloader version does not match the one on Bluefruit device.
    Please upgrade the Bootloader or select correct version in Tools->Bootloader.
- Baud rate must be 115200, Flow control must be off.
- Target is not in DFU mode. Ground DFU pin and RESET and release both to enter DFU mode.

I just received the “Seeed Studio XIAO nRF52840” (the basic one, not the sense). First, I wanted to use it with arduino ide (1.8.18). Adafruit nrf52 boards were installed for a couple of years. So, I just added the url for seeed boards. When I tried to compile Blink, I faced the USBD issue. I removed the url for seeed boards and, later, all seed folders that I can find. I downloaded your patch and copied the content to the corresponding arduino folder. Now, I’m facing the missing nrf_soc.h file issue.

Arduino : 1.8.18 (Windows 10), Carte : "Seeed XIAO nRF52840, S140 7.3.0, Level 0 (Release)"
[...]
C:\Users\Famille\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\1.4.0\cores\nRF5/WVariant.h:24:10: fatal error: nrf_soc.h: No such file or directory

   24 | #include "nrf_soc.h"

Indeed, the nrf_soc.h file was provided by the patch and is available in :

C:\Users\MyName\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\1.4.0\softdevice\s140_nrf52_7.3.0_API\include

(And also in C:\Users\MyName\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\1.4.0\cores\nRF5\nordic\softdevice\s140_nrf52_6.1.1_API\include and C:\Users\MyName\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\1.4.0\cores\nRF5\nordic\softdevice\s132_nrf52_6.1.1_API\include

So, what?

Hi alexus,
I think if you “double reset” XIAO, the COM port will show up.

To avoid copying errors, please try the following steps

  1. Install “Adafruit nRF52 1.4.0 by Adafruit”.
    See the following link for instructions
    GitHub - adafruit/Adafruit_nRF52_Arduino: Adafruit code for the Nordic nRF52 BLE SoC on Arduino

  2. Unzip the attached ZIP file.
    adafruit_patch_to_add_Seeed_2.zip (992.5 KB)

  3. Copy 3 folders and 2 files and overwrite them in the following directory.
    C:\Users\xxxxxxxx\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\1.4.0

This method does not require “Seeed nRF52 Boards 1.1.3”.

will try new rar again, thank you!

how to double reset? will it help program firmware?

Quickly click the reset button twice. If you can successfully “double reset”, a new window will open and the port will be visible in the IDE.

@msfujino, thanks for you tip. I used your zip patch instead of the initial rar one. And it is working. My board is blinking. :rofl:

double tapping reset button brought me to UF2 mode or something, installed driver, uplaodded blink code yay it blinking lol and it changed serial to another unknown driver lol but at least it blinks tnx for help
will try updating driver and see if i can flash again lol

Has anyone got this running in platformio? also any examples that work!

thanks

david

Hi There,
Yes platformio works with Xiao if that’s what your asking. Example are here on the Search Icon. LOTs of them. I use it mostly for debugger but it woks perfectly. Getting the right config(platform.ini) setup correctly is key to a smooth experience. i.e.

HTH
GL :slight_smile:

I just faced this problem as well, downgrading to 1.1.1 works for me. I’ll be using 1.1.1 at least until the fix is there in a higher version.

After upgrade of “Adafruit nRF52” boards to 1.5.0, seeed entries in the Adafruit nRF52 boards, as obtained with the earlier trick, were gone. So, I used again the official way to install it but stand with 1.1.1 version, as done by @parasquid . It is more or less OK. I’m still loosing the board quite often and have to double-click the reset button to find it back.

1 Like

Same here, I wish there would be more activity on fixing it.
Another thing to have would be github issues open. Maybe someone would contribute?

This issue might be related to Cannot run sketch from Arduino IDE - adafruit industries, version 1.1.3 is also few versions behind adafruit branch

There is version 1.1.6, but it installs adafruit-nrfutil as not executable. It would be nice @Seeed_Seraphina, if the GitHub repo would be open to issues. The community could fix some errors.

Hello, Nilgob:

What do you mean by “not executable”? Can you describe in detail

Thank you very much for your feedback. We highly appreciate it and will actively communicate it upwards.

In the path Arduino15/packages/Seeeduino/hardware/nrf52/1.1.6/tools/adafruit-nrfutil

doesn’t have executable permissions. Had to edit chmod +x adafruit-nrfutil