Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 16, 2024, 05:35:12 05:35


Login with username, password and session length


Pages: [1]
Print
Author Topic: PDS and Proteus8  (Read 18303 times)
0 Members and 1 Guest are viewing this topic.
picette
Newbie
*
Offline Offline

Posts: 11

Thank You
-Given: 4
-Receive: 0


« on: September 24, 2014, 08:24:37 20:24 »

Hi, hope this is the correct place.

I have been using PDS (3.5.6.7) with Proteus 7. I have just installed Proteus 8, but I am unable to integrate it with Proton Development Suite, as it requires the location of ISIS.EXE and Proteus 8 has a single file (PDS.EXE). If I rename the Proteus 8 PDS.EXE to ISIS.EXE I get an error from Proton about command line errors in the .ini file.


Has anyone got Proteus 8 to run from Proton?

picette
Logged
towlerg
Senior Member
****
Offline Offline

Posts: 263

Thank You
-Given: 474
-Receive: 104

What is this for?


« Reply #1 on: September 24, 2014, 10:09:42 22:09 »

I don't beleive it's possible, with Proteus 8, to use the "compile and program" button to go directly to Proteus (for the reasons you give). Nor is it possible to use the Proton compiler as the project compiler from within Proteus. You still can still declare the .BAS as the program file for the target processor and debug it. Or alternately tell Proton to produce a COF file and use it in Proteus.

If you are not welded to Proton but wish to stick with Basic, there is a utility for PICBasic. It was written by Darrel Taylor (that name again) and it allows you to declare PICBasic as the project compiler.

Hope that helps

George
Logged

Win 7 Ult x64 SP1 on HP2570p
picette
Newbie
*
Offline Offline

Posts: 11

Thank You
-Given: 4
-Receive: 0


« Reply #2 on: September 24, 2014, 11:34:58 23:34 »

Thanks for the quick response. Guess I'll stick with Proteus 7 for a while.

picette
Logged
pickit2
Moderator
Hero Member
*****
Offline Offline

Posts: 4647

Thank You
-Given: 826
-Receive: 4204


There is no evidence that I muted SoNsIvRi


« Reply #3 on: September 26, 2014, 10:16:51 22:16 »

This should work if you have Proteus open and your set your file location to that of Proton.
Les removed auto updating proteus files a long time ago, he could not be arsed coding it in again.
The problem was now if there is a problem in your program, proton when compiling deletes the last hex,
before writing the new one, so it don't write the new hex file.
Logged

Note: I stoped Muteing bad members OK I now put thier account in sleep mode
towlerg
Senior Member
****
Offline Offline

Posts: 263

Thank You
-Given: 474
-Receive: 104

What is this for?


« Reply #4 on: September 27, 2014, 09:59:27 09:59 »

You can get around the problem of having no .HEX file in the event of failed compile, by using Keep_Hex_File as in "Declare Keep_Hex_File = On". Also handy if you use the auto input hex option on PicKit2.

George
Logged

Win 7 Ult x64 SP1 on HP2570p
towlerg
Senior Member
****
Offline Offline

Posts: 263

Thank You
-Given: 474
-Receive: 104

What is this for?


« Reply #5 on: September 28, 2014, 06:40:43 18:40 »

Just out of curiosity I played with the PICBasic to Proteus 8 loader (is that the right term?) looks like it creates 3 files, one of which is just a program template. I have no notion of the level of difficulty of making the necesary changes for Proton.

I must admit that the facility to display selected active portions of the curcuit on the source editing/debugging page seem pretty neat. You should fire up PICBasic and give it a go.

George
« Last Edit: September 28, 2014, 06:43:58 18:43 by towlerg » Logged

Win 7 Ult x64 SP1 on HP2570p
chicowood
Junior Member
**
Offline Offline

Posts: 92

Thank You
-Given: 101
-Receive: 25


« Reply #6 on: September 29, 2014, 06:15:22 06:15 »

Just out of curiosity I played with the PICBasic to Proteus 8 loader (is that the right term?) looks like it creates 3 files, one of which is just a program template. I have no notion of the level of difficulty of making the necesary changes for Proton.

I must admit that the facility to display selected active portions of the curcuit on the source editing/debugging page seem pretty neat. You should fire up PICBasic and give it a go.

