Page 1 of 1
Atmega128 Compile warnings
Posted: Wed Sep 25, 2024 11:29 pm
by Alan_37
Hello
Getting a lot of warnings when compiling to Hex, The code works OK
Any idea why ?
Re: Atmega128 Compile warnings
Posted: Thu Sep 26, 2024 9:42 am
by BenR
Hello,
We mark variables as volatile so that they work correctly when manipulated inside an interrupt. Some functions do not accept volatile variables so the volatile cast is simply removed and hence the warning. Should be safe to ignore. I'll see if it's something we can potentially hide from the compiler output.
Re: Atmega128 Compile warnings
Posted: Thu Sep 26, 2024 6:27 pm
by Alan_37
Hi BenR
Thanks for your reply
where sould I put the -w flag to ignore warnings, the problem is a lot of warnings
mixing with errors and it's making it difficult to spot and fix the errors.
Re: Atmega128 Compile warnings
Posted: Thu Sep 26, 2024 7:30 pm
by Alan_37
OK Found it
C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\AVR\batchfiles\avra.bat
LIne 13 : add -w after -Os
"%MX_COMPILER%bin\avr-gcc.exe" -mmcu=%MX_CHIP% -Os
-w -ffunction-sections -fdata-sections -funsigned-char -o %MX_ELF% %MX_SOURCE% -lm -Wl,-gc-sections
Now compiles much faster
