Up
same problem:
"The program file could not be loaded: java.lang.NullPointerException"
Up
same problem:
"The program file could not be loaded: java.lang.NullPointerException"
I've updated the plugin download.
http://pbp3.com/downloads/com-melabs-pbptoolchain.zip
Let me know what you find.
I tested with a PICkit3. Source-level debugging works and it will show PBP variables in the watch window.
MPLABX still seems a bit spotty for debugging. I'm hoping for some improvement in version 1.20.
Hi Charles,
I still have to understand how MPLABX works, but I can confirm that with the udated plugin I no longer have that java error after build.
I'll come back here again next week. For the moment, many thanks.
Marco
Hi, SupaCharles
Works fine here :
lots of thanks to you once more ...
CLEAN SUCCESSFUL (total time: 62ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `C:/Program Files/Microchip/MPLAB IDE/Projets/X/Servotest.X'
make -f nbproject/Makefile-default.mk dist/default/production/Servotest.X.production.hex
make[2]: Entering directory `C:/Program Files/Microchip/MPLAB IDE/Projets/X/Servotest.X'
gnumkdir -p build/default/production
"C:\PBP3\PBPX.EXE" -ampasmx -k# -os -p16f887 Servotes.pbp
PICBASIC PRO(TM) Compiler 3.0.5.4, (c) 1998, 2012 microEngineering Labs, Inc.
All Rights Reserved.
gnumkdir -p dist/default/production
cp Servotes.HEX dist/default/production/Servotest.X.production.hex
cp Servotes.COF dist/default/production/Servotest.X.production.cof
rm -f Servotes.COF
make[2]: Leaving directory `C:/Program Files/Microchip/MPLAB IDE/Projets/X/Servotest.X'
make[1]: Leaving directory `C:/Program Files/Microchip/MPLAB IDE/Projets/X/Servotest.X'
BUILD SUCCESSFUL (total time: 3s)
Loading C:/Program Files/Microchip/MPLAB IDE/Projets/X/Servotest.X/dist/default/production/Servotest.X.production.hex...
Loading C:/Program Files/Microchip/MPLAB IDE/Projets/X/Servotest.X/dist/default/production/Servotest.X.production.cof...
Loading completed
Alain
Last edited by Acetronics2; - 29th March 2012 at 17:31.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Hi, Charles
just a little error I Can't explain ...
Compiles ( and runs in real life ... ) fine with MPLAB 8.84, but doesn't want to compile with MPLABX ...
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `C:/Program Files/Microchip/MPLAB IDE/Projets/X/Train_Rentrant.X'
make -f nbproject/Makefile-default.mk dist/default/production/Train_Rentrant.X.production.hex
make[2]: Entering directory `C:/Program Files/Microchip/MPLAB IDE/Projets/X/Train_Rentrant.X'
gnumkdir -p build/default/production
"C:\PBP3\PBPX.EXE" -ampasmx -k# -os -p16f628 Train_R.pbp
Error[113] C:\PBP3\PBPPIC14.LIB 451 : Symbol not previously defined (TMR1)
Error[113] C:\PBP3\PBPPIC14.LIB 465 : Symbol not previously defined (TMR1)
Error[113] C:\PBP3\PBPPIC14.LIB 479 : Symbol not previously defined (TMR1)
.
.
.
looks a definition for TMR1 ( as a word ) is missing somewhere ... but where ???
Here is the program
AlainCode:'**************************************************************** '* Name : Train_Rentrant '* Author : Alain '* Notice : Copyright (c) 2010 '* : All Rights Reserved '* Date : 9 avr. 2012 '* Version : 1.0 '* Processor : '* Notes : Gestion de train rentrant électrique '* : '**************************************************************** '****************************************************************************** 'Configuration '****************************************************************************** #CONFIG __CONFIG _BODEN_ON &_CP_OFF & _PWRTE_ON & _WDT_ON & _LVP_OFF & _MCLRE_ON & _XT_OSC #ENDCONFIG '****************************************************************************** 'Config Timer 1 T1CON = 110100 ' 1/8, internal osc,stopped INTCON = 000000 PIE1 = 000001 PIR1 = 0 TMR1 = 0 '****************************************************************************** 'Definitions '****************************************************************************** DEFINE PULSIN_MAX 2500 DEFINE BUTTON_PAUSE 255 '****************************************************************************** 'Definitions '****************************************************************************** Temp var Word Servoval var Word mesure var Byte meanval var Byte dureeprog var Byte Pos1 var Byte Pos2 var Byte Timecounter var Byte echantil var Byte delay var Byte side var byte Timeout var Byte CLEAR '****************************************************************************** ' I/Os '****************************************************************************** Sorti var PORTA.0 ' Closed = GND Rentre var PORTA.1 ' Closed = GND LedA var PORTA.2 LedB var PORTA.3 prog var PORTB.0 ' jp2 reglage enclenchement Signal var PORTB.1 ' Entrée Signal Boost var PORTB.3 ' Sortie PWM T2 var PORTB.4 T3 var PORTB.5 T8 var PORTB.6 T5 var PORTB.7 '****************************************************************************** 'Initialisation des ports '****************************************************************************** CMCON = 7 ' All digital PORTA = 0 PORTB = 000000 TRISA = 000011 TRISB = 000011 Neutre CON 150 Traveltime CON 50 DATA @1,180,170,130,1 ' Protection 1ère utilisation '****************************************************************************** 'Lecture des valeurs en EEPROM '****************************************************************************** READ 1, Dureeprog, Pos1, Pos2, Side IF dureeprog <> 255 THEN start '****************************************************************************** 'Mesure de l'impulsion d'enclenchement '****************************************************************************** mesurepro: dureeprog = 255 LOW LedA LOW LedB mesurep: LedA = 0 ' Led Verte LedB = 1 FOR echantil = 1 to 50 PULSIN Signal,1,mesure IF ( mesure < 75) OR ( mesure > 220 ) THEN GOTO mesurep ENDIF IF dureeprog = 255 THEN valable ' Stability check IF ( mesure < ( dureeprog - 1 )) OR ( mesure > ( dureeprog + 1 )) THEN GOTO mesurep ENDIF ' Valid mesure valable: dureeprog = mesure NEXT echantil LedB = 0 delay = 0 BUTTON prog,0,255,0,delay,1,mesurepro 'Enlever le cavalier '****************************************************************************** ' Calcul Pos1, Pos2 '****************************************************************************** SELECT CASE Dureeprog CASE is => ( Neutre + 20 ) Pos1 = ( Dureeprog - 10 ) Temp = 2*Neutre - Pos1 Pos2 = Temp Side = 1 CASE is < ( neutre - 20 ) Pos1 = ( Dureeprog + 10 ) Temp = 2*Neutre - Pos1 Pos2 = Temp Side = 0 CASE ELSE IF Dureeprog => Neutre THEN Pos1 = Neutre + 10 Pos2 = Neutre - 10 Side = 1 ELSE Pos1 = Neutre - 10 Pos2 = Neutre + 10 Side = 0 ENDIF END SELECT WRITE 2,Pos1, Pos2, Side ' Save Switching Positions '****************************************************************************** '****************************************************************************** start: '****************************************************************************** IF Timeout THEN ' Locking for Timeout GOTO NoSignal ENDIF Servoval = 0 FOR Echantil = 1 to 5 ' Check 5 cycles and take mean value PULSIN Signal,1,mesure IF ( mesure < 75) OR ( mesure > 220 ) THEN GOTO NoSignal ENDIF IF Meanval = 0 THEN Valable1 ' Stability check IF ( mesure < ( meanval - 2 )) OR ( mesure > ( meanval + 2 )) THEN GOTO start ' Reset cycle ENDIF Valable1: Servoval = Servoval + mesure NEXT echantil Meanval = Servoval/5 '****************************************************************************** ' IF Side THEN SELECT CASE Meanval CASE is => pos1 'IF T2CON.2 = 0 THEN HPWM 1,127,20000 GOTO UP ' _________________ Gear UP CASE is < pos2 'IF T2CON.2 = 0 THEN HPWM 1,127,20000 GOTO DOWN '__________________ Gear DOWN CASE Else 'IF T2CON.2 = 1 THEN HPWM 1,0,20000 GOTO NoMove ' _________________ Gear LOCKED END SELECT ELSE SELECT CASE Meanval CASE is <= pos1 'IF T2CON.2 = 0 THEN HPWM 1,127,20000 GOTO UP ' _________________ Gear UP CASE is > pos2 'IF T2CON.2 = 0 THEN HPWM 1,127,20000 GOTO DOWN '__________________ Gear DOWN CASE Else 'IF T2CON.2 = 1 THEN HPWM 1,0,20000 GOTO NoMove ' _________________ Gear LOCKED END SELECT ENDIF '***************************************************************************** UP: '***************************************************************************** IF Rentre = 0 OR Timeout THEN ' Verification fins de course T1CON.0 = 0 ' Stop the timer TMR1.0 = 0 ' Reset the timer LedA = 1 ' Solid GREEN Led LedB = 0 GOTO NOMOVE ENDIF T1CON.0 = 1 LOW T8 ' T8 + T3 OFF LOW T3 PAUSEUS 100 HIGH T5 ' T5 + T2 ON HIGH T2 LedA = 0 IF PIR1.0 THEN LedB = ~ LedB TMR1 = 0 TimeCounter = Timecounter + 1 IF Rentre THEN IF timecounter => TravelTime THEN Timeout = 1 GOSUB NoMove ENDIF ELSE GOSUB NoMove ENDIF ENDIF TMR1.0 = 1 PIR1.0 = 0 ' Clear Flag GOTO Start '***************************************************************************** DOWN: '***************************************************************************** IF Sorti = 0 OR Timeout THEN ' Verification fins de course T1CON.0 = 0 ' Stop the timer TMR1.0 = 0 ' Reset the timer LedA = 0 ' Solid RED Led LedB = 1 GOTO NOMOVE ENDIF T1CON.0 = 1 LOW T5 ' T5 + T2 OFF LOW T2 PAUSEUS 100 HIGH T8 ' T8 + T3 ON HIGH T3 IF PIR1.0 THEN LedA = ~ LedA TMR1 = 0 TimeCounter = Timecounter + 1 IF Sorti THEN IF timecounter => TravelTime THEN Timeout = 1 GOTO NoMove ENDIF ELSE GOTO NoMove ENDIF ENDIF LedB = 0 T1CON.0 = 1 PIR1.0 = 0 ' Clear Flag GOTO Start '***************************************************************************** NOMOVE: ' Bridge switched OFF , Led Remains unchanged '***************************************************************************** 'Brake a While LOW T5 ' Hi part of Bridge OFF LOW T8 Pauseus 100 HIGH T2 ' Low part of Bridge ON HIGH T3 PAUSE 500 ' LOW T5 ' Hi Bridge OFF ' LOW T8 LOW T2 ' Low Bridge OFF LOW T3 GOTO Start '***************************************************************************** NoSignal: '***************************************************************************** IF PIR1.0 THEN LedA = ~ LedA TMR1 = 40536 ' Quick 5Hz RED Flash PIR1.0 = 0 ' Clear Flag ENDIF LedB = 0 T1CON.0 = 1 GOTO Start '***************************************************************************** '***************************************************************************** END
Last edited by Acetronics2; - 17th April 2012 at 21:22.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
The 16F628.inc file for MPASMX doesn't have an EQU for TMR1.
The 16F628.inc file for MPASM in MPLAB 8 does have TMR1.
You can add this to your program for a workaround ...
Code:ASM ifndef TMR1 TMR1 = TMR1L endif ENDASM
DT
Hi, Darrel
Thanks for the tip.
I finally have modified the Mpasmx .inc file ...![]()
With PBP3 there is no more need to modify the PBP . inc files .... but the Mpasmx have to be now ....
You right : customers ALWAYS complain !!!
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks