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: GermanyPosts: 2 |
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. |
||||
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2794 |
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: GermanyPosts: 1133 |
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: Regards Michael |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
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: GermanyPosts: 2 |
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. |
||||
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2794 |
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: GermanyPosts: 1133 |
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: AustraliaPosts: 5905 |
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: AustraliaPosts: 5905 |
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 |