Problems with linker

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

Reply to
Paul Phoenix
Loading thread data ...

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 schrieb in im Newsbeitrag: chh864$fc7$ snipped-for-privacy@lacerta.tiscalinet.it...

the

me

undefined

made

Reply to
Jan Homuth

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" ha scritto nel messaggio news: snipped-for-privacy@uni-berlin.de...

is

Reply to
Paul Phoenix

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.

Reply to
Gary Kato

me

undefined

it

what

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

Reply to
Peter Dickerson

I solved the problem. Simply wasn't putting all the files needed in the linker command string. Now all is ok. Thank you

Reply to
Luke Phoenix

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.