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
Hot Topic (More than 8 Replies) Trouble with {@ReportDigital} (Read 7143 times)
Mike in Michigan
Newbies
*
Offline


Posts: 5
Joined: Dec 5th, 2015
Trouble with {@ReportDigital}
Dec 5th, 2015 at 3:18am
Print Post  
Hi all - 
I'm attempting to monitor the state of the digital pins on my UNO board.
I'm using AS7 and have purchased the license for Visual Studio. I've managed to get the break points to work as expected, but reading the state of the digital pins has not worked out. When I insert a breakpoint and click 'Actions', and then insert {@ReportDigital} in the 'Log a message to Output Window' box, I get this message when I try to compile:

Compiling debug version of 'Direct_Port_1' for 'Arduino/Genuino Uno'
Direct_Port_1.ino:In function `loop
Direct_Port_1.ino:printPortsDigital()
collect2.exe*:error: ld returned 1 exit status
Error creating .elf


I don't know if I'm implementing the digital pin monitoring incorrectly, or if there is some other problem. Any thoughts are greatly appreciated.

As a side note, I tried reading the analog pins using the same method, and had all sorts of compilation errors.

Thanks for any thoughts - Mike 

UPDATE:
For whatever reason, the issue seems to have resolved itself. I tried @ReportDigital again, and it failed to compile as before. Then I tried @ReportAnalog and @ReportFreeMemory, and they failed to compile. I then tried @ReportI2C, and it did compile. I went back to try @ReportDigital again, and it compiled and worked. I have no idea what happened or why, but all is well.
« Last Edit: Dec 5th, 2015 at 2:37pm by Mike in Michigan »  
Back to top
 
IP Logged
 
Mike in Michigan
Newbies
*
Offline


Posts: 5
Joined: Dec 5th, 2015
Re: Trouble with {@ReportDigital} UPDATE:
Reply #1 - Dec 7th, 2015 at 4:59pm
Print Post  
Per my previous post, I thought the problem had resolved itself. 
However, the problem seems to return after a reboot. If anyone 
has any insight on what the above error message might indicate, 
I would be grateful to hear about it.
Thanks - Mike
  
Back to top
 
IP Logged
 
Arjuino
Newbies
*
Offline


Posts: 7
Location: Netherlands
Joined: Dec 16th, 2015
Re: Trouble with {@ReportDigital}
Reply #2 - Dec 18th, 2015 at 12:21pm
Print Post  
Hi MinM,

I'm experiencing the same thing. Sometimes some of the settings work but often they don't. 

At one time the I2C setting compiled, the next time only Analogs compiles but Analogs and/or Digitals fail with the collect2* error. 

Code that worked properly breaks and won't repair itself by turning reporting off; turning it back on never seems to work. Starting a fresh sketch with one of the reporting options ON seems (?) to work but modifying an older one, not so much. Restarting VS and reloading the sketch also has no influence.
  
Back to top
 
IP Logged
 
Mike in Michigan
Newbies
*
Offline


Posts: 5
Joined: Dec 5th, 2015
Re: Trouble with {@ReportDigital}
Reply #3 - Dec 18th, 2015 at 1:38pm
Print Post  
Hi Arjuino,

It does seem to be hit and miss if it works or not. The rest of the features seem to work fine, and it's a great help on the Arduino boards.

However, I think I'll be making serious efforts to transition over to hardware from Atmel. I just recently bought the ATmega328PB-XMINI. 
The board can be debugged directly though AS7 - all the registers can be monitored. Headers can be soldered to the board an used similar 
to the Arduino stuff. 

Thanks for your reply - good to know I'm not the only one having problems.

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Trouble with {@ReportDigital}
Reply #4 - Dec 18th, 2015 at 1:53pm
Print Post  
Hi Arjuino,

I plan to look at this this weekend. However you can read anything you want via the breakpoints {digitalRead(13)} so the graphical report isn't that important. You can also use the debugger to toggle them {digitalWrite(13, HIGH)}. You can call any Arduino methods or your own, from the debugger.

You can also use the plot command but it's about to be improved massively. Right now you can do this:-

{@plot.MyChartTest1.Pin13.Red digitalRead(13)}{@plot.MyChartTest2.Pin11.Green digitalRead(11)}
or
{@plot.Pin13 digitalRead(13)}
or
{@plot.MyPins.Pin13 digitalRead(13)}

You can delete the xml files from the __vm folder to clear any previous settings.

Hi Mike, the explained atmel boards are okay but if you go with atmel cpp instead of Arduino your code won't easily port to esp8266 and other Arduino compatible boards.
« Last Edit: Dec 18th, 2015 at 1:56pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Arjuino
Newbies
*
Offline


Posts: 7
Location: Netherlands
Joined: Dec 16th, 2015
Re: Trouble with {@ReportDigital}
Reply #5 - Dec 18th, 2015 at 3:17pm
Print Post  
Tim@Visual Micro wrote on Dec 18th, 2015 at 1:53pm:
You can delete the xml files from the __vm folder to clear any previous settings.

Erasing the xlm's does not compile a failing reporter. Setting "Compare Dates and Times" to False, does seem to do the trick, however. For now at least.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Trouble with {@ReportDigital}
Reply #6 - Dec 18th, 2015 at 3:22pm
Print Post  
Great! Thanks, that means it is a compiler cache issue and explains why it appears random.

Will fix.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Trouble with {@ReportDigital}
Reply #7 - Dec 19th, 2015 at 4:23pm
Print Post  
I forgot to say that you should be able to leave the date/tome comparisons switched on but click "Build>Clean" or "Build>Rebuild" after you change any of the report settings. The Rebuild is the fastest of the two because the Arduino core isn't recompiled.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Trouble with {@ReportDigital}
Reply #8 - Dec 21st, 2015 at 5:35pm
Print Post  
I hope the latest release fixes this issue with the debugger compiler cache.

Thanks for the reports.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint