PDA

View Full Version : To install PBP in MPLAB X 1.95



pedja089
- 27th November 2013, 00:23
To install PBP in MPLAB X 1.95:
0) First download MPLAB X from http://www.microchip.com/pagehandler/en-us/family/mplabx/ and install it, then run.'<< Added later
1) Go to Tools>Plugins
2) Select tab Available Plugins
3) Mark PBP Tool Chain and PicBasic Language Syntax
4) Click "Install"(Require internet connection), after installation plugins should be visible in installed tab
5) Restart MPLAB X
6) Tools>Option
7) Select tab Embedded then click "Add...",
8) Browse to "C:\PBP3", do not open folder, just select.
9) And that's all, folks:)
To create new project:
1) File>New project>"Next"
2) chose PIC>"Next"
3) Select programmer/Debugger>"Next"
4) Select PICBasic pro>"Next"
5) Enter project name, Set as Main Project>"Finish"
Now add source file:
1) Right click on Source Files in project tree
2) New>Other> click Basic directory, select PICBASIC file>"Next"
3) Enter name(Must be without spaces)>Finish, Now file is visible in project tree.
Enable Long
4) File>Project Properties> PBPW> check PBPL Compilation.
Add few lines, try to debug... Right click on toolbar to customize, to add step, Add PIC memory view, configuration bits, etc...
7151
Now there is little problem with debugging WORD and LONG var's and bit's. Just with that:)
As you can see, only first byte is showing.
Add new watch, but this time by entering address of variable, not name.
Watch are case sensitive.
7152
And select size of var(WORD=16bit, Long=32 bits),
And now we can see actual value in variables.
Define byte container for bits, eg
BitCont var byte
LightOn var BitCont.0
And then add BitCont to watch... Another way is to find PBP's byte container in .mac file if I can remember correctly. Right click to customize layout...
7153
Note that address of Z isn't same. So watch out for that. Every time when variables is added/removed, check address...
Check out local history by right click on file name
7154
And save often, sometimes when I pres shift and "[" or "]" by mistakes, it should just add char "{" or "}" but 99,9 won't add char, it will freeze...
On 1.70 version after minute or so you can click save button if you have luck. On this version seems to stuck forever...
I hope this will be helpful...

Ioannis
- 12th February 2014, 20:05
Thanks to the above tutorial, I have been triggered to install and try for the first time the MPLAB-X v2.00.

All went smooth and got my first small program compiled succesfully.

I don't know if I will continue on MPLAB-X IDE or MicroCode Studio, since the latter is much more quicker in setting up an new project.

I wonder if anyone else has seen all these new files in the User Document Folder spread around, like MPLABXLog.xml.*

Can I delete these?

Ioannis

Ioannis
- 12th February 2014, 21:23
While I was trying to use PicKit3 with MPLAB-X v2.00, there was a very persistent problem. Target chip was detected but with wrong ID!

The solution is to lower the Power from Pickit3 from 5V to say 4.875...

Well, I think that I was just fine with the stand alone PicKit3 programmer.

Ioannis

pedja089
- 13th February 2014, 05:16
I found MPLAB X files all over system. In C, User doc, app data, temp files, etc. Just ignore them, if you can't then delete them, and if something doesn't work, just reinstall MPLAB.
I use 3.3V for PIC power supply, so I didn't notice problem with ID's.

Ioannis
- 13th February 2014, 07:29
Have not tested at 3.3 volt. It is dissaponting that this problem exist back from 1.6 version...!

Also Watch window does not show the variables of the program. Only PIC registers. And they do not change as I step the program...

I do not think I am going to use this IDE. OK, installed it just to have the latest *.inc files but I am not happy to change.

MicroCode Studio is just fine for now.

Ioannis

pedja089
- 13th February 2014, 07:48
Watch are case sensitive. As you can see you can watch variables:
http://www.picbasic.co.uk/forum/attachment.php?attachmentid=7153
And they change with step.

Ioannis
- 13th February 2014, 09:46
Tried to add a watch but the list gave only the SFRs and none of my variables.

Ioannis

pedja089
- 13th February 2014, 11:04
Duble click on last line(<Enter New Watch>), and just type name, then enter ;)

Ioannis
- 13th February 2014, 11:51
Really? Will try it soon.

Thanks,

Ioannis

pedja089
- 13th February 2014, 12:11
Also open Program memory window so you can see each step.
If you have arrays, open RAM(file registers window).
To find address of first element, add array to watch. This will show only first byte, but also show address, so you can easy locate start of array in ram.

Ioannis
- 13th February 2014, 12:21
Thanks for the tips. Will test that too.

In general, there is a big overhead in using the MPLAB-X comparing to MCS. Also the problem with the Pickit is annoying too.

To add a +, the new look and feel is much nicer than the old classic cold MPLAB 8.x

Ioannis

pedja089
- 13th February 2014, 13:49
For me only reason for using MPLAB is debugging using ICSP pins.

HenrikOlsson
- 13th February 2014, 18:51
Yeah, I SO wish they could/would add source level debugging to MCSP, code folding and other editor features would be nice too but source level debugging would be gold. It has been THE ONLY reason I've ever tried to get MPLAB going.

Anyway, pedja, I thank you for the writeup! I'd be sure to go thru it next time I feel forced to try MPLAB.

pedja089
- 14th February 2014, 21:19
I'm glad I could help :)

Demon
- 16th February 2014, 18:17
For me only reason for using MPLAB is debugging using ICSP pins.

I'm still using my Microchip USB programmer, no debugging via ICSP for me.

Robert

mehmetOzdemir
- 3rd September 2016, 17:02
I'm using MPLABX IDE v3.40. Installed "PBP Tool Chain" and added PBP3 in options/embedded/build tools.

After all of them, i wanted to make new project. I sellected PBP3 for compiling but i couldnt add a new PBP3 file to source file. All C or asm types i can see but PBP files. Is there anybody to success this?

8307

pedja089
- 3rd September 2016, 23:12
No as far as I know, it is bug...
Download 2.35 or 2.05.
Both version work for me really good, but all version I tried it freezes when I press "`"

tumbleweed
- 4th September 2016, 10:29
Since the old V2 LanguageToolsuite plugin isn't compatible with MPLABX 3 you'll have to add the file by hand.
Either create the file outside MPLABX or from the screen you're showing scroll down in the 'File Types' window
and select 'Empty File'.

There you can create a file with any extension. Be sure to use '.pbp'

mehmetOzdemir
- 5th September 2016, 08:49
No as far as I know, it is bug...
Download 2.35 or 2.05.
Both version work for me really good, but all version I tried it freezes when I press "`"


Since the old V2 LanguageToolsuite plugin isn't compatible with MPLABX 3 you'll have to add the file by hand.
Either create the file outside MPLABX or from the screen you're showing scroll down in the 'File Types' window
and select 'Empty File'.

There you can create a file with any extension. Be sure to use '.pbp'

Thank you for your answers. I made a new .pbp file with no problem and compiled well but i cant see highlighters for basic commands now.

tumbleweed
- 5th September 2016, 10:24
but i cant see highlighters for basic commands nowAnd you won't without the language toolsuite plugin.

For that you'd need to go back to MPLABX 2.35 and install the old PBP MPLABX support files.

mehmetOzdemir
- 5th September 2016, 17:04
And you won't without the language toolsuite plugin.

For that you'd need to go back to MPLABX 2.35 and install the old PBP MPLABX support files.

I installed old version now everything is ok. i hope we can use last versions of mplabx with pbp3. thank you very much.