Hello
Getting a lot of warnings when compiling to Hex, The code works OK
Any idea why ?
Atmega128 Compile warnings
-
- Posts: 186
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 03, 2020 7:23 pm
- Has thanked: 54 times
- Been thanked: 26 times
Atmega128 Compile warnings
- Attachments
-
- ATmega128A.fcfx
- (25.9 KiB) Downloaded 245 times
-
- ATmega128A.msg.txt
- (20.36 KiB) Downloaded 252 times
-
- Matrix Staff
- Posts: 1952
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 510 times
- Been thanked: 698 times
Re: Atmega128 Compile warnings
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: Atmega128 Compile warnings
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.
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
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
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
