| ||||||||
Technical Support Support Resources Product Information | C251: STARTUP CODE CHANGES REQUIRED TO USE ECODEInformation in this article applies to:
QUESTIONWhat must I modify in my startup code to place parts of my program in ECODE? ANSWERUse the assembler command SET(ROMHUGE) when you assemble the 251 startup code in START251.A51. There are conditional assembly statements which, as a result of this directive, declare code segments as ECODE instead of CODE. This lets the linker place your program's functions anywhere in ECODE's 24-bit allowable address range. Using this directive, you can create functions that are up to 64K and programs that are up to 16M (or the limit of memory available with your device). Note: Make sure you set your C compiler options to use ROM(HUGE). Failing to do this yields the linker errors shown below:
*** ERROR L101: SEGMENT COMBINATION ERROR
SEGMENT: ?CO?START251?4
MODULE: D:\KEIL1\C251\LIB\C2ST.LIB (?C_START)
*** ERROR L127: UNRESOLVED EXTERNAL SYMBOL
SYMBOL: MAIN?
MODULE: D:\KEIL1\C251\LIB\START251.OBJ (?C_START?)
*** ERROR L120: CONTENT BELONGS TO ERRONEOUS SEGMENT
SEGMENT: ?CO?START251?4
*** ERROR L121: IMPROPER FIXUP
MODULE: D:\KEIL1\C251\LIB\START251.OBJ (?C_START?)
SEGMENT: ?CO?START251?4
OFFSET: 000001H
*** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL
SYMBOL: MAIN?
MODULE: D:\KEIL1\C251\LIB\START251.OBJ (?C_START?)
ADDRESS: FF0027H
*** ERROR L120: CONTENT BELONGS TO ERRONEOUS SEGMENT
SEGMENT: ?CO?START251?4
*** ERROR L121: IMPROPER FIXUP
MODULE: D:\KEIL1\C251\LIB\C2ST.LIB (?C_START)
SEGMENT: ?CO?START251?4
OFFSET: 000001H
MORE INFORMATIONFor more information on how to set the address range(s) for ECODE, refer to the L251 linker command ECODE() in the 251 Utilities User's Guide. Last Reviewed: Monday, May 17, 2004 | |||||||
| ||||||||