I have been having problems with the KDS 3 linker not resolving function references. I have prototypes for
all of the functions. But I am unable to call a function, say App_Run() from the main.c file.This morning I believe
that I have figured out what is happening. My task is to port software from an old product to new hardware,
replacing an 8051 with an ARM processor. The software was originally built with the Franklin C compiler,
so all of the file names are in upper case DOS file names). The code contained in a file named UMAIN05.C is
the old main() function, it calls all of the other functions in the project.
It appears that the KDS tools process the files in alphabetical order. When I attempt to call my App_Run() function
which is defined in this file I get undefined references from the linker. However, if I rename the file UMAIN05.C
to say _main.c then the linker is able to resolve the references to function App_Run(). This does not solve my
problem because the file name UMAIN05.C is one of the last file names in the 8051 software. With the new file
name all of the functions which are defined in this file _main.c, are now flagged as undefined references.
The references between files main.c and _main.c are now resolved, but all of the functions in files named Uxxxxxx.c
are not resolved.
File named _main.c is processed before file named main.c, but is also processed before all of the other files in my
project. Since file main.c is generated by Processor Expert, I can't change it. It looks like I will have to change all of the file
names in the old software. Am I correct? Is there some way to resolve this with out changing file names? Is this really
what the KDS tools are doing? I have changed some of the file names and now these renamed files have function
Has anybody seen this type of issue?