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] 2  Send TopicPrint
Very Hot Topic (More than 25 Replies) VMDPR problem persists (Read 10726 times)
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
VMDPR problem persists
Nov 22nd, 2018 at 7:51pm
Print Post  
The VMDPR problem has been around for a long time:

VMDPR_|4:32:16:0:0:0:0:|||_VMDPR
VMDPR_|4:32:16:2:0:0:0:|||_VMDPR
VMDPR_|4:32:16:0:0:0:0:|||_VMDPR

I can make them disappear by compiling in release mode, but that seems to be a bit of a hack. I need to be able to see the Digital Pins and my Serial Output window is being filled with countless VMDPR messages even when I am not writing to it. Lips Sealed

When will this problem actually be fixed?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VMDPR problem persists
Reply #1 - Nov 22nd, 2018 at 8:42pm
Print Post  
I don't see any other reports of this so I guess you have been seeing it and assuming it's a problem. You should not see the messages unless your own serial always ends packets with println() or \r\n

It is also possible there is some outbound serial corruption, depending on hardware, if loop() method repeats very fast

If you switch OFF "vMicro>Debugger>Monitor Digital Pins" and "Monitor Analog Pins" then you will not see the messages during Debug.

Instead of using the automatic reports which happen at the start of every loop() you can control the update of the pin displays using special variable names in a trace-point (non-breaking break-point)

For example this "when hit" break-point would update/display the digital and analog pin displays:-

{@ReportDigital}{@ReportAnalog}

see this doc for more info

You can also use a similar mechanism to plot specific pins in a live chart(s).

The plot windows have a setting that switches to digital mode if viewing a digital pin which more clear shows a rolling 
high/low graph



« Last Edit: Nov 22nd, 2018 at 8:48pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Re: VMDPR problem persists
Reply #2 - Nov 22nd, 2018 at 9:12pm
Print Post  
Tim,

I suspect that people may not thank you as often as you deserve. I submitted a report and had your answer an hour later and it was a very complete answer. Turns out all I had to do was turn off line endings in the Serial window and the garbage went away. Simple.

Your additional recommendations are very interesting as well.

Any hope that eventually I will be able to set breakpoints in shared libraries?

Thanks,

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VMDPR problem persists
Reply #3 - Nov 22nd, 2018 at 9:31pm
Print Post  
Thanks. I am unsure why "line endings" affects things, unless you are sending your own serial to the arduino from the serial window?

The work in progress thread has a download with shared lib debug. You have to switch it on using the new menu item described in the thread.
  
Back to top
WWW  
IP Logged
 
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Re: VMDPR problem persists
Reply #4 - Nov 23rd, 2018 at 1:12am
Print Post  
I just downloaded and installed the new version. When I turned on the Allow Library Debugging, I got this in the Micro Build window:

