Hello, i have been using Arduino and Eclipse for a while until i have found your debugger tool, so i decided to test VS+VisualMicro and i have some issues with the debugger enabled. I have an Arduino UNO board and i am using the Adafruit LPD8806 libraries together with the SPI library. First of all i have found issues with the robot library (and i have fixed it deleting the Robot libraries as you said in one of the topics) Second, i have the exactly same problem with the ISR than: [url]http://www.visualmicro.com/forums/YaBB.pl?num=1358598602[/url] In my case i have no errors or warnings during the compilation but i don't know if this can be causing my other problems. Third, when i am in "Release Mode" and i press the green play button to compile and upload, everything works fine (compiling, uploading and running on the board), but when i enable the debugger (in release or debug mode) and i compile and upload, everything seems to compile and upload fine, but the program never starts running on the board (the strip is frozen in the last color before the last "upload"). With the debugger ENABLED the COM port window shows: [quote] Port open Port closed Uploading to I/O board Port open [/quote] The debug trace window: [quote] Program Started 'InterruptsTest' Version 1 [/quote] The MicroBuild results window: [quote] Compiling 'InterruptsTest' for 'Arduino Uno' Binary sketch size: 3886 bytes (12% of a 32256 byte maximum) (0,35 secs) Compiling debug version of 'InterruptsTest' for 'Arduino Uno' Binary sketch size: 5696 bytes (18% of a 32256 byte maximum) (0,62 secs) Uploading to I/O board using 'COM3' Done uploading [/quote] With the debugger DISABLED the COM window shows: [quote] Port closed Uploading to I/O board Port open [/quote] The MicroBuild results window: [quote] Compiling 'InterruptsTest' for 'Arduino Uno' Binary sketch size: 3886 bytes (12% of a 32256 byte maximum) (0,38 secs) Uploading to I/O board using 'COM3' Done uploading [/quote] A simplified version of code is: [code] #include <SPI.h> #include <LPD8806.h> int nLEDs = 8; LPD8806 strip = LPD8806(nLEDs); const int effect_Pin = 32; const int speedUP_Pin = 11; const int speedDOWN_Pin = 13; bool Effect_Button_State = LOW; bool SpeedUP_Button_State = LOW; bool SpeedDOWN_Button_State = LOW; int Effect = 0; int speed = 200; unsigned long button_time = 0; unsigned long last_button_time = 0; void InitialiseInterrupt(){ cli(); PCICR = 0xFF; PCMSK2 = 0xFF; PCMSK1 = 0xFF; PCMSK0 = 0xFF; sei(); } ISR(PCINT0_vect) { button_time = millis(); if (button_time - last_button_time > 250) { Effect++; if (Effect > 7) { Effect = 0; } last_button_time = button_time; } } void setup() { pinMode(effect_Pin, INPUT); digitalWrite(effect_Pin, LOW); pinMode(speedUP_Pin, INPUT); digitalWrite(speedUP_Pin, LOW); pinMode(speedDOWN_Pin, INPUT); digitalWrite(speedDOWN_Pin, LOW); InitialiseInterrupt(); strip.begin(); strip.show(); } void colorChase(uint32_t c, uint8_t wait); void colorWipe(uint32_t c, uint8_t wait); void dither(uint32_t c, uint8_t wait); void scanner(uint8_t r, uint8_t g, uint8_t b, uint8_t wait); void wave(uint32_t c, int cycles, uint8_t wait); void rainbowCycle(uint8_t wait); uint32_t Wheel(uint16_t WheelPos); void loop() { if ((Effect == 1) || (Effect == 7)) { colorWipe(strip.Color(127,127,127), speed); } if ((Effect == 2) || (Effect == 7)) { colorWipe(strip.Color(127,0,0), speed); // red } for (int i=0; i < strip.numPixels(); i++) { strip.setPixelColor(i, 0); } } [code] Than you very much in advance.
|