Building failure when linking 3 .asm codes

Discussion on both general simulation and Proteus VSM microcontroller simulation.
Post Reply
picchiedi
Professional User
Posts: 142
Joined: Thu 2014-12-25 9:32

Building failure when linking 3 .asm codes

Post by picchiedi »

Hello.
The aim of the enclosed Proteus project is to draw lines on a GLCD.
To do this, I have one main .asm code that needs 2 other codes (also enclosed) (I didn’t put them directly in project, because if there’s a building error they are not saved in project):

-line.asm (where I have soubroutines to clear the screen and draw lines, called from main.asm)
-TrigTab.asm (where I have tables used in main.asm).

When I put the 3 files:
Source Files
main.asm
line.asm
TrigTab.asm
all together in Source Files and I build, I have following error :

make: *** No rule to make target `../../../../../../../Documents_and_Settings/Utente/Impostazioni_locali/temp/5e525844d45f432fb2a0ae309b4059d0/PIC16F877/line.asm', needed by `line.o'. Stop.
Error code 2

I guess it can be a linking problem, but it is the first time I’m facing that and I can’t coming out.

Any help, or similar project example, would be appreciated.

Thanks a lot in advance.

Regards
Attachments
GLCD line with ks0108.zip
(20.37 KiB) Downloaded 37 times
Ettore
Labcenter Staff
Posts: 2932
Joined: Fri 2006-03-03 11:56
Location: Milan
Contact:

Re: Building failure when linking 3 .asm codes

Post by Ettore »

I did not try to rebuild your project but I can see that problem is twofold.
The first one is because you define scratch4 as "extern" in line.asm but then you did not add scratch4 in the GLOBAL list in main.asm.
The second problem is related to a number of illegal label errors that you definitely need to resolve. I bet this are related to lines like this:

pageSet:banksel control

that should be fixed as:

pageSet:
banksel control
Kind regards,
Ettore Arena - Labcenter Electronics.
picchiedi
Professional User
Posts: 142
Joined: Thu 2014-12-25 9:32

Re: Building failure when linking 3 .asm codes

Post by picchiedi »

Thanks a lot, Ettore.
You're perfectly right and I solved that already (in my post was the original codes from web).
But in spite of that, after correction, I had the no rule error.

Investigating a little bit, I found that if I bild the 3 .asm codes in MPLAB I had no error.

I found that in Proteus I have the error if I make "add new file" from Source Files, so I have an empty page, and I copy a text file with the code in it.
Instead, if I save the text code as line.asm (for instance in ConText program) and then I make "add file", picking it up from a folder, I have no error in building also with Proteus.

I don't know why.
Anyway, I thought it was a linking problem, but it seems not.

Thank you for your kind attention.
Regards
picchiedi
Professional User
Posts: 142
Joined: Thu 2014-12-25 9:32

Re: Building failure when linking 3 .asm codes

Post by picchiedi »

I add enclosed the working code, maybe it can be useful for others.
It's not easy to find complete assembly codes examples for PIC and GLCD display.
I'm going to adapt it also for EADOG. I will try.
Thank you again.
Regards
Attachments
GLCD line with ks0108_rev1.zip
(28.42 KiB) Downloaded 40 times
Post Reply