I am writing a custom bootloader, such that the bootloader code all resides in one flash segment, and the remaining flash area is upgraded with new code (from an external serial flash).
I am using the F021 Flash API, and it almost works. After DSP restart, I am able to erase each flash segment, and I am able to reprogram (and verify) almost all of the flash. There is a particular flash area -- all within one segment, and only a partial portion of that segment, that the Fapi_issueProgrammingCommand always returns Fapi_Error_AsyncIncorrectDataBufferLength.
My data buffer lengths are constant (8 bytes), and as I wrote much of Flash is successfully reprogrammed, so this error must also have other meaning -- can you detail what other causes for this error might be?
Also I assume this is relevant, but I don't know why yet -- the programming errors start at the address associated with .text, which is also RamfuncsLoadEnd. I wonder if there is some FlashProtection module that is locking me out of this area. Note, nothing is running from this area at this time (I relocated c_int00 and args_main to be sure).
Thanks,
Jim