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) Digispark programming error (Read 8106 times)
Felipe
Junior Member
**
Offline


Posts: 12
Joined: Sep 16th, 2015
Digispark programming error
Dec 11th, 2016 at 1:29pm
Print Post  
Hi,

When trying to program the digispark in Visual Studio I'm getting errors every time. I think it is because my user has a space in it and the digispark launcher can't handle it.

Code
Select All
C:\Users\Felipe her -cdigispark --timeout 60 -Uflash:w:C:\Users\Felipe nariaV2-t85.ino.hex:i
Running Digispark Uploader...
Plug in device now... (will timeout in 60 seconds)
...
> Error opening C:\Users\Feli: No such file or directory
> Error loading or parsing hex file. 



When programing with the Arduino enviroment, it avoid using spaces in the (8.3 filename/folders) to pass the hex file location parameter. It gives no errors.

Code
Select All
C:\Users\Felipe her -cdigispark --timeout 60 t85.ino.hex:i  



I've tried putting quotation marks in the platform.txt but I still can't program it

Original
Code
Select All
tools.micronucleus.upload.pattern="{cmd.path}" -cdigispark --timeout 60 -Uflash:w:{build.path}\{build.project_name}.hex:i 



Modified
Code
Select All
tools.micronucleus.upload.pattern="{cmd.path}" -cdigispark --timeout 60 -Uflash:w:{build.path}\"{build.project_name}.hex":i 



Is it possible to modify the {build.path} and {build.project_name} to only use the 8.3 convention? Is there any other variables that uses this convention?

Thank you,
Felipe Maimon
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Digispark programming error
Reply #1 - Dec 11th, 2016 at 6:28pm
Print Post  
Hi,

There is a setting to use 8.3 build paths I will look at enabling it for digitspark.

The issue is actually a poorly constructed digispark platform.txt that should have quotes around the file names as it does already in the compile section.

8.3 causes problems for some hardware so it's a balancing act between the various poorly designed config files of certain hardware.

You can force 8.3 by adding the following to a local project board.txt

Code
Select All
upload.8dot3=true 



  
Back to top
IP Logged
 
Felipe
Junior Member
**
Offline


Posts: 12
Joined: Sep 16th, 2015
Re: Digispark programming error
Reply #2 - Dec 11th, 2016 at 7:35pm
Print Post  
Hi,

Tim@Visual Micro wrote on Dec 11th, 2016 at 6:28pm:
You can force 8.3 by adding the following to a local project board.txt


I've tried right clicking on my project in the solution explorer, going to "Add/Add Local Board.txt (Pro)" and I've put the "upload.8dot3=true" in it (file attached), but it still using the full path name. Is there anything else I need to do?

Thank you,
Felipe
  

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


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Digispark programming error
Reply #3 - Dec 11th, 2016 at 7:53pm
Print Post  
I've look at this and 8dot3 is on by default. I suspect java automatically handles this for the arduino ide and looks though the string to find valid file names. Not very scientific, Visual Micro does similar but obviously not so well in certain cases

I would say you put the opening quote in the wrong location when you changed it. The " needs to be before {build.path}\ because it contains the path. 

Code
Select All
tools.micronucleus.upload.pattern="{cmd.path}" -cdigispark --timeout 60 -Uflash:w:"{build.path}\{build.project_name}.hex":i
 



You can also look in the arduinoide\hardware\arduino\avr folder for how the standard arduino core uses quotes with the -Uflash:w: param.
  
Back to top
IP Logged
 
Felipe
Junior Member
**
Offline


Posts: 12
Joined: Sep 16th, 2015
Re: Digispark programming error
Reply #4 - Dec 11th, 2016 at 8:11pm
Print Post  
Tim@Visual Micro wrote on Dec 11th, 2016 at 7:53pm:
I would say you put the opening quote in the wrong location when you changed it. The " needs to be before {build.path}\ because it contains the path.


Still no good. Error below.

Code
Select All
Uploading via Bootloader
C:\Users\Felipe her -cdigispark --timeout 60 -Uflash:w:"C:\Users\Felipe nariaV2-t85.ino.hex":i
Running Digispark Uploader...
...
> Error opening nariaV2-t85.ino.hex: No such file or directory
> Error loading or parsing hex file. 



This time the file path in the error is everything after the space (Maimon\AppData...). Before, it was everything up until the space, minus a couple chars (C:\Users\Feli)

The arduino enviroment uses quotation marks around the whole -Uflash... I've also tried that with the same error as above.

Code
Select All
tools.micronucleus.upload.pattern="{cmd.path}" -cdigispark --timeout 60 "-Uflash:w:{build.path}/{build.project_name}.hex:i" 

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


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Digispark programming error
Reply #5 - Dec 11th, 2016 at 9:11pm
Print Post  
Oh I see sorry. 

The problem is the digispark uploader doesn't cater for windows long files names. The error is in the uploader code which is struggling to work out what the name of the file is.

I will take a look over the next few days to find a workable solution. 

Thanks

In the meantime you should find a solution by setting your own temporary build folder in the visual micro options. The main problems seems to be your user name being two words so using a different temp folder will solve that.

Tools>options>visual micro>compiler>temporary build folder

Set it to something like c:\temp\vmicro

You might also need to rename the project because it has a long name. However the digispark code might be happy with that, it might be the space in "your name" that throws it out.

If you open the project in visual micro then right click the INO file and choose rename, visual micro should rename the project, solution and containing folder at the same time. 

note: When renaming projects, it is important for arduino that the master .ino, the project and the containing folder have the same name.




« Last Edit: Dec 11th, 2016 at 9:12pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Digispark programming error
Reply #6 - Dec 12th, 2016 at 9:05pm
Print Post  
Hi,

I've looked this again and can see you are using an old version of Visual Micro. 

The default temp folder was changed some time ago to use the windows temp instead of users appData folder. 

The arduino ide made the same change. 

So please update visual micro and then try it.

Thanks
  
Back to top
IP Logged
 
Felipe
Junior Member
**
Offline


Posts: 12
Joined: Sep 16th, 2015
Re: Digispark programming error
Reply #7 - Dec 12th, 2016 at 9:56pm
Print Post  
Hi,

My Visual Micro version is up to date. Here is a snapshot of the Extensions and Updates window:

« Last Edit: Dec 12th, 2016 at 9:57pm by Felipe »  

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


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Digispark programming error
Reply #8 - Dec 12th, 2016 at 10:29pm
Print Post  
Thanks

Is "tools>options>visual micro>compiler>temporary build folder" empty?
  
Back to top
IP Logged
 
Felipe
Junior Member
**
Offline


Posts: 12
Joined: Sep 16th, 2015
Re: Digispark programming error
Reply #9 - Dec 15th, 2016 at 10:05pm
Print Post  
Tim@Visual Micro wrote on Dec 12th, 2016 at 10:29pm:
Is "tools>options>visual micro>compiler>temporary build folder" empty?


It was. I've set it to C:\Temp\vmicro after this reply of yours:

Tim@Visual Micro wrote on Dec 11th, 2016 at 9:11pm:
In the meantime you should find a solution by setting your own temporary build folder in the visual micro options. The main problems seems to be your user name being two words so using a different temp folder will solve that.

Tools>options>visual micro>compiler>temporary build folder

Set it to something like c:\temp\vmicro


After that, it started working correctly.

Best regards,
Felipe
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Digispark programming error
Reply #10 - Dec 15th, 2016 at 10:32pm
Print Post  
Okay. I think it's just the space in the path name that causes the issue but will try to resolve to 8.3

Thanks very much for the update
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint