I got register-locked vars working right now. I think. The trick was to recompile all my source files with -ffixed-r2, -ffixed-r3, etc.
My remaining question is: is this enough, or do I need to recompile the avr libc sources as well for it to be safe? I'm guessing since the FAQ advises to use r2 through r7, it normally saves and restores these registers itself if it uses them? Finally, I think it might be useful to mention the need to put the register declarations before all function definitions in a single source file, and to use -ffixed-r? when compiling other source files for the same program, in the FAQ question about how to use register-locked vars. Although these things are covered in the GCC manual, its a little trouble to dig them out and the mention of how to do register vars in the FAC creates an expectation that the one-liner given does the work. If anyone agrees I'll submit a patch. Thanks, Britton _______________________________________________ AVR-chat mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/avr-chat
