Hi
I also just checked your code:
#if 1
"LDR R0,=0x20001fff\n" //load initial value of stack pointer into R0
"MSR MSP,R0\n"//re-initialize stack pointer by new value
#endif
"LDR R0, =0x400ac044\n"//Address of register IOMUXC_GPR_GPR17
"LDR R1, =0xfaa5\n"//FlexRAM configuration DTC = 265KB, ITC = 128KB, OC = 128KB
"STR R1,[R0]\n"
The comments are incorrect and should be
"LDR R1, =0xfaa5\n"//FlexRAM configuration DTC = 128KB [2,3,4,5], ITC = 64KB [6,7], OC = 64KB [0, 1]
Since it is setting the stack pointer at 128k into the DTC, which will be OK after the FlexRAM change I see no problems (as the code is in assembler and there are no interrupts).
#if 1
"LDR R0, =0x400ac038\n"//Address of register IOMUXC_GPR_GPR14
"LDR R1, =0x980000\n"//New size configuration for the IOMUXC_GPR_GPR14 register
"STR R1,[R0]\n"
#endif
should however be
"LDR R1, =0x870000\n"//New size configuration for the IOMUXC_GPR_GPR14 register [128k DTC / 64k ITC]
although I don't know that it will be an actual issue.
If it isn't that it will more likely be that the following code tries to use a no longer existing bank in RAM so check that the linker scrip reflects the layout and it doesn't try to put variables (or heap) into non-existent banks.
I expect that the debugger will be able to break after the FlexRAM reconfiguration and then you can step to see where it subsequently fails.
Regards
Mark