I am struggling to figure out why I can't write on the Peripherals memory to set a function. In this case I am trying to write in the 0x4000250C which is UART0, PSELTXD (Pin select for TXD), but it doesn't change the memory value using gcc on emIDE and Em::Blocks but using Keil it writes (I can write normally in RAM region using every IDE). The assembler code looks equivalent. I think I may be forgetting some compile parameter or it needs a special command to write or whatever. Attached are the pictures and the source code for emIDE if someone can help.