FreeEMS Issues - Firmware
View Issue Details
0000169FirmwareInit & Configpublic2011-06-16 15:382011-06-28 10:45
Fred 
Fred 
normalfeatureN/A
assignedopen 
 
0.3.0 
New Feature
low
0000169: Create DDL and implement it
We need to create a master file that contains both data, structure, versions and so on.

From this file we will generate any number of different formats containing the default data and the structures that hold it.

There are two main outputs:

1) C code - headers with structs and initialisation code using those headers and holding the default data
2) XML/JSON/etc - structure definitions, default data definitions, meta data, human descriptions, versions, etc. For use in tuning applications wishing to communicate with the firmware. This will either generate two files or one with optional data. A tuning package should be able to pick up this file and talk to the device showing some form of simplistic UI for the available tunable items.

Additionally, we should look into compressing the structure and meta data stuff and storing it in flash on the actual device to be returned in pieces upon request. This may or may not be possible, but if it is, would allow a self contained firmware which doesn't need any external files to function with external software - very clean. It could be that the size of such data would be prohibitive, though.

A somewhat messy thread on the subject exists here:

http://forum.diyefi.org/viewtopic.php?f=8&t=1007 [^]

And an older one about the same stuff here:

http://forum.diyefi.org/viewtopic.php?f=8&t=1004 [^]

This is a priority for 0.3.0 with some number of 0.2.X releases between 0.2.0 and then.
No tags attached.

Notes
(0000204)
Fred   
2011-06-28 10:45   
(edited on: 2011-06-28 10:48)
Some things that need investigating here:

YAML - http://en.wikipedia.org/wiki/YAML [^] - Human friendly - parse into xml, json, c?
JSON - http://json.org/ [^] - NO COMMENTS, no good :-(
ANTLR - for parsing and output - http://www.antlr.org/ [^]
XSLT - if source is XML - http://en.wikipedia.org/wiki/XSLT [^]
XSD - if source is XML - http://www.w3.org/2005/07/xml-schema-patterns.html#Collection-Inheritance [^]
XSD - more - http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#built-in-primitive-datatypes [^]


D3L - oracle format to learn from - http://download.oracle.com/docs/cd/B10465_01/integrate.904/b10404/appx_d3l.htm [^]

XSL codegen article - http://www.ibm.com/developerworks/library/ibm-codegen/index.html [^]
YA XSL article - http://www.la-solutions.co.uk/content/MDL/XML_Struct.htm [^]
XML article - http://www.ibm.com/developerworks/xml/library/x-sbxml/index.html [^]