EmbeddedRelated.com
Forums

Problems with linker

Started by Paul Phoenix September 6, 2004
Hi,
I have a C program to compile and load on a M16C processor. The program is
ready and working, but I have
to modify some lines.
There are some AA.c and AA.h files, the ncrt0.a30 (the startup file) and the
sect30.inc (the inclusion file).
The compiler I have to use is NC30, which consists of:
- as30 which gives me ncrt0.r30 from ncrt0.a30 and sect30.inc
- nc30 - the compiler. It gives me AA.r30 from AA.c
- ln30 - the linker. It should give me my AA.x30 file
- lmc30.exe. It changes the AA.r30 file into AA.mot

As30 and nc30 don't give any problem, but when I run the linker it gives me
the following errors:

sect30.inc 151 Error (ln30): ncrt0.r30 : '_VoutAltaSoglia1' value is
undefined
sect30.inc 156 Error (ln30): ncrt0.r30 : '_VinAlta' value is undefined
sect30.inc 158 Error (ln30): ncrt0.r30 : '_VoutAltaSoglia2' value is
undefined
sect30.inc 161 Error (ln30): ncrt0.r30 : '_Dma0Interrupt' value is undefined
sect30.inc 171 Error (ln30): ncrt0.r30 : '_Serial1RxInterrupt' value is
undefined

And so on...
The parameters of the programs should be ok, as I use some batch files made
by the programmer who did it all.
Any idea?
Thank you very much


Hi Paul,

before posting support questions about a proprietary development tool,
-- how about consulting the user manual ?


The M16C (NC30WA) Assembler Manual (as30ue.pdf) decribes this behaviour
like:

'symbol' value is undefined
? The value of the symbol 'symbol' is not defined yet.
! The program will be processed assuming values = 0. Check the symbol
values.


Feel free to open the document and have a look at the appropriate chapters
about proper use of the assembler.

grtnx
/jan

Paul Phoenix <paulphoenix@inwind.it> schrieb in im Newsbeitrag:
chh864$fc7$1@lacerta.tiscalinet.it...
> Hi, > I have a C program to compile and load on a M16C processor. The program is > ready and working, but I have > to modify some lines. > There are some AA.c and AA.h files, the ncrt0.a30 (the startup file) and
the
> sect30.inc (the inclusion file). > The compiler I have to use is NC30, which consists of: > - as30 which gives me ncrt0.r30 from ncrt0.a30 and sect30.inc > - nc30 - the compiler. It gives me AA.r30 from AA.c > - ln30 - the linker. It should give me my AA.x30 file > - lmc30.exe. It changes the AA.r30 file into AA.mot > > As30 and nc30 don't give any problem, but when I run the linker it gives
me
> the following errors: > > sect30.inc 151 Error (ln30): ncrt0.r30 : '_VoutAltaSoglia1' value is > undefined > sect30.inc 156 Error (ln30): ncrt0.r30 : '_VinAlta' value is undefined > sect30.inc 158 Error (ln30): ncrt0.r30 : '_VoutAltaSoglia2' value is > undefined > sect30.inc 161 Error (ln30): ncrt0.r30 : '_Dma0Interrupt' value is
undefined
> sect30.inc 171 Error (ln30): ncrt0.r30 : '_Serial1RxInterrupt' value is > undefined > > And so on... > The parameters of the programs should be ok, as I use some batch files
made
> by the programmer who did it all. > Any idea? > Thank you very much > >
You are right. I read the manual, and I found the line you showed to me, but
it wasn't helpful to me.
I don't think there is an error in the program but I think it is more likely
that I miss a file or I don't
use the programs in the right order.
Maybe someone has already encountered a problem like this and so can help
me.
Don't you think I am sitting here doing nothing and waiting for someone to
solve the problem for me!
Thank you


"Jan Homuth" <jandothomuth@altium.com> ha scritto nel messaggio
news:2q2nrvFr2ekgU1@uni-berlin.de...
> Hi Paul, > > before posting support questions about a proprietary development tool, > -- how about consulting the user manual ? > > > The M16C (NC30WA) Assembler Manual (as30ue.pdf) decribes this behaviour > like: > > 'symbol' value is undefined > ? The value of the symbol 'symbol' is not defined yet. > ! The program will be processed assuming values = 0. Check the symbol > values. > > > Feel free to open the document and have a look at the appropriate chapters > about proper use of the assembler. > > grtnx > /jan > > Paul Phoenix <paulphoenix@inwind.it> schrieb in im Newsbeitrag: > chh864$fc7$1@lacerta.tiscalinet.it... > > Hi, > > I have a C program to compile and load on a M16C processor. The program
is
> > ready and working, but I have > > to modify some lines. > > There are some AA.c and AA.h files, the ncrt0.a30 (the startup file) and > the > > sect30.inc (the inclusion file). > > The compiler I have to use is NC30, which consists of: > > - as30 which gives me ncrt0.r30 from ncrt0.a30 and sect30.inc > > - nc30 - the compiler. It gives me AA.r30 from AA.c > > - ln30 - the linker. It should give me my AA.x30 file > > - lmc30.exe. It changes the AA.r30 file into AA.mot > > > > As30 and nc30 don't give any problem, but when I run the linker it gives > me > > the following errors: > > > > sect30.inc 151 Error (ln30): ncrt0.r30 : '_VoutAltaSoglia1' value is > > undefined > > sect30.inc 156 Error (ln30): ncrt0.r30 : '_VinAlta' value is undefined > > sect30.inc 158 Error (ln30): ncrt0.r30 : '_VoutAltaSoglia2' value is > > undefined > > sect30.inc 161 Error (ln30): ncrt0.r30 : '_Dma0Interrupt' value is > undefined > > sect30.inc 171 Error (ln30): ncrt0.r30 : '_Serial1RxInterrupt' value is > > undefined > > > > And so on... > > The parameters of the programs should be ok, as I use some batch files > made > > by the programmer who did it all. > > Any idea? > > Thank you very much > > > > > >
>As30 and nc30 don't give any problem, but when I run the linker it gives me >the following errors: > >sect30.inc 151 Error (ln30): ncrt0.r30 : '_VoutAltaSoglia1' value is undefined >
Let's take first things first. What is the linker trying to tell you? When it says "value is undefined", what does it mean? Why does the linker care what that symbol is? What is that symbol? You need to look in sect30.inc for the line that is causing the error.
"Gary Kato" <garykato@aol.com> wrote in message
news:20040906064126.15036.00002886@mb-m02.aol.com...
> >As30 and nc30 don't give any problem, but when I run the linker it gives
me
> >the following errors: > > > >sect30.inc 151 Error (ln30): ncrt0.r30 : '_VoutAltaSoglia1' value is
undefined
> > > > Let's take first things first. What is the linker trying to tell you? When
it
> says "value is undefined", what does it mean? Why does the linker care
what
> that symbol is? What is that symbol? > > You need to look in sect30.inc for the line that is causing the error.
This looks like the assembler complaining rather than the linker, as if the interrupt vectors are not declare global (.glb). A template sect30.inc is provided with NC30 but needs to be edited for any interrupt vectors. Peter
I solved the problem. Simply wasn't putting all the files needed in
the linker command string. Now all is ok.
Thank you