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 3 of 5 | |||||
Author | Message | ||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2350 |
one approach may be to completely re-gig the way running and editing programs are handled. for instance: LOAD "filename" [n] where n is (for instance) 1, 2, or 3 being three flash slots, defaulting to n=1. this allows you to have up to 3 pre-tokenized sets of code that can chain between each other. LOAD could be used within a program, but would erase all RAM, thereby allowing a menu system to be used as a front-end to select between multiple programs. similarly, RUN "filename" [n] and, CHAIN "filename" [n] then editing could be restricted to file-system files only, ie the editor would not need to be able to de-tokenize the contents of a flash slot. in this case you would use: EDIT "filename" this is not a fully fleshed out idea, and indeed may not be a good idea. just something to kick around. inspired by the thought that it may be simpler, rather than sticking with the existing idea of flash slots, to move more towards the appearance of how the CMM and CMM2 does things. cheers, rob :-) Edited 2022-12-18 19:19 by robert.rozee |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9139 |
b2 PicoMite.zip This fixes the bug in the INPUT command which was a stupid typo - nothing to do with eof - I had tested input$ but not input. Now implemented MKDIR, CHDIR, and RMDIR for flash. This was a huge change and has effectively re-written a lot of the SD code as well as the flash so needs a lot of testing. The key code was imported from the CMM2 which has to do the directory tracking in my firmware because of limitations in FATFS when using exFAT. LittleFS has even more limitations than FatFS-exFAT as it doesn't even have a CHDIR primitive so everything is at the top level and the firmware has to track user CHDIRs and apply that path to every filename the user requests. e.g. CHDIR "/peter/test" load "../fred/myapp" gets converted to load "/peter/fred/myapp.bas" Note again that filenames in LittleFS are case sensitive. The firmware will assume lower case extensions "myapp.bas". If you create a file myapp.BAS then LOAD "myapp" won't find it. Also note that LittleFS does not support time and date stamping of files At the moment you can specify a filename with a disk e.g. load "A:/myapp". However the disk specifier is ignored and the file is loaded from the device specified by the latest DRIVE command Edited 2022-12-18 22:14 by matherp |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9139 |
5.07.06b3 PicoMite.zip I think I'm about there except for any bugs. You should now be able to use fully qualified filenames with drive letters irrespective of the current working drive in nearly all situations exceptions are: MKDIR, CHDIR, RMDIR, NAME which only operate on the current drive e.g. DRIVE "A:" MKDIR "flashdir" PLAY WAV "B:/wavfiles/wavsample" COPY "B:/mydir/myprog.bas" to "a:/flashdir/myprog.bas DRIVE "B: FILES "A:/flashdir/ OPEN "A:/testfile.dat" for input as #1 OPEN "B:/anotherfile.dat for output as #2 a$=input$(100,1) print #2,a$ close #1 close #2 ' etc..... You can still use the other form of copy A2B, B2A in which case you can use relative pathnames to the default directory set on each drive e.g. drive "a:" chdir "peter" drive "b:" chdir "anything" copy a2b "file.dat2 to "newfile.dat" This will copy a:/peter/file.dat2 to b:/anything/newfile.dat Jim: FILE output is now the same format irrespective of the drive (as per original SD) but as the flash file system doesn't support dates these are always set to 00:00 00-00-1980 and of course the sort on date is meaningless Edited 2022-12-19 04:43 by matherp |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4254 |
Hi Peter, Works now, thanks.... Generic question: in commands that can only work with strings, like all the filesystem commands, can we do something to avoid the "" ? In stead of an error message, assume it is a string and try again ? load "hello.bas" will also accept load hello.bas similar for drive chdir mkdir copy kill Thank you for making the filesystem in flash. I am really going to use it. For the VGA picomite in general and SD card is common, since it is a stand alone computer and SD card is exchangeable. For the picomite this is not so obvious. The filesystem is really an essential addition. PicomiteVGA PETSCII ROBOTS |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2140 |
One of these on the way - end of Jan. Winbond 25Q128 no logo on the RP chip, just RP2-82. Cheap enough to have a punt. Appears to have linear 3V3 reg. Edited 2022-12-19 07:22 by phil99 |
||||
palcal Guru Joined: 12/10/2011 Location: AustraliaPosts: 1873 |
I saw these Pico Cant imagine them being genuine "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2140 |
Bait advertising. Try to order it and price jumps to $6.21 + $8.98 postage + GST. Cheaper to buy locally. Edited 2022-12-19 07:35 by phil99 |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6102 |
That price is for the chip only. Their prices for boards are a little high. Jim VK7JH MMedit  MMBasic Help |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6812 |
That 0.99 is for the RP2040 alone, not the Pico. Check the options. :) The price for the basic chip has been 1USD (lower in bulk) for a while, I think. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
palcal Guru Joined: 12/10/2011 Location: AustraliaPosts: 1873 |
Yeh, I should have checked further "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9139 |
No: this is core Basic functionality |
||||
vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1110 |
Thoughts about "default" and terminology... Could the default drive on power up always be the flash drive, even if an SD card is available? This would make for a more uniform environment for programs, without needing to test for special configurations. Terminology wise, could the DRIVE command set the ACTIVE drive, not the default drive. I feel this would make it easier to understand what the command does. Thank you for your awesome work! Visit Vegipete's *Mite Library for cool programs. |
||||
Pluto Guru Joined: 09/06/2017 Location: FinlandPosts: 359 |
The ones I bought and successfully use do also look like there would be no Logo on the RP2040 chip on the seller's site. The arrived modules do however have the Raspberry Logos. https://www.thebackshed.com/forum/ViewTopic.php?TID=15398&P=2#195152 Flash memory: I suppose one of these is the regulator: Latest order was 3.30EUR incl shipment and VAT (4MB version). Still to come 16MB version at 3.63EUR incl shipment and VAT. Up to now all of the 4MB modules have functioned as expected for PicoMite. |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6812 |
Thanks. :) There's no reason why anyone can't make Pico-alikes. The design is open AFAIK, and in any case the full schematics, data sheets etc. are available to all, as is the RP2040 itself. The only thing is that I suspect Raspberry Pi might come down on someone describing something else as a "Raspberry Pi Pico", although I think they allow their logo to be used on equipment built to the correct specification. Edited 2022-12-19 21:11 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9139 |
V5.07.06b4 PicoMite.zip I've found a way of using the flexible attributes capability of LittleFS to implement time stamping of files so the flash system is now pretty much indistinguishable from the SD system Please test this version. My current feeling is to skip the 5.07.05 release and go straight to this. The changes are all in the file system so as long as that works OK there should be little else that may have gone wrong. Please report any issues. I've kept the active file system as the SDcard if enabled (and a disk in place) so that existing programs run without change. Edited 2022-12-19 21:36 by matherp |
||||
Pluto Guru Joined: 09/06/2017 Location: FinlandPosts: 359 |
A stupid question again FILES FILES "A:" FILES "A:/" Are these not supposed to be in a program? It results in: "Error : Invalid in a program" |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9139 |
No: they clear the variable memory for buffer space to do the sorts so not possible |
||||
Pluto Guru Joined: 09/06/2017 Location: FinlandPosts: 359 |
Thanks Peter! Could maybe be mentioned in the manual. Page 38 in the PicoMite User Manual says: |
||||
Hans Senior Member Joined: 18/10/2022 Location: CanadaPosts: 116 |
Season's Greetings; Very excited for the files system changes. I purchased this Waveshare RP2040-Plus with 16mb from Amazon.ca. I don't expect it till the end of January either as it ships from China. Considering the state of the country it may be delayed. Not much risk here as it's from Amazon, $24.89 CAD with pre-soldered headers, free shipping. Here's wishing you all and your loved ones the season's best! Hans ... |
||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 512 |
Hi Peter, I'm using Version 5.07.06b4 and have found that every time I F2 to save and run program. First the program does not run, the effect is like a F1, it saves and leave me at the prompt. Second in my program I am using the SPI command, each time I make an change and F1 or F2 out, a number 1 is inserted into the SPI command, even those in a comment? so I end up with for example: ' SPI 1 1 1 Open 1000000, 2, 16 Pin(FSY)= 0 SPI 1 1 1 write 5, c Or RESET Or B28, f1, f2, p, c Pin(FSY)= 1 ' SPI 1 1 1 Close Which of course produces an error and won't run. Regards Kevin. |
||||
Page 3 of 5 |
Print this page |