--- In lpc2000@yahoogroups.com, Jan Thogersen <jan@...> wrote: > > I went for the quick fix... The pragma packed worked just fine! > Glad to have been of help, and that you have it working. It really comes down to the extent, size and structure of the software which is the "best" approach (if such a thing ever exists). For example, if you have a lot of code that uses the data structure, and only one or two places where it has to be copied to an external system (flash card, comms link etc.) than it's probably worth going through the pain of producing byte stream encoding/decoding functions. That way the code will work reasonably efficiently, and more importantly will work on any target with any compiler (works with any "endian" system, too, which packing can't sort out). If on the other hand the structure is very localised to a piece of code that does the actual copy to/from the external device/system, you may as well take the simple approach, using "packed" pragma or modifier, testing to make sure all is well on each system. Brendan
Message
Re: LPC2148 and words on odd addresses.
2006-04-29 by brendanmurphy37
Attachments
- No local attachments were found for this message.