corrupted file - time killer

Questions about the BASICtools and MakeItC
Post Reply
olzeke51
Posts: 394
Joined: Sat May 17, 2014 4:22 pm
Location: South Carolina

corrupted file - time killer

Post by olzeke51 »

Got a time killer here. - I don't expect you to spend time on it - but am curious.
'
I have saved the files from the /temp directory; will load on request
'
I think this is the 3rd time this type of situation has occured. (win XP @ SP2)
A working (seemed to have been) file has been added to ; (ie add more SUBs - in stages)
and then all of a sudden it crashes in one area and no amount of patching it seems to fix
it. [I have gotten the 'Firmware error 032 / 007E during the process of reloading, and
perhaps a "loss of communication" popup also - - - would any of those cause a file error?
You know - like a file doesn't get a 'file_close' command??] again this is a time-killer!!
'
anyway to the present file IF YOU CHOOSE to look at it. maybe run the text file through a
HEX file editor. was created with NPP
error occurs in the ACOMP_out SUBroutine. LINE 108
LINE 114 always prints, I have changed the value at Main: line 176 for testing - no difference
ALSO NOTE there is no ENDIF in the ACOMP_out. Putting one in causes " endif without an if" error
BUT this loads okay, in DEMO and in real-time !!!
The file also has several empty lines past the END in Main: (I had one program that would only allow
one blank line - or newline - character -- (again using NPP) -- so that is my SOP!!)

Analyzing C:/Coridium/basic/BASIClib/ACMP04_bad
Programming Flash 0812...
ARMbasic[9.32c] on the PC Copyright 2014, Coridium Corp.
*+*+
... ( 0.63K code + 0.09K const)/4K 0.04/1K data programmed

run
Executing...

value out of range10
value out of range10
value out of range10
value out of range10

******************* same file - ran in DEMO mode
I quit BT, removed usb/812, started BT, loaded file, "run" from the enter window (command line)
NO "value out of range" -- shouldn't as pin is 10

Analyzing C:/Coridium/basic/BASIClib/ACMP04_bad.bas
done
run
*** WARNING !!! ARM is not connected !!! ***DEMO MODE*** loading PC...


"ARMbasic[9.32c] on the PC Copyright 2014, Coridium Corp.
"
in do_any_operand fe [8]=fe
"... 1.26K code 0.04K data programmed


"

Executing on the PC...
call PEEK( 40048080 )
call POKE( 40048080 <= 40048080 )
call PEEK( 40048234 )
call POKE( 40048234 <= 40040234 )
call PEEK( 40048238 )
call POKE( 40048238 <= 40040238 )
call PEEK( 4000c1c0 )
call POKE( 4000c1c0 <= c1c0 )
call PEEK( 40024000 )
call POKE( 40024000 <= 40024a18 )
call PEEK( 4004402c )
call POKE( 4004402c <= 40044024 )
call POKE( 40044044 <= 40044024 )
call PEEK( 40024000 )
call POKE( 40024000 <= 40024a18 )
call PEEK( 4004402c )
call POKE( 4004402c <= 40044024 )
call POKE( 40044044 <= 40044024 )
call PEEK( 4000c020 ) // this is acomp_out
call POKE( 4000c020 <= 40000a20 )
call PEEK( 40024000 )
call PEEK( 40048004 )
call POKE( 40048004 <= 40048004 )
call PEEK( 40048004 )
call POKE( 40048004 <= 40049004 )
call PEEK( 40024000 )


... Finished on the PC in 0 ms
Attachments
ACMP04_bad.bas
runs bad, no compiler errors- BUT missing endif
(7.72 KiB) Downloaded 296 times



basicchip
Posts: 1038
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: corrupted file - time killer

Post by basicchip »

A bug snuck into the compiler involving DIR(expression) on the left hand side of a statement. This cause the missing ENDIF to be ignorred and the IF branch was never patched.

Our test cases don't do any of the IO functions, as those specific to each board. We have to add some of those tests and will have to add those to the suite, actually BLINKY might start doing that.

A fixed compiler will be ready Monday

olzeke51
Posts: 394
Joined: Sat May 17, 2014 4:22 pm
Location: South Carolina

Re: corrupted file - time killer

Post by olzeke51 »

Yo, installed the new ARMBasic_933a
Demo mode pointed out the missing EndIF, I added it - came out clean
Ran the program on my 812 and all I got was

Ex and my <Stop> button was red

*****************************
had you run the program on your '812??? - kernel [8.32a]

Tnx

olzeke51
Posts: 394
Joined: Sat May 17, 2014 4:22 pm
Location: South Carolina

Re: corrupted file - time killer

Post by olzeke51 »

Okay, I knew the file might be bad - apart from what you found.
'
I started from scratch (with Crimson)- 24 lines of code
so I created a simple Main: for/next loop with a type of CALL in it.
I've used CALL label, gosub label, label and they all work in DEMO
but to run it on the 812 --
'
ALL I ever got was an " exe" after the <run> button
********
started from scratch a second time - didn't run DEMO on it
quit BT and restarted - did a load/file ; <run> button
"exe" was all I got
<stop> button, <reset> button
had 1 or two linefeeds and a RED <stop> button NO 'exe'
'
kernel [8.32a]
'
am I doing load/file , <run> button WRONG????
Attachments
ACMP_07callce.bas
doesn't "run"
(338 Bytes) Downloaded 328 times

basicchip
Posts: 1038
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: corrupted file - time killer

Post by basicchip »

You have an 812 with an experimental firmware, and I guess the experiment failed. We'll have to look into why.

Attached is the version we were using on earlier boards. It can be installed with the loadLPC.exe run from the command line.

And I have fixed the DIR(expression)=expression in the compiler I will post next.
B80828.hex
(32.99 KiB) Downloaded 333 times

olzeke51
Posts: 394
Joined: Sat May 17, 2014 4:22 pm
Location: South Carolina

Re: corrupted file - time killer

Post by olzeke51 »

was a little hesitant to d/l the older firmware, so I tried the idLPC program to see what would happen.
I got this from a CMD window in WinXP SP2:

Directory of C:\Coridium\basic

10/25/2013 10:31 AM 45,211 idLPC.exe
1 File(s) 45,211 bytes
0 Dir(s) 20,018,073,600 bytes free

C:\Coridium\basic>idlpc.exe
Copyright 2013, Coridium Corp., may be used anywhere with this notice


Chip identifier for Philips LPC family
Syntax: idLPC comport

FAIL
C:\Coridium\basic>idlpc.exe com10
Copyright 2013, Coridium Corp., may be used anywhere with this notice

No answer on '?'
FAIL
C:\Coridium\basic>

************************* the RX and TX leds on the usb dongle cycled probably 10 times before it
did the no answer.
**** is it still safe to reprogram the 812 ?? - I would hate to 'brick it"

basicchip
Posts: 1038
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: corrupted file - time killer

Post by basicchip »

To do any ISP functions you need to force P0.1 (pin 12) low during reset.

The Coridium USB serial dongles will do this, but no other ones do it to my knowledge, the others can only drive reset.

You can't brick the device with software.

olzeke51
Posts: 394
Joined: Sat May 17, 2014 4:22 pm
Location: South Carolina

Re: corrupted file - time killer

Post by olzeke51 »

can I get the shipped experimental firmware back -- at least it will run HWPWM8
and not give me a firmware error 0027 !!!

that's for the 812 aka Basic so-20

Thanks - olzeke51 - sorry for the interruptions

Post Reply