Find in the project's files - not working for me - MPLBX 5.45

Thread Starter

atferrari

Joined Jan 6, 2004
4,764
Currently using Win 10 - MPLABX 5.45 - Assembly - pic-as 2.31

Developer help didn't help on this, no matter what I tried.

My usual organization is just a single file added to the project and the rest of the code / data in the necessary files #included in the above. They all bear the extension .S

Sometimes when I need to catch something I am not sure where it is, usually a CALL or a variable statement, I try to use the "find in the project" function but no joy, no magic at all. Now that I mention it, I was equally unlucky when using MPASM.

Found even more confusing the "test" option somewhere in the menu. I do not understand even what it is for.

I will appreciate a brief comment on what I could be doing wrong or any tip to get success.
 

JohnInTX

Joined Jun 26, 2012
4,787
In my experience, 'find in files' only looks for the files shown in the project window in the folders under the current project. I always include the header files in the 'Header FIles' folder under the project. That also makes it easy to open them from the project window rather than using File->open. I put the firmware log.txt file under 'Important Files' for easy updates to that.

EDIT: didn't see a 'test' in the menus. Where is it?

Hope that helps!
 
Last edited:

JohnInTX

Joined Jun 26, 2012
4,787
Also, if you name your include files with a .inc extension then when you right-click on the Header Files-> Add Existing or New Item, it will filter the file names for you i.e. *.inc for assembler or *.h for C.
 

Thread Starter

atferrari

Joined Jan 6, 2004
4,764
In my experience, 'find in files' only looks for the files shown in the project window in the folders under the current project. I always include the header files in the 'Header FIles' folder under the project. That also makes it easy to open them from the project window rather than using File->open. I put the firmware log.txt file under 'Important Files' for easy updates to that.

EDIT: didn't see a 'test' in the menus. Where is it?

Hope that helps!
Gracias John. As usual, to the rescue.

Inspired on your comments, I found that I need Browse to appear and the select explicitly the project's folder. The search works fine now. The option that sometimes appears "current project" is what does not work.

BTW, all this reminds me how precarious is my knowledge. When you said "headers" had to go and look what was actually that...!

Maybe around 30 years ago I started with some BASIC or BASIC for 8051, who knows, and I am still using the long #include list for the segments of code I create. Since I do not know other than Assembly I do not other way. The sole "deviation" I recall (MPASM) was renaming the specific .inc PIC file for each project as .asm. Do not ask me why. It worked.

Whatever, bear with me.

My scheme.png

BTW the test (clickable) options are in the menu. Gracias again.

Juan en Texas.png
 

JohnInTX

Joined Jun 26, 2012
4,787
Inspired on your comments, I found that I need Browse to appear and the select explicitly the project's folder. The search works fine now. The option that sometimes appears "current project" is what does not work.
Try using the 'Projects' tab next to the 'Files' tab you have selected. For me, it's easier to deal with.
I haven't noticed the 'test' option before. It looks like it tests the regular expression you specify for the search path or text.

You are doing assembly for PICs like I have done forever. I have one .asm file that is named for the project e.g. TOY.asm. The .asm file has only ORGS to organize file placement in banks if needed, locate interrupt vectors, top level code and interrupt handlers. Everything else is in .inc include files that are included in order and location by the master .asm file. I build in Absolute mode only (I don't use pic-as). Each file in the project is named with the main project name e.g. TOY.asm includes TOYconfig.inc, TOYio.inc, TOYdisplay.inc etc. I have found that when you have many current projects with the same general organization, it is easy to open a file in the wrong folder for editing. For example, all of my IO routines are in a separate io.inc file. If the IO files for many projects are all named IO.inc, it is easy to open one in the wrong project folder, especially when folders from some other project are open for reference. Ask me how I know this.

Finally,
I copy the PIC definition file P18Fxxx.inc to the project folder and use that. There have been instances where bugs have crept into those from version to version. I like to archive everything necessary to build the complete project in one place.
Avoid using command line definitions if you can. Instead, put everything needed to build your code in the source - I have a config.inc file for that. It is too easy to lose important information when the code is migrated.
Don't rely on assembler defaults for things like radix etc. Way too easy to lose those over time. Always expressly call out radix, register destination instead of relying on defaults.

Good luck and remember the old adage: "If it can't be done in assembler, it isn't worth doing."
 

Thread Starter

atferrari

Joined Jan 6, 2004
4,764
Well Johnny, it seems I was not so far from the reasonable. Good.

I felt so well with absolute that I did not bother to change but, when starting with pic-as I realized that I needed it for quite specific things only while the rest was compiler's work. First of all I rebuilt my template file 000_XXXXXXX with the few necessary ORGs and then, the three days long of clerical work to adapt the syntax of my whole library even the more obscure routines and macros.

Something told me to avoid ranting and good I did.

Your contributions are always helpful, as this last again. Gracias.
 
Top