Build-A-Burger
Full Member level 1
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.
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: