Hi,
I have an existing project which contains my code and code of a library and I would add again a little part from this same library (Atmel) 3 new files ( file.c, fs_varaiable.c and fat.c) at this project but after adding the fat.c file I have receive too many errors and warning. For a segment (function) there are too many differents warning but which one is the first and so?
Can you advice me to best implement a part of a library?
The output file is:
Sequences of warnings (LX) and errors (Error LX)
L16 24 x L15 1 x ERROR L107 30 x L1 6 x Error L105 1x Error L120 1x Error L118 1 x Error L105 7x Error L120 10x Error L105 4x Error L120 2x Error L118 12x Error L120 1x Error L118 2x Error L120 1x Error L118 1x Error L120 1x Error L118 24x Error L105 1x Error L120 1x Error L118 84x Error L105 2x Error L120 2x Error L105 1x Error L120 2x Error L105 1x Error L118 20x Error L120 1x Error L118 14x Error L105 1x Error L118 22x Error L120 1x L1 2x Error L105 1x L2 2x Error L120 1x L1 12x Error L105 7x Error L120 1x L2 46x Error L120 1x L2 93x Error L120 1x L2 30x Error L120 3x L2 18x Error L118 2x Error L105 1x Error L118 4x Error L105 1x Error L120 1x Error L105 1x Error L120 1x Error L105 1x Error L120 1x
////////////////////////////////
Build target 'Target 1' compiling main.c... compiling I2C.c... compiling ADC.c... compiling AUD.c... compiling DAC.c... compiling MICRO2.c... compiling DONG2.c... assembling STARTUP.A51... compiling variable.c... compiling ide_drv.c... compiling C_Flash.c... compiling CF_oper.c... compiling cf_drv_.c... compiling ata.c... compiling file.c... compiling fs_variable.c... compiling fat.c... linking... *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?CAG?ADC *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?MICRO?MICRO2 *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?CO?VARIABLE *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?_FILE_SEEK_PREV?FILE *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?_FILE_SEEK_NEXT?FILE *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?_FILE_ENTRY_DIR?FILE *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS .... ... ... ..
Can you help me please?
Thank you
Thanks,
It's my code Rom which is overflowed
Are you using a small derivative and have specified the max code size to match, or are you overflowing 64k?
I use in options target in target tab :
Memory model : Large variables in XDATA code Rom size: Large 64 K program Operating system : None
I think it is otpimal memory sizing, can I do anything else to grow up my rom size
"A one gallon bucket can not hold two gallons of water."
And every single extra cup you try to put in will each cause further overflow!
Now I have too many warnings L118 but again ERROR L107 address space overflow in space code, this error has occur when I remove the #if 0 #endif from a big function.
How can I do to resolve this problem, it's very hard to find a solution to this ?
Not very hard, reduce the size of your code or increase the size of your code memory (if you are below 64k)
A one gallon bucket can not hold two gallons of water.
Erik
"ERROR L107 address space overflow in space code, this error has occur when I remove the #if 0 #endif from a big function."
So, you add a large amount of code (a "big function"), and then your code space overflows - why would that be a surprise to you?
Once you've had an error like that, it is likely to cause errors in everything else the Linker subsequently does!
Therefore, you need to fix the first error, then rebuild and see how many are left...
"Uncalled segment" means that your files contain code that is not used in your project. This code takes up space, and what is often worse, serves as another root for the call tree for parameter and local variable overlay. You should avoid linking unneeded code into your project. Also, see the REMOVEUNUSED linker directive.
"Address space overflow" means that your code does not fit into the available memory. You've got more than 64KB of code, and so something has to go. You can try higher levels of optimization, emphasizing space. But you might have to roll up your sleeves and rewrite some code to do the same job in less space. Alternatively, you need to use more memory (and since you've reached the 64KB limit, that means bank switching, which may mean hardware changes for the banking logic in addition to a larger RAM).
View all questions in Keil forum