Robot-Will / Stino

A Sublime Text Plugin for Arduino
Other
1.58k stars 249 forks source link

Need to single quote -D flags #242

Closed yingyuho closed 7 years ago

yingyuho commented 9 years ago

Line 46 of Stino/preset/platform_sam.txt: build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_MANUFACTURER={build.usb_manufacturer} -DUSB_PRODUCT={build.usb_product}

Change this: -DUSB_PRODUCT={build.usb_product} To: '-DUSB_PRODUCT={build.usb_product}'

Otherwise shell will eat double quotes in build.usb_product ("Arduino Due" in my case)

myclark commented 9 years ago

This fixed the first error that brought me here, however now I get a new error (c'est la vie);

"arm-none-eabi-g++: error: '-DUSB_PRODUCT=Arduino Due': No such file or directory"

jurnaza commented 9 years ago

I get the same error on Windows, but the above fix does work for OS X.

AndrewCapon commented 9 years ago

The above fix doesn't work for me on OS X.

Edit: This seems to be dependent on the ' character used. If I use the one from my UK mac keyboard I get the g++ error. If I cut and paste the line from the first post it then works!

judepereira commented 9 years ago

Thanks! This worked for me (single quotes)

@AndrewCapon while editing that file, make you aren't in the rich mode of TextEdit on your Mac. It will automatically cause that special one to show up.