Closed elsalahy closed 3 years ago
This is how people write to external flash without any files system (using our new APIs)
uint8_t bufferR[4] = {0, 0, 0, 0};
uint8_t bufferW[4] = {1, 1, 3, 3};
GNSE_Flash_Write(0x1EFFFE, 4, bufferW);
GNSE_Flash_BlockErase(0x1EFFFE, 2);
GNSE_Flash_Read(0x1EFFFE, 4, bufferR);
GNSE_Flash_Write(0x1EFFFE, 4, bufferW);
GNSE_Flash_BlockErase(0x1EFFFE, 1);
GNSE_Flash_Read(0x1EFFFE, 4, bufferR);
@marnixcro it seems there is an issue when the external flash is initialized twice causing the system to hang, so I opened #173 and will fix it later.
@johanstokking mainly check if you approve of using the SPIFFS APIs/ library. I find it useful but need another opinion on the subject.
@johanstokking mainly check if you approve of using the SPIFFS APIs/ library. I find it useful but need another opinion on the subject.
What's the alternative? Why choose this?
I'm not against it, but it doesn't seem maintained (https://github.com/pellepl/spiffs/graphs/contributors) and nobody seems to be actively triaging quite a bunch of issues.
@johanstokking
What's the alternative? Why choose this?
There isn't a lot of alternatives. The guys at Mbed OS used the same lib and did a good explanation of why it's useful here. The features mentioned are perfect for the GNSE and I did some testing to confirm functionality.
I'm not against it, but it doesn't seem maintained (https://github.com/pellepl/spiffs/graphs/contributors) and nobody seems to be actively triaging quite a bunch of issues.
Yes I understand, nothing we can do about maintaining it, but the current feature set is enough for us and there is no breaking issues preventing us from not using it.
Summary:
This PR adds support for SPIFFS and this will allow us to easily write to external flash without worrying about mapping.
This is useful in debugging/logging sensors and update client
Relates to #160 #82 #75
Changes:
Notes for Reviewers:
You can test this using this code snippet
Release Notes: (optional)
...