This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C51:( LINk Error) fatal error: application calls too many recursions.

while using Keil8.04 compiling and link, there is a fatal error:
*** WARNING L13: RECURSIVE CALL TO SEGMENT SEGMENT: ?CO?MAIN CALLER: ?PR?DISP_MOTORSETUP?MAIN
*** WARNING L13: RECURSIVE CALL TO SEGMENT SEGMENT: ?CO?MAIN CALLER: ?PR?_LCD_SHOWCHAR?MAIN
*** WARNING L13: RECURSIVE CALL TO SEGMENT SEGMENT: ?CO?MAIN CALLER: ?PR?_LCD_SHOWHZ?MAIN
*** WARNING L13: RECURSIVE CALL TO SEGMENT SEGMENT: ?CO?MAIN CALLER: ?PR?_LCD_SHOWSTR?MAIN
*** WARNING L13: RECURSIVE CALL TO SEGMENT SEGMENT: ?CO?MAIN CALLER: ?PR?DISP_CYCLICSETUP?MAIN
*** WARNING L13: RECURSIVE CALL TO SEGMENT SEGMENT: ?CO?MAIN CALLER: ?PR?DISP_MOTORRUNSETUI?MAIN
*** WARNING L13: RECURSIVE CALL TO SEGMENT SEGMENT: ?CO?MAIN CALLER: ?PR?DISP_GENERALSETUI?MAIN
*** WARNING L13: RECURSIVE CALL TO SEGMENT SEGMENT: ?CO?MAIN CALLER: ?PR?DISPAR_TIME?MAIN
*** WARNING L13: RECURSIVE CALL TO SEGMENT SEGMENT: ?CO?MAIN CALLER: ?PR?DISPAR_STARTTIME?MAIN
*** WARNING L13: RECURSIVE CALL TO SEGMENT SEGMENT: ?CO?MAIN CALLER: ?PR?DISPAR_ALARMTEMP?MAIN
*** WARNING L13: RECURSIVE CALL TO SEGMENT SEGMENT: ?CO?MAIN CALLER: ?PR?SETUP_MOTORRUNPAR?MAIN
*** FATAL ERROR L232: APPLICATION CONTAINS TOO MANY RECURSIONS
Target not created.

I don't konw why, if there are some error while use function pointer or the pro struct include too many layers? waiting for your idears. this problem has pazzled me several days. If mesessary, i can upload my code for you !

Parents
  • if there are some error while use function pointer

    Using function pointers should be avoided when using the C51 compiler.

    If you insisit on using them, be very, very sure to read and follow the instructions given in the compiler manual regarding this topic.

    You may, for example, have to modify the linkers calling tree manually.

Reply
  • if there are some error while use function pointer

    Using function pointers should be avoided when using the C51 compiler.

    If you insisit on using them, be very, very sure to read and follow the instructions given in the compiler manual regarding this topic.

    You may, for example, have to modify the linkers calling tree manually.

Children
  • thanks for you replay, in detail, the function pointer was used for my menu, and in the display program, constant pointer was used to pointed to strings of my menu's char, and i also saw others had the same problems, but i can't find any avalible mothod, could you please have a look at my code ,and give me some advice?