ArchProweb.bin comm error

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

ArchProweb.bin comm error

Post by olzeke51 »

Got around to checking out the ArchProweb.bin file (for mbed). Tried loading a working program for the 1768
I keep getting "time out 1" popup windows -- attached file
//
went back to the latest earlier version of mbed1768web [Oct 02- from Mike]
and it loads okay. attached text file is a BT screen capture to show initialization (no ethernet & then ethernet)
comm_err1.txt
BT screens
(2.37 KiB) Downloaded 1506 times
/
update
loaded a fresh short program - 13 lines
loaded on the old web.bin OKAY but on the new .bin file---
Got a little further on the new APweb.bin
'
Analyzing C:/Coridium/Basic/Projects/ArchPro/test_short.bas
Programming Flash 1768 Manual...
ARMbasic[9.34h] on the PC Copyright 2014, Coridium Corp.
*+*
then the Time out 1 popup
Attachments
time out pop-up
time out pop-up
archpro_bin_1.JPG (42.36 KiB) Viewed 26310 times



AMDlloydsp
Posts: 99
Joined: Mon Apr 15, 2013 3:51 pm
Location: NE Central FL

Re: ArchProweb.bin comm error

Post by AMDlloydsp »

'Might be good to post the working and failing .bas files, as well.

There could be a syntax difference (as opposed to error) in the newer compiler.

Just speculating, right now. No MBEDs here in the shop to try.

LLoyd

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

Re: ArchProweb.bin comm error

Post by olzeke51 »

well, here is the 13 line program that wouldn't load on the newer.bin file
I think the issue is in the timing in/of the usb/comm port. I havn't RUN it on the old software, it compiled and loaded.
kernel "a" worked for comm but "e" only got part way through the download.
test_short.bas
(220 Bytes) Downloaded 1433 times
CONST foo = 1
dim bar
dim f_num as single
dim a$(6)
Main:
bar = 2
a$= "howlongisthis"
f_num = 3.14
print (foo + bar)
print a$
print f_num
end

AMDlloydsp
Posts: 99
Joined: Mon Apr 15, 2013 3:51 pm
Location: NE Central FL

Re: ArchProweb.bin comm error

Post by AMDlloydsp »

Really?
I would expect in any BASIC where you can't control allocation of variables, that might crash when run, even if it didn't when compiling.

How does one assign a 13-character string to a six-byte string variable without expecting it to over-write other memory space?

