2009-11-13 03:00 AM
Cosmic compiler - section boundary crossing
2011-05-17 06:05 AM
Hi,
I use Cosmic compiler with STVD. The error receive after linking: #error clnk Debug\waga tw.lkf:34 Debug\beep.o: section boundary crossing (.text:018d) c_uitolx #error clnk Debug\waga tw.lkf:37 Debug\funkc.o: section boundary crossing (.text:0003) c_uitolx. How can one remove this error? Best regards. Kris.2011-05-17 06:05 AM
2011-05-17 06:05 AM
Hi Luca.
I change memory model and libraries for code larger than 64K. The error receive after linking: #error clnk Debug\waga tw.lkf:1 prefixed symbol f__stext in conflict (C:\Program Files\COSMIC\CXSTM8\Lib\crtsi.sm8 Debug\stm8_interrupt_vector.o) #error clnk Debug\waga tw.lkf:1 symbol __stext not defined (Debug\stm8_interrupt_vector.o ) Best regards. Kris2011-05-17 06:05 AM
2011-05-17 06:05 AM
just to close this thread, the problem was due to a wrong way to declare the interrupt vectors: the way used was ok for < 64k, but did not work for bigger applications.
Cosmic recommends to declare the interrupt vectors in the following way, that works for all memory models / application sizes: /* INTERRUPT VECTORS TABLE FOR STM8 * Copyright (c) 2007 by COSMIC Software */ #define NULL 0 extern void _stext(); /* startup routine */ extern void recept(); /* character receive handler */ #pragma section const {vector} void (* const @vector _vectab[32])() = { _stext, /* RESET */ NULL, /* TRAP */ NULL, /* TLI */ NULL, /* AWU */ NULL, /* CLK */ NULL, /* EXTI PORTA */ NULL, /* EXTI PORTB */ NULL, /* EXTI PORTC */ NULL, /* EXTI PORTD */ NULL, /* EXTI PORTE */ NULL, /* CAN RX */ NULL, /* CAN TX */ NULL, /* SPI */ NULL, /* TIMER 1 OVF */ NULL, /* TIMER 1 CAP */ NULL, /* TIMER 2 OVF */ NULL, /* TIMER 2 CAP */ NULL, /* TIMER 3 OVF */ NULL, /* TIMER 3 CAP */ NULL, /* USART TX */ recept, /* USART RX */ NULL, /* I2C */ NULL, /* LINUART TX */ NULL, /* LINUART RX */ NULL, /* ADC */ NULL, /* TIMER 4 OVF */ NULL, /* EEPROM ECC */ NULL, /* Reserved */ NULL, /* Reserved */ NULL, /* Reserved */ NULL, /* Reserved */ NULL, /* Reserved */ }; the linker file should contain the lines +seg .vector -b 0x8000 -m 0x80 -k # vectors start address vector.o # interrupt vectors (sorry if it's not too clear, the CODE tag does not seem to work properly on the forum..)