Code
Select All
Board Properties
name=Arduino Nano w/ ATmega328P (Old Bootloader)
upload.tool=avrdude
upload.protocol=arduino
bootloader.tool=avrdude
bootloader.unlock_bits=0x3F
bootloader.lock_bits=0x0F
build.f_cpu=16000000L
build.board=AVR_NANO
build.core=arduino
build.variant=eightanaloginputs
menu.cpu.atmega328=ATmega328P
menu.cpu.atmega328.upload.maximum_size=30720
menu.cpu.atmega328.upload.maximum_data_size=2048
menu.cpu.atmega328.upload.speed=115200
menu.cpu.atmega328.bootloader.low_fuses=0xFF
menu.cpu.atmega328.bootloader.high_fuses=0xDA
menu.cpu.atmega328.bootloader.extended_fuses=0xFD
menu.cpu.atmega328.bootloader.file=optiboot/optiboot_atmega328.hex
menu.cpu.atmega328.build.mcu=atmega328p
menu.cpu.atmega328old=ATmega328P (Old Bootloader)
menu.cpu.atmega328old.upload.maximum_size=30720
menu.cpu.atmega328old.upload.maximum_data_size=2048
menu.cpu.atmega328old.upload.speed=57600
menu.cpu.atmega328old.bootloader.low_fuses=0xFF
menu.cpu.atmega328old.bootloader.high_fuses=0xDA
menu.cpu.atmega328old.bootloader.extended_fuses=0xFD
menu.cpu.atmega328old.bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex
menu.cpu.atmega328old.build.mcu=atmega328p
menu.cpu.atmega168=ATmega168
menu.cpu.atmega168.upload.maximum_size=14336
menu.cpu.atmega168.upload.maximum_data_size=1024
menu.cpu.atmega168.upload.speed=19200
menu.cpu.atmega168.bootloader.low_fuses=0xff
menu.cpu.atmega168.bootloader.high_fuses=0xdd
menu.cpu.atmega168.bootloader.extended_fuses=0xF8
menu.cpu.atmega168.bootloader.file=atmega/ATmegaBOOT_168_diecimila.hex
menu.cpu.atmega168.build.mcu=atmega168
runtime.ide.path=D:\Arduino
runtime.os=windows
build.system.path=D:\Arduino\hardware\arduino\avr\system
runtime.ide.version=10807
target_package=arduino
target_platform=avr
runtime.hardware.path=D:\Arduino\hardware\arduino
originalid=nano
intellisense.tools.path={runtime.tools.avr-gcc.path}\
avr\4.9.3\include;
tools.atprogram.cmd.path=%AVRSTUDIO_EXE_PATH%\atbackend\atprogram
tools.atprogram.cmd.setwinpath=true
tools.atprogram.program.params.verbose=-v
tools.atprogram.program.params.quiet=-q
tools.atprogram.program.pattern="{cmd.path}" -d {build.mcu} {program.verbose} {program.extra_params} program -c -f "{build.path}\{build.project_name}.hex"
tools.atprogram.program.xpattern="{cmd.path}" {AVRSTUDIO_BACKEND_CONNECTION} -d {build.mcu} {program.verbose} {program.extra_params} program -c -f "{build.path}\{build.project_name}.hex"
tools.atprogram.erase.params.verbose=-v
tools.atprogram.erase.params.quiet=-q
tools.atprogram.bootloader.params.verbose=-v
tools.atprogram.bootloader.params.quiet=-q
tools.atprogram.bootloader.pattern="{cmd.path}" -d {build.mcu} {bootloader.verbose}  program -c -f "{runtime.ide.path}\hardware\arduino\avr\bootloaders\{bootloader.file}"
version=1.6.23
compiler.warning_flags=-w
compiler.warning_flags.none=-w
compiler.warning_flags.default=
compiler.warning_flags.more=-Wall
compiler.warning_flags.all=-Wall -Wextra
compiler.path={runtime.tools.avr-gcc.path}/bin/
compiler.c.cmd=avr-gcc
compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects
compiler.c.elf.flags={compiler.warning_flags} -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections
compiler.c.elf.cmd=avr-gcc
compiler.S.flags=-c -g -x assembler-with-cpp -flto -MMD
compiler.cpp.cmd=avr-g++
compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto
compiler.ar.cmd=avr-gcc-ar
compiler.ar.flags=rcs
compiler.objcopy.cmd=avr-objcopy
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
compiler.elf2hex.flags=-O ihex -R .eeprom
compiler.elf2hex.cmd=avr-objcopy
compiler.ldflags=
compiler.size.cmd=avr-size
build.extra_flags=
compiler.c.extra_flags=
compiler.c.elf.extra_flags=
compiler.S.extra_flags=
compiler.cpp.extra_flags=
compiler.ar.extra_flags=
compiler.objcopy.eep.extra_flags=
compiler.elf2hex.extra_flags=
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.S.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
archive_file_path={build.path}/{archive_file}
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mmcu={build.mcu} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm
recipe.objcopy.eep.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.objcopy.eep.flags} {compiler.objcopy.eep.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.eep"
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
recipe.output.tmp_file={build.project_name}.hex
recipe.output.save_file={build.project_name}.{build.variant}.hex
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
recipe.size.regex=^(?:\.text|\.data|\.bootloader)\s+([0-9]+).*
recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*
recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*
preproc.includes.flags=-w -x c++ -M -MG -MP
recipe.preproc.includes="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {preproc.includes.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}"
preproc.macros.flags=-w -x c++ -E -CC
recipe.preproc.macros="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {preproc.macros.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{preprocessed_file_path}"
tools.avrdude.path={runtime.tools.avrdude.path}
tools.avrdude.cmd.path={path}/bin/avrdude
tools.avrdude.config.path={path}/etc/avrdude.conf
tools.avrdude.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
tools.avrdude.upload.params.verbose=-v
tools.avrdude.upload.params.quiet=-q -q
tools.avrdude.upload.verify=
tools.avrdude.upload.params.noverify=-V
tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" {upload.verbose} {upload.verify} -p{build.mcu} -c{upload.protocol} "-P{serial.port}" -b{upload.speed} -D "-Uflash:w:{build.path}/{build.project_name}.hex:i"
tools.avrdude.program.params.verbose=-v
tools.avrdude.program.params.quiet=-q -q
tools.avrdude.program.verify=
tools.avrdude.program.params.noverify=-V

 

« Last Edit: Nov 23rd, 2018 at 1:16am by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Re: VMDPR problem persists
Reply #5 - Nov 23rd, 2018 at 1:13am
Print Post  
The important part got truncated:

Library folder does not exist:
Code
Select All
d\Debug\SPI
System.IO.DirectoryNotFoundException: Could not find a part of the path ld\Debug\SPI'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileSystemEnumerableIterator`1.CommonInit()
   at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
   at System.IO.DirectoryInfo.InternalGetDirectories(String searchPattern, SearchOption searchOption)
   at System.IO.DirectoryInfo.GetDirectories()
   at nfo outputPath, DirectoryInfo libraryFolder, List`1 includePaths, Boolean NoExec, Boolean isRoot)
   at Visual.Micro.MiroAppAPI.SketchCompilerArduino.compileLibraries(List`1 includePaths)
   at Visual.Micro.MiroAppAPI.SketchCompilerArduino._compile(SketchBuilder lsketch, String primaryClassName, Boolean verbose, Boolean isDebug)
   at Visual.Micro.MiroAppAPI.SketchCompilerArduino.compile(SketchBuilder lsketch, String primaryClassName, Boolean verbose, Boolean isDebug)
   at Visual.Micro.Visual.Studio.Arduino.AddInApp._CompileDo(Object oProject, Boolean IsDebugStartCommand, Boolean isRebuild, Boolean UseGdbIfAvailable)
   at Visual.Micro.Visual.Studio.Arduino.AddInApp.CompileDo(Object oProject, Boolean IsDebugStartCommand, Boolean isRebuild, Boolean UseGdbIfAvailable)
   at Visual.Micro.Visual.Studio.Arduino.AddInApp.Compile(Object oProject, Boolean IsDebugStartCommand, Boolean IsRebuild, Boolean UseGdbIfAvailable) 


