#14 Flat24: can't reliably pass BYTE * to function

closed-works-for-me
5
2000-09-25
2000-06-29
No

Program snippet goes along the lines of;

void c(BYTE *pkt)

{

}

main(..)

{
BYTE *packet_data;
long int c;

packet_data=packet->packet_data;

/* c=(long int)packet_data; */
foo(packet_data);
}

The value passed to foo is corrupt if the assignment (in /* */) isn't made. In my code the corrupt case uses registers (r2-r5) to hold the value of packet_data, in non-corrupt case it gets value from scratchpad.

Code can be sent on request.

Compilation line is;

--model-flat24 --stack-after-data --stack-10bit --code-loc 0x010000 -xram-loc 0x10080 -Wl-rk/usr/local/share/lib/flat24

MUBES
dmarples@iee.org

Discussion

  • Kevin Vigor

    Kevin Vigor - 2000-09-14
    • assigned_to: nobody --> kvigor
     
  • Kevin Vigor

    Kevin Vigor - 2000-09-14
    • labels: 101550 --> ds390 target
     
  • Kevin Vigor

    Kevin Vigor - 2000-09-25
    • status: open --> closed-works-for-me
     
  • Kevin Vigor

    Kevin Vigor - 2000-09-25

    Can't duplicate this problem; closing for now with approval from mubes.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks