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


Posts: 4
Joined: Nov 16th, 2018
Change platform.txt
Nov 16th, 2018 at 3:17pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Change platform.txt
Reply #1 - Nov 16th, 2018 at 7:18pm
Print Post  
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
Joined: Nov 16th, 2018
Re: Change platform.txt
Reply #2 - Nov 19th, 2018 at 8:51am
Print Post  
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
Select All
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
Joined: Nov 16th, 2018
Re: Change platform.txt
Reply #3 - Nov 19th, 2018 at 8:54am
Print Post  
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
Joined: Nov 16th, 2018
Re: Change platform.txt
Reply #4 - Nov 19th, 2018 at 9:49am
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Change platform.txt
Reply #5 - Nov 19th, 2018 at 12:08pm
Print Post  
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.
« Last Edit: Nov 19th, 2018 at 12:09pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint