Is it possible to slim down the REED OTA client demo software to use the internal flash of the 512kB KW21z? My understanding is that the program would have to be less than half the size of the available flash. Currently the complied program is too large to allow for an OTA update.
Thank you in advance,
Charlie
Solved! Go to Solution.
Hi Charlie,
Using a REED it is difficult to use internal flash for OTA because we have the following:
1. Product data sector [2k]
2. NVM - [64k] - (32 sectors);
3. Image area - [430k]
4. Bootloader [16k]
With internal flash for OTA, your image should be placed in a 215k flash, and by default, our REED_ota image has around 240k in release mode. You can start by disabling some modules, like shell module (by disabling THREAD_USE_SHELL) to reduce the size with @20k and continue with the LED module (gLEDSupported_d -> another @3k) ...
If this device is not intended to be a commissioner you can comment the code form APP_Commissioning_Handler (switch handler and let only to free the buffer...) -> this will reduce the library code with @3k....
The recommendation will be to look at the map file and see what files/modules could be reduced/optimized.
As an observation, to enable the internal flash, you should set the following:
1. in config.h file:
#define gEepromType_d gEepromDevice_InternalFlash_c
2. in Project Options - > Linker-> Symbol set the UseInternalStorageLink_d=1
Regards,
Ovidiu
Hi Charlie,
Using a REED it is difficult to use internal flash for OTA because we have the following:
1. Product data sector [2k]
2. NVM - [64k] - (32 sectors);
3. Image area - [430k]
4. Bootloader [16k]
With internal flash for OTA, your image should be placed in a 215k flash, and by default, our REED_ota image has around 240k in release mode. You can start by disabling some modules, like shell module (by disabling THREAD_USE_SHELL) to reduce the size with @20k and continue with the LED module (gLEDSupported_d -> another @3k) ...
If this device is not intended to be a commissioner you can comment the code form APP_Commissioning_Handler (switch handler and let only to free the buffer...) -> this will reduce the library code with @3k....
The recommendation will be to look at the map file and see what files/modules could be reduced/optimized.
As an observation, to enable the internal flash, you should set the following:
1. in config.h file:
#define gEepromType_d gEepromDevice_InternalFlash_c
2. in Project Options - > Linker-> Symbol set the UseInternalStorageLink_d=1
Regards,
Ovidiu