Hi Raman,

thanks for the report!

> 2) I assumed step-1 should be sufficient but I ran into an "Unaligned
> memory" fault
> when I executed the build with step-1 alone. I then introduced variable
> attributes for
> `Rom' and `Ram' (included in main.c).
> 
> any const Rom[] __attribute__ ((aligned (8))) = {
>    #include "rom.d"
> };
> 
> any Ram[] __attribute__ ((aligned (8))) = {
>    #include "ram.d"
> };

I see that the original has in these cases

   any const __attribute__ ((__aligned__(2*WORD))) Rom[] = {

Does this make any difference? After all, I would expect 'WORD' to be 4
on a 32-bit machine.



> any plisp_pio_pin_setdir(any ex) {
>    any x, y;
>    // Some code here
> 
>    x = cdr(x);
>    NeedSym(ex, y = EVAL(car(x)));
>    char s[bufSize(y)];
>    bufString(y, s);
>    ret = pio_value_parse(s);
>    PIO_CHECK(ret);
> 
>    plisp_pio_gen_setdir(ex, NULL, ret, PIO_PIN_OP, dir);
>    return Nil;
> }
> 
> I would then invoke my function like this:
> (pio-pin-setdir *pio-output* 'PB_29)
> 
> Strange, but it looks like a part of 'PB_29 is getting stripped somehow.

Perhaps a stack problem? Also, I'm not sure if allocating 's' in the
middle of a code body is right. I always did that in an explicit code
block { .. }, but perhaps current C versions can handle this.

Perhaps you can debug what string exactly you get in 's'?

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe

Reply via email to