I have issues building Adafruit nRF52832 under arduino platform, i noticed is something doing with the user’s name “ricky gai” where the error is caused by python.exe as shown below:
c:\users\ricky gai.platformio\penv\scripts\python.exe “C:\Users\RICKY GAI.platformio\packages\tool-adafruit-nrfutil\adafruit-nrfutil.py” dfu genpkg --dev-type 0x0052 --sd-req 0x00B7 --application .pio\build\adafruit_feather_nrf52832\firmware.hex .pio\build\adafruit_feather_nrf52832\firmware.zip
MethodWrapper([“checkprogsize”], [".pio\build\adafruit_feather_nrf52832\firmware.elf"])
‘c:\users\ricky’ is not recognized as an internal or external command,
operable program or batch file.
*** [.pio\build\adafruit_feather_nrf52832\firmware.zip] Error 1
Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
RAM: [ ] 5.0% (used 3252 bytes from 65536 bytes)
Flash: [ ] 4.5% (used 23344 bytes from 524288 bytes)
.pio\build\adafruit_feather_nrf52832\firmware.elf :
section size addr
.text 22852 155648
.ARM.exidx 8 178500
.data 484 536884736
.bss 2768 536885220
.heap 46412 536887988
.ARM.attributes 50 0
.comment 126 0
.debug_frame 2372 0
Total 75072
========================================================== [FAILED] Took 8.74 seconds ==========================================================
The terminal process “C:\Users\RICKY GAI.platformio\penv\Scripts\platformio.exe ‘run’, ‘–verbose’, ‘–environment’, ‘adafruit_feather_nrf52832’” terminated with exit code: 1.
A PlatformIO builder script or sub-tool is not properly escaping the path – first c:\users\ricky gai.platformio\penv\scripts\python.exe should have been "c:\users\ricky gai.platformio\penv\scripts\python.exe". The problem lies in
Open the file explorer and find the file C:\Users\<user>\.platformio\platforms\nordicnrf52\builder\main.py
Find the above referenced line 133 and replace "$PYTHONEXE" with '"$PYTHONEXE"'.
Thank you again maxgerhardt, now can compile and upload properly same sketch for both nRF52832 and nRF52840 after the red rectangle updated as shown on picture below.