Runaway BASIC program

Questions about the BASICtools and MakeItC
YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Runaway BASIC program

Post by YahooArchive »

Hit STOP

Enter another program, like

PRINT

hit RUN, and it will erase the run-away one.

> I also typed in a "?" and got a string of numbers. I assumed a question mark
was the shortcut for PRINT, being as I was using BASIC. I also entered the
example "hello world" into the command line and now every time the machine boots
up, it spews the results and I have no clue how to stop it. Ideas? I'm using
the ARMmite board.
> George
>



YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: Runaway BASIC program

Post by YahooArchive »

I did that a few times. Got the same result. Now, every time I poke the reset
button, I get this:
Hello!
Hello! World!
3+4 = 7
sum= 5555


... program done

Welcome to ARMbasic Kernel[7.43] Copyright 2008,
Coridium Corp.
for the ARMmite

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: Runaway BASIC program

Post by YahooArchive »

I was able to get rid of the Hello stuff, once it dawned on me that it was in
DEMO mode and I got it over onto a real port. Now I get this message when I type
in PRINT to the command line at the bottom:

ERROR In Line 1: corrupt address entry, found end of line

Maybe something got messed up. Is there a way to just reset this board to
factory settings?
George

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: Runaway BASIC program

Post by YahooArchive »

Not sure how you got to that state, but that error is coming from the ARMbasic
compiler from a table entry. If it doesn't go away when you exit BASICtools
and restart, you've somehow corrupted the .ini file for BASICtools

To delete that--

from a command line

>del %appdata%/coridium/BASICtools.ini

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: Runaway BASIC program

Post by YahooArchive »

I tried your suggestion about deleting an ini file, but ran into trouble.

1. pasted del %appdata%/coridium/BASICtools.ini into the BASICtools command line
area and got nothing.
2. typed it into an MSDOS window and got nothing.
3. Pasted it into Start>RUN window and got nothing.
4. I tried searching the whole computer for basictools.ini and it's nowhere to
be found.

Where am I supposed to type it?

I've apparently lost control of this board. Now it repeatedly tells me to press
the reset button on the board (pro plus), which I did, and then "enter" OK.
Well, I 'click' on OK but now everything I enter comes back in red errors.

George

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: Runaway BASIC program

Post by YahooArchive »

The direction was --

> > from a command line
> >
> > >del %appdata%/coridium/BASICtools.ini

command line implied MSDOS command line -- a google search would turn up the
first 3 entries explaining that in detail

so in your 2 below that was accomplished, maybe in 3 too, never tried it with
%parameters%

What del did was to delete the file

As you can't find it now, means you probably deleted it.

When you quit BASICtools, a new one will be written.

The "Push Reset" button is happening as you've configured
BASICtools->Options->Manual

As I think you are using an FTDI cable, that's wrong is should be PRO-your
cable.

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: Runaway BASIC program

Post by YahooArchive »

Bruce,
I didn't enter the manual mode. If it got there, it did it on it's own. I can
select a different mode, though.

I have an FTDI cable
http://www.ftdichip.com/Support/Documen ... R_CABLES.p\
df from Mouser,


http://www.mouser.com/ProductDetail/FTD ... aSAtgR7DpP\
Mdam%2fwe00

When I ordered your board, you didn't have a cable version of a USB interface,
but the site directs me to Makershed, who no longer offers a cable, but I found
the identical cable at Mouser, so I ordered it. It does seem to run the little
test program I put in. If this is the wrong cable, please tell me the cable I
need to locate to make the Pro Plus run right.

When I tried to run that command line program, BASICtools was probably still
running. I did not know that the only way to get that command to work would be
to first end the BASICtools program. I can try that. You mentioned "a command
line", but should I actually be in the same directory as BASICtools.ini is
located in, first?

Thanks,
George

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

Re: Runaway BASIC program

Post by basicchip »

The timeouts are such that you can always stop a running program by---

start BASICtools

select the serial port for the offending device

disconnect the offending device from the USB

reconnect the offending device

Select the serial port for the offending device in BASICtools, BASICtools will issue a break, ctl-C or ESC before your runaway program has a chance to startup.

You have a few seconds to do this, so you can't go out and have a cup of coffee while trying to halt the program. If you have one you still can't stop we want to know about it. But we need REAL specifics, what is the program, what device is it running on, and what version of Windows are you using.

mikechris
Posts: 12
Joined: Sat Apr 29, 2017 12:02 pm

Re: Runaway BASIC program

Post by mikechris »

The following are excerpts and results of emails with ‘basicchip’.
Problem: Runaway BASIC program causes chip to lockup (can’t re-program).
“Tried the Runaway Program procedure provided in the Forum, keep getting Com Port Unavailable Error (maybe I wasn't fast enough). But did stumble on something that worked on a STAMP, shown below.”

3 step procedure that works on a STAMP.
1. Connect the STAMP via USB.
2. Start BASICtools.
3. Very quickly re-select the already selected (checked)
USB Com port.
Result: Program stops, "Welcome....." message displayed.

This shorter procedure may work best when only a single device is connected, while the longer procedure may work best when multiple devices are connected.

‘basicchip’ comments: “Both do the same thing, I typically have more than one device plugged in, sometimes BT (BASICtools) chooses the wrong one. Depends on how fast Windows identifies the device and lots of other variables. The windows serial driver keeps changing, so timings change.”

In response to: “Any idea what might cause a runaway program?”
Reply: “As for what can hang a Stamp, usually turning off the USB interrupt or disturbing other USB settings, like clocks.”

This post added at the request of ‘basicchip’, who's help was much appreciated.

jmcdougall
Posts: 35
Joined: Tue Mar 22, 2022 11:17 pm

Runway Program needs to be stopped.

Post by jmcdougall »

In the process of testing I missed a loop condition. As a result, I now have a runaway program locked in an outer loop. I have tried what I found here on the forum, but it has not worked for me. In the ArmBasic manual it says that on a RESET, there is a 500 ms window where it will look for input and if the character Escape or CTL-C is received then the user program is prevented from running and the ARM is ready to be reprogrammed. No information is given as to how to accomplish this in Basictools.
How do I do this?
Note: This is on a SuperPro.

Post Reply