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.
Hi, I have a lot of string that I have to put in a Display 2x16 and I'm trying to put this strings in the code area. Firs I declare a matrix as below: const unsigned char [6][16] = { "bla-bla-bla-bla-", "bla-bla-bla-bla-", "bla-bla-bla-bla-", "bla-bla-bla-bla-", "bla-bla-bla-bla-", "bla-bla-bla-bla-" }; When I'm using a matrix 6x16 I don't have problems, but when I use a matrix bigger than 10x16, my compiler send the message: ***ERROR L107: ARDES SPACE OVERFLOW SPACE: DATA SEGMENT: DATA_GROUP Program Size: data 141 xdata: 809 code: 5970 My flash have 64kByte and 2kB of RAM. When I use the command above, does I need "data" memory? Somebody know why this problem?
Sounds like you are new to the 8051, so see the Standard advice below. In particular, you need to understand the different memory spaces of the 8051; in Keil C51 nomenclature, you have CODE, DATA, IDATA, PDATA, and XDATA to choose from. Standard advice: First, you need to read the uVision Getting Started guide, and work through the example projects in it. You need to read the following documents - commonly referred to as "the bible" for the 8051: http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_ARCH_1.pdf http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_PROG_GUIDE_1.pdf http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_HARDWARE_1.pdf Are you also a newbie to 'C' programming in general? If so, you'll also need a good 'C' textbook. Here are some other introductory & reference materials: http://www.keil.com/books/8051books.asp http://www.8052.com/books.phtml http://www.8052.com/tutorial.phtml You will need to read the Data Sheet for your particular processor, and the Manual(s) for any development boards, etc. You will need to read the Manuals for the C51 Compiler, A51 Assembler, etc, etc,...
"I'm trying to put this strings in the code area" If you don't specify a memory space variables are placed in the default memory space for the memory model you're using. For the small model this is the DATA area. You need to use the 'code' keyword: const unsigned char code matrix[6][16]... Note that 'const' has no bearing on where variables are located. Stefan