Hello loudpotato,
Sorry for my last comment.
For LPC845, I think this code for enable SRAM is wrong. maybe this is just copy from other part, for example LPC546xx, enable SRAM register address is 0x40000220 as below:
Alice_Yang_0-1621306469590.png
For LPC845, address should be 0x4004 8080, while it enabled by default, so the demo also can work well, see below:
Alice_Yang_1-1621306587875.png
Hope it can help you.
BR
Alice