PIC file stuffer

Removes automatic unused PIC Basic extensions

Proton PIC Basic creates by compiling from a Basic program ten files with different extensions.
These files are created for several reasons.
The .BAK file is a reservecopy (back-up) from the penultimate Basic program.
And .ASM is the compiled program in assembler, used by MPLAB, which will create a .HEX file to program into a PIC.
Those who do not use simulation programs and only program PIC's, only the .HEX file is important.
All other files are only filling the PIC programs folder, which will become a complete mess when there are a lot of PIC programs in it.
For those who annoying these files, there is the PIC file stuffer from picbasic.nl, which removes these unused files directly and automatically after succesfull compiling, which will keeps this folder well-organized.


The files from only one PIC Basic program before removing.

After full-automatic removing by the PIC file stuffer.

 
When pressing in Proton PIC Basic IDE on key F10 or F11, the PIC file stuffer removes only the files from the PIC Basic program which is just now compiled, with the extensions (= .ASM, .COD, .PBP, etc.) which you have checked.
Not any other file with the checked extensions from other programs in the folder will be removed (therefore exists the broombutton), but only the selected extensions from the program you've just compiled.

When in Proton IDE key F9 is pressed (only compiling), then not any file is become removed, because PIC file stuffer doesn't start.

You can also select .ASM for removing if you never use this file, because removing starts direct after compiling and then the .ASM is already used by MPASM.

You can choose by yourself which extensions from the just compiled PIC Basic program should automatic removed.
Checking the sourcecode from all extensions, the Basic program itself (.BAS) is ofcourse impossible and on this way it will never removed.

 

If there is later a reason that you need one or more from the removed files, then it is easy to uncheck the needed file in the PIC file stuffer and compile the program again.
On this way it is always possible to create all extensions from out of the sourcecode from these files, the PIC Basic program.

 

8

8 Place the mouse on the picture and see the different after removing.
This folder keeps almost hundred files (1,48 MB) against 18 files (102 kB) áfter removing.
And now these are the files from only 9 PIC programs.

 

The program PIC file stuffer acts in Proton PIC Basic IDE as a program from a PIC programmer.
On this way pressing F10 or F11 starts the program PIC file stuffer (instead of the programmers program i.e. BumbleBee.exe, XWisp.exe or EpicWIN.exe) and removes invisible (on the background) the selected extensions.
On his turn the PIC file stuffer will start the program from the PIC programmer (i.e. BumbleBee.exe, XWisp.exe or EpicWIN.exe).
So, removing the unused files happens unnoticed, when starting it in Proton PIC Basic IDE the program works invisible and close itself when the files are removed.
Only when you click directly on the program picfile_stuffer.exe, the program becomes visible so that you can adjust the settings.


Installing PIC file stuffer

Download PIC file stuffer on the bottom from this page and unzip it.
Place PIC file stuffer in the folder from the steeringprogram from your PIC programmer.

Example for the PICkit2 programmer:
Place PIC file stuffer.exe when you use PK2CMD in folder C:\Program Files\Microchip\PK2CMD


Examples for the Galva-Wisp PIC programmer (which have a choise between three programs):
Place PIC file stuffer.exe when you use BumbleBee in folder C:\Program Files\BumbleBee
Place PIC file stuffer.exe when you use XWisp in folder C:\Program Files\XWisp 
Place PIC file stuffer.exe when you use XWisp2 in folder C:\Program Files\XWisp2
 

More steering programs at the same time is ofcourse also possible.
If you use i.e. BumbleBee as well as XWisp, then place a PIC file stuffer.exe in both folders.

Installing looks long-winded, but on this way works the program itself very easy.

Set up the PIC file stuffer

Go to the folder where you have placed picfile_stuffer.exe.
As example we take the folder C:\Program Files\BumbleBee
for an other program (i.e. XWisp or EpicWIN) take the folder from thát program.
 


The PIC file stuffer in the folder from BumbleBee.
Start picfile_stuffer.exe by (double)clicking on it.

 


 

Click the Info button and select the desired language (English or Nederlands).
At the same time you can read also the showed information.
After reading the infopage, click there on button Back.

Now select the files which you never use and which can removed automatically direct after compiling.
If you program only PIC's then you can check all boxes, except .HEX because that's the file which shall be programmed into the PIC.

