We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
after linking my code I get: *** ERROR L121: IMPROPER FIXUP MODULE: prog_fsk.obj (PROG_FSK) SEGMENT: ABSOLUTE Everything was OK before untill the moment, when I changed one of my program functions to be ISR. Here is it's source code: void CallerId(void) interrupt 0 using 2 { char c; int timeout=0; char i; //licznik petli while(P3_2==0); //czeka az skonczy sie pierwszy dzwonek P3_3=0; //przelaczenie CMX 612 w tryb odbioru danych FSK P3_7=1; c=_getkey(); while(c!=0x55) //czekamy na blok Chan Seize (ASCII 'U') { c=_getkey(); //czym rozni sie getkey od getchar???? timeout++; if(timeout==10000) //aktywowac przerwanie INT 1 tylko po co????????? {dzwonek=0; return; //nieudana transmisja danych } } timeout=0; while(c!=0x80) //czekamy na naglowek CLIP (call setup) { c=_getkey(); timeout++; if(timeout==10000) { //aktywowac przerwanie INT 1 tylko po co????????? dzwonek=0; return; //nieudana transmisja danych } } fsk_tab[0]=c; //"call setup" c=_getkey(); fsk_tab[1]=c; //liczba bajtow wiadomosci (nie liczac pol "call setup" i "Message Lenght") for(i=2;i<c+2;i++) { fsk_tab[i]=_getkey(); } P3_3=1; //przelaczenie CMX 612 w tryb "Zero Power" P3_7=0; dzwonek=1; } and here memory map: LINK MAP OF MODULE: prog_fsk (PROG_FSK) TYPE BASE LENGTH RELOCATION SEGMENT NAME ----------------------------------------------------- * * * * * * * D A T A M E M O R Y * * * * * * * REG 0000H 0008H ABSOLUTE "REG BANK 0" DATA 0008H 0006H UNIT _DATA_GROUP_ 000EH 0002H *** GAP *** REG 0010H 0008H ABSOLUTE "REG BANK 2" DATA 0018H 0050H UNIT ?DT?PROG_FSK IDATA 0068H 0001H UNIT ?STACK * * * * * * * C O D E M E M O R Y * * * * * * * CODE 0000H 0003H ABSOLUTE CODE 0003H 0002H ABSOLUTE 0005H 07FBH *** GAP *** CODE 0800H 00F6H UNIT ?C?LIB_CODE CODE 08F6H 00D9H INBLOCK ?PR?MAIN?PROG_FSK CODE 09CFH 00B4H INBLOCK ?PR?CALLERID?PROG_FSK CODE 0A83H 008CH UNIT ?C_C51STARTUP CODE 0B0FH 0086H INBLOCK ?PR?PRINTCLIP?PROG_FSK CODE 0B95H 005CH INBLOCK ?PR?SAVECLIP?PROG_FSK CODE 0BF1H 004DH INBLOCK ?PR?_PRINTWPIS?PROG_FSK CODE 0C3EH 002DH INBLOCK ?PR?_CHECKSUM?PROG_FSK CODE 0C6BH 001CH INBLOCK ?PR?_WRITE_DATA?PROG_FSK CODE 0C87H 0014H INBLOCK ?PR?SERIAL_INIT?PROG_FSK CODE 0C9BH 000FH INBLOCK ?PR?_WRITE_CMD?PROG_FSK CODE 0CAAH 000EH INBLOCK ?PR?_WRITE_NIBBLE?PROG_FSK CODE 0CB8H 000CH INBLOCK ?PR?LCD_INIT?PROG_FSK CODE 0CC4H 000AH UNIT ?PR?_GETKEY?_GETKEY CODE 0CCEH 0004H UNIT ?C_INITSEG Thank you for help, Wojtek PS I'm using Keil Evaluation Project settings: -Device:
Be careful what you call from an interrupt routine. The call to getkey is very likely the problem. You may have to incorporate the function of getkey so as not to call it. Better is to re-structure the interrupt so that a flag is set for the main program loop to do this lengthy serviceing.
The problem here is that you are creating functions using ROM(SMALL). This means that only AJMP and ACALL functions are used. If you have a function that is outside of the 2K block, you will receive the fixup error you get. Switch to ROM(LARGE) and this problem will go away. Jon
I cant't switch to Larhe, because my device(at89c2051) has only 2kB of Flash ROM.
Oh, sorry. I didn't notice you were using the evaluation tools. The evaluation compiler starts program code at 0x0800. The interrupt service routine (at address 0x0003) is using a 2-byte JMP (AJMP) to jump to the ISR code (which is located above 0x0800 = 2K). This is what causes the fixup error. You're not going to be able to use the evaluation compiler to develop code for a 2K device using on-chip memory. This limitation is in place because the evaluation compiler is for evaluating the tools. If you're going to do full-up development, you need to purchase a license for the product. That limitation should be explained when you install the tools. Jon
I see. One thing is strange to me: why my code was compiled and linked without any errors after change my ISR(CallerId()) to normal function. Wojtek
It's not strange at all. If you look at the linker MAP file you posted:
CODE 0000H 0003H ABSOLUTE CODE 0003H 0002H ABSOLUTE 0005H 07FBH *** GAP *** CODE 0800H 00F6H UNIT ?C?LIB_CODE CODE 08F6H 00D9H INBLOCK ?PR?MAIN?PROG_FSK CODE 09CFH 00B4H INBLOCK ?PR?CALLERID?PROG_FSK CODE 0A83H 008CH UNIT ?C_C51STARTUP CODE 0B0FH 0086H INBLOCK ?PR?PRINTCLIP?PROG_FSK CODE 0B95H 005CH INBLOCK ?PR?SAVECLIP?PROG_FSK CODE 0BF1H 004DH INBLOCK ?PR?_PRINTWPIS?PROG_FSK CODE 0C3EH 002DH INBLOCK ?PR?_CHECKSUM?PROG_FSK CODE 0C6BH 001CH INBLOCK ?PR?_WRITE_DATA?PROG_FSK CODE 0C87H 0014H INBLOCK ?PR?SERIAL_INIT?PROG_FSK CODE 0C9BH 000FH INBLOCK ?PR?_WRITE_CMD?PROG_FSK CODE 0CAAH 000EH INBLOCK ?PR?_WRITE_NIBBLE?PROG_FSK CODE 0CB8H 000CH INBLOCK ?PR?LCD_INIT?PROG_FSK CODE 0CC4H 000AH UNIT ?PR?_GETKEY?_GETKEY CODE 0CCEH 0004H UNIT ?C_INITSEG
CODE 0000H 0003H ABSOLUTE
CODE 0003H 0002H ABSOLUTE
Witam. Zajmuje sie genealogia rodziny Glądała. Prosze o odpisanie na moj list bowiem nie wiem czy dostanie Pan ta wiadomosc. Dziekuje.
Witam Szukam zyjacych Glądałów, prosze o odpisanie.