diff --git a/platform.txt b/platform.txt
index 8858440c3a..3b687213d2 100644
--- a/platform.txt
+++ b/platform.txt
@@ -244,7 +244,7 @@ tools.openocd_upload.cmd=bin/openocd
 tools.openocd_upload.cmd.windows=bin/openocd.exe
 tools.openocd_upload.upload.params.verbose=-d2
 tools.openocd_upload.upload.params.quiet=-d0
-tools.openocd_upload.upload.pattern="{path}/{cmd}" {upload.verbose} -f interface/{upload.protocol}.cfg -f target/{openocd.target}.cfg -c "program {build.path}/{build.project_name}.elf verify reset exit"
+tools.openocd_upload.upload.pattern="{path}/{cmd}" {upload.verbose} -f interface/{upload.protocol}.cfg -f target/{openocd.target}.cfg -c "program {{build.path}/{build.project_name}.elf} verify reset exit"
 
 #
 # Debugger