[En-Nut-Discussion] protecting memory from NutOS

Hugo Simon hugo.simon at gmx.de
Mon Feb 27 18:46:27 CET 2006


> On Ethernut 2 however, this memory is used. So I assume you
> are talking about Ethernut 1, right?
I talk of both. I have an old 1.1 laying around, but maybe it is too slow.

It seems I misunderstood the memorymap of the Ethernut at first.
Please tell me if I am wrong.

Ethernut 1:
0000..7fff  RAM (overlayed partly by AVRs internal RAM)
8000..ffff  Ethernet Controller

Ethernut 2: Don't know if this is right, is there a documentation somewhere?
0000..7fff  RAM (overlayed partly by AVRs internal RAM)
8000..afff  banked RAM
b000..ffff  Ethernet Controller

As I interpret this, with none of both Ethernuts I have a free memory area.
I see two solutions to that:

1. alter the memory decoding scheme to free a block of the mirrored Ethernet
controller, but I don't know how to do this without doing much modifications
to the board. If Ethernut 1 has a free memory area that would be best.

2. add my hardware to the addresses 7000..ffff and only doing write accesses
to the external hardware. So the screen memory lies behind the official RAM.
If I do a write access to that area I write to both, the onboard and the
addon RAM. If I read I get the data from the onboard RAM which is ok since
this holds a copy of the external RAM. With this method I have to tell the
compiler somehow to set his memtop to 6fff. And then I can initialize a
pointer with 7000 and access my hardware there.

Maybe there is a third method.
Adding an addresscounter to my external hardware and copy an onboard memory
area to the external RAM by doing some port writes, incrementing the address
counter with every write. Not very nice but maybe the simplest solution.

Any other ideas?

Thank you
Thorsten

>
> Harald
>
>
> At 06:07 27.02.2006 +0100, you wrote:
> >Hi,
> >
> >I built a memory mapped device which occupies the addresses from 0xb000
to
> >0xffff. So it lay "behind" the external memory of the Nut (AVR version).
> >This ist no problem because it's a write-only display memory of an LED
> >display.
> >
> >How can I protect that memory from being used by NutOS and how can I
define
> >an array that lies at that address range or maybe a pointer pointing to
it?
> >
> >Thank you
> >bye
> >Thorsten
>




More information about the En-Nut-Discussion mailing list