-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
963c823
commit 4f57350
Showing
4 changed files
with
132 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,29 @@ | ||
# RAK3172 Flash IAP Example | ||
|
||
# BSEC BME688 Test Example | ||
Uses the internal flash as user data. This example uses first `245760` bytes as application and remaining `16384` bytes as user data that user can access. Some details about the size as follow: | ||
- Sector size: `2048` bytes | ||
- Application size: `sector size * 120` = `2048 * 120` = `245760` bytes | ||
- User data size: remaining flash space = `2048 * 8` = `16384` bytes | ||
|
||
Tested on: | ||
Below configuration needs to be enabled to limit the application size to specific size. Under `mbed_app.json` set the following: | ||
|
||
- Compiler ARMC6 | ||
- With/without sleep trace enabled | ||
- [BSEC2 Library](https://www.bosch-sensortec.com/software-tools/software/bme688-software/) | ||
"target_overrides": { | ||
"*": { | ||
"target.features_add": ["STORAGE"], | ||
"target.components_add": ["FLASH", "FLASHIAP"], | ||
"target.restrict_size": "0x3C000" | ||
... | ||
... | ||
} | ||
} | ||
|
||
## Acknowledgement | ||
Source code is based on https://github.com/Mircerson/AERQ | ||
`"target.features_add": ["STORAGE"]` and `"target.components_add": ["FLASH", "FLASHIAP"]` might be optional. | ||
`"target.restrict_size": "0x3C000"` limit the application size to `245760` bytes | ||
|
||
## TODO | ||
## Reference | ||
|
||
- [ ] Update BSEC library to use the latest version | ||
- [ ] Provide BSEC static library | ||
- `libalgobsec.a` for GCC_ARM | ||
- `libalgobsec.ar` for ARMC6 ( currently rename the .lib file to .ar from the BSEC library) | ||
- STM32WL55CC is Cortex-M4 | ||
- [ ] Implement simple AQI reader without proper sleep | ||
- [ ] Rewrite BME688 high-level library | ||
- [ ] Create a different repo for proper AQI reader with sleep | ||
The following are some good reference: | ||
- https://tronche.com/blog/2020/03/mbed-flashiap-tdbstore-and-stm32f4-internal-flash/ | ||
- https://os.mbed.com/docs/mbed-os/v6.16/program-setup/creating-and-using-a-bootloader.html | ||
- https://forums.mbed.com/t/how-can-i-provision-a-persistent-array-of-int-in-flash-memory-and-access-it-as-an-array-of-int-from-mbed-c/6927/8 | ||
- https://forums.mbed.com/t/saving-config-data-with-flashiap-on-stm32l476rg-isnt-persisting-the-data/14721 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters