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?
"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