Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

working with asm and c files in MPLAB

Status
Not open for further replies.

Build-A-Burger

Member level 4
Joined
Oct 27, 2010
Messages
77
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Wyoming
Activity points
1,982
I've trying to get a project to work that has both asm files and C files. It looks like you can't build the project at once because you can only pic either the compiler (HI-TECH ANSI C Compiler) or the assembler (MPASM) from the 'Select Language Toolset' under Build options. When I try to run the compiler I get these errors on the relocatable asm file: 16F877ATMPO.ASM which is just the template from the MPASM directory.
Error [223] C:\dev\PIC\source\16F877ATMPO.ASM; 38. digit out of range
Error [876] C:\dev\PIC\source\16F877ATMPO.ASM; 38. syntax error
Error [876] C:\Program Files (x86)\Microchip\MPASM Suite\p16f877a.inc; 33. syntax error
Error [876] 16F877ATMPO.pre; 86. syntax error
Error [876] 16F877ATMPO.pre; 92. syntax error

line 38,39:
list p=16f877a ; list directive to define processor
#include <p16f877a.inc> ; processor specific variable definitions

So I tried to run MPASMWIN in a DOS box and got a message that it was incompatible with my OS (Windows 7)
So I tried to select the assembler from the language toolset and assemble just the asm file. I can either right-click on the asm file listed in the project files mcw box and do 'assemble' or remove the C file and build and it generates an 'o' file (16F877ATMPO.O).
But when I go back to the compiler I can't add the 'o' file to the list of object files in the project file mcw box because its looking for and obj file extension. I have the option of adding an *.as file to the project files along with the *.c files. How do I generate an *.as file from the asm template? I guess is my question.
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top