I realized that I didn't want Level 9 (Common Block Subroutine Packing) optimizations performed on my code. Now, going back to Level 8 optimizations, I get IMPROPER FIXUP errors in my assembly startup code. What's the deal?
Now, going back to Level 8 optimizations, I get IMPROPER FIXUP errors in my assembly startup code. Hmmmm... The C Compiler doesn't assemble the startup code. The assembler does that. And, optimizer level 9 or 8 on the compiler have no effect on the assembler. What are the exact error messages you get from the assembler? Keil Support
They are actually linker errors. The linker is complaining about my startup assembly file. I get 5 IMPROPER FIXUP errors; they only differ in the OFFSET parameter. Here is the first error: *** ERROR L121: IMPROPER FIXUP MODULE: .\Simulator\Object\startup.obj (?C_STARTUP) SEGMENT: ?C_C51STARTUP OFFSET: 0028 Once again, if I change my compiler option back to level 9, then this error goes away.
OK, here'a solution to try. 1. Remove the STARTUP.A51 file from your project. 2. Compile and link your project. If you get no errors, then the STARTUP you have is being assembled incorrectly OR you have made changes to it that generate this problem. Copy the startup code from the \keil\c51\lib directory and include it in your project WITH NO CHANGES. Rebuild and see what happens then. If you get errors without the startup code, then there is a problem with the default startup code. Let us know if this happens. Keil Support
I get no errors with the default startup. Of course, however, I need my own startup. My startup assembles without errors. Do you need me to send you my code?
Yes, I would appreciate that. Dale
View all questions in Keil forum