fs_format E_Busy


I am trying to tweak an old application to do something extra.
Using a 15 year old laptop I am actually capable of transferring compiled code and do some debugging.

The extra stuff I want this thing to do is use its flash capability.
I have modified the RabbitBios.c file to define the required XMEM_RESERVE_SIZE to 0x2000 and set the associated FS2_USE_PROGRAM_FLASH to 8.

The init etc… works but the fs_format function returns EBUSY when it tries to format the flash for the first time.

So: can anyone point me in the right direction to get this right ?

Well, at least I found how to do this one.

The original software to handle the flash was based on Dynamic.c V 7.33.

My application uses Dynamic C 9.01.

There is a difference: in 9.01you can’t try to read and simply format the flash when the read fails, which was possible in version 7.33.

To make the fs_format function work there must be an additional “fs_init” between the failed read and the “fs_format”. Then the “fs_format” gets the job done.