Memory problems - "outside the effective address range"

Hi There.

First of all. My hardware is a RSKM16C62P Starter Kit including the E8 emulator/debugger.


My problem occurs when I try to download a module to the µC.

I am getting the following error messages:

Memory area error. It is outside the effective address range.

Memory area error. It is outside the effective address range.

Some basic facts I dont understand (concerning the errors):

> What memory is ment. RAM or ROM?

> What is outside the effective address range? My Code?

My µC has:

512kB + 4kB of ROM which lies at 80000h - FFFFFh

31kB of RAM at 00400h - 07FFFh


Something else I am not sure about:

> FFFFFh - 80000h = 7FFFF = 524287 Bytes

> it seems that there is in fact more ROM than the datasheet says. How can it be?

> The same concerns the RAM. Its size is about 31743 Bytes


In HEW under Link/Library -> Category: Section

0x000F0000 program_S

> does it mean that my code will be flashed at this address?

> if yes I think its ok. It will be placed into ROM. Or not?


When connecting to the E8 under emulator setting I have to specify the firmware location (what firmware is that?)

Program and Work-RAM

> What to set up here? Which memory addresses?



  • 1) It probably means your code (not RAM) has linked addresses outside the range of the selected device.

    2) 1kB == 1024 bytes (2 to the 10th). 512kB == 524,288. Addresses 0x80000 through 0xFFFFF represent 0x80000 bytes (don't forget to include the first and last addresses!), or 512kB.

    3) Can't answer - I don't build within HEW. However, that looks like the starting address where HEW would be linking your "ROM" code/data. It's the top 64kB of a 20-bit address space, which is the top 64kB of the M16C/62P family.

    4) When you connect HEW / E8a to the target, the "Firmware Location" tab refers to the ROM/RAM addresses where HEW will load its required code, and where HEW will expect free RAM for its use. Generally, I use the top available addresses for the device I'm using (since my code/data use would start at the bottom). You should be OK setting those fields to: Program = FF800  Work RAM = 7F80. However, you'd need to check your startup code and linker scripts to make sure you won't have code and/or stack above those addresses.

  • Thank You!

    Finally I got it working.

    I specified the addresses for the E8 firmware as following:

    Firmware Address: 0xA0000

    Work RAM: 0x63F0

    They are situated at the end of ROM and RAM respectively.

    Dont know how much space the E8 firmware needs and maybe I could youse even higher addresses.

    Right now my own code doesnt need much space itself so I dont have to optimize here i think.



    PS: please correst me if I´m wrong.

  • I would probably link my code so that it starts at 0x80000. That way, it can continue to grow upwards to the limit of the device. I would set the emulator's "Firmware address" and "Work RAM" so that they're at the very end of the two memory regions. The emulator needs 2kB of code space and 128 bytes of RAM. In the 512kB/31kB device, the appropriate settings are 0xFF700 and 0x7F80, respectively.