21
Help / Re: Compiler Optimizations
« Last post by stahta01 on April 19, 2024, 11:32:15 pm »Hi stahta01,
I have set the compiler optimizations to 1, 2, and 3, but this issue still occurs. There was another post about using the compiler optimizations to solve an issue that I saw.
I just tried the same code with MPLABX with the same results, and the same warning message, so it doesn't appear to be a CB issue. I am just reaching out for help from people with way more experience than me.
Regards,
mikejp56
See https://www.nongnu.org/avr-libc/user-manual/group__util__delay.html
Did you define F_CPU as required?
Edit: You did as "-DF_CPU=16000000UL"
And, you need to find an website that supports your AVR compiler; because some or most of your question is off topic (OT) for this website.
Edit: Did you rebuild the project trying at least 3 different optimizations? Edit3: I suggest "O1" "O2" and "Og".
If yes, what optimizations did you try?
Post at least one build log of those opt. builds?
Edit2: Try building the project without the debug mode (-g) being used. Sometimes debug mode make things easier and sometimes harder.
Tim S.