21.01.2014 Views

3.22EjemploDRM007 Co..

3.22EjemploDRM007 Co..

3.22EjemploDRM007 Co..

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Source <strong>Co</strong>de<br />

Include Files<br />

#pragma DATA_SEG FAR _STARTUP<br />

#ifdef __ELF_OBJECT_FILE_FORMAT__<br />

/* ELF/DWARF object file format */<br />

/* attention: the linker scans the debug information for this structures */<br />

/* to obtain the available fields and their sizes. */<br />

/* So dont change the names in this file. */<br />

extern struct _tagStartup {<br />

unsigned char flags; /* STARTUP_FLAGS_xxx */<br />

_PFunc main; /* top level procedure of user program */<br />

#ifndef __NO_STACK_OFFSET<br />

unsigned short stackOffset; /* initial value of the stack pointer */<br />

#endif<br />

unsigned short nofZeroOuts; /* number of zero out ranges */<br />

_Range *_FAR pZeroOut; /* vector of ranges with nofZeroOuts elements */<br />

_<strong>Co</strong>py<br />

*_FAR to<strong>Co</strong>pyDownBeg; /* rom-address where copydown-data begins<br />

*/<br />

#if 0 /* switch on to implement ROM libraries */<br />

unsigned short nofLibInits; /* number of library startup descriptors */<br />

_LibInit<br />

descriptors */<br />

#endif<br />

#if defined(__cplusplus)<br />

unsigned short nofInitBodies;<br />

*/<br />

_Cpp<br />

C++ constructors */<br />

#endif<br />

} _startupData;<br />

#else<br />

*_FAR libInits; /* vector of pointers to library startup<br />

/* number of init functions for C++ constructors<br />

*_FAR initBodies; /* vector of function pointers to init functions for<br />

extern struct _tagStartup{<br />

unsigned flags;<br />

_PFunc main; /* top procedure of user program */<br />

unsigned dataPage; /* page where data allocation begins */<br />

long stackOffset;<br />

int nofZeroOuts;<br />

_Range *_FAR pZeroOut; /* pZeroOut is a vector of ranges with nofZeroOuts<br />

elements */<br />

long to<strong>Co</strong>pyDownBeg; /* rom-address where copydown-data begins */<br />

_PFunc *_FAR mInits; /* mInits is a vector of function pointers, terminated<br />

by 0 */<br />

_PFunc *_FAR libInits; /* libInits is a vector of function pointers,<br />

terminated by 0x0000FFFF */<br />

} _startupData;<br />

#endif<br />

BLDC Motor <strong>Co</strong>ntrol Board for Industrial and Appliance Applications<br />

DRM007<br />

MOTOROLA Source <strong>Co</strong>de 109

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!