I keep getting a 'Target not created' error at the end of compile. When I comment out a printf, everything is fine. What is the problem? Thank you.
What other errors do you get before "Target not created?" ALWAYS start with the FIRST error!
There are no other error messages. Here is the dump:
Build target 'Target 1' compiling can.c... CAN.C(258): warning C280: 'mask': unreferenced local variable CAN.C(280): warning C280: 'i': unreferenced local variable CAN.C(280): warning C280: 'mask': unreferenced local variable linking... *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?PCA_TEST?MAIN *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?ADC_TEST?MAIN *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?I2C_READ_TEST?MAIN *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?I2C_WRITE_TEST?MAIN *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?CAN_TRANSMIT?CAN *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?CAN_RECEIVE?CAN *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?_CAN_PRINT_MSG_BUF?CAN *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?CAN_PRINT_STATUS?CAN *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?CAN_PRINT_MSG?CAN *** WARNING L15: MULTIPLE CALL TO SEGMENT SEGMENT: ?PR?PRINTF?PRINTF CALLER1: ?PR?CAN_INT_HANDLER?CAN CALLER2: ?C_C51STARTUP *** ERROR L107: ADDRESS SPACE OVERFLOW SPACE: DATA SEGMENT: ?DT?PCA_TEST?MAIN LENGTH: 0003H *** ERROR L107: ADDRESS SPACE OVERFLOW SPACE: DATA SEGMENT: ?DT?CAN_PRINT_STATUS?CAN LENGTH: 0002H *** ERROR L107: ADDRESS SPACE OVERFLOW SPACE: DATA SEGMENT: ?DT?CAN_RECEIVE?CAN LENGTH: 0001H *** ERROR L107: ADDRESS SPACE OVERFLOW SPACE: DATA SEGMENT: ?DT?CAN_PRINT_MSG?CAN LENGTH: 0001H *** ERROR L107: ADDRESS SPACE OVERFLOW SPACE: DATA SEGMENT: ?DT?GETCHAR LENGTH: 0001H *** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT SYMBOL: ?_UNGETCHAR?BYTE SEGMENT: ?DT?GETCHAR Program Size: data=136.4 xdata=12 code=4173 Target not created
Oh, sorry, there are other error messages. What does ADDRESS SPACE OVERFLOW mean?
Let me guess: you're calling printf() from an interrupt handler? Stefan
What does ADDRESS SPACE OVERFLOW mean? That your code tried to put more stuff into one of the 8051 address spaces (in the case at hand: into DATA) than fits into it. Pretty straightforward, I'd have thought, especially after you looking up the error message number in the docs. But in the case at hand, that's an indirect error. The real problem is that you have so much code compiled in your source files that isn't actually used for anything, as far as the compiler could tell. That wreaks havoc in the data overlay optimization step, and thus caused your data segment to overflow. Fix those "unused segment", and "multiply called segment" warnings before you go on---they're serious.
View all questions in Keil forum