Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: LPC2148 and words on odd addresses.

2006-04-29 by rtstofer

I had the same problem when I ported the FAT code from AVRLib to my
LPC2106 project.  I went with the non-portable approach:

struct bootsector710 {
    unsigned int     bsJump:24;
    unsigned char    bsOEMName[8]; 
    unsigned char    bsBPB[53];
    unsigned char    bsExt[26];
    unsigned char    bsBootCode[418];
    unsigned char    bsBootSectSig2;
    unsigned char    bsBootSectSig3;
    unsigned char    bsBootSectSig0;
    unsigned char    bsBootSectSig1;
#define BOOTSIG0        0x55
#define BOOTSIG1        0xaa
#define BOOTSIG2        0
#define BOOTSIG3        0
} __attribute__ ((packed));  <=== non-portable

I didn't have the ability to change the structure - that's the way the
data is set out on the disk.

These structs are defined and accessed in a single source file.  I can
live with it.

Richard

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.