Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: [1]  Send TopicPrint
Very Hot Topic (More than 25 Replies) Multiple Definition of Vectors.... (Read 54843 times)
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Multiple Definition of Vectors....
Nov 24th, 2012 at 4:00pm
Print Post  
I've been using the plug-in without the debugger for several weeks with no problems whatsoever.  Today I installed the debugger, and, when (Micro Debug) is set to "Full", I get the errors below - it appears the vectors are being multiply defined.  If I turn (Micro Debug) off, all is fine.  Any ideas?

Regards,
Ray L.


Compiling 'SkyNet' for 'Arduino Mega 2560 or Mega ADK'
Binary sketch size: 11648 bytes (of a 258048 byte maximum) (1.046875 secs)
Compiling debug version of 'SkyNet' for 'Arduino Mega 2560 or Mega ADK'
core.a(HardwareSerial.cpp.o)* : : In function `__vector_25':
HardwareSerial.cpp : multiple definition of `__vector_25'
SkyNet.cpp.o : :/HAL_Arduino_Code.h:372: first defined here
ld.exe : : Disabling relaxation: it will not work with multiple definitions
core.a(HardwareSerial.cpp.o)* : : In function `__vector_36':
HardwareSerial.cpp : multiple definition of `__vector_36'
SkyNet.cpp.o : :/HAL_Arduino_Code.h:383: first defined here
core.a(HardwareSerial.cpp.o)* : : In function `__vector_51':
HardwareSerial.cpp : multiple definition of `__vector_51'
SkyNet.cpp.o : :/HAL_Arduino_Code.h:394: first defined here
core.a(HardwareSerial.cpp.o)* : : In function `__vector_26':
HardwareSerial.cpp : multiple definition of `__vector_26'
SkyNet.cpp.o : :/HAL_Arduino_Code.h:302: first defined here
core.a(HardwareSerial.cpp.o)* : : In function `__vector_37':
HardwareSerial.cpp : multiple definition of `__vector_37'
SkyNet.cpp.o : :/HAL_Arduino_Code.h:313: first defined here
core.a(HardwareSerial.cpp.o)* : : In function `__vector_52':
HardwareSerial.cpp : multiple definition of `__vector_52'
SkyNet.cpp.o : :/HAL_Arduino_Code.h:324: first defined here
avr-objcopy* : : 'C:\Documents and Settings\RayL\Local Settings\Application Data\VMicro\Arduino\Builds\SkyNet\mega2560\SkyNet.elf': No such file
avr-objcopy* : : 'C:\Documents and Settings\RayL\Local Settings\Application Data\VMicro\Arduino\Builds\SkyNet\mega2560\SkyNet.elf': No such file
Couldn't determine program size: 
  
Back to top
 
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #1 - Nov 24th, 2012 at 4:09pm
Print Post  
BTW - Obviously, this has to do with serial port vectors.  I am setting up my own interrupt handlers for the serial ports, which work fine when (Micro Debug) is off.  Here's another odd thing - Since installing the debugger, if I select one of the vector numbers in the source code, for example "USART1_UDRE_vect", right click, and select "Go To Definition", I get an error message that USART1_UDRE_vect is undefined!  It worked before installing the debugger.

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple Definition of Vectors....
Reply #2 - Nov 24th, 2012 at 4:45pm
Print Post  
Hi, okay this might be a couple of things. First off, install of the debugger doesn't alter the way vm works when it is switched off (not set to Full) so we are possibly looking at two problems.

1)

Quote:
"USART1_UDRE_vect", right click, and select "Go To Definition", I get an error message that USART1_UDRE_vect is undefined


When you installed the debugger did you also upgrade your visual micro installation to the latest release? What version of vm is installed tools>options>visual micro>version? Based on your answers I will have more info.

2) 