Maybe it does, maybe it doesn't overwrite something important, but without being able to declare where and how strings are allocated, how would you know? It's a guaranteed run-time crash (*even if it didn't create a run-time error*) if you'd declared any strings after A$.

Although one can 'play' with the known allocation memory locations and sizes, why? Declare things the sizes they need to be, and don't tempt fate.

I'll also 'niggle' on using compiler-specific DIM features. They're not transportable. Use explicit types in any declarations; always; period. It doesn't use up a single byte of code or variable space, just source. It's not only safer, it's more understandable tomorrow.

Lloyd

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: ArchProweb.bin comm error

Post by basicchip »

Try connecting the Ethernet, you may be running into long timeouts due to our assuming the EMAC is responding. It is continually polled by the firmware in case there is web traffic.

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

Re: ArchProweb.bin comm error

Post by olzeke51 »

Bruce, I did have the ethernet connected - it failed connected or not - on the new .bin
My computer is looking like it is a possible suspect. I still get 812 comm issues - occasionally.
and now the ArchProweb.bin _ though the 1768web.bin didn't give me issues - AFAIRemember.
'
Lloyd - the string was deliberately long. Being only I string - it might over-write other variables.
sometime not. It is also a seven byte string (zero based) then an additional byte for the null terminator.
I have had it print out the whole string - it seems the string function uses the 'null' for an end of operation
and not the length - BUT the allocation in memory depends upon the length and how it fits into the
32bit memory usage; so when the later string is called upon - it is corrupted.
'
DIM is an interesting issue - its optional until one is declared - and many times they are declared in the
#include files that come with ARMBasic. to be honest - I haven't used a 'single' before but I decided I wanted one.
I was under the impression that I had to use DIM to declare a single or a string - in ARMBasic
'
Evaluating a chip & its software will generate errors, usually at compile time- and I usually catch the ones
I am stress testing. so I don't generally report them.; only if I see a conflict with the write up.
[ternary operation and the definition of 'expression' was one of them - I use 'value' instead of expression,
so now I know what Bruce means by 'expression'.]
'
the main issue is with the download of the compiled / modified Intel-hex formatted file. It seems I may have
an overloaded computer and the virtual /USB comm port is an issue. It seems to effect the comm with the '812 I was
evaluating also - NOW I have the excuse I need to get a new computer
computer-tyhpe.JPG
computer-tyhpe.JPG (5.93 KiB) Viewed 26288 times
'
Please don't take offense, I appreciate your comments and experience. I'm coming upto speed on programming.
The 70's & 80's was awhile ago !!

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: ArchProweb.bin comm error

Post by basicchip »

Your screen shot showed --

Initialize Ethernet

Ethernet not connected

------------

This will probably be a feature as it may be a lot of extra code to detect Ethernet not connected as the timeouts are long. And we really do assume the web version is plugged into a network and that is how we do our testing, especially during code development.

If your really don't want to use the network use the non-network version.

DIM is optional for integer variables, until you declare a DIM something as integer. Then it requires DIM from then on for all variables. Why, because for short programs it is nice to have BASIC declare variables on first use. For big programs it is nice to force DIM because if you misspell a variable the compiler will catch it.

You always need to DIM singles or strings or arrays, otherwise how would the compiler know what your are talking about.

If you DIM a string space too small you might as well point the gun at your head and pull the trigger, because you WILL get unexpected results.

AMDlloydsp
Posts: 99
Joined: Mon Apr 15, 2013 3:51 pm
Location: NE Central FL

Re: ArchProweb.bin comm error

Post by AMDlloydsp »

Gary, the only reason I'm so adamant about not using 'default' features, and only using explicit syntaxes is that I work on about a dozen platforms, with all sorts of languages (or variants of the common ones).

It helps a lot when crossing over to keep everything at the most bare-bones 'common elements' possible. Although none of my Coridium BASIC code could ever transport directly into (say) VBS, at least keeping those commons common will speed up the process, should I have to do it.

That's also a good reason to write your own utilities, if you have the code space. Having your own (say) "Val_Single()" certainly isn't necessary in a language that supports it directly. But if you have it in your code, it'll work (more or less <G>) in any language.

Lloyd

AMDlloydsp
Posts: 99
Joined: Mon Apr 15, 2013 3:51 pm
Location: NE Central FL

Re: ArchProweb.bin comm error

Post by AMDlloydsp »

Oh, by the way... if you're running XP on that machine, Gary, it should be fine, unless you've got it clogged up with all sorts of plugins, add-ons, and background daemons. XP runs USB-based virtual serial ports just fine all day, every day. You are kind of tight on RAM, though.

I have an "octopus" multi-serial USB interface I use on the bench for troubleshooting. I use XP for a number of reasons, and I've never had throughput related problems below 115200 baud on up to four ports at once.

LLoyd

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

Re: ArchProweb.bin comm error

Post by olzeke51 »

swapped USB ports from the front of machine to the back panel
'
I noticed when I copied the AP.bin file that the light pattern was
different from a previously good load of 1768.bin.
'
good red-flash - 1sec? - Yellow 1/3sec - 1.5 sec? - 2 short yellows
fail red-flash --------------- ? 3/4 sec ----------2 short ??grn/yellow ??
and then sometimes 5 secs later or so - will get a failed.txt in the mbin folder !!
'
reloaded the AP.bin file from my gmail account and got the same (type of) results.
but not the 'failed.txt' [only did the AP.bin reload once or twice]
'
will try to get another copy of my AP.bin file (ArchProweb.bin)

Post Reply