Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
platform.txt - Recipes for extraction of executable files and other binary data (Read 2522 times)
Markk
Junior Member
**
Offline



Posts: 15
platform.txt - Recipes for extraction of executable files and other binary data
Jan 31st, 2017 at 9:01am
 
Hi

first again thanks for a great tool!

Tinkering around with the great Dragonfly board, I stumbled over this error:

Code:
No such file or directory*: Could not open file C:\Users\Myself\AppData\Local\Temp\VMBuilds\Sketch\grumpyoldpizza_Dragonfly-L476RE\Debug\Sketch.ino.dfu for reading 



I suspect Visual Micro might not fully implement the standard for platform.txt with regards to arbitrary file extensions:

Quote:
Recipes for extraction of executable files and other binary data
An arbitrary number of extra steps can be performed by the IDE at the end of objects linking. These steps can be used to extract binary data used for upload and they are defined by a set of recipes with the following format:

Code:
recipe.objcopy.FILE_EXTENSION_1.pattern=[.....]
recipe.objcopy.FILE_EXTENSION_2.pattern=[.....]
[.....] 



FILE_EXTENSION_x must be replaced with the extension of the extracted file, for example the AVR platform needs two files a .hex and a .eep, so we made two recipes like:

Code:
recipe.objcopy.eep.pattern=[.....]
recipe.objcopy.hex.pattern=[.....] 




See here.

This breaks building for the STM32L4xxx boards:
https://github.com/GrumpyOldPizza/arduino-STM32L4

See the platform.txt file there, specifically these lines:
Code:
## Create output (dfu file)
recipe.objcopy.dfu.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.dfu"

## Create output (iap file)
recipe.objcopy.iap.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} -R .boot "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.iap"
 



Thanks for looking into this.

-Markk

EDIT: added verbose compiler log.
Back to top
« Last Edit: Jan 31st, 2017 at 11:16am by Markk »  

 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10529
United Kingdom
Re: platform.txt - Recipes for extraction of executable files and other binary data
Reply #1 - Jan 31st, 2017 at 11:33pm
 
Thanks very much for the very useful and detailed report.

It is a good change. In earlier arduino defs eep, hex and bin were each managed in turn.

It is much less code for visual micro to sit in a loop and process all the recipe.objcopy.??.pattern commands.

This is in the next release due over the next few days. It might be posted as a beta outside of the gallery. If so then I will post a link here.

Thanks again for the best report ever.
Back to top
 
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10529
United Kingdom
Re: platform.txt - Recipes for extraction of executable files and other binary data
Reply #2 - Feb 6th, 2017 at 2:27am
 
There is a link to the next release at the top of this post if you want to try it.
Back to top
 
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print