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
Normal Topic Error uploading with custom programmer (Read 3658 times)
CapnBry
Junior Member
**
Offline


Posts: 32
Joined: Nov 4th, 2011
Error uploading with custom programmer
Jun 28th, 2017 at 4:15pm
Print Post  
I've got some custom programmers defined that I use to network flash some embedded devices. I used them a lot with Visual Micro a while back but things broke a while back and I never looked into it until today. It was due to the Arduino 1.5 changes to how they laid out their directory structure so I have updated my custom configs to the new formats and it works great in Arduino 1.8.0 as a custom programmer. However, in Visual Micro it fails
Code
Select All
Uploading 'heatermeter' to 'Arduino/Genuino Uno' using 'wwwdude'
Uploader started for board Arduino/Genuino Uno
Uploader will use programmer name: wwwdude
Error during upload using programmer
Index was outside the bounds of the array.

Index was outside the bounds of the array.
The uploader returned an error
 



I assume VMicro is trying to do some sort of parameter replacement on the upload line, but my uploader doesn't have the parameter it is looking for so it bombs out? I have tried adding all sorts of bits and extra lines to my config files (pattern, path, etc), swapping slash directions, but because the error message doesn't say what it is looking for, I am trying to troubleshoot it blind.

Here are my files from Arduino/hardware/capnbry/avr/platform.txt
Code
Select All
name=CapnBry AVR Boards
version=1.0

o\WWW avrdude.bat
tools.wwwdude.program.pattern="{cmd.path}" {build.path}\{build.project_name}.hex
tools.wwwdude.program.params.quiet=
tools.wwwdude.program.params.verbose=
 



Arduino/hardware/capnbry/avr/programmers.txt
Code
Select All
wwwdude.name=WWW avrdude
wwwdude.program.tool=wwwdude
 



And Arduino/hardware/capnbry/avr/boards.txt is present but blank. What is VMicro requiring that the Arduino IDE doesn't for uploading using a custom programmer?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error uploading with custom programmer
Reply #1 - Jun 28th, 2017 at 6:27pm
Print Post  
1)
Can you zip your hardware\capnbry folder so I can try. I expect the platform.txt references "arduino" in some way that visual micro isn't handling correctly.

2)
Switch on "vmicro>compiler>show build properties" and also "verbose" then build/upload and email the output as .txt so I can see your config.

3) Possible workaround

Create a board.txt in the current project (can use the visual micro menu to do that). Notice board.txt is singular.

Add the following to the board.txt then click save before compile/upload

Code
Select All
o\WWW avrdude.bat
tools.wwwdude.program.pattern="{cmd.path}" {build.path}\{build.project_name}.hex
tools.wwwdude.program.params.quiet=
tools.wwwdude.program.params.verbose=
wwwdude.name=WWW avrdude
wwwdude.program.tool=wwwdude
 



Thanks
« Last Edit: Jun 28th, 2017 at 6:28pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
CapnBry
Junior Member
**
Offline


Posts: 32
Joined: Nov 4th, 2011
Re: Error uploading with custom programmer
Reply #2 - Jul 10th, 2017 at 4:03pm
Print Post  
Hi Tim! Thanks for responding and sorry I haven't gotten back to you-- I just lose track of time!

That's the entirety of my hardware directory structure and complete contents of the files listed above. I can provide a zip with them as well as the verbose output you requested but I don't remember your email address.

Adding the board.txt did make it work. Comparing the two build properties, I see that the one that does not work doesn't have my wwwdude tool listed at all in the properties, and the one that works does have it (all the lines of the board.txt are present). Without the board.txt (and reloading the toolchain / IDE) I still have "WWW avrdude" listed in my programmers, so somehow it is showing up there but there is none of the information in the build properties dump.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error uploading with custom programmer
Reply #3 - Jul 10th, 2017 at 5:14pm
Print Post  
Thanks, I noticed you were using custom hardware from within ide/hardware folder. I think it's finding some inheritance for the \arduino branch and then ignoring the defs in your own branch.

Will look into it over the next week or so.
  
Back to top
WWW  
IP Logged
 
CapnBry
Junior Member
**
Offline


Posts: 32
Joined: Nov 4th, 2011
Re: Error uploading with custom programmer
Reply #4 - Jul 10th, 2017 at 8:57pm
Print Post  
Oh I guess that was a bit ambiguous, my custom hardware is in my user profile's documents\Arduino folder (Ye olde "My Documents"), not in the Arduino IDE tree.

I've uploaded the files to my webserver here if that helps. The hardware.zip is starting from Documents\Arduino. Thanks for looking into it, it seems I am always the guy coming here with broken hardware folders   Undecided
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error uploading with custom programmer
Reply #5 - Jul 10th, 2017 at 9:49pm
Print Post  
Thanks will take a look. No, you are the guy who bothers to report so can be fixed! Thanks!!

Smiley
« Last Edit: Jul 29th, 2017 at 12:56pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error uploading with custom programmer
Reply #6 - Jul 30th, 2017 at 2:43pm
Print Post  
Resolved in latest release.

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