Skip to content
This repository was archived by the owner on Jan 3, 2025. It is now read-only.
schmidtw edited this page Mar 30, 2011 · 3 revisions

Project Goals

  • Produce GPL+LE based Microchip headers and linker files based off of the facts provided by the datasheets.
  • Create generator code to generate all the nearly duplicate code needed by gputils / sdcc.
  • Get the code/headers/etc refined and moved into the right other projects (again, gputils / sdcc).
  • Shut down the project if we can migrate this to one of the other projects.

Useful Links

Workflow

  1. Download PDF of the device datasheet (or use make to download 78 of them ~320MB)
  2. Open up the datasheet & find the REGISTER FILE SUMMARY table page(s), SPECIAL FUNCTION REGISTER MAP (sfr) table page(s) (only needed if the addresses aren't included in the REGISTER FILE SUMMARY table), and the CONFIGURATION BITS AND DEVICE ID table page(s).
  3. Run: to_csv.sh <pdf-filename> <sfr-table-first-page> <sfr-table-last-page> <config-table-first-page> <config-table-last-page> [columns of address/name pairs in the sfr map (if needed)] > temp.csv
  4. Open up temp.csv with your favorite editor and fix noted problems and add the document name (original Microchip PDF name).
  5. Add ! to values with a line over the top.
  6. Run: csv_to_xml.pl <input-file> <part-family-name>
  7. Inspect the shiny new <part-family-name>.xml file that comes out for defects - there will be problems, the scripts are just there to make much of the tedious work easier.
  8. Update the <limit> values so one xml file can generate the entire part family.
  9. Add details to the configuration bits.

Dependencies

  • linux environment with bash
  • pdftohtml
  • make
  • perl
  • wget
  • xmllint (a nice-to-have, really)

Example

TBD

ToDo

  1. Create the xml to header script - want to stay with perl & use an xml DOM library most likely.
  2. Create the xml to lkr files script - again use perl+DOM.
  3. Create the xml to gputils code generation script - again use perl+DOM.
  4. Create the xml to sdcc code generation script (not sure if this is needed) - perl+DOM.

Clone this wiki locally