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 Arduino as ISP and ATTiny85 (Read 5632 times)
Tomek Gorski
Newbies
*
Offline


Posts: 7
Joined: Aug 1st, 2013
Arduino as ISP and ATTiny85
Aug 23rd, 2014 at 4:49pm
Print Post  
Hi
I have Visual Studio 2012, most recent Visual Micro plugin and Arduino Ide 1.5.7. I'm trying to setup things to use Arduino as ISP to program ATTiny85. I manged to succeed on Arduino IDE (burns bootloaders, uploads programs), but i have poblem with visual micro.  I use libraries from this address: https://github.com/damellis/attiny/tree/ide-1.5.x. They work out of the box with Arduino IDE 1.5.7 but since visual micro doesn't support menu building in boards.txt I had to customize it a little:

C:\Program Files (x86)\Arduino\hardware\attiny\avr\boards.txt:

attiny.name=ATtiny85@16MHz(Internal)
attiny.bootloader.tool=arduino:avrdude
attiny.bootloader.unlock_bits=0xff
attiny.bootloader.lock_bits=0xff
attiny.build.core=arduino:arduino
attiny.build.board=attiny
attiny.upload.tool=arduino:avrdude

attiny.upload.maximum_size=8192
attiny.build.mcu=attiny85
attiny.build.variant=tiny8


attiny.bootloader.low_fuses=0xC1
attiny.bootloader.high_fuses=0xD4
attiny.bootloader.extended_fuses=0xFF
attiny.build.f_cpu=16000000L

attiny.upload.params.quiet=-q -q


(basically I only left parts that are related to processor of my interest)


platform.txt also needed some modification (lines added by me are highlighted)
C:\Program Files (x86)\Arduino\hardware\attiny\avr\platform.txt:


name=ATtiny Microcontrollers

tools.avrdude.cmd.path={runtime.ide.path}/hardware/tools/avr/bin/avrdude


tools.avrdude.erase.params.verbose=-v -v -v -v
tools.avrdude.erase.params.quiet=-q -q
tools.avrdude.erase.pattern="{cmd.path}" "-C{config.path}" {erase.verbose} -p{build.mcu} -c{protocol} {program.extra_params} -e -Uefuse:w:{bootloader.extended_fuses}:m -Uhfuse:w:{bootloader.high_fuses}:m -Ulfuse:w:{bootloader.low_fuses}:m

tools.avrdude.program.params.verbose=-v -v -v -v
tools.avrdude.program.params.quiet=-q -q
tools.avrdude.program.pattern="{cmd.path}" "-C{config.path}" {program.verbose} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{build.path}/{build.project_name}.hex:i"


tools.avrdude.bootloader.params.verbose=-v -v -v -v
tools.avrdude.bootloader.params.quiet=-q -q
tools.avrdude.bootloader.pattern="{cmd.path}" "-C{config.path}" {bootloader.verbose} -p{build.mcu} -c{protocol} {program.extra_params}


Now I'm almost there. 
Visual micro gives me this error (now highlight used for significant phrases)
avrdude: ser_open(): can't open device "serial.port": The system cannot find the file specified.
the command was issued as follows:
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude "-CC:\Program Files (x86)\Arduino/hardware/tools/avr/etc/avrdude.conf" -v -v -v -v -pattiny85 -cstk500v1 -P{serial.port} -b19200 hex:i"

the {serial.port} part comes from C:\Program Files (x86)\Arduino\hardware\arduino\avr\programmers.txt
and the line is as follows: 
arduinoasisp.program.extra_params=-P{serial.port} -b{program.speed}

clearly {serial.port} is not substituted with the port name (com5 in my case) in programmers.txt. 

It works perfectly well if I'll do the substitution in programmers.txt by hand as follows:
arduinoasisp.program.extra_params=-Pcom5 -b{program.speed}
but it should happen automatically.
Did I messed up something in txt files or maybe its a bug?
What can I do about that?
thanks.

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino as ISP and ATTiny85
Reply #1 - Aug 23rd, 2014 at 5:10pm
Print Post  
Hi,

Thanks for a great explanation! 

Yes it is certainly a Visual Micro bug. The serial.port variable is not being populated for programmer upload so it fails.

We will try to issue a fix over the next few days, it's a good one found thanks.

The usb/assembler conversation has been moved to here http://www.visualmicro.com/forums/YaBB.pl?num=1409417379
« Last Edit: Aug 31st, 2014 at 8:48pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino as ISP and ATTiny85
Reply #2 - Sep 7th, 2014 at 10:36pm
Print Post  
Sorry for the delay

I know you have a working solution but when time permits please try sp1 which should fix the issue 

install sp1

Thanks
« Last Edit: Sep 7th, 2014 at 10:37pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint