ambiot / ambd_arduino

AmebaD Arduino third-party package SDK
MIT License
81 stars 51 forks source link

Compile fails on Windows if space exists in path (eg username) #212

Closed xixiha5230 closed 6 months ago

xixiha5230 commented 7 months ago

Issue Description:

I encountered an error while working with the ambd_arduino project, similar to this reported issue. Although a suggested solution was provided here, it didn't resolve the problem on my computer.

Error Message:

cmd /c copy /y "C:\\Users\\Chen Qizhen\\AppData\\Local\\Arduino15\\packages\\realtek\\tools\\ameba_d_tools\\1.1.2\\km0_km4_image2.bin" "C:\\Users\\Chen" "Qizhen\\AppData\\Local\\Temp\\arduino\\sketches\\DABA8B6501CFD828C2BC5D29860497F2"
The syntax of the command is incorrect.

Proposed Solution:

The error seems to be related to a syntax issue in the build process. The suggested fix in the provided solution is to modify the following line in the platform.txt file:

Change:

recipe.hooks.objcopy.postobjcopy.pattern.windows=cmd /c copy /y "{runtime.tools.ameba_d_tools.path}\km0_km4_image2.bin" {build.path}

To:

recipe.hooks.objcopy.postobjcopy.pattern.windows=cmd /c copy /y "{runtime.tools.ameba_d_tools.path}\km0_km4_image2.bin" "{build.path}"

Additional Notes:

After making this modification, the issue was resolved for me, and the build process completed successfully.

github-actions[bot] commented 7 months ago

Hello, hope this message finds you well. Congrats to your first Issue! We will review it as soon as possiable. Feel free to have a look at https://www.amebaiot.com/en/ameba-arduino-summary/ for more information

M-ichae-l commented 7 months ago

@xixiha5230 Thanks for point the issue out and provide a solution. Really appreciate it. Please refer to commit 785778e1bf63039ec7a4f853a79195895155b8bb for the fix. It will merged for next SDK.

github-actions[bot] commented 6 months ago

This issue is stale because it has been open for 14 days with no activity.

github-actions[bot] commented 6 months ago

This issue was closed because it has been inactive for 7 days since being marked as stale.