Skip to content
btsimonh edited this page Feb 28, 2022 · 4 revisions

This page outlines the flash layouts of the various devices supported by OpenBK7231T_App

BK7231 (all except N?)

'Official' partitions: (from BkDriverFlash.c)

"Bootloader" - 0x00000000 - 0x11000, //68KB
  Last 0x1000 is some kind of application header written by the bootloader after OTA
"Application" - 0x11000 - 0x132000,//1156KB
"ota" - 0x132000 - 0x1C8000, //600KB
  This area can be shared with the littleFS filesystem when OTA not in progress.  
  FS can be backed up and restored if using the webapp upgrade.
"RF Firmware" - 0x1e0000 - 0x1e1000 // 4KB - don't lose this one - calibration data?
"NET info" - 0x1e1000 - 0x1e2000,// for net related info - we use this for configuration
  Note: all 'static' config to go in here, use flash_config.c functions.
  e.g. pins config is here....

Areas not listed in Beken partition table:

"Unknown net stuff" - 0x1e2000 - 0x1e3000 // 4kbytes - Beken SDK writes SSID here with other stuff? 'fast reconnect?'
"flash Vars" - ours - 0x1e3000 - 0x1e5000 // 8kbytes - Flash Variables area (boot count, etc.)
  the address is set as ('End of Net Info' + 0x1000) in flash_vars.c
  Designed for many writes.  Only erases once we've filled 8k.
  variables are found by search from the end at boot.
  pls keep the variable structure small.

There are Tuya logs later in flash, plus info in the last sector or two which is unknown.