2.0.3 Compilation error "invalid option softdevice"

The following board librariy and board selection cause compile errors even for empty sketch.

OS : Windows 11
IDE: Arduino IDE 2.0.3
Board Library : Seeed nRF52 mbed-enabled Boards 2.7.2
Board select : Seeed XIAO BLE Sense - nRF52840

Compilation error: Error resolving FQBN: getting build properties for board Seeeduino:mbed:xiaonRF52840Sense: invalid option 'softdevice'

Curiously, no compilation error occurs when "Seeed XIAO BLE - nRF52840" is selected. Also, if I use Arduino IDE 1.8.19, no compile error occurs.

Please advise how to deal with this.

Hi @msfujino. I have version 2.7.2 of the "Seeed nRF52 mbed-enabled Boards" platform installed just like you do, but when I look in the boards.txt file, there is no softdevice option.

Have you made any modifications to the boards.txt file?

Have you added a boards.local.txt file?

Hi ptillisch Arduino Team,

What I checked.

  1. there is no "softdevice" in /AppData/Local/Arduino15/packages/Seeeduino/hardware/boards.txt, and it has not been changed.
  2. There is no "boards.local.txt" in /AppData/Local/Arduino15/packages/Seeeduino/hardware/.
  3. Uninstall IDE2.0.3, delete /Documents/Arduinod directory, install IDE2.0.3 in C:/Program files/, install only board library 2.7.2, and compile empty sketch ----> compile error
  4. Install IDE2.0.3 and board library 2.7.2 on another PC (win10) and compile empty sketch ---->compilation completed!!

From these results, I know the problem is on my Win11 PC, but I can't imagine where the compile option is referenced, only when XIAO_BLE_Sense is selected.
Any ideas?

Excellent work on investigating the problem!

The file should be at this path:

/AppData/Local/Arduino15/packages/Seeeduino/hardware/mbed/2.7.2/boards.txt

(note the mbed/2.7.2/ part of the path)

Is that where you looked?

My apologies. The path is an error in my description.
I correct it as follows.

  1. there is no "softdevice" in /AppData/Local/Arduino15/packages/Seeeduino/hardware/mbed/2.7.2/boards.txt, and it has not been changed.
  2. There is no "boards.local.txt" in /AppData/Local/Arduino15/packages/Seeeduino/hardware/mbed/2.7.2.

OK, I was able to find the cause of the problem.

Version 1.0.0 of the "Seeed nRF52 mbed-enabled Boards " platform did have a softdevice custom board option. Arduino IDE remembers the previously selected options for convenience so that you don't need to reconfigure the board every time you select it. Unfortunately, this causes a bug where Arduino IDE continues to try to use that option even after you update to a different version of a platform that doesn't have the option anymore. This is why you now get that error message when compiling.

I have submitted a formal bug report to the Arduino IDE developers:

I'll share the workaround you can use to get Arduino IDE working again:

  1. Select File > Quit from the Arduino IDE menus if it is running.

  2. Delete the following folder to clear the incorrect FQBN from Arduino IDE's data store:

    • If you are using Windows:
      C:\Users\<user name>\AppData\Roaming\arduino-ide
      
    • If you are using Linux:
      ~/.config/arduino-ide
      
    • If you are using macOS:
      ~/Library/Application Support/arduino-ide
      

    :warning: Please be very careful when deleting things from your computer. When in doubt, back up!

  3. Start Arduino IDE.

  4. Select the board again.

  5. Retry whatever operation that failed previously.

Deleting the C:\Users\<user name>\AppData\Roaming\arduino-ide folder will cause Arduino IDE to forget some convenience information like the board options you had selected before, and it will cause it to run some setup processes that normally only occur on the first run of a fresh installation, but no essential data is stored in that folder so you don't need to worry about this causing the loss of anything essential.


Please let me know if you have any questions or problems while following those instructions.

1 Like

I deleted the arduino-ide folder as instructed. The compilation error no longer occurs.
However, I got an error "property 'upload.tool.serial' is undefined" during uploading, but I was able to work around it by adding "xiaonRF52840Sense.upload.tool.default=nrfutil" in the boards.txt file.
Thanks for your quick response.

You are welcome. I'm glad it is working now.

Great work finding the solution to that other bug. By the way, just today I submitted a fix for that "upload.tool.serial" bug to Seeed:

Hopefully they will merge that PR and make a new release with the fix soon.

Regards,
Per

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.