Bluetooth library example - possible error

In the agent-to-spiflash download example provided with the new bluetooth firmware lib, the initialisation of the filesystem states
sffs <- SPIFlashFileSystem(0x000000, 0x020000);

I haven’t tried it yet, but shouldn’t the start of the filesystem be above the space occupied for the Wifi firmware on IMP004m ? I initially thought the SPIFlashFileSystem may make abstraction of that, but can’t find references to such setup in the SPIFlashFileSystem lib code itself…

The space occupied by the Wifi firmware (as well as any other SPI areas used by the improm itself) is not exposed to Squirrel at all. It’s abstracted away before Squirrel even gets to see it.

Peter

Thx Peter.
That kind of makes it difficult to know how the ‘squirrel address space’ maps exactly to the physical address space.
As long as you stay within Squirrel, that’s no problem, but we were planning to pre-program the IMP004M’s SPIFI flash during production with other data next to the obligatory Wifi firmware d (Buetooth firmware, serials, default settings etc.). Such programming happens in the physical address space…
So 2 questions :

  • which physical address in the SPI flash does Squirrel Address’ 0x0 correspond to
  • can we be sure that this doesn’t change with upcoming ImpOS releases… (at least for the IMP004) ?

On imp004, Squirrel’s address 0x0 corresponds to 776kbytes, or 0xC2000. All memory from there to the top of the SPI flash is available to Squirrel.

And yes, this is guaranteed never to move in future improm releases. Moving it would clearly mess up everybody’s existing imps.

The fixed offset is different for different imp types, though: on imp003 it’s 448kbytes or 0x70000; on imp005 it’s 3448kbytes or 0x35e000; and on impC001 it’s 4096kbytes or 0x400000.

Peter