« Last Edit: Nov 23rd, 2018 at 1:16am by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VMDPR problem persists
Reply #6 - Nov 23rd, 2018 at 1:18am
Print Post  
Thanks, it needs a bit more testing.


ps: When you click Reply instead of using the quick Reply below you get the opportunity to attach a .txt file with your build output. That will be easier Smiley

Please repost a .txt after switching on "vmicro>compiler>show build properties"
« Last Edit: Nov 23rd, 2018 at 1:20am by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Re: VMDPR problem persists
Reply #7 - Nov 23rd, 2018 at 1:25am
Print Post  
Output is attached.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VMDPR problem persists
Reply #8 - Nov 23rd, 2018 at 2:00am
Print Post  
Thanks

Can I please see the same output but with Allow Library Debugging switched off
  
Back to top
WWW  
IP Logged
 
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Re: VMDPR problem persists
Reply #9 - Nov 23rd, 2018 at 3:57am
Print Post  
Tim,

Sorry for the delay. We were having our annual "We escaped from King George" celebration, otherwise known here as Thanksgiving.

The attached is with Allow Library Debugging turned off.

Bob
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VMDPR problem persists
Reply #10 - Nov 23rd, 2018 at 7:40pm
Print Post  
Unfortunately verbose is now off. I need an output with both verbose and "show build properties" enabled.
  
