installer woes
installer woes
In the past, whenever I used the installer, I only lost my font preferences and had to again turn off "auto-complete". This time it appears to have completely trashed my ZBasic installation, I no longer have a tab bar (nor a menu item for it), it doesn't remember any settings between starts, it doesn't recall my project, it will not compile my project, the IDE is version 1.0.2 while the previous IDE was 1.4.2, The Language menu offers about 25 choices but not ZBasic, the directory structure appears mangled (with a second ZBasic folder under the original) and...
How do I fix it?
How do I fix it?
Re: installer woes
If you make such changes in your User Options file, you won't lose them at all. The installer doesn't touch the User Options file which is found at "\Documents and Settings\<your user name>\SciTEUser.properties". You can edit this file with any text editor. From the IDE you can load it using the entry "Open User Options File" on the Options menu.dlh wrote:In the past, whenever I used the installer, I only lost my font preferences and had to again turn off "auto-complete".
This suggests that an outdated installer version was used or, at least, the IDE that you're executing is an older one. The IDE version contained in v2.5.0 installer is v1.4.3. You might check the properties of the item used to invoke the IDE and determine its location.dlh wrote:[...] the IDE is version 1.0.2 while the previous IDE was 1.4.2
The only potential solution is to install again, ensuring that you're invoking the latest installer.
- Don Kinzer
I'm sure I used the correct installer.
All of the files in the ZBasic folder that ended up embedded in the original folder were the latest files although ZBasicIDE.exe somehow got renamed to ZBasic~1.exe.
I renamed the original ZBasic folder as ZBasic_old, moved the embedded folder up a notch so it's now under the root and renamed ZBasic~1.exe as ZBasicIDE.exe and all is now well - except for my cardiac condition which took quite a hit when I thought all was lost
All of the files in the ZBasic folder that ended up embedded in the original folder were the latest files although ZBasicIDE.exe somehow got renamed to ZBasic~1.exe.
I renamed the original ZBasic folder as ZBasic_old, moved the embedded folder up a notch so it's now under the root and renamed ZBasic~1.exe as ZBasicIDE.exe and all is now well - except for my cardiac condition which took quite a hit when I thought all was lost
installer woes
FWIW, Dave, I had some IDE odd problems some time ago which
reinstallation did not fix. I ultimately found that I had a very old
IDE version installed, too. Once that was removed the IDE became sane.
I think it appeared as a separate item in Control Panels/AddRemoveApps.
Tom
reinstallation did not fix. I ultimately found that I had a very old
IDE version installed, too. Once that was removed the IDE became sane.
I think it appeared as a separate item in Control Panels/AddRemoveApps.
Tom
Tom
ZBasic 2.5.0 is the only Control Panel entry. Either the installer or the installer was confused by something.
Now, I need to figure out why my application has stopped working. I updated the VM and the app choked when I restarted. I recompiled under 2.5.0 and get no output whatsoever. It normally outputs about a 20 line sign-on message but it's no longer outputting anything.
Now, I need to figure out why my application has stopped working. I updated the VM and the app choked when I restarted. I recompiled under 2.5.0 and get no output whatsoever. It normally outputs about a 20 line sign-on message but it's no longer outputting anything.
It is possible that there is a coding error that we didn't catch in the VM that results in interrupts being left disabled. That would cause the symptom that you're seeing.dlh wrote:It normally outputs about a 20 line sign-on message but it's no longer outputting anything.
One approach to narrowing down the source of the problem is to use a "binary search" strategy. To do this, disable about half of your initialization code by putting #if 0 ... #endif around it. If the system then responds as it should (with that part missing), the problem is located in the portion that is disabled. If not, it's either in the other half or related to an interaction between instructions in the two halves taken together. Once you know which part it is in, that part can be further divided in half, and so on, until you have narrowed it down to just a few instructions.
- Don Kinzer
It outputs "ZBasic v2.5" and then goes mute. There have been no changes to the initialization code for several weeks.
I can reset the ZX-40a using DTR but not using the API whereas before both worked. None of the data I send to it is acknowledged whereas it was before.
Is there a link where I can download the previous compiler and VM?
I can reset the ZX-40a using DTR but not using the API whereas before both worked. None of the data I send to it is acknowledged whereas it was before.
Is there a link where I can download the previous compiler and VM?
The problem is almost certainly in the VM, the issue is finding out which instruction or instructions in your specific program cause the problem. That is why I suggested the binary search method.dlh wrote:There have been no changes to the initialization code for several weeks.
I suspect that you'll only need to roll back the VM. In any event, here are the links.dlh wrote:Is there a link where I can download the previous compiler and VM?
The v2.3.0 VM for the ZX-40a is at:
http://www.zbasic.net/download/zvm/2.3/zx40a_2-3-0.zvm
The ZBasic compiler v2.4.2 is at:
http://www.zbasic.net/download/ZBasic/2 ... _2-4-2.zip
The installer that contains the v2.4.2 compiler is at:
http://www.zbasic.net/download/zbasic-setup_2-4-3.exe
- Don Kinzer
I'm not so sure that my initialization code lends itself to your suggested binary method. It calls many other proceduresdkinzer wrote:The problem is almost certainly in the VM, the issue is finding out which instruction or instructions in your specific program cause the problem. That is why I suggested the binary search method.
Code: Select all
Sub Initialize()
Dim b As Byte
Dim p As Byte
Dim n As Integer
Call GetPersistent(19,b,1)
If (b<>&HFF) Then
b = &HFF
Call PutPersistent(19,b,1)
End If
Call PutPin(16, zxInputTriState) 'ZC pin
Call PutPin(ICP, zxInputTriState) 'RF/IR input
Call PutPin(28, zxOutputLow)
Call PutPin(29, zxOutputLow)
Call OpenQueue(iq0, SizeOf(iq0))
Call OpenQueue(oq0, SizeOf(oq0))
Call OpenCom(1, 19200, iq0, oq0)
Call Delay(0.050)
If FirstTime Then
Call Delay(2.0)
End If
tx = "roZetta (tm)" & CrLf
Call PutStr(0, tx)
Call Delay(0.025)
tx = "Copyright © 2008 dlh" & CrLf
Call PutStr(0, tx)
tx = "All Rights Reserved" & CrLf
Call PutStr(0, tx)
tx = "Compile Date: " & compdata(1) & " " & compdata(2) & CrLf
Call PutStr(0, tx)
Call GetEEPROMSize
tx = tx & " - CODE:" & CStr(Register.CodeSize) & CrLf
Call PutStr(0, tx)
Call GetCPU
Call SerialNumber(SerNum)
tx = tx & " - VM " & CStr(SerNum(1)) & "." & CStr(SerNum(2)) & "." _
& CStr(SerNum(3)) & CrLf
Call PutStr(0, tx)
Select Case Register.ResetFlags
Case 1: tx = "Power-On Reset" & CrLf
Case 2: tx = "External Reset (DTR)" & CrLf
Case 4: tx = "Brownout Reset" & CrLf
Case 5: tx = "Power-On + Brownout Reset" & CrLf
Case 8
If rstflag Then
tx = "Software Reset (API)" & CrLf
Else
tx = "Hardware or Watchdog Reset" & CrLf
End If
rstflag = False
Case Else: tx = "Mystery Reset " & CStrHex(Register.ResetFlags) & CrLf
End Select
Call PutStr(0, tx)
tx = "S0 OPEN @ 19200 8N1" & CrLf
Call PutStr(0, tx)
Call ComChannels(4, 9600)
For p = 1 To 4
If (LoByte(ports(p))>0) Then
Select Case p
Case 1: Call DefineCom(3,18,25,&H08) 'non-inverted
Case 2: Call DefineCom(4,24,19,&H08) 'non-inverted
Case 3: Call DefineCom(5,17,21,&H08) 'non-inverted
Case 4
b = (HiByte(ports(p) And &H80)) Or &H08
Call DefineCom(6,4,1,b) '8-bit, inverted/non-inverted
End Select
Call OpenSerialPort(p)
End If
Next
Call InitTTL(1)
Call InitTTL(2)
Call InitW0
Call GetLocation
Call GetHolidays(1)
Call MemoryMap
tx = "GPIO PINS:" & CStrBin(HiByte(pins)) & " "
tx = tx & CStrBin(LoByte(pins)) & " - RSSI:" & CStr(rssi) & CrLf
Call PutStr(0,tx)
tx = "RTC Board:" & CStrBin(rtc) & CrLf
Call PutStr(0,tx)
If (xpct<6) Or (xpct>18) Then
xpct=12
End If
tx = "X-10 RF DIM:" & CStr(xpct) & "%" & CrLf
Call PutStr(0,tx)
b=rtc
Select Case GetBit(b,0)
Case 0 'query PC for timestamp
tx="?RTC" & CrLf
Call PutStr(0, tx)
Case Else 'query M41T81 for timestamp
'get rtc
'output when power loss occured, if any
'output daughterboard configuration
tx="RTC board:" & CStrBin(rtc) & CrLf
Call PutStr(0, tx)
End Select
End Sub
Rolling back to VM 2.3.0 did the trick.dkinzer wrote:I suspect that you'll only need to roll back the VM.
Code: Select all
15:19:26 ZBasic v2.3
15:19:26 roZetta (tm) Copyright 2008 dlh
15:19:26 All Rights Reserved
15:19:26 Compile Date: Jun 25 2008 13:35:23
15:19:26 EEPROM:65536 - CODE:11322
15:19:26 CPU: ZX40a - VM 2.3.0
15:19:26 External Reset (DTR)
15:19:26 S0 OPEN @ 19200 8N1
15:19:26 S1 OPEN @ 9600 8N1 MR26X, XTD:S3, PSD:S3, STD:S2
15:19:26 S2 OPEN @ 4800 8N1 2414S
15:19:26 S3 OPEN @ 4800 8N1 CM11A
15:19:26 S4 OPEN @ 9600 8N1 BINARY Non-Inverted
15:19:26 T1: TW523
15:19:26 T2: CTL + OPTOS 63, XTD:S2, STD:S2
15:19:26 W0: RF+RSSI 0000_0000 2500:14
15:19:26 LOCATION: -84.56 39.04 -5.00
15:19:26 HOLIDAYS: 1 21 49 147 186 245 287 316 332 360
15:19:26 Memory Map: 25000 29000 33000 37000 41000 45000 49000 53000 57000 61000
15:19:26 Record Sizes: 10 14 10 10 10 10 10 10 7 ??
15:19:26 GPIO PINS:1111_0000 1111_1100 - RSSI:1
15:19:27 RTC Board:0000_0000
15:19:27 X-10 RF DIM:12%
15:19:27 ?RTC
15:19:27 RTC: 25 JUN 2008 15:19:06 DST: 11,1658:00,7370:00,4263:19
15:19:27 NOW:1519 DAY:177 SUNRISE:0614 SUNSET:2108 HOLIDAY:False
My recollection is that you use the low level X-10 routines (DefineX10(), OpenX10(), etc.) so I began sleuthing around in those areas. I found that the data structures used by those routines are not being properly initialized so the functions sometimes work and sometimes don't depending on the previous content of RAM.dlh wrote:If you can make some targetted suggestions, I'll try to narrow it down but I fatigue quickly and start making dumb mistakes that only complicate troubleshooting things like this.
I would suggest commenting out all code related to the X-10 functionality. It is especially important to be sure to comment out code that adds data to the X-10 transmission queue because the PutQueue*() routines will hang when there is no space left in the queue.
- Don Kinzer