Hi Gudjon,

thanks for providing the nice header file!)

It could go in "as is".



Yet I want to draw your attention to the latest
NXP/Philips header file distributed with SDCC:
http://svn.sourceforge.net/viewvc/sdcc/trunk/sdcc/device/include/mcs51/P89LPC925.h?view=markup

This most modern format which #includes <compiler.h>
allows to use the _same_ header file for quite a few compilers
(SDCC, Keil, Raisonance, IAR, Hi-Tech, Tasking, Crossware, Wickenhäuser)

While it may or may not be in our best interest to provide
such an easy path to walk away from SDCC and use another
compiler we (naturally I can only speak for myself but I
think this is consensus) want to push that format.

It gives users more freedom, avoids duplicate work,
and may lead to more (and/or more reliable) header files.



I'm not sure whether this has been mentioned previously but with
this format one should _also_ be able to derive an assembly
include file (*.inc file) semi-automatically from a C-header
file:

Adapt the macro definitions within compiler.h
http://svn.sourceforge.net/viewvc/sdcc/trunk/sdcc/device/include/mcs51/compiler.h?view=markup
which do the conversion for the compiler syntax and typically look like:
#define SFR(name, addr) __sfr __at(addr) name
to something that pleases the assembler syntax
and then run a C-preprocessor over the header file:)
(most C-compilers will also have a preprocessonly mode)


Greetings,

Frieder

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to