From db0dbe6d8c77305bd953412a17d56c5e5adae2b0 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sun, 24 Apr 2016 00:50:56 +0300 Subject: [PATCH] Automatically add ``-DUSB_MANUFACTURER`` with vendor's name // Resolve #631 --- HISTORY.rst | 4 +++- platformio/builder/scripts/frameworks/arduino.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index a578601432..f870dcf052 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -16,6 +16,8 @@ PlatformIO 2.0 (`issue #604 `_) * Updated native SDK for ESP8266 to 1.5 (`issue #366 `_) +* Automatically add ``-DUSB_MANUFACTURER`` with vendor's name + (`issue #631 `_) * Automatically reboot Teensy board after upload when Teensy Loader GUI is used (`issue #609 `_) * Forced ``-std=gnu++11`` for Atmel SAM development platform @@ -37,7 +39,7 @@ PlatformIO 2.0 * Updated Arduino Wiring-based framework to the latest version for Atmel AVR/SAM development platforms * Updated "Teensy Loader CLI" and fixed uploading of large .hex files - (`issue #568 `_) + (`issue #568 `_) * Updated the support for Sanguino Boards (`issue #586 `_) * Better handling of used boards when re-initialize/update project diff --git a/platformio/builder/scripts/frameworks/arduino.py b/platformio/builder/scripts/frameworks/arduino.py index c844979777..74deb272f1 100644 --- a/platformio/builder/scripts/frameworks/arduino.py +++ b/platformio/builder/scripts/frameworks/arduino.py @@ -121,7 +121,9 @@ "USB_VID=${BOARD_OPTIONS['build']['vid']}", "USB_PID=${BOARD_OPTIONS['build']['pid']}", 'USB_PRODUCT=\\"%s\\"' % (env.subst( - "${BOARD_OPTIONS['build']['usb_product']}").replace('"', "")) + "${BOARD_OPTIONS['build']['usb_product']}").replace('"', "")), + 'USB_MANUFACTURER=\\"%s\\"' % (env.subst( + "${BOARD_OPTIONS['vendor']}").replace('"', "")) ] if env.get("PLATFORM") == "teensy":