Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 08:46 29 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Program in memory not saved - CGMMSTICK1

Author Message
MichaelE
Newbie

Joined: 23/06/2015
Location: Germany
Posts: 2
Posted: 06:37am 13 Jul 2015
Copy link to clipboard 
Print this post

Hello dear forum members.

I have a problem and I hope you can help me.

I'm using the CGMMSTICK1 and when I enter "autorun" I get the error "Program in memory not saved". I never had this problem before.

I read here on the forum that this might have momething to do with a defect of the internal memory, so I tried the 2nd device I have, copied the autorun.bas both on A: and also on B:, and the programm was even starting automatically ... what often it does not.

I made some changes on the programm, flashed it again on A:, but now I also get the same error "Program in memory not saved" again also on the second device, when I type "autostart". After entering "autostart" again the error message: "Only one internal flash file can be open at a time" appears.

I hope you have an idea why these errors appear.Edited by MichaelE 2015-07-14
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 07:05am 13 Jul 2015
Copy link to clipboard 
Print this post

Hi Michael,

Can you tell us which version of MMBasic firmware you are running?

Thanks,

WW
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 08:36am 13 Jul 2015
Copy link to clipboard 
Print this post

Hi Michael,

assuming you are using MMBasic 4.5. There are no commands like "AUTORUN" or "AUTOSTART"!

If you are typing AUTORUN at the prompt MMBasic tries to open a file named AUTORUN(.bas).

There exists a command "OPTION AUTORUN ON" for MicroMites.

For Maximites this should work:
  Quote  On the Maximite MMBasic will look for a file on startup called “AUTORUN.BAS” in the root directory of the internal flash drive (A:) then the SD card (B:). If the file is found it will be automatically loaded and run,


Regards
Michael

Edited by twofingers 2015-07-14
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 11:28am 13 Jul 2015
Copy link to clipboard 
Print this post

I can see what is going wrong here.

You edited a program in memory (RAM) and did not save it. You then typed autorun at the command prompt. MMBasic thought that you wanted to run a program called autorun on the SD card but it knew that you had not saved the edited program in RAM so it gave you the helpful error message "Program in memory not saved".

You should use the command SAVE "autorun.bas". Then you can use autorun at the command line and MMBasic will load and run autorun.bas.

As previously pointed out, the program autorun.bas will be automatically run when you turn on your Maximite.

Geoff
Geoff Graham - http://geoffg.net
 
MichaelE
Newbie

Joined: 23/06/2015
Location: Germany
Posts: 2
Posted: 06:42am 14 Jul 2015
Copy link to clipboard 
Print this post

Dear WW, Michael, and Geoff,

thanks for your answers. Indeed I have the frimware version 4.5, and I meant "autorun" not "autostart".

I copied the programm called "autorun.bas" via MMEdit to the A: drive.
The program does not run automatically - although it should, that's why I typed "autorun", resulting in "Error: Program in memory not saved".

Thanks Geoff for the advice SAVE "autorun.bas" - could be that MMEdit made something wrong...but this did not help. The answer to this command was : "Error: Only one internal flash file can be open at a time".

I typed then one more time "autorun", resulting again in "Error: Only one internal flash file can be open at a time".

However, after trying the autorun command again, the the programm finaly started.

I don't know why this happens. It seems to have something to do with the way MMEdit copies the file to the memory.

Concluding, I hope that I can improve my program even though it won't always start, and after it is finished I will try copying it until also the autostart function works.
Edited by MichaelE 2015-07-15
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 08:17am 14 Jul 2015
Copy link to clipboard 
Print this post

Maybe worth TassyJim stepping in here if possible to see if MMEdit could be causing an issue here.

Does anyone else use MMEdit with v4.5 on a MaxiMite to try this out??

WW
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 10:52am 14 Jul 2015
Copy link to clipboard 
Print this post

  Quote  Does anyone else use MMEdit with v4.5 on a MaxiMite to try this out??


On a DuinoMite (4.5) all seems to work as expected ... nearly.

After a "NEW" I can execute "AUTORUN" on Drive "a:" repeatedly.






Regards
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5905
Posted: 01:46pm 14 Jul 2015
Copy link to clipboard 
Print this post

  MichaelE said  
I copied the programm called "autorun.bas" via MMEdit to the A: drive.
The program does not run automatically - although it should, that's why I typed "autorun", resulting in "Error: Program in memory not saved".


How do you copy the file to your maximite?

I have copied a test file to drive A: on a maximite with the name "AUTORUN.BAS" without any problems using the 'File Manager'.
It ran first time by entering "RUN AUTORUN.BAS"

I will do some more testing later.

Jim


VK7JH
MMedit   MMBasic Help
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5905
Posted: 02:33pm 14 Jul 2015
Copy link to clipboard 
Print this post

If you are using "Load and Run" with a maximite,
MMEdit first transfers your program to the maximite as "TEMP.BAS" and then either sends the command "LOAD TEMP.BAS" or "RUN TEMP.BAS" depending on your settings.
In either case, there is no AUTORUN.BAS and there is a program loaded into memory.

The choice of drive A: or drive B: depends on your sttings and if there is a card in Drive B:

Jim
VK7JH
MMedit   MMBasic Help
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024