From: Stefano Priore on
On 2 Apr, 18:33, "Claudio Lapilli" <pleasedonts...(a)isp.com> wrote:
> On Apr 2, 4:28 am, "Stefano Priore" <Stefano.Pri...(a)gmail.com> wrote:
>
> > Hmm, there are still some bugs to iron out in FMAN...
>
> Not that I know of... let's see:
>
>
>
> > 1) CUT doesn't work correctly: it performs always a COPY
>
> It works correctly. Look next to the name of the original object,
> you'll see a "D" indicating it's a deleted object when you use cut.

Geez, I tested it on an already deleted object (just for curiosity!)
and obviously didn't detect the behaviour you described ;)

> > 2) When I pack some banks the program errors out with a "EVAL: Bad
> > Argument Value" error. It must be noticed that I run FMAN putting it
> > on the stack and pressing EVAL. After the error FMAN is still on the
> > stack and no memory looks corrupted.
>
> If you get an error is because the operation failed, most likely
> because you don't have enough memory to do the packing, but it could
> happen that your bank is corrupted somehow and it's giving you an
> error.

I suspect some form of corruption, but what do you mean with "not
enough memory": memory in a bank, or whole memory?

> It's an assembler program dealing with low-level stuff, so if
> you see an error messsage it's because the condition was detected and
> the error delibratedly generated, no data corruption should occur in
> such case. The stack is restored to what it was when you called the
> program, as in any error condition. So this is not a bug, it's an
> error condition properly dealt with.

The error management worked flawlessly, but maybe you could use a more
descriptive error message...

> Still, I don't know what could be wrong with that specific bank,
> though. Try deleting all objects first, then repack.

OK, will do!

Ciao,

Stefano

From: Claudio Lapilli on
Hi,

On Apr 3, 4:16 am, "Stefano Priore" <Stefano.Pri...(a)gmail.com> wrote:

<...>
>
> I suspect some form of corruption, but what do you mean with "not
> enough memory": memory in a bank, or whole memory?

I mean main memory. The process of repacking a bank requires copying
all non-deleted libraries in the bank to ram, then erase the flash
memory and rewrite all your libs back. If your bank is full, you would
need up to 128 kbytes of free ram to perform a repack.

<...>

>
> The error management worked flawlessly, but maybe you could use a more
> descriptive error message...

Well, there are many possible causes for the error, and all I get is a
"carry set" for all of them, so a message would probably not represent
the real cause anyway. The message "Bad argument value" was chosen
because the routine receives the bank number as an argument on the
stack, and one of the most common causes are that the bank number is
invalid (outside the normal range). Now that I added the interactive
part, you obviously can't choose the wrong bank anymore, but the
message remained the same. You shouldn't see the message very often
under normal conditions, though.

Claudio