Gast
#215894
Hallo Leute, ich arbeite gerade mit einem M16C62P µ Controller mit IAR. Sobald mein Programm über eine bestimmt Grenze wächst bringt der Linker im IAR folgende Meldung: "Error[e16]: Segment CODE (size: 0x302 align: 0) is too long for segment definition. At least 0x1 more bytes needed. The problem occurred while processing the segment placement command "-Z(HUGECODE)CODE,TINYFUNC=FF0FF-FF3FF", where at the moment of placement the available memory ranges were "CODE:ff0ff-ff3ff"" Im Linker Command File benutze ich folgendes: // ================================================= // IAR XLINK Linker command file for Mitsubishi M16C // For use with the IAR C libraries // // This is an example of a XLINK command file // for the M16C/60 and M16C/20 series. // // $Revision: 1.4 $ // ================================================= // Define CPU -cm16c // Size of the user stack -D_CSTACK_SIZE=400 // Size of the interrupt stack -D_ISTACK_SIZE=40 // Relocatable "bit" segment (must be in data13 area). -Z(BIT)BITVARS=2000-FFFF // ======================= // DATA13 RAM // ======================= -Z(NEAR)DATA13_AN=0-1FFF -Z(NEAR)DATA13_I=400-1FFF -Z(NEAR)DATA13_Z,DATA13_N // ======================= // DATA16 RAM // ======================= // Set up user stack -Z(NEAR)CSTACK+_CSTACK_SIZE=400-7FFF // Set up interrupt stack -Z(NEAR)ISTACK+_ISTACK_SIZE // Near variables -Z(NEAR)DATA16_I,DATA16_Z,DATA16_N,DATA16_AN // User defined near DATA segments // ======================= // DATA16 ROM // ======================= // Constant segments (in ROM), reachable for near pointers -Z(NEARCONST)DATA16_C=8000-FFFF // User defined near CONST segments // ======================= // FAR/DATA20 RAM // ======================= // Far and huge data segments -Z(FAR)FAR_I,FAR_Z,FAR_N,FAR_AN=400-7FFF -Z(HUGE)DATA20_I,DATA20_Z,DATA20_N,DATA20_AN // User defined far & huge DATA segments // ======================= // FAR/DATA20 ROM // ======================= // Constant and initializer segments (in ROM) -Z(FARCONST)FAR_ID=F0000-FFCFF -Z(FARCONST)FAR_C=C0000-FFCFF -Z(HUGECONST)DATA20_C,DATA20_ID,CHECKSUM -Z(FARCONST)DATA16_ID,DATA13_ID,DIFUNCT // CODE segments -Z(HUGECODE)CODE,TINYFUNC=FF0FF-FF3FF -Z(HUGECODE)CSTART=FF000-FF033 // User defined CODE segments // User defined far & huge CONST segments // Variable vector table -Z(CONST)INTVEC=FF4FF-FF5FF // Special page table -Z(CONST)FLIST=FFE00-FFFDB // Fixed interrupt vector table -Z(CONST)INTVEC1=FFFDC-FFFFF // ======================== // IAR C library formatting // ======================== -e_small_write=_formatted_write -e_medium_read=_formatted_read Kann mir jemand von euch mal bitte sein Linker Command File schicken/posten oder einen guten Tipp geben wie ich das Problem umgehen kann. Den Bereich TINYFUNC=FF0FF-FF3FF habe ich auch schon mal auf TINYFUNC=FF0FF-FF4FF erhöht. Leider war ein Absturz beim Upload Vorgang die Folge. Danke für eure Hilfe. Gruß Dirk