äÏÂÒÏÇÏ ÚÄÏÒÏרÑ, Oleg!
30 Oct 03 17:57, Oleg Dolgov ÎÁÐÉÓÁÌ ÄÌÑ Sergei Tuchinski:
OD> åÝÅ ÈÏÞÕ ÚÁÄÁÔØ ×ÏÐÒÏÓ ÐÒÏ ÎÁÞÁÌØÎÕÀ ÉÎÉÃÉÁÌÉÚÁÃÉÀ ËÏÜÆÆÉÃÉÅÎÔÏ× × eeprom. OD> ëÏÇÄÁ Ñ ÐÅÒ×ÙÊ ÒÁÚ ÎÁÐÉÓÁÌ ÐÒÏÛÉ×ËÕ ËÏÔÏÒÁÑ ÉÚ ÅÅÐÒÏÍ ÂÅÒÅÔ ÐÁÒÁÍÅÔÒÙ ÄÌÑ OD> ÒÁÓÞÅÔÏ× ÔÏ ÐÒÏÇÁ ÐÒÏÓÔÏ ÉÌÉ ÐÏ×ÉÓÌÁ ÉÌÉ ÔÁÍ ÒÅÓÅÔ ÐÏÓÔÏÑÎÎÙÊ ÂÙÌ ÏÎÁ OD> ×ÏÂÝÅÍ OD> ÎÅ ÒÁÂÏÔÁÌÁ Ô.Ë. × ÅÅÐÒÏÍ ÐÕÓÔÏ ÂÙÌÏ. èÏÔÅÌÏÓØ ÂÙ ËÁË ÎÉÂÕÄØ ÓÇÅÎÅÒÉÔØ OD> ÐÒÏÛÉ×ËÕ É ÄÌÑ eeprom Ó ÐÒÅÄ×ÁÒÉÔÅÌØÎÙÍÉ ÚÎÁÞÅÎÉÑÍÉ ËÏÜÆÆÉÃÉÅÎÔÏ×. á ÔÏ OD> ÅÓÌÉ OD> ×ÙÂÉÒÁÅÛØ ×ÙÈÏÄÎÏÊ ÆÏÒÍÁÔ intel-standart ÔÏ ËÏÄ ÇÅÎÅÒÉÔØÓÑ ÎÏ eeprom ÅÓÓÎÏ OD> ÏÔÓÕÔÓÔ×ÕÅÔ. èÏÔÅÌÏÓØ ÂÙ ËÁË ÎÉÂÕÄØ ÏÔÄÅÌØÎÙÍ ÆÁÊÌÏÍ É eeprom c OD> ÐÒÅÄ×ÁÒÉÔÅÌØÎÙÍÉ ÚÎÁÞÅÎÉÑÍÉ ÐÏÌÕÞÉÔØ Á ÚÁÔÅÍ Ó ËÌÁ×ÉÁÔÕÒËÉ ÐÏÄÐÒÁ×ÉÔØ ÉÈ OD> ÐÏÄ OD> ËÏÎËÒÅÔÎÕÀ ÓÉÔÕÁÃÉÀ. ñ ÏÐÉÓÙ×ÁÀ Ë ÐÒÉÍÅÒÕ 3 ËÏÜÆÆÉÃÉÅÎÔÁ __eeprom _no_init OD> float a,b,c; ÎÏ ÏÎÉ × ÄÁÌØÎÅÊÛÅÍ ÄÏÌÖÎÙ ÐÒÉÎÉÍÁÔØ ÕÞÁÓÔÉÅ × ÒÁÓÞÅÔÁÈ É OD> ÐÒÁ×ÉÔÓÑ Ó ËÌÁ×ÉÁÔÕÒÙ. ÷ÏÚÎÉËÁÅÔ ×ÏÐÒÏÓ ËÁË ÓÇÅÎÅÒÉÔØ ÐÒÏÛÉ×ËÕ ÄÌÑ eeprom OD> Ó OD> ÎÅËÏÔÏÒÙÍÉ ÐÒÅÄ×ÁÒÉÔÅÌØÎÙÍÉ ÚÎÁÞÅÎÉÑÍÉ ËÏÔÏÒÙÅ ÐÏÔÏÍ ÍÏÖÎÏ Ó ËÌÁ×ÉÁÔÕÒÙ OD> ÐÏÄÐÒÁ×ÉÔØ. ëÏÇÄÁ ÐÒÏÒÁÍÍÁ ÄÏÌÖÎÁ ÂÕÄÅÔ ÓÔÁÒÔÏ×ÁÔØ ÐÒÉ ×ËÌÀÞÅÎÉÉ ÔÏ ÏÎÁ OD> ÄÏÌÖÎÁ OD> ÐÏÄÃÅÐÉÔØ ÈÏÔÑ ÂÙ ÐÒÉÍÅÒÎÙÅ ÚÎÁÞÅÎÉÑ ÜÔÉÈ ËÏÜÆÆÉÃÉÅÎÔÏ×. úÁÔÅÍ Ñ ÉÈ Ó OD> ËÌÁ×ÉÁÔÕÒËÉ ÐÏÄÐÒÁ×ÌÀ ÐÒÑÍÏ × eeprom. èÏÔÅÌÏÓØ ÂÙ Ë ÐÒÉÍÅÒÕ ÐÒÉ ÓÔÁÒÔÅ OD> ÓÒÁÚÕ OD> ÉÍÅÔØ a=0.045 b=0.89 c=0.342 òÕËÁÍÉ ÍÅÎÑ ÐÏËÁ ÌÏÍÁÅÔ ×Ï ×ÎÕÔÒÅÎÎÅÅ OD> ÐÒÅÄÓÔÁ×ÌÅÎÉÅ ÐÅÒÅËÏ×ÙÒÉ×ÁÔØ ÜÔÉ ÞÉÓÌÁ É ÐÒÏÛÉ×ËÕ ÒÕÞËÁÍÉ ÎÁÂÉ×ÁÔØ × HEX OD> ÒÅÄÁËÔÏÒÅ. :)) ÎÁ×ÅÒÎÏÅ ÅÓÔØ ËÁËÏÊ ÔÏ ÐÒÅÄÕÓÍÏÔÒÅÎÎÙÊ ÓÒÅÄÏÊ ÓÐÏÓÏÂ. :))) OD> ???
ÞÉÔÁÊÔÅ ÄÏËÉ, ÏÎÉ ÒÕÌÅÚ (Ó) ÓÐÏÓÏÂ, ËÏÎÅÞÎÏ, ÅÓÔØ, ÎÏ ÐÒÅÄÕÓÍÏÔÒÅÎÎÙÊ ÎÅ ÓÒÅÄÏÊ, Á ËÏÍÐÉÌÑÔÏÒÏÍ. äÌÑ ÎÁÞÁÌÁ, ÔÅÂÅ ÓÌÅÄÕÅÔ ÕÂÒÁÔØ ÐÒÅÆÉËÓ no_init ÉÚ ÏÐÉÓÁÎÉÑ ÅÅÐÒÏÍ-ÐÅÒÅÍÅÎÎÙÈ, ÂÏÌØÛÅ ÔÏÇÏ, ÅÓÌÉ ÔÙ ÈÏÞÅÛØ ÉÎÉÃÉÁÌÉÚÉÒÏ×ÁÔØ ÉÈ ËÁËÉÍÉ-ÔÏ Ó×ÏÉÍÉ ÚÎÁÞÅÎÉÑÍÉ, ÔÅÂÅ ÎÁÄÏ ÎÁÐÉÓÁÔØ ÎÅÞÔÏ ÔÉÐÁ
__eeprom float a = 0.045, b = 0.89, c = 0.342;
ÐÏÓÌÅ ÔÏÇÏ, ËÁË ÔÙ ÜÔÏ ÓÄÅÌÁÅÛØ, ÔÙ ÏÂÎÁÒÕÖÉÛØ, ÞÔÏ Ô×ÏÊ ÐÒÏÅËÔ ÐÅÒÅÓÔÁÌ ËÏÍÐÉÌÉÔØÓÑ, ÌÉÎËÅÒ ×ÙÂÒÁÓÙ×ÁÅÔ ÓÏÏÂÝÅÎÉÅ Ï ÔÏÍ, ÞÔÏ ×ÙÂÒÁÎ ÎÅÐÒÁ×ÉÌØÎÙÊ ÆÏÒÍÁÔ ×ÙÈÏÄÎÏÇÏ ÆÁÊÌÁ:
Error[e133]: The output format Format cannot handle multiple address spaces. Use format variants (-y -O) to specify which address space is wanted
üÔÏ ÏÚÎÁÞÁÅÔ, ÞÔÏ × ÆÏÒÍÁÔÅ intel-standart (×ÐÒÏÞÅÍ, ËÁË É intel-extended) ÎÅÔ ×ÏÚÍÏÖÎÏÓÔÉ ÒÁÚÍÅÓÔÉÔØ ÏÄÎÏ×ÒÅÍÅÎÎÏ Ó DATA É FLASH ÓÅÇÍÅÎÔ XDATA, × ËÏÔÏÒÏÍ, ÓÏÂÓÎÏ, É ÂÙÌÉ ÒÁÚÍÅÝÅÎÙ ÉÎÉÃÉÁÌÉÚÉÒÕÝÉÅ ÚÎÁÞÅÎÉÑ Ô×ÏÉÈ ÐÅÒÅÍÅÎÎÙÈ. ôÅÐÅÒØ ÓÍÏÔÒÉÍ × ÄÏËÕÍÅÎÔÁÃÉÀ, Á ÔÁÍ ÐÏ ÜÔÏÍÕ ÐÏ×ÏÄÕ ÎÁÐÉÓÁÎÏ ÓÌÅÄÕÀÝÅÅ:
Output formats that do not support more than one memory space-like MOTOROLA and INTEL-HEX-may require up to one output file per memory space. This causes no problems if you are only producing output to one memory space (FLASH), but if you also are placing objects in EEPROM or an external ROM in DATA space, the output format cannot represent this and the linker issues the following error message: Error[e133]: The output format Format cannot handle multiple address spaces. Use format variants (-y -O) to specify which address space is wanted. To limit the output to FLASH, make a copy of the linker command file (see Linker command file, page 19) for the derivative and memory model you are using and put it in the project directory. Add the following line at the end of the file: -y(CODE)
MEMORY LOCATION CONFIGURATION To produce output also for the other memory space(s), you must generate one output file per memory space (since the output format you have chosen does not support more than one memory space). Use the XLINK option -O for this purpose. For each additional output file, you have to specify format, XLINK segment type, and file name. For example:
-Omotorola,(DATA)=external_rom.a90
-Omotorola,(XDATA)=eeprom.a90 Note: As a general rule, an output file is only necessary if you use non-volatile memory. In other words, output from the data space is only necessary if the data space contains external ROM.
The IAR Postlink utility You can also use the IAR Postlink utility, delivered with the AVR IAR C/EC++ Compiler. This application takes as input an object file (of the XLINK simple format) and extracts one or more of its XLINK segment types into one file (this file can be in either Intel extended hex format or Motorola S-record format). For example, it can put all code segments into one file and all EEPROM segments into another. See the postlink.htm document for more information about IAR Postlink.
åÓÌÉ ×ËÒÁÔÃÅ ÐÅÒÅ×ÅÓÔÉ, ÚÄÅÓØ ÏÐÉÓÁÎÏ ÔÏ, ÞÔÏ Ñ ÉÚÌÏÖÉÌ ×ÙÛÅ ÐÏ-ÒÕÓÓËÉ, É ÐÒÅÄÌÁÇÁÅÔÓÑ Ä×Á ×ÁÒÉÁÎÔÁ ÒÁÚ×ÉÔÉÑ ÓÏÂÙÔÉÊ. 1-Ê (ÎÁÓËÏÌØËÏ Ñ ÐÏÎÉÍÁÀ) ÇÏÄÉÔÓÑ ÄÌÑ ÔÅÈ, ËÔÏ ËÏÍÐÉÌÉÒÕÅÔ ÐÒÏÅËÔÙ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÌÉÎË-ÆÁÊÌÏ×, × ÜÔÏÍ ÓÌÕÞÁÅ ÔÁÍ ÐÒÅÄÕÓÍÏÔÒÅÎ ËÌÀÞ -ï ÄÌÑ ×Ù×ÏÄÁ ÒÁÚÎÙÈ ÓÅÇÍÅÎÔÏ× × ÒÁÚÎÙÅ ÆÁÊÌÙ. ÷ÔÏÒÏÊ ×ÁÒÉÁÎÔ ÂÏÌÅÅ ÕÎÉ×ÅÒÓÁÌØÎÙÊ, ÏÎ ÐÒÅÄÌÁÇÁÅÔ ÌÉÎËÏ×ÁÔØ ÐÒÏÅËÔ × ÆÏÒÍÁÔ simple, ÐÏÓÌÅ ÞÅÇÏ ÏÂÒÁÂÁÔÙ×ÁÔØ ÅÇÏ ÕÔÉÌÉÔÏÊ postlink (ÌÅÖÉÔ × ËÁÔÁÌÏÇÅ bin). ïÎÁÑ ÕÔÉÌÉÔÁ ÍÏÖÅÔ ÒÁÚ×ÁÌÉ×ÁÔØ simple ÎÁ Ä×Á hex-ÆÁÊÌÁ ÐÏ ÒÁÚÎÙÍ ÓÅÇÍÅÎÔÁÍ. ñ ÌÉÞÎÏ ÉÓÐÏÌØÚÕÀ ×ÁÒÉÁÎÔ 2 (ÐÒÏÓÔÏ ÚÁÐÕÓËÁÀ postlink ÐÅÒÅÄ avreal × ÂÁÔÎÉËÅ ÐÒÏÛÉ×ÁÌØÎÉËÁ) ÐÒÉÍÅÒÎÏ ÔÁË:
postlink.exe -intel-extended -code -data -idata -bit -const -untyped Debug\Exe\out.raw out.hex postlink.exe -intel-extended -xdata Debug\Exe\out.raw eeprom.hex avreal32 -p1 +mega128 -! -ewp
-fM103C=1,CKSEL=c,JTAGEN=1,CKOPT=0,EESV=0,SUT=3,BODEN=1,BLEV=1,OCDEN=1,BLB1=0,BLB0=0,BSIZ=3 out.hex eeprom.hex
WBR, óÅÒÇÅÊ. ICQ: 101347299