Visual Studio Ide for Arduino
https://www.visualmicro.com/forums/YaBB.pl
Other >> Other Hardware >> platform.txt - Recipes for extraction of executable files and other binary data
https://www.visualmicro.com/forums/YaBB.pl?num=1485853285

Message started by Markk on Jan 31st, 2017 at 9:01am

Title: platform.txt - Recipes for extraction of executable files and other binary data
Post by Markk on 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[/code):
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"
[/code]

Thanks for looking into this.

-Markk

EDIT: added verbose compiler log.

https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=buildlog_001.txt (68 KB | )

Title: Re: platform.txt - Recipes for extraction of executable files and other binary data
Post by Visual Micro on 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.

Title: Re: platform.txt - Recipes for extraction of executable files and other binary data
Post by Visual Micro on 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.

Visual Studio Ide for Arduino » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2019. All Rights Reserved.