kentm
June 6, 2025, 1:32am
1
I'm pretty new to Arduino, though I have successfully used several different boards for small projects. I thought I'd try the Xiao board. I was able to download the platform and I have the correct board in Board Manager, correct port, etc. When I upload the blink example, I get the following error message:
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Apps > Advanced app settings > App execution aliases.
exit status 9009
Compilation error: exit status 9009
One basic question is: Do I need to program this board with Python rather than the language (I think it's C) used by the other boards? The SEEED Wiki startup documentation lists CircuitPython under Programming Language.
Thanks for any insights.
Hi @kentm .
No. You write your sketches for this board in the same language as any other Arduino sketch.
The reason you are getting this error message is because the sketch program binary generated by the compilation process is converted to a special file format using a helper Python script. This script is executed using the Python interpreter:
recipe.objcopy.uf2.pattern=python "{runtime.platform.path}/tools/uf2conv/uf2_wrap.py" "{runtime.platform.path}/tools/uf2conv/uf2conv.py" "{build.board}" "{build.path}" "{build.source.path}" "{build.project_name}"
Note that this has absolutely nothing to do with the code of your sketch. It is only about converting the binary file from one format to another.
Traditionally all the tools required by an Arduino boards platform to compile and upload a sketch are installed along with the platform by Arduino IDE's Boards Manager. Unfortunately the Seeed Studio developers departed from that tradition by introducing a dependency on the Python interpreter even though their package does not provide that tool. So the responsibility for installing Python and making it accessible via the executable name python in the system path is put on the user.
So you will need to install Python on your computer. After that, you will be able to compile and upload without getting this error. I have always installed Python on my Windows computers using the official installer that is available for download from the Python website:
You see from the error message that Windows suggested you install it via the Microsoft Store . I don't have any experience using Microsoft Store , so I can't comment on whether or not that is sound advice.
The Arduino company considers the language used in the .ino files of sketches to be a unique language ("Arduino language"). However, it is essentially C++ .
kentm
June 6, 2025, 12:49pm
3
@ptillisch : Thanks for your very fast and detailed response - amazing!
I installed Python from their site. I got the same error message as before when running the blink sketch. Based on that message
"or disable this shortcut from Settings > Apps > Advanced app settings > App execution aliases."
I went there and switched App Installer python.exe and App Installer python3.exe from ON to OFF. When I re-ran the sketch, I got this error:
exec: "python": executable file not found in %PATH%
Compilation error: exec: "python": executable file not found in %PATH%
It looks like I need to tell the sketch what path my python is located at. If that is the solution, how do I do that?
kentm
June 6, 2025, 12:52pm
4
Also, I read in another forum post something about needing python, not python3. Could that be the issue?
kentm
June 6, 2025, 9:46pm
5
Here is the verbose compilation output:
FQBN: Seeeduino:nrf52:xiaonRF52840
Using board 'xiaonRF52840' from platform in folder: C:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10
Using core 'nRF5' from platform in folder: C:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10
Detecting libraries used...
C:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\tools\arm-none-eabi-gcc\9-2019q4/bin/arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -c -g -Werror=return-type -mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=64000000 -DARDUINO=10607 -DARDUINO_Seeed_XIAO_nRF52840 -DARDUINO_ARCH_NRF52 -DARDUINO_BSP_VERSION="1.1.10" -DNRF52840_XXAA -DUSBCON -DUSE_TINYUSB -DUSB_VID=0x2886 -DUSB_PID=0x8044 -DUSB_MANUFACTURER="Seeed" -DUSB_PRODUCT="XIAO nRF52840" -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DDX_CC_TEE -DLFS_NAME_MAX=64 -Ofast -DCFG_DEBUG=0 -DCFG_LOGGER=0 -DCFG_SYSVIEW=0 -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS\5.7.0/CMSIS/Core/Include/ -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS\5.7.0/CMSIS/DSP/Include/ -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/nordic -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/nordic/nrfx -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/nordic/nrfx/hal -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/nordic/nrfx/mdk -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/nordic/nrfx/soc -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/nordic/nrfx/drivers/include -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/nordic/nrfx/drivers/src -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/nordic/softdevice/s140_nrf52_7.3.0_API/include -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/nordic/softdevice/s140_nrf52_7.3.0_API/include/nrf52 -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/freertos/Source/include -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/freertos/config -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/freertos/portable/GCC/nrf52 -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/freertos/portable/CMSIS/nrf52 -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/sysview/SEGGER -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/sysview/Config -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10/libraries/Adafruit_TinyUSB_Arduino/src/arduino -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5 -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\variants\Seeed_XIAO_nRF52840 C:\Users\kente\AppData\Local\arduino\sketches\83D1C21D5AE527E23B561B7C2B5FA320\sketch\Blink.ino.cpp -o nul
Generating function prototypes...
C:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\tools\arm-none-eabi-gcc\9-2019q4/bin/arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -c -g -Werror=return-type -mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=64000000 -DARDUINO=10607 -DARDUINO_Seeed_XIAO_nRF52840 -DARDUINO_ARCH_NRF52 -DARDUINO_BSP_VERSION="1.1.10" -DNRF52840_XXAA -DUSBCON -DUSE_TINYUSB -DUSB_VID=0x2886 -DUSB_PID=0x8044 -DUSB_MANUFACTURER="Seeed" -DUSB_PRODUCT="XIAO nRF52840" -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DDX_CC_TEE -DLFS_NAME_MAX=64 -Ofast -DCFG_DEBUG=0 -DCFG_LOGGER=0 -DCFG_SYSVIEW=0 -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS\5.7.0/CMSIS/Core/Include/ -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS\5.7.0/CMSIS/DSP/Include/ -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/nordic -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/nordic/nrfx -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/nordic/nrfx/hal -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/nordic/nrfx/mdk -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/nordic/nrfx/soc -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/nordic/nrfx/drivers/include -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/nordic/nrfx/drivers/src -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/nordic/softdevice/s140_nrf52_7.3.0_API/include -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/nordic/softdevice/s140_nrf52_7.3.0_API/include/nrf52 -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/freertos/Source/include -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/freertos/config -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/freertos/portable/GCC/nrf52 -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/freertos/portable/CMSIS/nrf52 -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/sysview/SEGGER -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5/sysview/Config -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10/libraries/Adafruit_TinyUSB_Arduino/src/arduino -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\cores\nRF5 -IC:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\variants\Seeed_XIAO_nRF52840 C:\Users\kente\AppData\Local\arduino\sketches\83D1C21D5AE527E23B561B7C2B5FA320\sketch\Blink.ino.cpp -o C:\Users\kente\AppData\Local\Temp\3821934226\sketch_merged.cpp
C:\Users\kente\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\kente\AppData\Local\Temp\3821934226\sketch_merged.cpp
Compiling sketch...
"C:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\arm-none-eabi-gcc\\9-2019q4/bin/arm-none-eabi-g++" -mcpu=cortex-m4 -mthumb -c -g -Werror=return-type -mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=64000000 -DARDUINO=10607 -DARDUINO_Seeed_XIAO_nRF52840 -DARDUINO_ARCH_NRF52 "-DARDUINO_BSP_VERSION=\"1.1.10\"" -DNRF52840_XXAA -DUSBCON -DUSE_TINYUSB -DUSB_VID=0x2886 -DUSB_PID=0x8044 "-DUSB_MANUFACTURER=\"Seeed\"" "-DUSB_PRODUCT=\"XIAO nRF52840\"" -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DDX_CC_TEE -DLFS_NAME_MAX=64 -Ofast -DCFG_DEBUG=0 -DCFG_LOGGER=0 -DCFG_SYSVIEW=0 "-IC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\CMSIS\\5.7.0/CMSIS/Core/Include/" "-IC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\CMSIS\\5.7.0/CMSIS/DSP/Include/" "-IC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\nrf52\\1.1.10\\cores\\nRF5/nordic" "-IC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\nrf52\\1.1.10\\cores\\nRF5/nordic/nrfx" "-IC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\nrf52\\1.1.10\\cores\\nRF5/nordic/nrfx/hal" "-IC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\nrf52\\1.1.10\\cores\\nRF5/nordic/nrfx/mdk" "-IC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\nrf52\\1.1.10\\cores\\nRF5/nordic/nrfx/soc" "-IC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\nrf52\\1.1.10\\cores\\nRF5/nordic/nrfx/drivers/include" "-IC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\nrf52\\1.1.10\\cores\\nRF5/nordic/nrfx/drivers/src" "-IC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\nrf52\\1.1.10\\cores\\nRF5/nordic/softdevice/s140_nrf52_7.3.0_API/include" "-IC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\nrf52\\1.1.10\\cores\\nRF5/nordic/softdevice/s140_nrf52_7.3.0_API/include/nrf52" "-IC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\nrf52\\1.1.10\\cores\\nRF5/freertos/Source/include" "-IC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\nrf52\\1.1.10\\cores\\nRF5/freertos/config" "-IC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\nrf52\\1.1.10\\cores\\nRF5/freertos/portable/GCC/nrf52" "-IC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\nrf52\\1.1.10\\cores\\nRF5/freertos/portable/CMSIS/nrf52" "-IC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\nrf52\\1.1.10\\cores\\nRF5/sysview/SEGGER" "-IC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\nrf52\\1.1.10\\cores\\nRF5/sysview/Config" "-IC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\nrf52\\1.1.10/libraries/Adafruit_TinyUSB_Arduino/src/arduino" "-IC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\nrf52\\1.1.10\\cores\\nRF5" "-IC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\nrf52\\1.1.10\\variants\\Seeed_XIAO_nRF52840" "C:\\Users\\kente\\AppData\\Local\\arduino\\sketches\\83D1C21D5AE527E23B561B7C2B5FA320\\sketch\\Blink.ino.cpp" -o "C:\\Users\\kente\\AppData\\Local\\arduino\\sketches\\83D1C21D5AE527E23B561B7C2B5FA320\\sketch\\Blink.ino.cpp.o"
Compiling libraries...
Compiling core...
Using previously compiled file: C:\Users\kente\AppData\Local\arduino\sketches\83D1C21D5AE527E23B561B7C2B5FA320\core\variant.cpp.o
Using precompiled core: C:\Users\kente\AppData\Local\arduino\cores\Seeeduino_nrf52_xiaonRF52840_softdevice_s140v6,debug_l0_3986cda2ae3b9829549781dfb8bf47f4\core.a
Linking everything together...
"C:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\arm-none-eabi-gcc\\9-2019q4/bin/arm-none-eabi-g++" "-LC:\\Users\\kente\\AppData\\Local\\arduino\\sketches\\83D1C21D5AE527E23B561B7C2B5FA320" -Ofast -Wl,--gc-sections -save-temps "-LC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\nrf52\\1.1.10\\cores\\nRF5/linker" -Tnrf52840_s140_v7.ld "-Wl,-Map,C:\\Users\\kente\\AppData\\Local\\arduino\\sketches\\83D1C21D5AE527E23B561B7C2B5FA320/Blink.ino.map" -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--wrap=malloc -Wl,--wrap=free --specs=nano.specs --specs=nosys.specs -o "C:\\Users\\kente\\AppData\\Local\\arduino\\sketches\\83D1C21D5AE527E23B561B7C2B5FA320/Blink.ino.elf" "C:\\Users\\kente\\AppData\\Local\\arduino\\sketches\\83D1C21D5AE527E23B561B7C2B5FA320\\sketch\\Blink.ino.cpp.o" "C:\\Users\\kente\\AppData\\Local\\arduino\\sketches\\83D1C21D5AE527E23B561B7C2B5FA320\\core\\variant.cpp.o" -Wl,--start-group "-LC:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\CMSIS\\5.7.0/CMSIS/DSP/Lib/GCC/" -larm_cortexM4lf_math -lm "C:\\Users\\kente\\AppData\\Local\\arduino\\sketches\\83D1C21D5AE527E23B561B7C2B5FA320/..\\..\\cores\\Seeeduino_nrf52_xiaonRF52840_softdevice_s140v6,debug_l0_3986cda2ae3b9829549781dfb8bf47f4\\core.a" -Wl,--end-group
"C:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\arm-none-eabi-gcc\\9-2019q4/bin/arm-none-eabi-objcopy" -O ihex "C:\\Users\\kente\\AppData\\Local\\arduino\\sketches\\83D1C21D5AE527E23B561B7C2B5FA320/Blink.ino.elf" "C:\\Users\\kente\\AppData\\Local\\arduino\\sketches\\83D1C21D5AE527E23B561B7C2B5FA320/Blink.ino.hex"
python "C:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\nrf52\\1.1.10/tools/uf2conv/uf2_wrap.py" "C:\\Users\\kente\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\nrf52\\1.1.10/tools/uf2conv/uf2conv.py" Seeed_XIAO_nRF52840 "C:\\Users\\kente\\AppData\\Local\\arduino\\sketches\\83D1C21D5AE527E23B561B7C2B5FA320" "C:\\Users\\kente\\AppData\\Local\\Temp\\.arduinoIDE-unsaved202556-14972-z2k9g0.mcash\\Blink" Blink.ino
exec: "python": executable file not found in %PATH%
Compilation error: exec: "python": executable file not found in %PATH%
The solution is to add the Python installation folder to your system PATH . That will allow the Arduino build system to use it.
The official installer gives the option to do that:
So I think the easiest way to fix the problem will be to uninstall Python and then reinstall it, this time making sure to check that "Add python.exe to PATH" checkbox.
I don't know about Microsoft Store, but it is not an issue when using the official installer. The problem is that, depending on how you install Python on a Linux (and I think macOS as well) computer, the Python interpreter executable might be named python3 instead of python. They did that to differentiate the Python version 3.x installation from the Python 2.x installation that might have also been needed years ago when quite a bit of Python code was not compatible with Python 3.x.
When you using the official installer to install Python, the interpreter executable is named python, so this will not be a problem if you install it that way.
This might raise the concern over whether the "Seeed nRF52 Boards " platform's uf2_wrap.py script is compatible with Python 3.x. The answer is that it is compatible with Python 3.x so you don't need to worry about that.
kentm
June 7, 2025, 1:13am
7
You are brilliant! How the heck do you know all this stuff? Anyway, it works, and I can proceed with my little project. Thank you so much!
You are welcome. I'm glad it is working now.
It is often knowledge hard won at the cost of much tearing of hair and gnashing of teeth.
Other times, it came easier thanks to others who were kind enough to share their knowledge on the Internet. This is one of the things that inspired me to start trying to give back in the cases where I have possession of some information that might be of some use to others.