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
Change platform.txt (Read 754 times)
barrybas
Newbies
*
Offline



Posts: 4
Change platform.txt
Nov 16th, 2018 at 3:17pm
 
Hi,
In order to compile the BSEC library from Bosch, I should be able to change the used platform.txt file to the following.
I already did this in the standard Arduino location, such that I can compile in the Arduino IDE. However, when compiling in visualMicro it uses a different linker command than the one i specified in platform.txt.
I also tried adding the board.txt file with the specific command in visualMicro, but it has no effect.
What is the location of the platform.txt file used in visualMicro compiling for a SAMD21 architecture?


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



Posts: 9917
United Kingdom
Re: Change platform.txt
Reply #1 - Nov 16th, 2018 at 7:18pm
 
Hi

I think there is some info missing from your post. What change did you make and in which file exactly and which arduino ide version?

Visual Micro should be using the same config as the arduino ide unless you have altered the default "Contributions Path". If you change the platform.txt you have to restart the ide or click the Rescan button

Back to top
 
WWW  
IP Logged
 
barrybas
Newbies
*
Offline



Posts: 4
Re: Change platform.txt
Reply #2 - Nov 19th, 2018 at 8:51am
 
Hi,
Thanks for the reply!
I changed the linker script in the samd21 platform.txt file (line 96, ..\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.19) to the following, such that it includes a precompiled library.
I already tried restarting and rescanning, however without success.
Is there a way to check that it is referring to the correct platform file?
I don't really see another possibility as to why it would compile in the arduino IDE and not in visualMicro?

The following is line 96 in platform.txt after change:
Code:
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}"  "-L{build.path}" {compiler.c.elf.flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group {compiler.arm.cmsis.ldflags} -lm {compiler.c.elf.extra_flags} "{build.path}/{archive_file}" -Wl,--end-group 



Thanks!
Back to top
 
 
IP Logged
 
barrybas
Newbies
*
Offline



Posts: 4
Re: Change platform.txt
Reply #3 - Nov 19th, 2018 at 8:54am
 
Hi, I have made a different change in the mentioned platform.txt file for testing, and it is indeed being used.
However it seems to ignore the {compiler.c.elf.extra_flags} field?
Back to top
 
 
IP Logged
 
barrybas
Newbies
*
Offline



Posts: 4
Re: Change platform.txt
Reply #4 - Nov 19th, 2018 at 9:49am
 
If i hardcode the {compiler.c.elf.extra_flags} to the correct path and library to include, everything works.
So for some reason visual micro omits this part or can't find this parameter.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 9917
United Kingdom
Re: Change platform.txt
Reply #5 - Nov 19th, 2018 at 12:08pm
 
I looked at your three messages but can not see what you added to the linker statement. Please show clearly the syntax used for "path\file" that fails and confirm the physical location of the file.

You can also put .a files in project\libs. The .a files in the libs folder are automatically added the the linker.
Back to top
« Last Edit: Nov 19th, 2018 at 12:09pm by Visual Micro »  
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print