diff --git a/app/lib/RXTXcomm.jar b/app/lib/RXTXcomm.jar index 51c7c1935..14de2259b 100644 Binary files a/app/lib/RXTXcomm.jar and b/app/lib/RXTXcomm.jar differ diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index ef17d0ffe..a53597cab 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -52,9 +52,9 @@ import static processing.app.I18n._; * files and images, etc) that comes from that. */ public class Base { - public static final int REVISION = 152; + public static final int REVISION = 153; /** This might be replaced by main() if there's a lib/version.txt file. */ - static String VERSION_NAME = "0152"; + static String VERSION_NAME = "0153"; /** Set true if this a proper release rather than a numbered revision. */ static public boolean RELEASE = false; diff --git a/app/src/processing/app/Preferences.java b/app/src/processing/app/Preferences.java index babc91cbb..23ca12287 100644 --- a/app/src/processing/app/Preferences.java +++ b/app/src/processing/app/Preferences.java @@ -302,6 +302,15 @@ public class Preferences { // other things that have to be set explicitly for the defaults setColor("run.window.bgcolor", SystemColor.control); + + fixPreferences(); + } + + private static void fixPreferences() { + String baud = get("serial.debug_rate"); + if ("14400".equals(baud) || "28800".equals(baud) || "38400".equals(baud)) { + set("serial.debug_rate", "9600"); + } } diff --git a/app/src/processing/app/Serial.java b/app/src/processing/app/Serial.java index e084e12b2..5537f9275 100644 --- a/app/src/processing/app/Serial.java +++ b/app/src/processing/app/Serial.java @@ -159,6 +159,8 @@ public class Serial implements SerialPortEventListener { if (portId.getName().equals(iname)) { //System.out.println("looking for "+iname); port = (SerialPort)portId.open("serial madness", 2000); + port.setDTR(true); + port.setRTS(true); input = port.getInputStream(); output = port.getOutputStream(); port.setSerialPortParams(rate, databits, stopbits, parity); diff --git a/app/src/processing/app/SerialMonitor.java b/app/src/processing/app/SerialMonitor.java index 58adff44e..90edfbcee 100644 --- a/app/src/processing/app/SerialMonitor.java +++ b/app/src/processing/app/SerialMonitor.java @@ -121,8 +121,8 @@ public class SerialMonitor extends JFrame implements MessageConsumer { lineEndings.setMaximumSize(lineEndings.getMinimumSize()); String[] serialRateStrings = { - "300","1200","2400","4800","9600","14400", - "19200","28800","38400","57600","115200" + "300","1200","2400","4800","9600", + "19200","57600","115200" }; serialRates = new JComboBox(); diff --git a/app/src/processing/app/syntax/PdeKeywords.java b/app/src/processing/app/syntax/PdeKeywords.java index 701978a45..ead926ec9 100644 --- a/app/src/processing/app/syntax/PdeKeywords.java +++ b/app/src/processing/app/syntax/PdeKeywords.java @@ -99,7 +99,7 @@ public class PdeKeywords extends CTokenMarker { //String htmlFilename = second.substring(tab + 1).trim(); String coloring = pieces[1].trim(); - if (coloring.length() > 0) { + if (coloring.length() > 0 && Character.isDigit(coloring.charAt(coloring.length() - 1))) { // text will be KEYWORD or LITERAL boolean isKey = (coloring.charAt(0) == 'K'); // KEYWORD1 -> 0, KEYWORD2 -> 1, etc diff --git a/build/linux/dist/lib/librxtxSerial.so b/build/linux/dist/lib/librxtxSerial.so old mode 100755 new mode 100644 index 19193f799..2cc270df8 Binary files a/build/linux/dist/lib/librxtxSerial.so and b/build/linux/dist/lib/librxtxSerial.so differ diff --git a/build/macosx/template.app/Contents/Resources/Java/librxtxSerial.jnilib b/build/macosx/template.app/Contents/Resources/Java/librxtxSerial.jnilib old mode 100755 new mode 100644 index b15dfa5e8..5a3bb0b5e Binary files a/build/macosx/template.app/Contents/Resources/Java/librxtxSerial.jnilib and b/build/macosx/template.app/Contents/Resources/Java/librxtxSerial.jnilib differ diff --git a/build/shared/revisions.txt b/build/shared/revisions.txt index 34412f94a..dbea406ca 100644 --- a/build/shared/revisions.txt +++ b/build/shared/revisions.txt @@ -1,4 +1,12 @@ +ARDUINO 1.5.3 BETA + +[ide] +* Removed useless baud rates from serial monitor + +[arduino core] +* sam: Fixed delayMicrosecond() when interrupts are disabled + ARDUINO 1.5.2 BETA - 2013.02.06 [ide] diff --git a/build/windows/dist/rxtxSerial.dll b/build/windows/dist/rxtxSerial.dll index c0e6b5822..c66c1ccb8 100644 Binary files a/build/windows/dist/rxtxSerial.dll and b/build/windows/dist/rxtxSerial.dll differ diff --git a/hardware/arduino/avr/boards.txt b/hardware/arduino/avr/boards.txt index d9860e6c3..f28192094 100644 --- a/hardware/arduino/avr/boards.txt +++ b/hardware/arduino/avr/boards.txt @@ -233,7 +233,7 @@ esplora.bootloader.lock_bits=0x2F esplora.build.mcu=atmega32u4 esplora.build.f_cpu=16000000L esplora.build.vid=0x2341 -esplora.build.pid=0x8036 +esplora.build.pid=0x803c esplora.build.board=ARDUINO_ESPLORA esplora.build.core=arduino esplora.build.variant=leonardo diff --git a/hardware/arduino/sam/cores/arduino/Arduino.h b/hardware/arduino/sam/cores/arduino/Arduino.h index c433ead6a..a1682a36c 100644 --- a/hardware/arduino/sam/cores/arduino/Arduino.h +++ b/hardware/arduino/sam/cores/arduino/Arduino.h @@ -41,12 +41,6 @@ extern "C"{ void yield(void); -#include "wiring.h" -#include "wiring_digital.h" -#include "wiring_analog.h" -#include "wiring_shift.h" -#include "WInterrupts.h" - /* sketch */ extern void setup( void ) ; extern void loop( void ) ; @@ -195,6 +189,12 @@ extern const PinDescription g_APinDescription[] ; // Include board variant #include "variant.h" +#include "wiring.h" +#include "wiring_digital.h" +#include "wiring_analog.h" +#include "wiring_shift.h" +#include "WInterrupts.h" + // USB Device #define USB_VID 0x2341 // arduino LLC vid #define USB_PID_LEONARDO 0x0034 diff --git a/hardware/arduino/sam/cores/arduino/wiring.c b/hardware/arduino/sam/cores/arduino/wiring.c index 431761b44..a934c50f5 100644 --- a/hardware/arduino/sam/cores/arduino/wiring.c +++ b/hardware/arduino/sam/cores/arduino/wiring.c @@ -49,13 +49,6 @@ void delay( uint32_t ms ) yield(); } -void delayMicroseconds( uint32_t us ) -{ - uint32_t start = micros(); - while ((micros() - start) < us) - ; -} - #if defined ( __ICCARM__ ) /* IAR Ewarm 5.41+ */ extern signed int putchar( signed int c ) ; /** diff --git a/hardware/arduino/sam/cores/arduino/wiring.h b/hardware/arduino/sam/cores/arduino/wiring.h index ad13cac66..3c58cf06c 100644 --- a/hardware/arduino/sam/cores/arduino/wiring.h +++ b/hardware/arduino/sam/cores/arduino/wiring.h @@ -62,8 +62,16 @@ extern void delay( uint32_t dwMs ) ; * * \param dwUs the number of microseconds to pause (uint32_t) */ -extern void delayMicroseconds( uint32_t dwUs ) ; - +static inline void delayMicroseconds(uint32_t) __attribute__((always_inline, unused)); +static inline void delayMicroseconds(uint32_t usec){ + uint32_t n = usec * (VARIANT_MCK / 3000000); + asm volatile( + "L_%=_delayMicroseconds:" "\n\t" + "subs %0, #1" "\n\t" + "bge L_%=_delayMicroseconds" "\n" + : "+r" (n) : + ); +} #ifdef __cplusplus } diff --git a/hardware/arduino/sam/variants/arduino_due_x/variant.h b/hardware/arduino/sam/variants/arduino_due_x/variant.h index 11893cfe8..d34a656d2 100644 --- a/hardware/arduino/sam/variants/arduino_due_x/variant.h +++ b/hardware/arduino/sam/variants/arduino_due_x/variant.h @@ -19,6 +19,16 @@ #ifndef _VARIANT_ARDUINO_DUE_X_ #define _VARIANT_ARDUINO_DUE_X_ +/*---------------------------------------------------------------------------- + * Definitions + *----------------------------------------------------------------------------*/ + +/** Frequency of the board main oscillator */ +#define VARIANT_MAINOSC 12000000 + +/** Master clock frequency */ +#define VARIANT_MCK 84000000 + /*---------------------------------------------------------------------------- * Headers *----------------------------------------------------------------------------*/ @@ -40,23 +50,6 @@ extern "C"{ # include /** RedHat Newlib minimal stub */ #endif -/*---------------------------------------------------------------------------- - * Definitions - *----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*/ - -#define ArduinoDueX_DevEd - -/** Name of the board */ -#define VARIANT_NAME "Arduino_DueX_Dev_Ed" - -/** Frequency of the board main oscillator */ -#define VARIANT_MAINOSC 12000000 - -/** Master clock frequency */ -#define VARIANT_MCK 84000000 - /*---------------------------------------------------------------------------- * Pins *----------------------------------------------------------------------------*/