AnsweredAssumed Answered

SPIFI flash loader troubleshooting

Question asked by on Aug 29, 2018
Latest reply on Aug 31, 2018 by


I am using the Hitex LPC4350 (flashless) evaluation board. I would like to have my code running from the (external) SPI flash chip that is on the devboard (Spansion type, should be supported since I found several examples for this specific board). I am working in IAR, I found a pre-written flash loader for SPIFI that should work with my setup, but I am having a hard time getting it working.

In my linker file I tried placing the readonly section of my code at the address of the SPIFI memory that is in the manual (0x1400 0000) and the readwrite, cstack and heap sections in SRAM. However, when I try to flash, an error pops up saying the flash loader tries to write outside the flash memory (giving 0x1400 0000 as invalid address). The SPI flash peripheral is mapped to address 0x0000 0000 (shadow register), but if I understand correctly the shadow register can only be used for read operations, so the flash loader should not be able to write any code to that address.


I also looked at the code of the flash loader itself, but there's not really any useful comments on how to use it. In the readme it says that the flash loader expects the application to be linked at address 0x000 0000, but I'm not sure what that means, since this is not a valid location to store my application before it gets programmed in flash. I've been working on it for a while now, but I can't get it working and I'm not sure how to continue now. Does anybody have an idea of where to start from here?