Finally fill-in the box Programmer Filename.
i.e.
Fill-in for BumbleBee: BumbleBee.exe $hex-filename$ /target $target-device$
Fill-in for XWisp: XWisp.exe wait end port 19200 target $target-device$ go $hex-filename$
Fill-in for XWisp2: XWisp2w.exe baud 19200 rts on go $hex-filename$
Fill-in for PICkit2: pk2cmd.exe -PPIC$target-device$ -F$hex-filename$ -JN -M -R

For the PICkit2 hitkey version, you may also place parameter -HK at the end.

Pay attention that the line from i.e. BumbleBee, happens in the PIC file stuffer which stays in the BumbleBee folder.
Thus that the adjustments from BumbleBee not happens in the wrong PIC file stuffer, else your PIC programmer will not start.
By the way, in some cases a baudrate of 38400 instead of 19200 is also possible.

Finally click OK so that your adjustments are saved and PIC file stuffer closes itself.
(The Cancel button closes PIC file stuffer without saving (changed) adjustments.)
 

PIC file stuffer is now installed and adjusted.
Now we have to connect PIC file stuffer to PIC Basic

 


PIC file stuffer with BumbleBee connect to PIC Basic

ATTENTION: BumbleBee is an example program from a PIC programmer.
You should place the name from the PIC programmer program which you use instead of BumbleBee.

 

Select View in the menubar from the Proton PIC Basic IDE and select
Compile and Program Options...
 


1. Click on tab Programmer and then click Install New Programmer...
 


2. Select Create a custom programmer entry and click Next >.
 


3. Type PIC file stuffer BumbleBee and click Next >.
 


4. Type filename picfile_stuffer.exe and click Next >.
Attention for the underscore _ in the name (thus not a space).

 


5. Click on Find Manually...
 


6. Search the BumbleBee folder.
Normally in the Program Files folder.
Open the folder Program Files by double clicking on it.

 


7. Search the foldername BumbleBee and click on it so that it becomes blue and click next on OK.
 


8. Check if there stays c:\program files\bumblebee on the screen.
If it's not then you've done something wrong (< Back).
Is it allright then click Next >.

 


9. Type $target-device$ $hex-filename$ and click Finished.
 


10. Finally click OK.
 


11. It's still possible to choose other programmer programs with or without the PIC file stuffer.
 

Repeat above description if you also use other programmer programs (like XWisp and/or EpicWIN).

From now on you can run BumbleBee via PIC file stuffer in the PIC Basic IDE
by pressing F10 (with compiling) or F11 (without compiling).
 

F9:
Compile the currently active editor page.
The compile button will generate a *.HEX file.

F10:
Compile the currently active editor page.
BumbleBee starts via PIC file stuffer from where you can program the PICmicro.
The PIC file stuffer removes now directly the checked files from the just compiled program.
(F10 is a combination from F9 and F11)

F11:
The F11 key runs BumbleBee (via PIC file stuffer) automatically, without compiling.


Optional: The broombutton 

Normally does the PIC file stuffer invisible his work.
Only the checked extensions from the last compiled PIC program shall be removed.
Other programfiles with whatever extension it has will not be removed.

But folders which have a lot of unused files can be cleared with the broombutton.


First select the extensions which should removed and then click on the broombutton.
 


Now you come in a folderlist where you can select a folder.
Browse to the folder which should be cleared (i.e. PIC programs) and open it.
Only the folders are shown, not the files.
Click on the broombutton if you've opened the folder which should be cleared.

 


Now appears a warning window with the selected folder.
Click Yes to start removing the (previously !) checked extensions.
Only the open folder will be cleared, not the subfolders, which you should clear separately if necessary.
In the picture above only the selected extensions in the folder PIC programs will be removed.
The subfolders in this folder, like DCF77, will not be cleared.

Using PIC file stuffer is on your own risc.

The PIC file stuffer works several years without problems on my PC's (Windows ME and XP).
You should in any case always make back-ups from your PIC Basic sourcecodes.
Because by harddisc crash, accidently deleting or robbery from your computer, you loose all your programs.
 

Download picfile_stuffer.zip V1.0 (Beta version)