Как в Atmel Studio 6 разместить массив во flash памяти?
Например, есть массив:
/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */ .c.geshi_code {font-family:monospace;} .c.geshi_code .imp {font-weight: bold; color: red;} .c.geshi_code .kw1 {color: #b1b100;} .c.geshi_code .kw2 {color: #000000; font-weight: bold;} .c.geshi_code .kw3 {color: #000066;} .c.geshi_code .kw4 {color: #993333;} .c.geshi_code .co1 {color: #666666; font-style: italic;} .c.geshi_code .co2 {color: #339933;} .c.geshi_code .coMULTI {color: #808080; font-style: italic;} .c.geshi_code .es0 {color: #000099; font-weight: bold;} .c.geshi_code .es1 {color: #000099; font-weight: bold;} .c.geshi_code .es2 {color: #660099; font-weight: bold;} .c.geshi_code .es3 {color: #660099; font-weight: bold;} .c.geshi_code .es4 {color: #660099; font-weight: bold;} .c.geshi_code .es5 {color: #006699; font-weight: bold;} .c.geshi_code .br0 {color: #009900;} .c.geshi_code .sy0 {color: #339933;} .c.geshi_code .st0 {color: #ff0000;} .c.geshi_code .nu0 {color: #0000dd;} .c.geshi_code .nu6 {color: #208080;} .c.geshi_code .nu8 {color: #208080;} .c.geshi_code .nu12 {color: #208080;} .c.geshi_code .nu16 {color:#800080;} .c.geshi_code .nu17 {color:#800080;} .c.geshi_code .nu18 {color:#800080;} .c.geshi_code .nu19 {color:#800080;} .c.geshi_code .me1 {color: #202020;} .c.geshi_code .me2 {color: #202020;} .c.geshi_code span.xtra { display:block; }
В CodeVisionAVR, чтобы разместить этот массив во flash, надо написать так:
/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */ .c.geshi_code {font-family:monospace;} .c.geshi_code .imp {font-weight: bold; color: red;} .c.geshi_code .kw1 {color: #b1b100;} .c.geshi_code .kw2 {color: #000000; font-weight: bold;} .c.geshi_code .kw3 {color: #000066;} .c.geshi_code .kw4 {color: #993333;} .c.geshi_code .co1 {color: #666666; font-style: italic;} .c.geshi_code .co2 {color: #339933;} .c.geshi_code .coMULTI {color: #808080; font-style: italic;} .c.geshi_code .es0 {color: #000099; font-weight: bold;} .c.geshi_code .es1 {color: #000099; font-weight: bold;} .c.geshi_code .es2 {color: #660099; font-weight: bold;} .c.geshi_code .es3 {color: #660099; font-weight: bold;} .c.geshi_code .es4 {color: #660099; font-weight: bold;} .c.geshi_code .es5 {color: #006699; font-weight: bold;} .c.geshi_code .br0 {color: #009900;} .c.geshi_code .sy0 {color: #339933;} .c.geshi_code .st0 {color: #ff0000;} .c.geshi_code .nu0 {color: #0000dd;} .c.geshi_code .nu6 {color: #208080;} .c.geshi_code .nu8 {color: #208080;} .c.geshi_code .nu12 {color: #208080;} .c.geshi_code .nu16 {color:#800080;} .c.geshi_code .nu17 {color:#800080;} .c.geshi_code .nu18 {color:#800080;} .c.geshi_code .nu19 {color:#800080;} .c.geshi_code .me1 {color: #202020;} .c.geshi_code .me2 {color: #202020;} .c.geshi_code span.xtra { display:block; }
В Atmel Studio 6 так нельзя. Как в Atmel Studio 6 разместить массив во flash памяти?
/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */ .c.geshi_code {font-family:monospace;} .c.geshi_code .imp {font-weight: bold; color: red;} .c.geshi_code .kw1 {color: #b1b100;} .c.geshi_code .kw2 {color: #000000; font-weight: bold;} .c.geshi_code .kw3 {color: #000066;} .c.geshi_code .kw4 {color: #993333;} .c.geshi_code .co1 {color: #666666; font-style: italic;} .c.geshi_code .co2 {color: #339933;} .c.geshi_code .coMULTI {color: #808080; font-style: italic;} .c.geshi_code .es0 {color: #000099; font-weight: bold;} .c.geshi_code .es1 {color: #000099; font-weight: bold;} .c.geshi_code .es2 {color: #660099; font-weight: bold;} .c.geshi_code .es3 {color: #660099; font-weight: bold;} .c.geshi_code .es4 {color: #660099; font-weight: bold;} .c.geshi_code .es5 {color: #006699; font-weight: bold;} .c.geshi_code .br0 {color: #009900;} .c.geshi_code .sy0 {color: #339933;} .c.geshi_code .st0 {color: #ff0000;} .c.geshi_code .nu0 {color: #0000dd;} .c.geshi_code .nu6 {color: #208080;} .c.geshi_code .nu8 {color: #208080;} .c.geshi_code .nu12 {color: #208080;} .c.geshi_code .nu16 {color:#800080;} .c.geshi_code .nu17 {color:#800080;} .c.geshi_code .nu18 {color:#800080;} .c.geshi_code .nu19 {color:#800080;} .c.geshi_code .me1 {color: #202020;} .c.geshi_code .me2 {color: #202020;} .c.geshi_code span.xtra { display:block; }
unsigned int tabz[] = {64, 128, 256, 512, 1024, 2048, 4096};
В CodeVisionAVR, чтобы разместить этот массив во flash, надо написать так:
/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */ .c.geshi_code {font-family:monospace;} .c.geshi_code .imp {font-weight: bold; color: red;} .c.geshi_code .kw1 {color: #b1b100;} .c.geshi_code .kw2 {color: #000000; font-weight: bold;} .c.geshi_code .kw3 {color: #000066;} .c.geshi_code .kw4 {color: #993333;} .c.geshi_code .co1 {color: #666666; font-style: italic;} .c.geshi_code .co2 {color: #339933;} .c.geshi_code .coMULTI {color: #808080; font-style: italic;} .c.geshi_code .es0 {color: #000099; font-weight: bold;} .c.geshi_code .es1 {color: #000099; font-weight: bold;} .c.geshi_code .es2 {color: #660099; font-weight: bold;} .c.geshi_code .es3 {color: #660099; font-weight: bold;} .c.geshi_code .es4 {color: #660099; font-weight: bold;} .c.geshi_code .es5 {color: #006699; font-weight: bold;} .c.geshi_code .br0 {color: #009900;} .c.geshi_code .sy0 {color: #339933;} .c.geshi_code .st0 {color: #ff0000;} .c.geshi_code .nu0 {color: #0000dd;} .c.geshi_code .nu6 {color: #208080;} .c.geshi_code .nu8 {color: #208080;} .c.geshi_code .nu12 {color: #208080;} .c.geshi_code .nu16 {color:#800080;} .c.geshi_code .nu17 {color:#800080;} .c.geshi_code .nu18 {color:#800080;} .c.geshi_code .nu19 {color:#800080;} .c.geshi_code .me1 {color: #202020;} .c.geshi_code .me2 {color: #202020;} .c.geshi_code span.xtra { display:block; }
flash unsigned int tabz[] = {64, 128, 256, 512, 1024, 2048, 4096};
В Atmel Studio 6 так нельзя. Как в Atmel Studio 6 разместить массив во flash памяти?
1 ответов
Наверное уже не актуально, из первых же строк гугла
const char *string_table[] PROGMEM =
{
"String 1",
"String 2",
"String 3",
"String 4",
"String 5"
};
{
"String 1",
"String 2",
"String 3",
"String 4",
"String 5"
};