Part Number: TMS570LC4357
I am writing a bootloader for the TMS570LC437 which fits into 64 kB.
The IAR linker is configured to to fill any unused locations with 0xFF from 0..0xFFFF.
The map file shows there is nothing beween 0x10000 and 0x3FFFFF (end of flash).
The bootloader is downloaded to the flash using the IAR debugger.
The mechanism to program the flash is the standard IAR Flashloader,
which uses the F021_API library.
The result is that the flash sector following the bootloader (0x10000 to 0x1FFFFF) is all zeroed out.
If I set the linker to fill from 0x0 to 0x1FFFF, reserving 128kB for the bootloader,
the third flash sector (0x20000 to 0x2FFFFF) is all zeroed out.
====
The bootloader expects the application to reside in the flash sector following the bootloader.
If I link the application to 0x10000 with a 64kB bootloader, any code in the second
flash sector (0x10000 - 0x1FFFF) fails to program, since the contents are
all read out as zero.
====
Is the FAPI library doing something funny, like disabling flash sectors?
There is the Flash Bank Sector Enable Register (FBSE).
If the Flash Bank Sector Enable register somehow is used to disable a sector, then this could explain the symptom.
It is not explained in the reference manual what happens if you read from a disabled sector.
Will you get an abort, or will you read a fix value (like 0x00)?
I can also think about that the MPU generates problems.
I do not see whyt it should though.
Any other ideas what might go wrong?