Цитата(MrYuran @ Mar 6 2009, 11:35)

ну тогда порпробуйте поширше чип взять.
Если прокатит - надо поиграть с оптимизацией, авось утопчет эти 170 байт
Усилил оптимизацию, но все равно не хватает.
Линкер пишет что сегмент кода 0x5c8 (это 1480) и нужно еще 0xe (это 14) байт.
Чего 1480+14 = 1496 байт в AT90s2313 или в любом другом AVR ???
понял - это пространство CODE:246-7ff а
где уменьшить число 246h в каких настройках ?
===========================
Error[e16]: Segment CODE (size: 0x5c8 align: 0x1) is too long for segment definition. At least 0xe more bytes needed.
The problem occurred while processing the
segment placement command "-Z(CODE)CODE=_..X_FLASH_BASE-_..X_FLASH_END", where at the moment of placement the available memory ranges were
"CODE:246-7ff"
Reserved ranges relevant to this placement:
CODE:16-23d NEAR_F
CODE:23e-245 INITTAB
CODE:246-7ff CODE
Error while running Linker
Total number of errors: 1
Total number of warnings: 0
Вот текст файла линкера lnk2313t.xcl - как в сегмент CODE добавить 20 байт ?
CODE
/* - lnk2313.xcl -
*
* XLINK command file for the ICCAVR C-compiler using the --cpu=2313, -mt
* options. Segments are defined for an AT90S2313 without external memory.
*
* Usage: xlink your_file(s) -f lnk2313
*
* File version: $Revision: 5794 $
*/
/*
* Modify the lines below to alter the size of the RSTACK, CSTACK and HEAP
* segments. These need to be fine tuned to suit your specific application.
* The '_..X_' prefix is used by C-SPY as an indication that the label should
* not be displayed in the dissassembly window.
*/
-D_..X_CSTACK_SIZE=20 /* 32 bytes for auto variables and register save. */
-D_..X_RSTACK_SIZE=10 /* 16 bytes for return addresses, equivalent to */
/* 8 levels of calls, including interrupts. */
-D_..X_HEAP_SIZE=10 /* 16 bytes of heap. */
-D_..X_TINY_HEAP_SIZE=10 /* 16 bytes of heap. */
/* Define CPU */
-ca90
/*
* The following segments are located in the internal memory of
* the AT90S2313. Do not change these lines.
*/
/* Code memory */
-Z(CODE)INTVEC=0-15 /* 11 Interrupt vectors * 2 bytes each */
/* Fill unused interrupt vector's with RETI */
-H1895 -h(CODE)0-15
-Z(CODE)TINY_F=16-FF
-Z(CODE)SWITCH,INITTAB,DIFUNCT=16-7FF
-Z(CODE)CODE=16-7FF
-Z(CODE)NEAR_F=16-7FF
-Z(CODE)TINY_ID,NEAR_ID=16-7FF
-Z(CODE)CHECKSUM#7FF
/* Data memory */
-Z(DATA)TINY_I,TINY_Z,TINY_N=60-DF
-Z(DATA)CSTACK+_..X_CSTACK_SIZE=60-DF
-Z(DATA)HEAP+_..X_HEAP_SIZE=60-DF
-Z(DATA)IOSTREAM_N#60-DF
-Z(DATA)TINY_HEAP+_..X_TINY_HEAP_SIZE=60-DF
-Z(DATA)RSTACK+_..X_RSTACK_SIZE=60-DF
-Z(DATA)NEAR_I,NEAR_Z=60-DF
/* Internal eeprom memory */
-Z(XDATA)EEPROM_I,EEPROM_N=0-7F
/* Select reduced "printf" support to reduce library size.
See configuration section in manual concerning printf/sprintf. */
/*Dlib*/
-e_PrintfSmall=_Printf
/*Clib*/
-e_small_write=_formatted_write
/*Dlib and Clib*/
-e_small_write_P=_formatted_write_P
/* Disable floating-point support in "scanf" to reduce library size.
See configuration section in manual concerning scanf/sscanf */
/*Dlib*/
-e_ScanfSmall=_Scanf
/*Clib*/
-e_medium_read=_formatted_read
/*Dlib and Clib*/
-e_medium_read_P=_formatted_read_P
/* Suppress one warning which is not relevant for this processor */
-w29
/* Code will now reside in file aout.a90 or aout.d90, unless -o is specified */
/* .d90 is the default if debug system is linked (option -r) */
/* .a90 is the default without debugging. Default format is -Fmotorola */
\\\\\\\\\\\\\\\
выкинул из проги одну большую строку - влезла в память.
Теперь новая напасть - что за ошибка ?
Building configuration: Gsm_sms - Debug
Updating build tree...
gsm_avrv4_c.c
Linking
Error[e46]: Undefined external "__iar_Strchr" referred in gsm_avrv4_c ( C:\_WORKs\__gsm sms\Debug\Obj\gsm_avrv4_c.r90 )
Error[e46]: Undefined external "__iar_Strstr" referred in gsm_avrv4_c ( C:\_WORKs\__gsm sms\Debug\Obj\gsm_avrv4_c.r90 )
Error while running Linker
Total number of errors: 2
Total number of warnings: 0