Sorry .. What's wrong is that if you compile, link, load and look
at the two structures the one located in flash has at least the first
two bytes endian-swapped in the flash structure compared with the
structure located in RAM. I looked at the listing and used
gpsim.

   The code is pulled from an 18f2550 build but I use 18f252
in gpsim and just load the hex file, run until it spins in
main() to get the RAM structure initialised. I, and I think
my USB host, kind of expected the first byte in the descriptor
to be it's length, 0x12, not 0x98 and that the two structures
look identical.

   Thanks for the snippet, Ernst, I've been trying to locate the
descriptors in flash a la uChip Demo code rather than in RAM
as your code seems to do.

regards, p

-- 
<=>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to