The target device of my program is Winbond W78E516B with 64k Flash ROM and my program size is just 29k, I want to know why there is a error of "CLOCKCAL V1.C(1221): error C249: 'DATA': SEGMENT TOO LARGE" after compiling with Keil C.
what does 64k Flash ROM and my program size is just 29k have to do with DATA???
I think it's "bible time"
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
Easy bug to fix.
Just select the LARGE memory model and the problem will disappear.
-------
Zeusti
Senior Software Archietect
correction:
Senior Software Archietect that loves his ass being kicked by Erik...
Zeusti,
It's not a bug!
Using the large model comes with a price (not least might be fending off the tongue of Erik).
I would suggest you take time to read 'the bible' before you give yourself further promotion.
One amazing thing about Zeusti's reply is that he did not ask if the OP had any XDATA (inside or outside the chip) I can just imagine the frustration of the OP debugging with the large memory model when no XDATA is present, the simulator will, of course work just fine.
Ok, here is the rant Easy bug to fix. Senior Software Archietect If a senior Software Archietect consider using the small model a bug, I wonder if I am a to call myself superverysenior.
I have no doubt that somebody can find or construe some cases where using the large model will be justified, but just picking it to "get enough space" without any considerations is barely forgivable for a junior.
What conclusion can be drawn from seeing someone spell their own job title incorrectly?
Yes - The large model can be useful.
Yes - There are perfectly valid situations where the large model can be fully justifiable.
No - Using the small memory model cannot, in itself, be considered a bug.
No - it is a design error;
possibly an implementation error;
certainly not a bug.
http://www.keil.com/support/man/docs/c51/c51_c249.htm
It is not relate to the "bible time", my problem is just related to how to put the constant array table into the on chip XRAM or into the ROM. And I know how to do it now, yeah. No need to read your such bibles pdf.
"It is not relate to the 'bible time'"
Remember: when you post to an internet forum, nobody knows anything at all about you or your project other than what you explicitly state in your post.
From your post (which was all we had to go on) it looked distinctly like you didn't understand the different memory areas - specifically DATA and CODE - inherent to the 8051 architecture. Therefore, it was natural to suggest that you require 'bible time'
"my problem is just related to how to put the constant array table into the on chip XRAM or into the ROM"
Your original post did not mention anything about a constant array table, did it?
I am very hapy my ansewr helped you.
All proffesionals must help each other.
Senior Sofware Guru
The answer may have helped to get the table into XDATA, but would not get it into CODE space.
The trouble with putting the table in XDATA is that it also consumes CODE space, doesn't it...?
andey
i Do not undrestand youre question?
Senior Softare Guru
and you call yourself a "professional" and a "guru" ?!
Think about it: if the table is in XDATA, how will its data get into the RAM when the system powers-up...?
any,
i STIL do not undersatnd youre questiion. i am now very very busy and can not help you yet.
Senior Softwre Guru