mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-19 13:54:23 +01:00
sketch USB VID and PID values are passed in from boards.txt at compile time now. changed sketch PIDs to final values. also uncommented Micro section in boards.txt
This commit is contained in:
parent
d02e4481d3
commit
caeaa4571c
@ -542,8 +542,10 @@ public class Compiler implements MessageConsumer {
|
||||
"-g", // include debugging info (so errors include line numbers)
|
||||
"-assembler-with-cpp",
|
||||
"-mmcu=" + boardPreferences.get("build.mcu"),
|
||||
"-DF_CPU=" + boardPreferences.get("build.f_cpu"),
|
||||
"-DF_CPU=" + boardPreferences.get("build.f_cpu"),
|
||||
"-DARDUINO=" + Base.REVISION,
|
||||
"-DUSB_VID=" + boardPreferences.get("build.vid"),
|
||||
"-DUSB_PID=" + boardPreferences.get("build.pid"),
|
||||
}));
|
||||
|
||||
for (int i = 0; i < includePaths.size(); i++) {
|
||||
@ -571,7 +573,9 @@ public class Compiler implements MessageConsumer {
|
||||
"-mmcu=" + boardPreferences.get("build.mcu"),
|
||||
"-DF_CPU=" + boardPreferences.get("build.f_cpu"),
|
||||
"-MMD", // output dependancy info
|
||||
"-DARDUINO=" + Base.REVISION,
|
||||
"-DUSB_VID=" + boardPreferences.get("build.vid"),
|
||||
"-DUSB_PID=" + boardPreferences.get("build.pid"),
|
||||
"-DARDUINO=" + Base.REVISION,
|
||||
}));
|
||||
|
||||
for (int i = 0; i < includePaths.size(); i++) {
|
||||
@ -602,6 +606,8 @@ public class Compiler implements MessageConsumer {
|
||||
"-mmcu=" + boardPreferences.get("build.mcu"),
|
||||
"-DF_CPU=" + boardPreferences.get("build.f_cpu"),
|
||||
"-MMD", // output dependancy info
|
||||
"-DUSB_VID=" + boardPreferences.get("build.vid"),
|
||||
"-DUSB_PID=" + boardPreferences.get("build.pid"),
|
||||
"-DARDUINO=" + Base.REVISION,
|
||||
}));
|
||||
|
||||
|
@ -155,31 +155,36 @@ leonardo.bootloader.low_fuses=0xff
|
||||
leonardo.bootloader.high_fuses=0xd8
|
||||
leonardo.bootloader.extended_fuses=0xcb
|
||||
leonardo.bootloader.path=caterina
|
||||
leonardo.bootloader.file=Caterina.hex
|
||||
leonardo.bootloader.file=Caterina-Leonardo.hex
|
||||
leonardo.bootloader.unlock_bits=0x3F
|
||||
leonardo.bootloader.lock_bits=0x2F
|
||||
leonardo.build.mcu=atmega32u4
|
||||
leonardo.build.f_cpu=16000000L
|
||||
leonardo.build.vid=0x2341
|
||||
leonardo.build.pid=0x8034
|
||||
leonardo.build.core=arduino
|
||||
leonardo.build.variant=leonardo
|
||||
|
||||
##############################################################
|
||||
|
||||
#micro.name=Arduino Micro
|
||||
#micro.upload.protocol=arduino
|
||||
#micro.upload.maximum_size=30720
|
||||
#micro.upload.speed=1200
|
||||
#micro.bootloader.low_fuses=0xde
|
||||
#micro.bootloader.high_fuses=0xda
|
||||
#micro.bootloader.extended_fuses=0xcb
|
||||
#micro.bootloader.path=caterina
|
||||
#micro.bootloader.file=Caterina-Micro.hex
|
||||
#micro.bootloader.unlock_bits=0x3F
|
||||
#micro.bootloader.lock_bits=0x2F
|
||||
#micro.build.mcu=atmega32u4
|
||||
#micro.build.f_cpu=16000000L
|
||||
#micro.build.core=arduino
|
||||
#micro.build.variant=micro
|
||||
micro.name=Arduino Micro
|
||||
micro.upload.protocol=avr109
|
||||
micro.upload.maximum_size=28672
|
||||
micro.upload.speed=57600
|
||||
micro.upload.disable_flushing=true
|
||||
micro.bootloader.low_fuses=0xff
|
||||
micro.bootloader.high_fuses=0xd8
|
||||
micro.bootloader.extended_fuses=0xcb
|
||||
micro.bootloader.path=caterina
|
||||
micro.bootloader.file=Caterina-Micro.hex
|
||||
micro.bootloader.unlock_bits=0x3F
|
||||
micro.bootloader.lock_bits=0x2F
|
||||
micro.build.mcu=atmega32u4
|
||||
micro.build.f_cpu=16000000L
|
||||
micro.build.vid=0x2341
|
||||
micro.build.pid=0x8035
|
||||
micro.build.core=arduino
|
||||
micro.build.variant=micro
|
||||
|
||||
##############################################################
|
||||
|
||||
|
@ -51,9 +51,9 @@ const u16 STRING_LANGUAGE[2] = {
|
||||
|
||||
const u16 STRING_IPRODUCT[17] = {
|
||||
(3<<8) | (2+2*16),
|
||||
#if USB_PID == USB_PID_LEONARDO
|
||||
#if USB_PID == 0x8034
|
||||
'A','r','d','u','i','n','o',' ','L','e','o','n','a','r','d','o'
|
||||
#elif USB_PID == USB_PID_MICRO
|
||||
#elif USB_PID == 0x8035
|
||||
'A','r','d','u','i','n','o',' ','M','i','c','r','o',' ',' ',' '
|
||||
#endif
|
||||
};
|
||||
|
@ -60,8 +60,4 @@
|
||||
|
||||
#define IMANUFACTURER 1
|
||||
#define IPRODUCT 2
|
||||
#define USB_PID_LEONARDO 0x0801
|
||||
#define USB_PID_MICRO 0x0035
|
||||
#define USB_VID 0x2341 // arduino LLC vid
|
||||
#define USB_PID ARDUINO_MODEL_USB_PID
|
||||
|
||||
|
@ -27,8 +27,6 @@
|
||||
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
#define ARDUINO_MODEL_USB_PID 0x0801
|
||||
|
||||
#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0)
|
||||
#define TXLED0 PORTD |= (1<<5)
|
||||
#define TXLED1 PORTD &= ~(1<<5)
|
||||
|
@ -23,5 +23,3 @@
|
||||
*/
|
||||
|
||||
#include "../leonardo/pins_arduino.h"
|
||||
#undef ARDUINO_MODEL_USB_PID
|
||||
#define ARDUINO_MODEL_USB_PID 0x0035
|
Loading…
x
Reference in New Issue
Block a user