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 platform.txt - Recipes for extraction of executable files and other binary data (Read 4405 times)
Markk
Junior Member
**
Offline


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

first again thanks for a great tool!

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

Code
Select All
No such file or directory*: Could not open file RE\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
Select All
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
Select All
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
Select All
## 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.
« Last Edit: Jan 31st, 2017 at 11:16am by Markk »  

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: platform.txt - Recipes for extraction of executable files and other binary data
Reply #1 - Jan 31st, 2017 at 11:33pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: platform.txt - Recipes for extraction of executable files and other binary data
Reply #2 - Feb 6th, 2017 at 2:27am
Print Post  
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 TopicPrint