Is there any way to tell, in code, if the sector erase size of a part is 512 or 1024 bytes? I know of at least one part in the B family that has a 1024 sector erase size and I need my bootloader to be compatible with 512 or 1024 byte parts.
The only way to keep this sector size is to make a table, which is not very efficient. Best bet is to use #defines and configure the sector size in the pre-compile stage.
I can ID the micro, but I would need a list of micros that have 1024 byte sector sizes. I was looking for something that I could use to tell what the size of the flash sector was without knowing what micro was being used.