![]() |
Forum Index : Microcontroller and PC projects : Flash File System and SD cards.
Author | Message | ||||
Bowden_P Senior Member ![]() Joined: 20/03/2019 Location: United KingdomPosts: 162 |
Hi All, I am trying to navigate around the Picomite Flash file system, but cannot fathom out the required syntax for moving into a directory. I have successfully created a directory called "Test", but cannot make this the current directory. ( The directory is currently empty.) I have :- > ?cwd$ A:/ > > ?MM.INFO(drive) A: > > files A:/ <DIR> . <DIR> .. <DIR> Test 16:06 14-01-2023 4 bootcount 3 directories, 1 file > Using CHDIR and assorted combinations of " . / \ $ and Test etc. I endlessly get :- "Error : Could not find the path" or "Error : Expected a string" or "Error : Syntax" e.g. > chdir "Test" Error : Could not find the path or :- > chdir "A:/Test" Error : Could not find the path > I am running :- PicoMite MMBasic Version 5.07.06b7 OPTION SYSTEM SPI GP10,GP11,GP12 OPTION SYSTEM I2C GP20,GP21 OPTION AUTORUN ON OPTION COLOURCODE ON OPTION CPUSPEED (KHz) 130000 OPTION LCDPANEL ILI9488W, RLANDSCAPE,GP8,GP15,GP9,GP13 OPTION GUI CONTROLS 5 OPTION TOUCH GP16,GP17 GUI CALIBRATE 0, 247, 3863, 1277, -869 OPTION SDCARD GP22, GP5, GP18, GP19 OPTION RTC AUTO ENABLE on a Waveshare pico-restouch-lcd-3.5 module. Please-please give me an exact syntax example of what is required ! Also, without an SD card present, some incorrect responses :- > ?cwd$ A:/ > > ?MM.INFO$(SDCARD) Ready > > drive "B:" > ?MM.INFO$(SDCARD) Not present > ?cwd$ Error : SD Card not found > > drive "A:" > ?cwd$ A:/ > ?MM.INFO$(SDCARD) Ready > With best regards, Paul. Nothing so constant as change. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10310 |
Suggest you update to the release version or one of the 5.07./07 beta before anything else ![]() Edited 2023-01-15 05:32 by matherp |
||||
Bowden_P Senior Member ![]() Joined: 20/03/2019 Location: United KingdomPosts: 162 |
Hi Peter, Thanks for your reply. I have updated from Geoff's site v5.07.06 as suggested - still a problem unfortunately :- > option list PicoMite MMBasic Version 5.07.06 OPTION SYSTEM SPI GP10,GP11,GP12 OPTION SYSTEM I2C GP20,GP21 OPTION COLOURCODE ON OPTION CPUSPEED (KHz) 130000 OPTION LCDPANEL ILI9488W, RLANDSCAPE,GP8,GP15,GP9,GP13 OPTION GUI CONTROLS 5 OPTION TOUCH GP16,GP17 GUI CALIBRATE 0, 247, 3863, 1277, -869 OPTION SDCARD GP22, GP5, GP18, GP19 OPTION RTC AUTO ENABLE > > files A:/ <DIR> . <DIR> .. 21:36 14-01-2023 4 bootcount 2 directories, 1 file > > mkdir "Test" > > files A:/ <DIR> . <DIR> .. <DIR> Test 21:36 14-01-2023 4 bootcount 3 directories, 1 file > chdir "Test" Error : Could not find the path I'm stumped !! With best regards, Paul. Nothing so constant as change. |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
> files A:/ <DIR> . <DIR> .. 00:00 01-01-2000 4 bootcount 2 directories, 1 file > mkdir "Test" > files A:/ <DIR> . <DIR> .. <DIR> Test 00:00 01-01-2000 4 bootcount 3 directories, 1 file > chdir "test" Error : Could not find the path > chdir"Test" Error : Could not find the path > rmdir "Test" > files A:/ <DIR> . <DIR> .. 00:00 01-01-2000 4 bootcount 2 directories, 1 file > mkdir "test" > files A:/ <DIR> . <DIR> .. <DIR> test 00:00 01-01-2000 4 bootcount 3 directories, 1 file > chdir "test" > picomite with latest beta drive a: CHDIR only works with directory name in lower case. Other commands appear to work normally. Jim VK7JH MMedit |
||||
Bowden_P Senior Member ![]() Joined: 20/03/2019 Location: United KingdomPosts: 162 |
Hi TassyJim, Is that intended, or a bug ? I've just updated another Picomite from V5.07.06 to v5.07.07b2 :- > option list PicoMite MMBasic Version 5.07.06 OPTION SYSTEM SPI GP10,GP11,GP12 OPTION SYSTEM I2C GP20,GP21 OPTION CPUSPEED (KHz) 130000 OPTION LCDPANEL ILI9488W, RLANDSCAPE,GP8,GP15,GP9,GP13 OPTION GUI CONTROLS 5 OPTION TOUCH GP16,GP17 GUI CALIBRATE 0, 229, 3883, 1269, -870 OPTION SDCARD GP22, GP5, GP18, GP19 > > update firmware PicoMite MMBasic Version 5.07.07b1 Copyright 2011-2023 Geoff Graham Copyright 2016-2023 Peter Mather > option list PicoMite MMBasic Version 5.07.07b1 OPTION SYSTEM SPI GP10,GP11,GP12 OPTION SYSTEM I2C GP20,GP21 OPTION CPUSPEED (KHz) 130000 OPTION LCDPANEL ILI9488W, RLANDSCAPE,GP8,GP15,GP9,GP13 OPTION GUI CONTROLS 5 OPTION TOUCH GP16,GP17 GUI CALIBRATE 0, 229, 3883, 1269, -870 OPTION SDCARD GP22, GP5, GP18, GP19 > files A:/ <DIR> . <DIR> .. <DIR> Experimental Code 00:00 01-01-2000 4 bootcount 3 directories, 1 file > > chdir "Experimental Code" Error : Could not find the path > chdir "experimental code" Error : Could not find the path > I thought that everything was wiped on doing that !! I still cannot do anything with the added directory. With best regards, Paul. Nothing so constant as change. |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
My post was to confirm the bug. On the flash drive, you cannot CHDIR into a folder with any upper case letters in the name. This is a bug. The SDcard is OK. I am not sure when it appeared. All my testing on the new flash system was in lower case. To use the flash drive, keep your folders in lower case until the problem is resolved. When updating firmware, the existing file system and flash slots are usually preserved but not always so backups are strongly recommended. Jim VK7JH MMedit |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2442 |
historically, MSDOS and windows do NOT distinguish between upper and lower case in filenames (and by extension, directory names), and i assume this is still the case? linux (and osX?) do distinguish between upper and lower case, and treat eg "A" and "a" as completely different. i must say this is, on the whole, quite inconvenient! in MSDOS (ie, pre-1995), file and directory names were forced to uppercase by the operating system itself, and so there was no question over the problem. with the arrival of FAT32 and LFNs, i suspect this strict enforcement started to change a bit. now, the waters are likely somewhat murky with some responsibility pushed on the application program to ensure that it makes no distinction. someone who uses modern windows may wish to chip in here. cheers, rob :-) Edited 2023-01-15 12:05 by robert.rozee |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10310 |
The LittleFS file system is case sensitive (like linux). This is documented in the manual. However, I don't understand why CHDIR seems to have a particular problem - I'll look at it - perhaps I'm inadvertently converting the supplied directory name to lower case. In the meantime just make sure directory names are lower case. Use clean_flash to completely wipe a Pico if required. |
||||
Bowden_P Senior Member ![]() Joined: 20/03/2019 Location: United KingdomPosts: 162 |
Hi Jim, Rob and Peter, Thanks for your info. I had decided to run the "clean_flash" for a complete wipe, as I currently cannot use the added directory at all!! Case accuracy for names is not a worry for me - BASIC is generally case insensitive IIRC - but I'll go with what works! With best regards, Paul. Nothing so constant as change. |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |