| ??? 05/08/06 20:53 Read: times | #115820 - Linker problem using SDCC | 
| I have been reading my a@% off trying to find in the compiler (SDCC) and linker(ASX8051) what I am doing wrong. In a nut shell, if I put all of my code in one file, compiles and simulates ok all variables and code show up in the lst file. If I try to seperate into one main and two function files all compile ok build ok but the lst files are not combined. 
 Please note this is program does nothing right now except let me work with the simulator and set up my first mutlple function project. I am not looking for someone to fix this for me just tell me what I am looking for - I learn better that way. TempTest.c 
#define MICROCONTROLLER_AT89C51ED2_44
#include <stdio.h>
#include <mcs51regMR.h>
#include "protoDS18B20.h"
char tempvar;
void main(void)
{
	
    tempvar = 6239;
    while(1)
    {
    tempvar = tempvar % 119;
    P3_3 = 0;
    ow_reset();
    P3_3 =1;
    }
}
Reset.c 
#include <mcs51regMR.h>
#include "protoDS18B20.h"
unsigned char ow_reset(void)
{
    unsigned char presence;
	
    P3_3 = 0; //pull P3 line low
    delay_loop(29); // leave it low for 480us NEEDS ADJUSTING 
    P3_3 = 1; // allow line to return high
    delay_loop(3); // wait for presence
    presence = P3_3; // get presence signal
    delay_loop(25); // wait for end of timeslot
    return(presence); // presence signal returned
} // 0=presence, 1 = no part
Delay.c 
#include "protoDS18B20.h"
void delay_loop(int useconds)
{
    unsigned int s;
    for (s=0; s<useconds;s++);//where is this code?
}
I can supply the lst files but from the above here is where the problem shows up in bold: 
   0021 F2                  666     movx    @r0,a
                    0022    667     C$TempTest.c$58$2$2 ==.
                            668 ;TempTest.c:58: P3_3 = 0;
                            669 ;     genAssign
   0022 C2 B3               670     clr	    _P3_3
                    0024    671     C$TempTest.c$59$2$2 ==.
                            672 ;TempTest.c:59: ow_reset();
                            673 ;     genCall
   0024 12s00r00            674     lcall   _ow_reset
                    0027    675 	C$TempTest.c$60$2$2 ==.
 | 
| Topic | Author | Date | 
| Linker problem using SDCC | 01/01/70 00:00 | |
| Linker??? | 01/01/70 00:00 | |
| Linker! | 01/01/70 00:00 | |
| I doubt SDCC would do that | 01/01/70 00:00 | |
| Ok not the linker? | 01/01/70 00:00 | |
| Sorry forgot to mention that I am using | 01/01/70 00:00 | |
| Compiler & Linker | 01/01/70 00:00 | |
| Nothing linked | 01/01/70 00:00 | |
| SDCC File types | 01/01/70 00:00 | |
| Linker problem | 01/01/70 00:00 | |
| Then what is the problem? | 01/01/70 00:00 | |
| Simulator only sees the "main" program | 01/01/70 00:00 | |
| simulator and/or IDE problem? | 01/01/70 00:00 | |
| Maybe this will illustrate ... | 01/01/70 00:00 | |
| BiPOM says | 01/01/70 00:00 | |
| SDCC new release? | 01/01/70 00:00 | |
| Q2 | 01/01/70 00:00 | |
| SDCC new Release Q2 -   | 01/01/70 00:00 | |
| where is this code? | 01/01/70 00:00 | |
| I used --no-peep SDCC | 01/01/70 00:00 | |
| linking multiple files | 01/01/70 00:00 | 



