I did it again :-(


Author Message
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 1013
Posted: 05:42am 11 Sep 2025      

Just spent the last 3-4 days coding a new project on a PicoVGA connected to TeraTerm and powered by the USB cable. I left it running overnight to see if there were any issues and this morning I was greeted by MSOFT telling me the PC needs a restart. Guess what I did ?
Unfortunately, I have been to used to programming mites and forgot to save the code to flash or the PC so when the PC came back the Pico was blank.

OA47

Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8292
Posted: 06:34am 11 Sep 2025      

Oh dear. :(

You will stray from the golden path to true enlightenment though! Such futile actions cannot go unpunished in some way.  ;)


It's like nudging the ram pack on a ZX81 when you are just entering the last line of the program that you are copying from a magazine. Only this time you have Microsoft to help. :(

OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 1013
Posted: 07:00am 11 Sep 2025      

You remind me of the days I had my first 8 bit computer where I would delay the saving of the program until the last minute as it took ages to save on cassette. I vividly remember the sound of thunder in the background and the knowledge that a lightning strike even kilometers away was enough to rest the computer.

OA47

Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5464
Posted: 07:10am 11 Sep 2025      

OA47,

If you have ever RUN the program on the PicoVGA, then it is still in flash. Simply open teraterm, and type "LIST", or "F2"(edit)
To erase a program from flash you actively have to execute a "NEW", or update the firmware (i.e. from 5.08.00 to 6.00.03). Otherwise the program is still there.

Regards,

Volhout
Edited 2025-09-11 17:10 by Volhout

atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 727
Posted: 07:10am 11 Sep 2025      

No backup, no mercy

OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 1013
Posted: 07:31am 11 Sep 2025      

Unfortunately if I list from Teraterm I get nothing. The PicoVGA is running ver 5.0704 and memory reports:
Program:
  0K ( 0%) Program (0 lines)
108K (100%) Free

RAM:
  0K ( 0%) 0 Variables
  0K ( 0%) General
140K (100%) Free

OA47

Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5464
Posted: 08:06am 11 Sep 2025      

Hi OA47,

Maybe this is the time to upgrade to 6.01.00b11. It is simply 1 button press, and a drag and drop.

I think the earliest ports of MMbasic on RP2040 ran the code in RAM. Maybe 5.07.04 was that early version (although I think 5.07.04 was already flash based). Later versions are running from flash, while maintaining similar speed.

Volhout

OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 1013
Posted: 09:58pm 11 Sep 2025      

As an afterthought, I was wondering as Teraterm was still running after the PC re-boot could I have been able to look at the history and got most of the code back ?

OA47

phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2821
Posted: 11:35pm 11 Sep 2025      

Tested with a Windows restart.
Answer:- No not with TeraTerm 5.2. TeraTerm restarted with an empty buffer.

As for the PicoMite (RP2040 V6.01.00b11) it continued to run its program without a hiccup throughout the restart.

Perhaps a Windows Update is different. If it starts the virtual com port at 1200 baud the Pico would go into Firmware Update mode. If Windows sees that as a corrupt USB drive it may try to "repair" it.

phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2821
Posted: 02:00am 13 Sep 2025      

Tested with Windows Update.
Pico connected to TeraTerm and program running then let Windows do the update.
Once again  the PicoMite continued to run its program without a hiccup throughout the update.
So what happened to yours remains a mystery.

OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 1013
Posted: 02:15am 13 Sep 2025      

Phil, I did notice an error message from mmbasic during both of the re-boots of the PC but they were only visable for a split second and I could not interpret them.

OA47
Edited 2025-09-13 12:16 by OA47