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 : PicoMite V5.07.06 preview - flash file system
Page 4 of 5 | |||||
Author | Message | ||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 512 |
I've now tried to do an OPTION RESET and the PicoMite locks up, when I power off and on all the options are still present. |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4253 |
Hi Peter, Following feedback on 5.07.06b4: 1/ MM.info showed 700+ kbytes free on flash filesystem Tried to write 100 files, size 6006bytes (600k) in a sequence 'check filesystem For i=1 To 100 a$= "test"+Str$(i)+".txt" Open a$ For output As #1 For j=1000 To 2000 Print #1,Str$(j) Next j Close #1 Pause 1000 'time to let the system settle Print i Next i End At the 85'th file, the pico threw me an error. Is the limitation in the number of files ? It looks like the filesystem is full, but 85 files of 6006 bytes are flooding the 700k disk size.? [9] Print #1,Str$(j) Error : Error during device operation > ? mm.info(free space) 4096 > ? mm.info(disk size) 708608 2/ removing the files using format does not work (as first post in this thread) > option filesystem flash format Error : Invalid Option > 3/ killing the files using wildcards does not work. Please provide a way to bulk remove / clean the filesystem. 4/ running a program from the editor using F2 does not work. From the commandline it works. Volhout Edited 2022-12-20 05:20 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9133 |
updated b4 for PicoMite and PicoMiteVGA PicoMite.zip Implemented DIR$ function for flash drive and improved functionality for SD (can now DIR$ a directory other than the current. Fixed F2 out of edit Fixed bug in SPI. HOWEVER NOTE: SPI and SPI2 commands are now deprecated and replaced with SPI 1 params SPI 2 params You can use the old versions but they are automatically changed by the tokeniser. Change was needed to free up a command slot. Use DRIVE "A:/FORMAT" to re-initialise the flash drive. There is no wildcard KILL on any version of MMBasic including CMM2 Can't comment accurately on the overhead of large number of files on space used. but I know each file uses c 1K for a header so every 4 files or so will eat another 4K block Edited 2022-12-20 05:43 by matherp |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4047 |
That syntax seems a bit out of left field Peter, did you consider DRIVE FORMAT A or DRIVE FORMAT "A:/" ? Best wishes, Tom Edited 2022-12-20 05:53 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6101 |
In a program, use DIR$() to loop through all files, (I won't post an example program in case someone RUNs it on their file system) or use MMEdit file manager - select a group of files using shift click. Jim Edited 2022-12-20 06:27 by TassyJim VK7JH MMedit  MMBasic Help |
||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 512 |
Hi Peter, Should it be possible to use the LIST, as in list "A:/xyz.bas" command on the files in flash storage, I've tried all the variations I can think of and only get "file not found" Regards, Kevin. |
||||
gadgetjack Senior Member Joined: 15/07/2016 Location: United StatesPosts: 146 |
I bought 2 of the 8mg rp2040 a while back and had not used them yet. Thought this would be a great test of them. Neither will load anything. I tried flash_nuke and half a dozen other programs. They will not load anything. Glad they were not that much money , but still not very happy. They were from WeAct STUDIO " on the back of the boards" |
||||
gadgetjack Senior Member Joined: 15/07/2016 Location: United StatesPosts: 146 |
Ok , tried again just for the heck of it , and it worked. Same cable , board , laptop. Maybe I wasn't holding my mouth right , not sure . But it does work and can see all the memory so YAY....... |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2140 |
If they haven't been used before there won't be any firmware so no commands will work. To get the firmware on a blank Pico hold down the BOOTSEL button before plugging in the USB. A temporary flash drive appears that you copy the firmware to. EDIT Cross posted. Ignore. Edited 2022-12-20 08:43 by phil99 |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9133 |
Yes : will fix |
||||
twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1245 |
I know Jim (and Volhout too) can do better, but I thought we should have an example of how to do it. I've tried installing some safeguards, but use is at your own risk. '***************** BULK REMOVE ****************** ' ' kills your files ' For demonstration only ' Use it on your own risk ' 12/2022 by Twofingers@TBS ' ' You can delete individual files or ALL together ' '************************************************ Option explicit Const TRUE =1 Const FALSE=Not TRUE Dim FileName$, Confirm$, MassMode=FALSE Print "###############################################" Print " BULK REMOVE = a Weapon of mass destruction" Print " Kills your files (use it on your own risk!)" Print "You can delete individual files or ALL together" Print "###############################################":Print Pause 1000 FileName$ = Dir$("*.*", FILE) Do While FileName$ <> "" If MassMode = FALSE Then ' e = exits the loop Print "Delete "+FileName$+" (y/n/e or ALL <for all files>) "; Input Confirm$ EndIf If Confirm$ = "ALL" Then Input "Are you sure you want to DELETE ALL your files? (y/n)",confirm$ If LCase$(Confirm$) = "y" Then MassMode = TRUE Killfile EndIf ElseIf LCase$(Confirm$) = "y" Then Killfile ElseIf LCase$(Confirm$) = "e" Then Print :Print "BYE! (Terminated by user)" Exit EndIf FileName$ = Dir$() Loop Sub KillFile On ERROR SKIP Kill (FileName$) If MM.Errno = 0 Then Print "File: " + FileName$ + " successfully deleted!" Else Print "ERROR @ File: "+ FileName$ EndIf End Sub Best regards Michael @Peter Thank you for this Christmas present. It's really fun to play with. causality ≠correlation ≠coincidence |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6101 |
I've tried installing some safeguards, but use is at your own risk. With NO SAFEGUARDS *** this will wipe out all files in the current directory *** f$=dir$("*",FILE):do:k ill f$:f$=DIR$():loop until f$="" There is a deliberate space in "k ill" which you have to remove before nuking your files. test it with f$=dir$("*",FILE):do:print f$:f$=DIR$():loop until f$="" Jim Edited 2022-12-20 12:45 by TassyJim VK7JH MMedit  MMBasic Help |
||||
Tinine Guru Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
Heck, didn't expect a VGA version for a while. I just happen to be working with one right now Question (maybe for TassyJim): I am kinda lagging in these areas but my PicoVGA has no SD card; is it possible to send say, a bitmap file from my PC, directly to a flash file? It looked like Pete did this from one of his initial screen-grabs. Incidentally, as an FYI in case anyone was wondering about updating the firmware without a boot-select button; 1200 Baud really does do the trick (I have no buttons on my PGA2040s). However, I believe that I had to use Teraterm for this to work. Craig |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6101 |
Incidentally, as an FYI in case anyone was wondering about updating the firmware without a boot-select button; 1200 Baud really does do the trick (I have no buttons on my PGA2040s). However, I believe that I had to use Teraterm for this to work. Craig Yes. The new flash drive functions the same as the SDcard drive. I haven't tried the beta for the picoVGA but I certainly have transferred to and from the a: drive (flash) with a standard picomite without any SDcard configured. You may need to update MMEdit first. Normal XMODEM with TeraTerm should also work if that is your preferred method. re 1200 baud for updating. That is how MMCC does it. Simply connect to your target system, drag a *.uf2 file onto MMCC and sit back. Note: with my W11, I cannot drag from a ZIP. The file has to be extracted first. Jim VK7JH MMedit  MMBasic Help |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4253 |
@Peter, When the dust around the flash drive settles, and you are enjoying Christmas, may I ask for an addition to the MATH functions. I would love to see a MATH CRC. There is a library for Arduino, thta has support for RP2040 added, so it may be possible to integrate it. Reason I am asking is that I need to evaluate a MODBUS client with 1 ms turn-around time. And the MMBasic Modbus CRC calculations are slower. I need either a CSUB or MATH CRC. The library can support various CRC's (CRC8/16/32/64 and different polynomes for each, but reading through these threads on TBS, most people look at MODBUS CRC, so that would be the preferred default I guess). The library is at : https://github.com/RobTillaart/CRC Thank you for looking at it, regardless the outcome. Volhout PicomiteVGA PETSCII ROBOTS |
||||
Tinine Guru Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
When the dust around the flash drive settles, and you are enjoying Christmas, may I ask for an addition to the MATH functions. I would love to see a MATH CRC. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9133 |
Please write an example program showing usage and proposed syntax |
||||
Tinine Guru Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
You would think that MCUs would have hardware CRC acceleration (Prop2 has it) but I guess that Modbus is typically not used at high Baud-rates. Craig |
||||
IanRogers Senior Member Joined: 09/12/2022 Location: United KingdomPosts: 151 |
May I say... I was reading the thread "Heart-felt thanks" I would like to say to you Pete... Your commitment is undeniable. Your efforts blow my mind.. I have worked on ETO for years and only a few of us there give to the community with absolutely no gratitude required. I do what I do because I can... This though is above and beyond... You and Geoff are cut from the same cloth. Well done.. I hope I can call you friend. Cheers Ian I'd give my left arm to be ambidextrous |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3813 |
Craig In the overall realm of computing I think it would hardly ever be used yet be taking up silicon area and some power. Plus it can be done in software. But specialist MCUs or ones with lots of silicon (more cost, more power) include it. The Pico is not in that latter category. John |
||||
Page 4 of 5 |
Print this page |