We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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.
"ALWAYS start with the FIRST error!" This isn't always as easy as it seems. If an uncalled function causes you to run out of, say, DATA space the linker will report "Address space overflow" first, then "Uncalled function ignored for overlay purposes". In this case you need to get rid of the uncalled function warning to fix the overflow error. In particular you can get a whole bunch of address space overflow errors which tend to hide the other warning. Stefan
the linker will report "Address space overflow" first, then "Uncalled function ignored for overlay purposes" Hmm... the actual output posted quite clearly has those the other way round. The real catch, I think, is that the uncalled function message is classified as a warning, so the address space overflow is the first actual error message. So maybe the rule of thumb should be extended to: Always look at the first error message first, yet heed any warnings preceding it, too.
"the actual output posted quite clearly has those the other way round" I see that - however I get the opposite result. I posted that message before seeing the OP's error listing. Stefan
The problem disappears after you either remove all the uncalled functions, or make them callable. One thing I still don't understand is why a lot of uncalled functions in different modules cause an overflow while a lot of callable functions don't??
"One thing I still don't understand is why a lot of uncalled functions in different modules cause an overflow" You need to read-up on Data Overlaying in the manuals.
"One thing I still don't understand is why a lot of uncalled functions in different modules cause an overflow while a lot of callable functions don't??" For 'compiler' read 'compiler/linker': The compiler builds a call tree for your program. Based on this tree it can use the same physical memory locations to store local variables from different functions. This is called 'data overlaying'. If you don't call a function the compiler decides that it can't risk overlaying the local variables in case the function is called via a pointer, which it can't see. In this case unique memory locations are allocated for that function, meaning that uncalled functions use up more memory space. A feature that I'd like to see is some method of telling the compiler to completely ignore uncalled functions as this problem is a real nuisance during program development. Stefan