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 "Compiler Warnings" option does not respected in combine recipe (recipe.c.combine.pattern) (Read 2324 times)
hagai
Newbies
*
Offline


Posts: 1
Joined: Aug 25th, 2017
"Compiler Warnings" option does not respected in combine recipe (recipe.c.combine.pattern)
Aug 25th, 2017 at 8:31pm
Print Post  
Hello,

It is seems that the Compiler Warnings option, "-Wall", do not work in the link step (recipe.c.combine.pattern).
Instead, the option "-w" is applied as in the option of no compiler warning.

This behavior also blocking the option of "Extra c.elf flags", because inhibit all warning messages flag ("-w") take precedence over other flags.

here is a verbose output, with Compiler Warnings ON and "-Wextra" set for the "Extra c.elf flags" option:

Code
Select All
Building project code ...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -Wall -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560  ...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -Wall -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560  ...

Linking it all together ...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections,--relax -mmcu=atmega2560 -o .... -lm -Wextra  




Trying achive the same goal in Arduion Ide, using the platform.local.txt, work as expected.

10'x,
hagai
« Last Edit: Aug 25th, 2017 at 8:39pm by hagai »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: "Compiler Warnings" option does not respected in combine recipe (recipe.c.combine.pattern)
Reply #1 - Sep 1st, 2017 at 10:02pm
Print Post  
Thanks for the report I will look into it.

In the meantime you can create a board.txt for the local project and override any build settings you want

For example adding these lines to the board.txt in the project folder would cause them to be used instead of the ones in platform.txt

Code
Select All
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" -Wall {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"

recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" -Wall {compiler.c.elf.flags} -mmcu={build.mcu} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm

recipe.objcopy.eep.pattern="{compiler.path}{compiler.objcopy.cmd}" -Wall {compiler.objcopy.eep.flags} {compiler.objcopy.eep.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.eep"
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
 




tip: vs tends to save the board.txt after you click build so if you change it then click save then build
« Last Edit: Sep 1st, 2017 at 10:06pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint