When a file is opened with update mode ('+' as the second or third character in the mode argument), both input and output may be performed on the associated stream. However, the application shall ensure that output is not directly followed by input without an intervening call to fflush() or to a file positioning function (fseek(), fsetpos(), or rewind()).
Unfortunately, the example has an ftell between a read and a write, which will cause the data to be flushed on GCG + IAR, but not on ARMCC.
per the open group documentation (here):
Unfortunately, the example has an ftell between a read and a write, which will cause the data to be flushed on GCG + IAR, but not on ARMCC.
should resolve https://github.com/ARMmbed/mbed-os-example-filesystem/issues/16 cc @kegilbert, @cmonr