sandeepmistry / arduino-BLEPeripheral

An Arduino library for creating custom BLE peripherals with Nordic Semiconductor's nRF8001 or nR51822.
MIT License
464 stars 180 forks source link

Error in nRF5\0.2.3\platform.txt #252

Closed MagnusThome closed 6 years ago

MagnusThome commented 6 years ago

Sorry, but not sure if this belongs here or somewhere completely different, like some Sparkfun page.

Anyway, here goes, this file needs a change when running in Arduino IDE in portable mode (and maybe if not in portable too). It's a classic, misplaced double quotes when the path includes a space. In file C:\Program Files (x86)\Arduino\portable\packages\SparkFun\hardware\nRF5\0.2.3\platform.txt line 95 must be changed from

recipe.objcopy.zip.pattern.windows={runtime.tools.nrfutil-0.5.2-SFE.path}/dist/nrfutil.exe dfu genpkg --application "{build.path}/{build.project_name}.bin" "{build.path}/{build.project_name}.zip" to

recipe.objcopy.zip.pattern.windows="{runtime.tools.nrfutil-0.5.2-SFE.path}/dist/nrfutil.exe" dfu genpkg --application "{build.path}/{build.project_name}.bin" "{build.path}/{build.project_name}.zip"

Otherwise you get this error when compiling (under certain conditions?) I included the two first lines because the second line shows what goes wrong with the path with a space in it.

"C:\\Program Files (x86)\\Arduino\\portable\\packages\\SparkFun\\tools\\gcc-arm-none-eabi\\5_2-2015q4/bin/arm-none-eabi-objcopy" -O ihex "C:\\USERS\\MAGNUST\\APPDATA\\LOCAL\\TEMP\\arduino_build_942669/led.ino.elf" "C:\\USERS\\MAGNUST\\APPDATA\\LOCAL\\TEMP\\arduino_build_942669/led.ino.hex"
"C:\\Program" Files "(x86)\\Arduino\\portable\\packages\\SparkFun\\tools\\nrfutil\\0.5.2-SFE/dist/nrfutil.exe" dfu genpkg --application "C:\\USERS\\MAGNUST\\APPDATA\\LOCAL\\TEMP\\arduino_build_942669/led.ino.bin" "C:\\USERS\\MAGNUST\\APPDATA\\LOCAL\\TEMP\\arduino_build_942669/led.ino.zip"
Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\portable\packages\SparkFun\hardware\nRF5\0.2.3\libraries\SPI 
Using library BLEPeripheral at version 0.4.0 in folder: D:\Documents\- - Datorer Arduino\libraries\BLEPeripheral 
exec: "C:\\Program": file does not exist
Error compiling for board SparkFun nRF52832 Breakout.
MagnusThome commented 6 years ago

Sorry, found where I'm supposed to go with this. Not here...