Back to top
WWW  
IP Logged
 
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Re: VMDPR problem persists
Reply #11 - Nov 23rd, 2018 at 8:13pm
Print Post  
OK - here you go.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VMDPR problem persists
Reply #12 - Nov 23rd, 2018 at 8:19pm
Print Post  
Looks like it fails for libraries that are not configured as shared libraries. NanoBots needs to be a shared library in the release you are using to allow debug.

If you Add Library for NanoBots with the "Create project when adding lib" checkbox checked then add a "Reference" to it from the Arduino project it should be okay.

I think you are using 4 libraries so you should have 4 shared projects.

Thanks for the testing
« Last Edit: Nov 23rd, 2018 at 8:20pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Re: VMDPR problem persists
Reply #13 - Nov 23rd, 2018 at 8:38pm
Print Post  
Now you are touching on an ongoing problem I have had. I add the NanoBot library with the Create Shared Project box checked... but it adds it as External Dependency rather than a shared library. 

All of the other libraries come in fine, but when I have to add a new class to NanoBots, I get this problem.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VMDPR problem persists
Reply #14 - Nov 23rd, 2018 at 8:42pm
Print Post  
make sure you don't have an src/_micro-api folder showing in the solution explorer.

does the library have a library.properties file in its root?

what you you mean external dependency? does the shared project get created and exist in the solution explorer? show an image if not

Thanks
  
Back to top
WWW  
IP Logged
 
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Re: VMDPR problem persists
Reply #15 - Nov 23rd, 2018 at 8:54pm
Print Post  
1) make sure you don't have an src/_micro-api folder showing in the solution explorer. 

There is no src/* folder (see attached jpg file)

2) does the library have a library.properties file in its root?

YES

3) what you you mean external dependency? does the shared project get created and exist in the solution explorer? show an image if not

There is  a folder under Whacko labeled Externa Dependencies. All of the BJ* files wind up in this folder.

Bob
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Re: VMDPR problem persists
Reply #16 - Nov 23rd, 2018 at 8:55pm
Print Post  
Here is an image of the External Dependencies folder.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VMDPR problem persists
Reply #17 - Nov 23rd, 2018 at 8:58pm
Print Post  
okay ignore external dependencies they are auto discovered for intellisense only by vs. It will find lots of things.

You are saying that when you try to add the "NanoBots" library to a project nothing happens.

This is probably because the library has already been #included in the .ino code.

Try removing #include <NanoBots.h> from the code, save it and then re-add the NanoBots library
« Last Edit: Nov 23rd, 2018 at 8:59pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Re: VMDPR problem persists
Reply #18 - Nov 23rd, 2018 at 9:03pm
Print Post  
1) okay ignore external dependencies they are auto discovered for intellisense only by vs. It will find lots of things.

UNDERSTOOD. Thanks.

2) You are saying that when you try to add the "NanoBots" library to a project nothing happens.

The code shows up under External Dependencies and I can run the program, but NanoBots does not appear as a project

3) This is probably because the library has already been #included in the .ino code.

I am well aware of that and delete the include statements as part of my process.

Would you consider doing a Zoom session with me? You can easily see what is happening. No cost - I have a Zoom account I use all the time.

Bob
Try removing #include <NanoBots.h> from the code then re-add the NanoBots library
Back to top      
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VMDPR problem persists
Reply #19 - Nov 23rd, 2018 at 9:06pm
Print Post  
Okay so take a look in the documents\arduino\libraries folder and see if there is a .vcxitems file? That is all we create to make a shared project. If there is then right click the solution name in the solution explorer and then click "add > existing project"

if you add it and it contains no files then ensure solution explorer is in "show all files" mode and ctl+click to highlights the folders/files, then right click "include in project". That is how you can make a new empty shared project. 

« Last Edit: Nov 23rd, 2018 at 9:09pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint