How to make section can be written

Hi alls, 

I am going to make a scripts to execute automation test.

I am creating a memory map of the CPU.

In the CPU, there is reserved area. When using simulator and write data to it: "error: [PC=0x2ee2] Invalid memory write to address 0x4004a000" is shown and the code is stuck at the writing line.

when using actual device, the issue did not occur. 

I think the issue may relate with my linker scripts but I do not find any solution. 

Can anyone help me?

Thanks