INTL 3:770/1 3:770/3   
   REPLYADDR JL@gct.com   
   REPLYTO 3:770/3.0 UUCP   
   MSGID: <6bntejlmcn474a4upiog3rc8seqcqi6e7p@4ax.com> caa63941   
   REPLY: 970c8166   
   PID: SoupGate-Win32 v1.05   
   CHRS: LATIN-1 2   
   XPost: sci.electronics.design   
      
   On Sat, 21 Sep 2024 09:12:06 +0100, The Natural Philosopher   
    wrote:   
      
   >On 20/09/2024 19:00, john larkin wrote:   
   >> On 20 Sep 2024 11:30:13 +0100 (BST), Theo   
   >> wrote:   
   >>   
   >>> In comp.sys.raspberry-pi The Natural Philosopher    
   wrote:   
   >>>> On 19/09/2024 23:09, Lasse Langwadt wrote:   
   >>>>> On 9/18/24 00:33, john larkin wrote:   
   >>>>   
   >>>>>> It looks like a USB memory stick. You can delete or add files if you   
   >>>>>> want.   
   >>>>>>   
   >>>>>> It boots CPU 0 (the one we call Alice) from a file with the extension   
   >>>>>> .UL2   
   >>>>>>   
   >>>>>> Why .UL2 one wonders.   
   >>>>>>   
   >>>>>> We'll put a bunch of files into the flash. Code for Bob, the 2nd CPU.   
   >>>>>> An FPGA bitstream file. A prototype calibration table. A README file   
   >>>>>> to explain everything in plain English.   
   >>>>>   
   >>>>> sure it's not UF2?   
   >>>>>   
   >>>>> https://github.com/microsoft/uf2   
   >>>>>   
   >>>>>   
   >>>> Definitely uf2 here.   
   >>>>   
   >>>> And no, you cannot 'delete or add files' to it.   
   >>>> The action of pretending to download a uf2 file into what appears to be   
   >>>> an empty drive, erases everything on it and programs the flash.   
   >>>>   
   >>>> There are no visible files to delete.   
   >>>   
   >>> Neat. So basically you throw some files at it, which causes a series of   
   >>> block writes. UF2 picks out specially tagged block writes and uses that to   
   >>> program the flash. It doesn't actually care what other stuff is written to   
   >>> the flash as it ignores all of that, so it doesn't care about all the FAT   
   >>> stuff or whatever junk your OS decides to put on there.   
   >>>   
   >>> Means you can write any kind of files to it and it'll only pay attention to   
   >>> the specific tagged blocks. If the OS is happy to cache the medium (as   
   many   
   >>> do) you could maybe even reformat it as some other filesystem like NTFS and   
   >>> it would still handle writing the UF2 file correctly.   
   >>>   
   >>> Theo   
   >>   
   >> My Pi guy says that you can only write one file, and the act of   
   >> writing that file wipes anything that was there before. So the flash   
   >> probably doesn't have a file structure, and the USB memory-stick write   
   >> is, well, a sort of cheap trick.   
   >>   
   >> That's workable, if inelegant. We can pack everything we need into   
   >> that one big file and users can upgrade box code in the field pretty   
   >> easily.   
   >>   
   >   
   >It gets nastier if you want to preserve config info across reboots.   
   >It is possible to read and write areas of flash from the code, but its   
   >no picnic.   
   >And it gets wiped when new code is uploaded   
   >   
   >   
   >It is an area I will have to tackle for one project tho.   
      
   Yes, writing to flash from the running application is nasty.   
      
   We have to calibrate each box. We'll store the prototype calibration   
   table inside the big flash image. At factory test, we'll grab that,   
   edit it for this particular unit, and save it to a small SPI eeprom   
   chip. That costs 24 cents and one chip select pin.   
      
   My guy says that there are a few magic integers at the start of the   
   UF2 file that identifies it, well, as a UF2 file. That confirms that   
   the Pico flash doesn't have a file structure, it just stores one giant   
   chunk of stuff starting at the start.   
      
   It's Windows who lies about it acting like a USB memory stick that   
   stores files.   
      
   We did consider saving the real cal table at some fixed physical   
   address near the end of the flash , on the theory that nobody will   
   ever write a bootable image that big. That might work.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)   
   SEEN-BY: 90/1 105/81 106/201 129/305 153/757 7715 218/700 840 220/70   
   SEEN-BY: 221/1 6 242 360 226/17 30 100 227/114 229/110 111 114 200   
   SEEN-BY: 229/206 300 317 400 426 428 470 550 616 664 700 230/0 266/512   
   SEEN-BY: 267/800 280/5003 282/1038 291/111 292/854 2226 8125 301/1   
   SEEN-BY: 310/31 320/219 322/757 335/364 341/66 342/200 396/45 410/9   
   SEEN-BY: 423/81 460/58 633/280 712/848 770/1 3 100 330 340 772/210   
   SEEN-BY: 772/220 230 5020/400 5058/104 5075/35   
   PATH: 770/3 1 218/840 221/6 1 292/854 229/426   
      
|