Greetings, My processor is a Dallas DS80C320.
I'm programming along saving, compiling and testing as I go. I have now received the following error: "L107 Address Space Overflow" That was my "first" error - at the top of the list. I have more errors, the next one is: "L105 Public refers to ignored segment".
Do I not have something not setup correctly?
My code is that that big (maybe it is), I don't believe I should have reached a size upper limit - unless I need to specify something. In my directory, the lst file is 87K, the hex file is 36k. The c code is 2288 lines with many comments.
Help?
Thanks Sparky
And what do you think constitutes "that many"?
It doesn't take very many variables to overflow an address space of only 128 bytes...
Again, the Linker message clearly tells you which specific address space has overflowed, and which specific module caused the overflow, and by how much it has overflowed. You need to pay attention to this information!
And have you looked at the map file yet?
"Is there a setting somewhere or something that can help?"
Perhaps you could move some variable(s) from one address space to another?
"Aren't variables stored in RAM?"
Usually, yes. But you do realise that the 8051 architecture has several distinct address spaces, don't you? And that includes several distinct RAM address spaces...
No I didn't know the 8051 architecture has several distinct address spaces. I have found them now (Small, Compact and Large). That fixed it.
I do not know how to use the map - I assume it's the *.M51 file. I have opened it but really didn't know what it is telling me.
Any chance (for the future) you can point me to some help in using the M51 file for debugging?
(Obviously I'm learning as I go.) Thanks again Sparky
No I didn't know the 8051 architecture has several distinct address spaces. I have found them now (Small, Compact and Large). BALONEY, this is ridiculous small etc are NOT "address spaces"
Any chance (for the NOW) you can point me to some help, you have two choices: 1) bungle alonng and spend a lot of time with 'unknown effcts' 2) study "the bible"
Erik
here are the links to "the bible" Chapter 1 - 80C51 Family Architecture: www.nxp.com/.../80C51_FAM_ARCH_1.pdf Chapter 2 - 80C51 Family Programmer's Guide and Instruction Set: www.nxp.com/.../80C51_FAM_PROG_GUIDE_1.pdf Chapter 3 - 80C51 Family Hardware Description: www.nxp.com/.../80C51_FAM_HARDWARE_1.pdf
Erik -
So sorry that my terminology is wrong.
When Andy suggested "several distinct RAM address spaces", I started going through the various menus and found under Project - under Options For Target - a menu for Memory Model with the choices of Small, Compact and Large - moving up from small allowed me to compile.
Again sorry for my wording.
Thanks Sparky_
"No I didn't know the 8051 architecture has several distinct address spaces."
That is essential, fundamental information!
It is outlined in the C51 manual:
http://www.keil.com/support/man/docs/c51/c51_le_memareas.htm
For full details, as Erik says, you will need to study the so-called "bible"
"I have found them now (Small, Compact and Large)."
No, they are not Address Spaces - they are Memory Models. Each Memory Model uses a different Address Space as its default.
The Address Spaces are a feature of the 8051 Architecture; The Memory Models are a feature of Keil's implementation of their C51 tools.
"I do not know how to use the map - I assume it's the *.M51 file."
Correct. The are some details in the Linker manual, and you will find more by searching the Knowledgebase on this site.
further resources:
http://www.keil.com/books/8051books.asp http://www.8052.com/tutorial
You really need to start with the manuals so that you understand what you're doing - rather than just thrashing-about in the menus hoping to get lucky...
You should start here:
http://www.keil.com/support/man/docs/gs/
There are examples to work through...
Erik and Andy
Thanks for the resources.
I'm downloading them now.
Erik - I'm going with option 2 -
Once again - thanks!!!
You can tell - I've jumped in without reading all I should.
Part of the problem is (no excuse though) I'm on a tight deadline to have this working for a customer.
I have done a similar project with a different family of controllers so I was picked to for this job.
Erik - you are correct - I have been playing hunt and bungle with the menus - most of my questions and problems have been with using uVision and things unique to the Dallas 80c320 / 8051 arch. not the actual "C" programming.
I will be going through these pdf's and web sites -
Thanks again