I was browsing this thread and it prompted me to try the PICBasic to Proteus 8 Loader you you posted (in the past I've used the MPLAB IDE to build PBP projects with Proteus simulating in a window), but I'm not sure how to use the file you posted. Can you explain how to do so? 

Thanks...
Logged
towlerg
Senior Member
****
Offline Offline

Posts: 263

Thank You
-Given: 474
-Receive: 104

What is this for?


« Reply #7 on: September 29, 2014, 02:39:19 14:39 »

Sorry, my fault for the confusion. I posted the files that the PICBasic loader seems to be writing to Proteus 8 in the hope that some bright bastard would convert them for Proton.

The PICBasic loader package is available on the  PICBasic web site, http://support.melabs.com/DT/Proteus_PBP3/PBP3-Proteus8_setup_16.exe

George
« Last Edit: September 29, 2014, 02:59:25 14:59 by towlerg » Logged

Win 7 Ult x64 SP1 on HP2570p
chicowood
Junior Member
**
Offline Offline

Posts: 92

Thank You
-Given: 101
-Receive: 25


« Reply #8 on: September 29, 2014, 06:01:51 18:01 »

The PICBasic loader package is available on the  PICBasic web site, http://support.melabs.com/DT/Proteus_PBP3/PBP3-Proteus8_setup_16.exe

I haven't done much PBP lately so I was saddened to hear of Darrel Taylor's passing when I went to melabs.com. I've used some of his stuff (like DT Interrupts and his LCD bar graph routines). He was a good guy, always very helpful to everyone on the melabs forums.

Regarding the PICBasic loader: I've installed it on Proteus 8, but am having an issue. As you said, it creates a PBP Program Template file, which compiles and runs correctly. But whenever I add source files to the project (.PBP, .BAS or .INC), they can't be found so I get errors. For some reason the generated compiler command line doesn't properly reference the location of the files I've specified. Have you successfully used PBP with Proteus 8 in this manner?

 
Logged
towlerg
Senior Member
****
Offline Offline

Posts: 263

Thank You
-Given: 474
-Receive: 104

What is this for?


« Reply #9 on: September 29, 2014, 10:11:51 22:11 »

Yes, it just worked first time. Compile of the standard program produces this -
Quote
PBPX.exe -K# -oq -x -P18F4550 -ampasmwin -e"main.err"  "..\main.PBP"
PICBASIC PRO(TM) Compiler 3.0.7.1, (c) 1998, 2013 microEngineering Labs, Inc.
All Rights Reserved.
Compiled successfully.

What error do you get?

I don't use PICBasic much or indeed at all, didn't like the way you couldn't specify the device in the source and none of the neat add-ons.

Apparently Darrel was quite young, which is sad.

George
« Last Edit: September 29, 2014, 10:18:20 22:18 by towlerg » Logged

Win 7 Ult x64 SP1 on HP2570p
chicowood
Junior Member
**
Offline Offline

Posts: 92

Thank You
-Given: 101
-Receive: 25


« Reply #10 on: September 30, 2014, 03:18:02 03:18 »

Yes, it just worked first time. Compile of the standard program produces this -
What error do you get?
When I use the same standard program, I get the same successful compile that you got.

If I leave the main.PBP program in place but paste my own source code over the blinky code, it compiles ok. But I can't use that technique when there are include files involved.

When I add a different source file from the source menu, which is located in the same folder as the Proteus schematic and project file, it can't find the source file, and compiles with errors.

Code:
PBPX.exe -K# -oq -x -P16F876A -ampasmwin -e"LCT_TEST.err"  "..\LCT_TEST.PBP"
PICBASIC PRO(TM) Compiler 3.0.7.1, (c) 1998, 2013 microEngineering Labs, Inc.
All Rights Reserved.
250: Syntax error
256: Syntax error
...snipped...
846: Syntax error
1063: Syntax error
make: *** [LCT_TEST.cof] Error 1

Error code 2


WARNING: Unable to open INCLUDE file GATE ALARM ICD2.INC.
WARNING: Unable to open INCLUDE file RTC.INC.
C:\MPLAB PROJECTS\LCD GATE ALARM 3  RTC PBP TEST\PIC16F876A\LCT_TEST.PBP ERROR Line 250: Bad expression.
C:\MPLAB PROJECTS\LCD GATE ALARM 3  RTC PBP TEST\PIC16F876A\LCT_TEST.PBP ERROR Line 256: Bad expression.
C:\MPLAB PROJECTS\LCD GATE ALARM 3  RTC PBP TEST\PIC16F876A\LCT_TEST.PBP ERROR Line 265: Bad expression.
...snipped...
C:\MPLAB PROJECTS\LCD GATE ALARM 3  RTC PBP TEST\PIC16F876A\LCT_TEST.PBP ERROR Line 844: Bad expression.
C:\MPLAB PROJECTS\LCD GATE ALARM 3  RTC PBP TEST\PIC16F876A\LCT_TEST.PBP ERROR Line 846: Bad expression.
WARNING: Unable to open INCLUDE file LCDBAR_INC.BAS.
C:\MPLAB PROJECTS\LCD GATE ALARM 3  RTC PBP TEST\PIC16F876A\LCT_TEST.PBP ERROR Line 1063: Bad expression.
FATAL ERROR: Too many errors. (21)

I may have overlooked a setup setting somewhere, but I can't seem to find it. I looked in the XML file that Darrel's program created and couldn't see where the input file specification came from (must be somewhere within Proteus itself).

Just wondering if you had tried a different input file and had success.
Logged
towlerg
Senior Member
****
Offline Offline

Posts: 263

Thank You
-Given: 474
-Receive: 104

What is this for?


« Reply #11 on: October 01, 2014, 05:02:25 05:02 »

I tried the example file SOUND.PBP which has an include and that compiled OK and produced a .cof.

can you infer anything from the errors? were they generated as a result of the unfound include or something more suspicious?

George
Logged

Win 7 Ult x64 SP1 on HP2570p
chicowood
Junior Member
**
Offline Offline

Posts: 92

Thank You
-Given: 101
-Receive: 25


« Reply #12 on: October 01, 2014, 06:10:20 18:10 »

I tried the example file SOUND.PBP which has an include and that compiled OK and produced a .cof.

can you infer anything from the errors? were they generated as a result of the unfound include or something more suspicious?

Thanks for trying that. It's helpful. I tried the same file, and it compiles ok as well.

But when I try one of my previous .bas or .pbp files, which were edited and saved under MPLAB 7, I get the error shown in the attached screen grab.

It's not location specific, because I get the same error if I copy the file to the location where SOUND.PBP resides and load it from there.

So it must have something to do with the file attributes itself. When I double click the file it loads in NotePad like I'd expect, but SOUND.PBP does not. Any ideas?
Logged
chicowood
Junior Member
**
Offline Offline

Posts: 92

Thank You
-Given: 101
-Receive: 25


« Reply #13 on: October 01, 2014, 10:57:35 22:57 »

A bit of progress, but not there yet...

I can get the PBP compiler to attempt to compile the source file I point it to, but it fails to open any of the include files specified.

For example, my source code contains the lines:

Code:
INCLUDE "GATE_ALARM_ICD2.INC" ; timing values for ROM & ICD2
INCLUDE "RTC.INC"

...and I've added those files to the file list on the left, but the errors I get are:

Code:
WARNING: Unable to open INCLUDE file GATE_ALARM_ICD2.INC.
WARNING: Unable to open INCLUDE file RTC.INC.

I've tried renaming the include files with the extensions .pbp and .bas with no luck.

It's gotta be something with the path specification. Proteus doesn't seem to be looking in the project folder where I told it the files reside. I haven't yet figured out how to work around whatever the issue is...
Logged
towlerg
Senior Member
****
Offline Offline

Posts: 263

Thank You
-Given: 474
-Receive: 104

What is this for?


« Reply #14 on: October 02, 2014, 03:53:14 15:53 »

Quote
So it must have something to do with the file attributes itself. When I double click the file it loads in NotePad like I'd expect, but SOUND.PBP does not. Any ideas?

Don't know if it helps but on my machine the extension .PBP is NOT registered to PICBasic.

When time allows I'll have another play with it.

George

Edit. I have successfully compiled one of Darrel's examples with an include, 12-bitDEMO.pbp

Sequence I used -
a. create new project
b. from source code tab "Add files" from files select dialog select "12-bitDEMO.pbp"
c. from source code tab select the default template and select delete file
d. from source code tab "Add files" from files select dialog select "DT_Analog.pbp"
c. from source code tab select "Build project"

Let me know if you want me to try something else.

  
« Last Edit: October 03, 2014, 02:46:10 02:46 by towlerg » Logged

Win 7 Ult x64 SP1 on HP2570p
chicowood
Junior Member
**
Offline Offline

Posts: 92

Thank You
-Given: 101
-Receive: 25


« Reply #15 on: October 03, 2014, 06:07:40 06:07 »

Edit. I have successfully compiled one of Darrel's examples with an include, 12-bitDEMO.pbp
Let me know if you want me to try something else.

George, thanks for staying with me on this.

I followed your steps exactly (I think). Both .pbp files have been added to the project. I still get the error on the include files, so either we're doing something differently or there's something funky with my setup.

Here's my error message:

Code:
PBPX.exe -K# -oq -x -P16C62B -ampasmwin -e"DT_Analog.err"  "..\DT_Analog.pbp"
PICBASIC PRO(TM) Compiler 3.0.7.1, (c) 1998, 2013 microEngineering Labs, Inc.
All Rights Reserved.
32: Syntax error
36: Syntax error
39: Syntax error
41: Syntax error
46: Syntax error
32: Syntax error
36: Syntax error
39: Syntax error
41: Syntax error
46: Syntax error
make: *** [DT_Analog.cof] Error 1

Error code 2

WARNING: Unable to open INCLUDE file DT_ANALOG.PBP.
C:\USERS\JDUNCA~1\APPDATA\LOCAL\TEMP\9E18923BB6CD4A6496DEE2430D25FE4B\PIC16C62B\DT_ANALOG.PBP ERROR Line 41: Bad expression.
C:\USERS\JDUNCA~1\APPDATA\LOCAL\TEMP\9E18923BB6CD4A6496DEE2430D25FE4B\PIC16C62B\DT_ANALOG.PBP ERROR Line 46: Bad expression.
WARNING: Unable to open INCLUDE file DT_ANALOG.PBP.
C:\USERS\JDUNCA~1\APPDATA\LOCAL\TEMP\9E18923BB6CD4A6496DEE2430D25FE4B\PIC16C62B\DT_ANALOG.PBP ERROR Line 32: Syntax error.
C:\USERS\JDUNCA~1\APPDATA\LOCAL\TEMP\9E18923BB6CD4A6496DEE2430D25FE4B\PIC16C62B\DT_ANALOG.PBP ERROR Line 36: Syntax error.
C:\USERS\JDUNCA~1\APPDATA\LOCAL\TEMP\9E18923BB6CD4A6496DEE2430D25FE4B\PIC16C62B\DT_ANALOG.PBP ERROR Line 39: Syntax error.
C:\USERS\JDUNCA~1\APPDATA\LOCAL\TEMP\9E18923BB6CD4A6496DEE2430D25FE4B\PIC16C62B\DT_ANALOG.PBP ERROR Line 40: ID GetADC is not a LABEL.
C:\USERS\JDUNCA~1\APPDATA\LOCAL\TEMP\9E18923BB6CD4A6496DEE2430D25FE4B\PIC16C62B\DT_ANALOG.PBP ERROR Line 41: Bad expression or missing THEN.
C:\USERS\JDUNCA~1\APPDATA\LOCAL\TEMP\9E18923BB6CD4A6496DEE2430D25FE4B\PIC16C62B\DT_ANALOG.PBP ERROR Line 47: Syntax error.

I put the source and include files in a folder on the desktop. Was your include file in the same location as the source file?

You told me earlier that you successfully compiled the example file SOUND.PBP, which had an include file, BS1DEFS.BAS. That file also compiled ok for me, HOWEVER the include file BS1DEFS.BAS is NOT in the same folder as SOUND.PBP, it's in the PBP program folder, C:\PBP. So I tried copying the include file to the same folder as SOUND.PBP and renamed it to BS1DEFS2.BAS, and changed the line in the source file to "include BS1DEFS2.BAS". It wouldn't compile because it couldn't find the include file.

So thus far I'm baffled: if the include file is in the same folder as the source file, the Proteus/PBP Loader can't find it.

Can you shed any light on what I'm seeing?
Logged
towlerg
Senior Member
****
Offline Offline

Posts: 263

Thank You
-Given: 474
-Receive: 104

What is this for?


« Reply #16 on: October 03, 2014, 05:41:13 17:41 »

I assume Proteus finds and is able to display all the files required for the project? and they compile ok in the PICBasic IDE?

Yes, the .php and any included are in the same directory - but if they're user (as opposed to system) include files, don't they have to be.

George

Logged

Win 7 Ult x64 SP1 on HP2570p
chicowood
Junior Member
**
Offline Offline

Posts: 92

Thank You
-Given: 101
-Receive: 25


« Reply #17 on: October 04, 2014, 02:11:48 02:11 »

I assume Proteus finds and is able to display all the files required for the project? and they compile ok in the PICBasic IDE?
Yes, the .php and any included are in the same directory - but if they're user (as opposed to system) include files, don't they have to be.

Proteus displays the files ok, it's just that on my system the PBP compile fails because it appears the PBP compiler doesn't correctly reference the .include file location as passed to it by Proteus. But since it works ok on your system, that tells me that I need to dig deeper into my system and see why this is happening.

I don't use the PicBasic IDE. I've always used the MPLAB IDE because it is required for the ICD2 hardware debugger, and it also offered nice windowed integration with Proteus 7.

But MicroChip stopped development on MPLAB 7 moved to the MPLABX IDE, which I dislike intensely because of it's poor performance and instability, and it also works poorly with Proteus...lots of lockups and restarts required. MicroChip also stopped support of the ICD2 with MPLABX, supporting only the ICD3, which I own but have issues with as well. So in the past I had a very nice development setup with the ICD2, MPLAB 7 and Proteus 7, but since all of those components have been retired my development system is much less enjoyable to use. Sigh.

That's why I was exploring the Proteus 8 code editing capability, to see if it could be relied upon to work reliably and in an enjoyable fashion. I'd still have to move my project back to MPLABX to use the ICD3, but I'd rather do my initial development and debugging in an environment I enjoy more than MPLABX.

My first experiment was to get my legacy PBP files to compile and work under Proteus 8, hence my efforts detailed in this thread. If I can get PBP to compile as it should, I'll give my C projects a try as well, then decide if it's worth doing code development using the Proteus 8 system.

So that's my story...if I figure out the PBP issue, I'll post back. Thanks for your help, George, it lets me know that the issue isn't universal, which gives me a better starting point...

chico
Logged
towlerg
Senior Member
****
Offline Offline

Posts: 263

Thank You
-Given: 474
-Receive: 104

What is this for?


« Reply #18 on: October 04, 2014, 11:31:15 11:31 »

I really don't know what to suggest, normally I'd say something glib (but often correct) like reinstall but I don't think that's going to help.

I know that Proteus does not use the PICBasic IDE but I'd try to get that working (just as a start point).

Stating the obvious, you need to see the command line that Proteus is calling the PICBasic compiler.

As I said, anything I can try, let me know.

BTW what C do you use?

George

Edit.  Good or bad news depending on your viewpoint. I tried to create a new project and now I'm getting similar errors to yours. This thing seems a bit tricky. I'll be back.

YA Edit. I am defeated by the logic of this thing. Every time I have a working method, I try a different example and that fails.  The only things that seem to consistently work is -

a. use as many defaults as possible (name location etc.) then when it works use "save project as" to where you're source is.
b. don't create quick start files and then whatever file you add will be the file name sent to the compiler (ie your main module)

I don't know if this is relevant but only the extension .pbp and .bas are specified as source in the compiler definition file.


 
« Last Edit: October 04, 2014, 04:09:30 16:09 by towlerg » Logged

Win 7 Ult x64 SP1 on HP2570p
chicowood
Junior Member
**
Offline Offline

Posts: 92

Thank You
-Given: 101
-Receive: 25


« Reply #19 on: October 04, 2014, 08:12:09 20:12 »

BTW what C do you use?

Typically I use the Microchip XC compilers. I'm set up to use BoostC and HighTech compilers for legacy projects.

Good or bad news depending on your viewpoint. I tried to create a new project and now I'm getting similar errors to yours. This thing seems a bit tricky. I'll be back.

YA Edit. I am defeated by the logic of this thing. Every time I have a working method, I try a different example and that fails.  The only things that seem to consistently work is -

a. use as many defaults as possible (name location etc.) then when it works use "save project as" to where you're source is.
b. don't create quick start files and then whatever file you add will be the file name sent to the compiler (ie your main module)

I don't know if this is relevant but only the extension .pbp and .bas are specified as source in the compiler definition file.

Yeah, I haven't figured out the logic yet either. I can open a simple .pbp file in the PBP Examples folder, like "BLINK.PBP", and it compiles fine. But if I move a different .pbp file of my own into the same folder, the PBP compiler (as setup by Proteus) can't seem to find it.

I think it might have something to do with Proteus setting up a temp working directory for the project debugging, and not updating it correctly. Here's one of the error messages I get:

> File 'C:/Users/JDUNCA~1/AppData/Local/Temp/96a348bea3544f0889040dc44ad74fd2/PIC16F876A/Debug/%INFILE_NAME%.cof' not found

I've looked at the PBP.XML file created by Darrel Taylor but can't see much that would affect this. Darrel must have been working with the Proteus people when he wrote this so he'd have the necessary interface info and know what was happening on the Proteus side of the interface. Sad that he's not around to query about this; he was always very willing to help.

I'll keep puttering. Please let me know if you find a setup technique that gives consistent results...thanks.

chico


Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC