Compilation Settings


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.


  • Are you running the simulator in Normal Mode or Advanced Mode? The simulator should be set for H8S/2000A
  • 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.

    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.

  • In reply to FrankL:

    Many thanks for the update. I would just to to confirm if I have understood your comment re addressing modes. I have a statement:

    This compiles down to:
    MOV.B R4L,H'00FFFED0:16 resulting in the sequence 6A8CFED0

    From what you are saying, the MCU interprets this correctly as the ABWCR register?

    I have some object files of the app I'm trying to recreate and it produces an opcode:


    This has led to my confusion. Is there any reason as to the difference in opcodes?
  • In reply to FredBear:

    6A8CFED0 - MOV.B R4L,H'00FFFED0:16 - Save 8 bit data from register R4L to address 0xFFFED0 using 16 bit address
    6AAE00FFFED0 - MOV.B R6L,@H'00FFFED0:32 - Save 8 bit data from register R6L to address 0xFFFED0 using 32 bit address

  • In reply to FrankL:

    Hi, in relation to your last comment about debugging my code, I wonder if you could advise on which kit I need. I have been given an E8a module which I cannot connect to a legacy production unit. We are currently using the H8S/2357 which I believe has been superceded by another device which can be fitted instead of the 2357 as it is a pin for pin replacement. Any advice would be appreciated. Many thanks
  • In reply to FredBear:

    As far as I know there is no pin compatible replacement for H8S/2357.
    H8S/2357 should only be used by companies who already have a working design for this device and only have to do small modifications.
    For new designs it is better to switch to RX devices.
    I don't understand what you mean by "I have been given an E8a module which I cannot connect to a legacy production unit". Do you want to use E8a as production programmer? E8a is in the first place an on-chip debug unit. For a development environment it can also be used as flash programmer. Use of E8a as production programmer is not recommended. For production programming it is better to use equipment from programmer manufacturers like BPM Microsystems, Data I/O, Elnec, Hi-Lo Systems, ... .
  • In reply to FrankL:

    Hi, thanks for the update. I assumed that the E8a was connected between the HEw debugger and the prototype hardware which has the code loaded so that you could control the debugging process. I may have miss- understood the process here.
  • In reply to FredBear:

    E8a cannot be used as in-circuit emulator for H8S/2357. It can only be used as flash programmer for this device.