Hi,
I have created an application and debugged it using the Simulator debugger. When the code accesses a register I get a Memory access error for that address. During my investigation I looked at the assembler listing I noticed that the instruction generated was for a 16- bit address. I was expecting the instruction to be a 32 bit address. Is this normal or have a setting incorrectly defined. I have created a work space defined around the H8S/2357F processor.
Many thanks for any advice.
Even in advanced mode H8S/2357 only supports 16MB address space with 24 bit addresses. See chapter 2.3 of the device hardware user's manual.
The processor has special addressing modes for the data area using 8 bit addresses (range 0xFFFF00-0xFFFFFF) or 16 bit addresses (range 0xFF8000-0xFFFFFF). So the processor only uses 32-bit addresses for const data access. See table 2-5 of the device hardware user's manual.
https://www.renesas.com/eu/en/doc/products/mpumcu/001/rej09b0138_h8s2357.pdf?key=8f2099e4634b02a052854399291a72fb
By default the simulator maps only some minimum memory. So the memory for the register area is not mapped.
The simulator does not simulate any of the special function registers. Simulation of special function registers can be done using special macros but it is quite slow and every single operation has to be programmed manually. It cannot be recommend to do this.
When you start writing to special function registers it is time to use an on-chip debugger and real hardware.