Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 16:30 09 May 2025 Privacy Policy
Jump to

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 : Interesting Output to console

Author Message
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 982
Posted: 02:29am 26 Mar 2025
Copy link to clipboard 
Print this post

I updated the date and time on a program on a PI Pico running 6.0001 and got this printout on the console. The 260325 132322 CTime=2 Valves=0 is expected the line after it unusual.
  Quote  260325 132322 CTime=2 Valves=0
D:\Dropbox\PicoMite\PicoMite\lfs.c:1969:warn: Unable to split {0x6b, 0x25}
                                                                         260325 132334 CTime=3 Valves=0


OA47
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2414
Posted: 02:55am 26 Mar 2025
Copy link to clipboard 
Print this post

Oops, wrong thread.
Edited 2025-03-26 12:59 by phil99
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 982
Posted: 03:59am 29 Mar 2025
Copy link to clipboard 
Print this post

I am getting this text back on my console during log printouts.
290325 145639 RTU Status for Port 3 VOF
290325 145642 RTU04VOF-0.3 Low Battery Voltage

D:\Dropbox\PicoMite\PicoMite\lfs.c:1969:warn: Unable to split {0x63, 0x71}
                                                                         290325 145642 RTU Status for Port 4 VOF


I am wondering if one of the authors of MMBasic might see the reference. Any thoughts Geoff of Peter?

OA47
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10062
Posted: 07:59am 29 Mar 2025
Copy link to clipboard 
Print this post

It's internal to the LFS file system and appears to relate to the flash disk itself being too full or to the file header area being too full or too fragmented

      // find size of first split, we do this by halving the split until
       // the metadata is guaranteed to fit
       //
       // Note that this isn't a true binary search, we never increase the
       // split size. This may result in poorly distributed metadata but isn't
       // worth the extra code size or performance hit to fix.
       lfs_size_t split = begin;
       while (end - split > 1) {
           lfs_size_t size = 0;
           int err = lfs_dir_traverse(lfs,
                   source, 0, 0xffffffff, attrs, attrcount,
                   LFS_MKTAG(0x400, 0x3ff, 0),
                   LFS_MKTAG(LFS_TYPE_NAME, 0, 0),
                   split, end, -split,
                   lfs_dir_commit_size, &size);
           if (err) {
               return err;
           }

           // space is complicated, we need room for tail, crc, gstate,
           // cleanup delete, and we cap at half a block to give room
           // for metadata updates.
           if (end - split < 0xff
                   && size <= lfs_min(lfs->cfg->block_size - 36,
                       lfs_alignup(
                           (lfs->cfg->metadata_max
                               ? lfs->cfg->metadata_max
                               : lfs->cfg->block_size)/2,
                           lfs->cfg->prog_size))) {
               break;
           }

           split = split + ((end - split) / 2);
       }

       if (split == begin) {
           // no split needed
           break;
       }

       // split into two metadata pairs and continue
       int err = lfs_dir_split(lfs, dir, attrs, attrcount,
               source, split, end);
       if (err && err != LFS_ERR_NOSPC) {
           return err;
       }

       if (err) {
           // we can't allocate a new block, try to compact with degraded
           // performance
           LFS_WARN("Unable to split {0x%"PRIx32", 0x%"PRIx32"}",
                   dir->pair[0], dir->pair[1]);
           break;
       } else {
           end = split;
       }
   }
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 982
Posted: 02:32am 30 Mar 2025
Copy link to clipboard 
Print this post

Thankyou Peter, I have cleared some files from the SD Card and I hope that will be the end of the message.

OA47
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2398
Posted: 12:17pm 30 Mar 2025
Copy link to clipboard 
Print this post

OA47: how full (as a percentage) was the SD card, and how much space (im Mb) was available?

Peter: could this error be trapped and/or returned as a meaningful error message of the form (for example) of "Drive D: has insufficient free space"?

if not trappable, given the enormous capacities of SD cards compared to the size/speed of the RP2040 and RP2350, perhaps MMbasic could impose a maximum usage of, for example, 95% of total capacity? i don't see such a limit causing any hardship.


cheers,
rob   :-)
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 982
Posted: 04:42am 02 Apr 2025
Copy link to clipboard 
Print this post

  Quote  how full (as a percentage) was the SD card, and how much space (im Mb) was available?


Unfortunately, when I type FILES I get,
4 directories, 3 files, 0 bytes free


But when I put the SD card into the PC I get
245MB free of 246MB


OA47
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4851
Posted: 05:51am 02 Apr 2025
Copy link to clipboard 
Print this post

Wauw,

That is an old SD card (from around 2002). 256Mb.....
Maybe it can't cope with the SPI clock speed PicoMite is using.

Volhout
Edited 2025-04-02 15:54 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10062
Posted: 06:58am 02 Apr 2025
Copy link to clipboard 
Print this post

We seem to be getting confused. The original error relates to the flash disk - drive A: and is nothing to do with the SDcard with is drive b and uses FatFS. That error only occurs in LittleFS used for the flash disk.
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 982
Posted: 07:17am 02 Apr 2025
Copy link to clipboard 
Print this post

  Quote  That is an old SD card (from around 2002). 256Mb....


Didn't I mention I don't throw away much 😁

OA47
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 982
Posted: 07:21am 02 Apr 2025
Copy link to clipboard 
Print this post

  Quote  We seem to be getting confused.


Your dead right there Peter. I have ported this program over from the F4 platform and it never occurred to me that I was writing to the FLASH and not to the SD card.

Guess I will have to modify the File PATH.

Is there an emoji to represent embarrassment whist eating humble pie?

OA47
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025