Setting MPLAB include path

Status
Not open for further replies.
Hi all.As I've switched from 8051s,I still keep the habbit of creating a group of *.inc files in the project folder for the mainloop.ASM routine to include.But now it seems a little difficult for MPLAB.Coz when I go to the setting window Project>Build Options>Project.I see the items marked 'Assembler Include Path,$(AINDIR):' and'Include Path,$(INCDIT):' in the General tab disabled.I can't find anywhere else to designate the custom folder.Is it impossible for MPLAB?I hate including absolute path in my source code.Could anyone help me with it?Thanks in advance
 
You don't have to use Absolute path in source code, it works fine with relative as well. But I see you want to completelly avoid this, i have to think about it more...
 
Alex_rcpilot said:
I still keep the habbit of creating a group of *.inc files in the project folder for the mainloop.ASM routine to include.

If your .inc files are in the project folder, you don't need to specify a custom include path. MPASM's include directive will find them. Simply :

Code:
#include "whatever.inc"

You could also manually add them to your project. They'll be listed in the project's sources tree for you to edit them on a double click. You still need the include directives in your main.asm though.

But this doesn't explain the two disabled inputs in the project's build options. That's what I get too with MPLAB 7.20...
 
Hi guys,I'm back.I just fan a test and found out a possible cause for this problem.I was using a long file name 'Delay Routines.inc'.Maybe this was an invalid path for MPLAB.As soon as I changed it into 'DelayRoutine.inc'.Everything was okay!

Jay and Joel,thank you for the replies.
 
Spaces in filenames is sin! Not using quotes around long filenames is pure evil! :evil:

Light a candle at church next saturday
 
Joel Rainville said:
Spaces in filenames is sin! Not using quotes around long filenames is pure evil! :evil:

Light a candle at church next saturday
I believe it's the evil inheritance ofPASM.Microchip may need to improve its assembler.I can't even store my project in a 'deep' folder.It make a mess in my HDD.I always spare an entire partition named 'Documents' specially for the system folder 'My Document'.Thus my electronic projects is located at Document partition:\My Documents\Electronics Database\My projects.I creat subfolders and store all my projects respectively inside them.Unlike PIC projects under MPLAB,8051 and AVR projects all turned out working fine with this structure.I have to creat folders for PIC projects under the root path,which makes the file structure ugly.It truely sucks!
 
As I understand it, MPASM is only a 16 bit application, and doesn't support long filenames.

But the entire 'long' filename system in Windows is just a bodge anyway!, it doesn't really support long filenames at all, at least not under FAT or FAT32, I don't know about NTFS?.

Personally though, I consider it really bad practice to include spaces in filenames, it's a stupid Microsoft idea! (as is filenames not being case sensitive!).
 
Alex_rcpilot said:
I've seen the linker function in MPLAB help,but is it really so convenient to use?
One word, YES
Linker creates Relative code instead of Absolute, this helps you to move program between procesors with minimal modifications.
 
Well personally I would prefer the compatibility for long filenames as long as those with spaces.It makes the content clearer at a glance at its name.AVR studio supports long filenames,and I'm happy with it.

But anyway,I will do in Rome as Rome does.Taking precautions is the best way to get on well with this environment,just before I switch to C code developement tool.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…