Quote:
HardwareSerial.cpp : multiple definition of `__vector_25'
SkyNet.cpp.o : :/HAL_Arduino_Code.h:372: first defined here


This looks like you are overriding the normal Arduino HardwareSerial system. The debugger currently supports HardwareSerial, UsbSerial (leonardo types), SoftwareSerial and FastSerial. By default it will attempt to use HardwareSerial which would cause this error if you are creating your own "Serial" object.

The best thing to do for now would be to override the FastSerial option as follows:-  
1) In the project debug properties set the RemoteTransport to "FastSerial"

2) Change the FastSerial.h and FastSerial references in the "VM_DBG.h" and "VM_DBG.cpp" to your own serial classes  such as "HAL_Arduino_Code.h" 

The only code you should change in the .cpp and .h will be contained within a test for VM_DEBUGGER_TYPE_FASTSERIAL. Do not change the #if just change the code within.

Code
Select All
#if defined(VM_DEBUGGER_TYPE) && VM_DEBUGGER_TYPE == VM_DEBUGGER_TYPE_FASTSERIAL 



Tip: Make a backup of your changes because the vm installer will overwrite the following files when you next upgrade, the .cpp and .h files can be found below the vm program folder. Example: "C:\Program Files (x86)\Visual Micro\Visual Micro for Arduino\Micro Platforms\Arduino\Templates\Hardware\Debuggers\VM_DBG"

If you are unsure of where vm is installed you will find the location in Tools>Options>Visual Micro>Version>Assembly
« Last Edit: Nov 24th, 2012 at 4:56pm by Tim@Visual Micro »  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #3 - Nov 24th, 2012 at 5:52pm
Print Post  
Tim,

Thanks for the prompt response.  I'm really looking forward to getting the debugger going.  It looks like a really nice piece of work, and I'm really tired of debugging with prints to a serial port!  Smiley

I installed the "stable" version of the debugger, and the indicated version of visual micro (1210.24, IIRC).  I had a previously installed version, but don't know what it was.  Is there a way to confirm what version is actually being used?

On the Serial code, I have to plead some degree of ignorance here....  A little background might be in order.  I've only been using Arduino for a few days, so it's all new to me.  I am writing code that must run on several platforms, so I've tried to avoid using any of the Arduino libraries.  Therefore, I have not so much as looked at the Arduino serial code.  I am also writing in pure C, not C++, since (sadly!) the other platforms this code needs to run on do not support C++.  I do have my own interrupt handlers for the four serial ports, and all are working perfectly.  Since the platform-specific code is isolated, I *could* switch to the Arduino serial, if that will simplify things.  It is interrupt-driven?  Of course, at the moment, I don't know how to do that....

I assume if I perform the steps you outlined, my Serial code needs to provide specific interfaces to be able to work properly?  Where are those interfaces defined?

Regards,
Ray L.
  
Back to top
 
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #4 - Nov 24th, 2012 at 6:06pm
Print Post  
Tim,

In doing some reading on Arduino Hardware serial, it appears (unless I'm reading out of date posts) that there are a surprising number of people complaining about some pretty significant issues in the low-level code - sitting in spin loops while transmitting, consuming large amounts of memory for serial buffers, even when those ports are not used.  Do you now if these issues have been fixed in current libraries?   

Really stupid question time:  If I simply use serial.begin, serial.available, serial.read and serial.write, am I getting interrupt-drive I/O?  It would be trivial for me to re-write my code around this interface if it will get the job done and resolve the current conflicts.

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple Definition of Vectors....
Reply #5 - Nov 24th, 2012 at 7:03pm
Print Post  
Your vm version is shown in Tools>Options>Visual Micro>Version. When using the main arduino serial port(s), reading from the port has always been interrupt driven.

I think that buffered interrupt driven "write/transmit" has been optional since 1.0.1

To make your own serial system you would need to create your own Arduino library, I suggest you avoid that for now.

For the debugger it sounds like using the built in Arduino serial would be best initially or buying an FTDI Usb cable which would allow you to use SoftwareSerial on any two interrupt driven digital pins.
  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #6 - Nov 24th, 2012 at 7:09pm
Print Post  
Tim,

My installed version appears to be 1.1211.04, even though I DID install 1201.24 before installing the debugger.  Obviously, I had the newer version from my initial install a week or so back.  Is this a problem?

I do have an FTDI USB serial cable - it's what I'm using to talk, and program, to the board (Mega2560), but I'll try porting to the Arduino serial drivers first, and see how that goes.  Shouldn't take long - I'll let you know what happens.

Thanks!

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple Definition of Vectors....
Reply #7 - Nov 24th, 2012 at 7:23pm
Print Post  
Ok, the version is fine. 

The goto definition must be failing for some other reason. Try switching to a different arduino board and then back to the 2560 that refreshes the intellisense.

Does that sort it out? Is the .h in the sketch folder?

  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #8 - Nov 24th, 2012 at 10:05pm
Print Post  
Well, it gets wierder....  I replaced my low-level code with Serial.begin, serial.read, serial.write, and serial.available.  I can't get *anything* to come out!  Even when I put:

serial.begin(57600);
serial.println("Hello, world");

in setup(), nothing comes out.  How is that possible?  Change one define to put my driver back in and it works perfectly.

I'll try another board a bit later.  I don't have one here right now.

Regards,
Ray L.
  
Back to top
 
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #9 - Nov 24th, 2012 at 10:33pm
Print Post  
Ah, poop!  I ran into a problem with using the Serial device - my code needs to know when transmit is complete, but I don't see any way clean to determine this with Serial, as the tx ring buffer is not accessible.  There is a transmitting flag, which looks like it's intended to serve this function, but, looking at the code, it does not appear to get set properly.  It gets set on transmit, then never cleared.

BTW - I'd be happy to send you my code if it would help get to the bottom of my interrupt issue.

Regards,
Ray L.
  
Back to top
 
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #10 - Nov 25th, 2012 at 1:02am
Print Post  
Tim,

This is very peculiar....  I cannot for the life of me get the Serial class to actually work.  Even running a bare-minimum sketch that does a serial.begin and serial.println, nothing comes out on the terminal.  It did work before I installed the debugger....

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple Definition of Vectors....
Reply #11 - Nov 25th, 2012 at 12:19pm
Print Post  
It's nothing to do with the debugger especially if you have the (Micro Debug) set to "None"?

What speed shows in the terminal?
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple Definition of Vectors....
Reply #12 - Nov 25th, 2012 at 2:00pm
Print Post  
Is the serial monitor set to 57600?

Is the DTR checkbox on the serial monitor (make the window wider to see it) checked? 

Adding serial.print to the setup only happens once when the arduino starts so it is easily missed. The DTR will force the arduino to reboot when the serial monitor opens so you should then see the message.

It is better to add serial.print to the loop when testing
« Last Edit: Nov 25th, 2012 at 2:39pm by Tim@Visual Micro »  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #13 - Nov 25th, 2012 at 3:08pm
Print Post  
Tim,

I've used the serial monitor, plus my own custom terminal program, and get the same response with both.  Both are set for 57600.  I've also put the serial.print in the loop, with the same result.  It's baffling....

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple Definition of Vectors....
Reply #14 - Nov 25th, 2012 at 3:12pm
Print Post  
Oh, does your terminal program set the dtr? If not the arduino will start and send the message before your program can connect to the port.

As a test I would move the serial.println("Hello World") from the setup() to the loop(). You should then see hundreds of "Hello World" messages in your terminal program.
  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #15 - Nov 25th, 2012 at 4:09pm
Print Post  
Tim,

I'll try setting DTR, but I doubt that is the problem.  Right now, using my serial driver, there is a print statement in setup() that simply prints "Ready...".  That comes out first time, every time, using my terminal program, or the serial monitor.

Is there no way to share the interrupts with the debugger?  I can give up one serial port and let the debugger have it.

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple Definition of Vectors....
Reply #16 - Nov 25th, 2012 at 4:18pm
Print Post  
Ray, I'm getting a bit confused

I thought you reported this

Quote:
This is very peculiar....  I cannot for the life of me get the Serial class to actually work.  Even running a bare-minimum sketch that does a serial.begin and serial.println, nothing comes out on the terminal.  It did work before I installed the debugger....


But in your last post you said this

Quote:
there is a print statement in setup() that simply prints "Ready...".  That comes out first time, every time, using my terminal program, or the serial monitor.


So is the normal arduino serial working okay now? If so then we are just discussion multiple interrupts?

So let's leave the debugger disabled for the time being.

Can you use Serial2.println("Hello World") in your own sketch combined with your own interrupt handling of Serial?
  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #17 - Nov 25th, 2012 at 4:51pm
Print Post  
Tim,

Sorry, the "Ready...." is using my drivers.

I've got Serial working now, though I'm a bit confused - when I use Serial Monitor, everything comes out as it should.  When I use my terminal program, nothing comes out, though it works perfectly when running MY serial drivers.  I am not explicitly setting DTR, and DTR is clear in SerialMonitor.  I gather by your comments that the Serial driver does not transmit if DTR is set?  So it would appear my terminal program is perhaps inadvertently leaving DTR set.

Anyway, I've gotten to where I can at least transmit using Serial, and SerialMonitor (though the data is not quite correct, yet).  I added the test I need for "Done Transmitting" by simply testing the UDRE bit in my application, so I did not have to modify HardwareSerial.cpp.

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple Definition of Vectors....
Reply #18 - Nov 25th, 2012 at 5:28pm
Print Post  
Not sure why your terminal program isn't seeing any data. The dtr only affects the arduino when the terminal program open the serial port. It causes the arduino to reboot so that the setup() runs once. After the reboot the dtr has no affect unless it is toggled.

Good to hear you found a solution to detect "done transmit". That sounds like a good halfway house between arduino and avr! 

Obviously you WILL need to run the debugger on a different port to the one you are testing for "transmit complete".

Please keep in mind that the debugger will block under various circumstances. Some of which can be disabled. I haven't investigated the arduino non-blocking transmit for debugger use. Non-blocking will have implications for how many TracePoint messages could be transmitted by the arduino without overflowing the transmit buffer....

Summary

The debugger is not recommended for time critical applications. There are various configuration properties that do allow use in time critical projects but these considerations require a certain amount of careful thought. 

For example the placement of breakpoints in places of least impact to time critical functions, applying conditions to breakpoints to ensure execution is limited to major events and/or exceptions, using the "Hit Counter" system to reduce the frequency
  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #19 - Nov 26th, 2012 at 12:52am
Print Post  
Tim,

Right now, I'm getting conflict errors on all eight serial vectors.  So, even if I dedicate one port for the debugger, and  comment out my code for one port, I've still got the errors on the other three.  How do I get around that?

I don't need to debug any time-critical code.  All the low-level, time-critical code is working fine.  It's the top-level message processing code I need to debug, and it all runs in the foreground.

Regards,
Ray L.
  
Back to top
 
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #20 - Nov 26th, 2012 at 12:54am
Print Post  
Tim,

Is the debugger using Serial?  It appears to me Serial grabs all available ports, even if you're using only one.  If so, could I just cobble HardwareSerial.cpp to only use a single port when using the debugger?

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple Definition of Vectors....
Reply #21 - Nov 26th, 2012 at 1:17am
Print Post  
The debugger uses Serial. It uses HardwareSerial unless you specify otherwise in the RemoteTransport project property.

So you can use SoftwareSerial, a custom SerialObject or cobble your own HardwareSerial
« Last Edit: Nov 26th, 2012 at 1:18am by Tim@Visual Micro »  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #22 - Nov 26th, 2012 at 1:25am
Print Post  
Tim,

Ah, ok!  I set Transport to Software Serial, and it's now compiling and loading, so I think I should be OK - just have to get my code off that serial port.

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple Definition of Vectors....
Reply #23 - Nov 26th, 2012 at 1:32am
Print Post  
SoftwareSerial will work on any digital pins that support interrupts. I don't know if it can be used on the hardware serial ports. Arduino.cc/forums should be able to help with that.

To use SoftwareSerial you need to provide the Remote TXPin and Remote RXPin numbers in the project properties
  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #24 - Nov 26th, 2012 at 2:59am
Print Post  
Tim,

I'm trying to get Software Serial working, and I think I'm close, but having different compile problems.  I've set:

Local Port: COM7
Local Speed: 115200

Remote Rx Pin: 10
Remote Tx Pin: 11
Remote Port: Serial
Remote Speed: 115200
Remote Transport: Software Serial

I have Pins 10 & 11 connected to the RS232 level converter, which is plugged into the USB Serial cable, which Windows sees as COM7.

The compile errors I get are:

Compiling 'SkyNet' for 'Arduino Mega 2560 or Mega ADK'
Binary sketch size: 13146 bytes (of a 258048 byte maximum) (1.234375 secs)
Compiling debug version of 'SkyNet' for 'Arduino Mega 2560 or Mega ADK'
SkyNet.ino : : In function 'void setup()':
SkyNet.ino : begin(HardwareSerial*, long int)'
VM_DBG.h : begin(SoftwareSerial*)
VM_DBG.h : begin(SoftwareSerial*, long int)
Error compiling

Regards,
Ray L
« Last Edit: Nov 26th, 2012 at 4:27am by RayLivingston »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple Definition of Vectors....
Reply #25 - Nov 26th, 2012 at 1:22pm
Print Post  
Hi,

One small point is to clear out the "Remote Port" property. If using the rx/tx then remote port is not required

If that doesn't fix it then please email your sketch

Thanks
  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #26 - Nov 26th, 2012 at 4:31pm
Print Post  
Tim,

Clearing the Remote Port property now has it compiling and loading, but when I set a breakpoint, the second monitor window just shows: "Waiting for debug breakpoint data".  If I don't set a breakpoint, the application does run.  If I do set a breakpoint, it appears to stop at the breakpoint, but the debugger never shows anything, and the "Waiting" message never goes away.   Even odder, the Monitor window now refuses to display the output from my program, though my custom terminal program, displays everything just fine.  That makes no sense at all to me, since they are simply monitoring a COM port on the PC!

I will e-mail my sketch shortly.

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple Definition of Vectors....
Reply #27 - Nov 26th, 2012 at 4:56pm
Print Post  
Thanks. 

Sounds like the RX on the arduino is not connected. 

I also forgot to say that SoftwareSerial doesn't like 115200. It does work okay at 115k without break/pause but slower speeds are better when the arduino receieves, please try at 19200. It has worked well for me at 57600 but not for some people.

Remember that Tx on the arduino goes to Rx on the ftdi, and Rx on the arduino goes to tx on the ftdi

I suggest you have break/pause = false so that you only have to worry about the Tx from the arduino to start with.

When you see debug trace messages then you will know the arduino tx is working. The debugger only uses the tx pin when break/pause = false.
« Last Edit: Nov 26th, 2012 at 5:12pm by Tim@Visual Micro »  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #28 - Nov 26th, 2012 at 8:56pm
Print Post  
Tim,

Some progress - I've gotten SoftwareSerial to work, using a simple test program.  I was confused about pin numbers....  Now trying to get the debugger to work with the LED blinking program.  If I set a breakpoint in loop(), and specify "print a message and continue execution", the printouts do come out in the Output window.  So, obviously the board and PC are talking.  At one point, it was also displaying something each pass of loop(), but that stopped - no idea why.  But it I set a regular breakpoint, nothing happens, other than periodically printing "12:53:59.968 BlivetSketch.ino, line 14" in the output window.  The "expressions on COM7" window never shows anything other than "Waiting for debug breakpoint data" in blue.

I also noticed some things in VS seem to have gotten whacked in installing the debugger, which may be the whole problem here.  The Project menu now has two new items "Upload last Arduino build" and "Show all Arduino file", but there are DOZENS of each in there.  I have NO Watch window, and it doesn't shows up anywhere in the View menu.

Regards,
Ray L.
« Last Edit: Nov 26th, 2012 at 9:18pm by RayLivingston »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple Definition of Vectors....
Reply #29 - Nov 27th, 2012 at 12:11pm
Print Post  
Hi, 

1)
You need to run the resetaddin which is documented on the main site. Search for resetaddin. That will remove the multiple menu items.

2)
All breakpoints are tracepoints unless you switch on the project property called "Enable Break/Pause". This is to prevent new users from causing an rc plane to stop in flight Smiley

3)
What "When Hit" message did you add to your breakpoint? Did it contain some variables/expressions to be watched??? Here are 3 different examples, you can add as many {expression} as you like, with or without static text:-

Quote:
Hello World {millis()}

Quote:
{millis()}

Quote:
Hello World


The first two examples should cause millis() to be displayed in the expression window. 

The expression window opens automatically when the debug starts, there is no menu item to open it.

Now that you have the vectors sorted I suggest a new thread for any other issues. Thanks
« Last Edit: Nov 27th, 2012 at 12:12pm by Tim@Visual Micro »  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #30 - Nov 27th, 2012 at 2:13pm
Print Post  
Tim,

resetaddin does get rid of the extra menu items, leaving only one set.  But, if I close then re-open VS, then I have two copies.  Close and re-open again, and I now have three copies.  And so on...

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple Definition of Vectors....
Reply #31 - Nov 27th, 2012 at 2:16pm
Print Post  
Very so often we find a version of vs that has another addin or extension installed that causes this problem.

Vs is unhappy so tells vm that it needs to re-add these controls. When vm asks vs if a control exists on a bar or menu it says it doesn't when it does!!

I expect you are on the latest vs service pack? What other addins have you got installed "Tools>Addin Manager"?

Thanks
  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #32 - Nov 27th, 2012 at 2:39pm
Print Post  
Tim,

Actually, VisualMicro is the ONLY add-on I have installed:

Microsoft Visual Studio 2008
Version 9.0.30729.1 SP
Microsoft .NET Framework
Version 3.5 SP1

Installed Edition: Standard

Microsoft Visual Basic 2008   91851-136-1197172-60481
Microsoft Visual Basic 2008

Microsoft Visual C# 2008   91851-136-1197172-60481
Microsoft Visual C# 2008

Microsoft Visual C++ 2008   91851-136-1197172-60481
Microsoft Visual C++ 2008

Microsoft Visual Web Developer 2008   91851-136-1197172-60481
Microsoft Visual Web Developer 2008

Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB2538241)   KB2538241

Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB944899)   KB944899

Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB945282)   KB945282

Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB946040)   KB946040

Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB946308)   KB946308

Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB946344)   KB946344

Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB946581)   KB946581

Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB947173)   KB947173

Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB947540)   KB947540

Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB947789)   KB947789

Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB948127)   KB948127

Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB953256)   KB953256

Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB971091)   KB971091

Microsoft Visual Studio 2008 Standard Edition - ENU Service Pack 1 (KB945140)   KB945140

Microsoft Visual Studio 2008 Standard Edition - ENU Service Pack 1 (KB947888)   KB947888

Microsoft Visual Studio 2008 Standard Edition - ENU Service Pack 1 (KB948484)   KB948484

Security Update for Microsoft Visual Studio 2008 Standard Edition - ENU (KB2251487)   KB2251487

Security Update for Microsoft Visual Studio 2008 Standard Edition - ENU (KB2669970)   KB2669970

Security Update for Microsoft Visual Studio 2008 Standard Edition - ENU (KB972222)   KB972222

Update for Microsoft Visual Studio 2008 Standard Edition - ENU (KB956453)   KB956453

Update for Microsoft Visual Studio 2008 Standard Edition - ENU (KB967143)   KB967143

Update for Microsoft Visual Studio 2008 Standard Edition - ENU (KB972221)   KB972221

Visual Micro Arduino
Copyright Visual Micro 2009

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple Definition of Vectors....
Reply #33 - Nov 27th, 2012 at 2:58pm
Print Post  
What about extensions Tools>Options>Extension Manager?

Your system looks okay. If you look at Tools>Options do you only see one set of "Visual Micro" options?
  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #34 - Nov 27th, 2012 at 3:16pm
Print Post  
Tim,

There is no Tools->Options->Extension Manager in my VS.  I can't find Extension Manager anywhere....

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple Definition of Vectors....
Reply #35 - Nov 27th, 2012 at 4:51pm
Print Post  
Oh yes I forgot that 2008 doesn't have extensions. 

I'm running out of suggestions. This is VS2008 playing up and I have little control over this part of the process.

All I can suggest is running a repair on vs2008 or downloading VS2012 on the 3 year ms promo. 

Sorry, it might also help to keep in mind that vs uses the office tool bar system and OLE so windows/office updated might help.
  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #36 - Nov 27th, 2012 at 7:07pm
Print Post  
Tim,

I guess I can live with the menu issues, for now.  But, back to the original problem, still no go.  I Enabled Break/Pause, but when it hits the breakpoiint, a message is printed indicating execution is paused, but the message specified in "When hit" does not display, nor does the Expression window ever appear.  The "Waiting for debug breakpoint data" also never goes away, and nothing is ever displayed in that window.  There appears to be no way to continue execution from that point.  The breakpoint source line does highlight when the breakpoint is hit.  This is all running a simple blink application, using hardware serial.

Would it be worthwhile to un-install the plug-in and debugger, and try again?

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple Definition of Vectors....
Reply #37 - Nov 27th, 2012 at 8:53pm
Print Post  
So you are seeing a "Micro Trace" output window message to confirm the breakpoint has been hit or a status bar message?

What is the "When Hit" message that you have set against the breakpoint? 

Please switch off break/pause until you have the trace system working and showing both messages and expressions.

Can you see the "Micro Trace" output window when the debugger starts?

Thanks
« Last Edit: Nov 27th, 2012 at 8:54pm by Tim@Visual Micro »  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #38 - Nov 28th, 2012 at 3:55am
Print Post  
Tim,

What messages I get, come out in the VS Output window.  There are two additional windows, both apparently tied to COM7 (the serial port connected to the Arduino serial port), one of which says only "Port Open", and the other, which I just (stupidly) realized *is* the expression window, which has never shown anything but "Waiting for debug breakpoint data".

When I turn off Break/Trace, I get nothing at all in the output window after the program finishes loading.  The two COM7 windows show the same thing as always - basically nothing.

VS is also now throwing an error when I exit - I get the error dialog asking if I want to send an error report to Microsoft.

Regards,
Ray L.
  
Back to top
 
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #39 - Nov 28th, 2012 at 4:19am
Print Post  
Well, this is odd....  After the last crash on exiting VS, I re-started, and ran the same program - didn't change anything.  It hit the breakpoint, stopped, printed the variables to the expression window, and opened a couple of other windows (performance monitor and digital pins), then stopped working.  Exited VS, it crashed, re-started, and it again worked.  After it hits the breakpoint, I can click the Run button, and it continues, hits the breakpoint again.  After doing this 3 or 4 times, rather than continuing, it re-compiles and re-loads the program.

Are the Run/Stop/Pause/Step buttons supposed to work?  Only the Run button ever enables.

Regards,
Ray L.
  
Back to top
 
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #40 - Nov 28th, 2012 at 4:35am
Print Post  
I un-installed VisualMicro and the debugger, re-installed the latest VisualMicro, and confirmed it worked properly, then re-installed the beta debugger, and VS is now back to crashing on exit, and the debugger is not working.  So, whatever is wrong seems tied tot he debugger, not to Visual Micro.

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple Definition of Vectors....
Reply #41 - Nov 28th, 2012 at 4:02pm
Print Post  
Hi Ray,

The fact that you have multiple menu items appear without the debug shows that vs is unhappy with something. A shutdown crash indicates the same thing. The only difference between debug and non-debug is that more tool windows get opened. We know VS2008 works well for many users and for myself so this problem is something to do with your VS install. Maybe re-installing will help.

As requested, to test the debug you need to switch break/pause OFF

Please follow this video and let me know the results http://www.youtube.com/watch?v=fFM8_RhIG0U

The reason for switching break/pause off is to keep things simple. It is correct that F5/Continue, continues during a break but re-compiles and uploads when not stopped at a break. BUT we need break/pause off for now so that we do not have to have this conversation just yet.

As requested please confirm what you have entered into your "When Hit" message.


Thanks
  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #42 - Nov 28th, 2012 at 4:26pm
Print Post  
Tim,

Since last night, for reasons I can't explain, because I didn't change anything, it's behaving differently, and *almost* working.  I have now, several times, run the program, and it has stopped at the breakpoint, properly displayed the messages in the output window, and properly displayed the variables in the expressions window.  The odd thing is, right now, it doesn't matter whether I have Break/Pause checked or not - it ALWAYS stops at the breakpoint, even though the specified breakpoint action is Print a Message then Continue Execution.  Hitting F5 at this point always results in re-compiling, and re-starting the program, so it appears the debugger for some reason does not think it stopped at a breakpoint.

Regards,
Ray L.
  
Back to top
 
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #43 - Nov 28th, 2012 at 4:39pm
Print Post  
Tim,

Success! (I think....).  I deleted the existing breakpoint, and created a new one, which is working correctly, both with Break/Pause enabled and disabled.  It appears re-installing the plug-in and debugger did clean up the worst of the problems, and perhaps there was something in whatever file the breakpoint conditions are stored in that was causing the whacky behavior I saw earlier today?  In any case, for the moment, it appears to now be working, with the exception of the duplicate menu items (which I can live with).

I did notice when I did the un-install that there were TWO instances of VisualMicro.  Recall that I initially installed the latest version, the attempted to install the version indicated as being correct for the stable debug release over it.  Could this have somehow screwed up the VisualMicro install and caused my problems?

I hate it when a problem gets resolved without knowing how or why....  Sorry for the trouble, and thanks for the help.

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple Definition of Vectors....
Reply #44 - Nov 28th, 2012 at 4:40pm
Print Post  
Hi Ray, 

What LocalSpeed are you using?

Can you upload a "Release" version and then a "Debug" version to see if this allows it to work without break/pause.

Thanks
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple Definition of Vectors....
Reply #45 - Nov 28th, 2012 at 4:42pm
Print Post  
Sorry, didn't see your second message. There should only be one Visual Micro for Arduino item in the control panel>add remove programs list and one Visual Micro Debugger Upgrade.

If you had two of the main plugin installed it is possible that vs would become confused.

If you now have only two items installed then maybe the resetaddin will sort out the UI.

Re-installing will not cause a duplicate.
« Last Edit: Nov 28th, 2012 at 4:43pm by Tim@Visual Micro »  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #46 - Nov 28th, 2012 at 5:23pm
Print Post  
Tim,

I did do another resetaddin, which cleared the duplicates, but they still come back, adding one each time I start VS.  I can live with that.  It does appear then that attempting to install an old plug-in over a newer one is a bad idea, as I don't see how else I could've ended up with two of them showing up in the Add/Remove Programs list.

But, the important thing is all seems to be working well now, and I'm looking forward to getting some good use out of the debugger!

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple Definition of Vectors....
Reply #47 - Nov 28th, 2012 at 5:31pm
Print Post  
There were some issues with the setup program a while back, if you had a version older than 18 months then it would certainly have been an issue but if you try to install the recent version again you will be prompted to repair/uninstall. Hopefully it's all okay now.

Maybe you can try a reset then running vs as administrator once. VS might be having a problem saving to the registry but its a long shot.

I'm pleased it working, well done for hanging in there!!

T

  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Multiple Definition of Vectors....
Reply #48 - Nov 28th, 2012 at 5:34pm
Print Post  
Tim,

The initial install was only about a week ago, and was the latest version (same one I have installed now).  The over-install was a slightly earlier version - the minimum recommended for use with the "Stable" release of the debugger.  When I did the second install, it did offer to "repair" the installation, but obviously what it did was not really a repair....

I always run with Admin rights, but I'll try logging in as Admin, and see if that does anything positive.

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 
Send TopicPrint