From: Francesco M. <f18...@ya...> - 2009-03-02 21:21:42
|
Hi, Frans Schreuder ha scritto: > Hi Francesco, > > I think this is a great approach, especially if we can load all the data > from piklab directly. > I really haven't done anything with XML files yet, so I will have to > read some tutorials I guess. well, there's not much to know about XML. See the link below. > Do you know if there are some standard tools to parse them using simple > scripts or something? I've already written all the code to load Piklab files (well, it's few lines thanks to wxXmlDocument class); you can see how easy is to parse an XML document with wx at: http://docs.wxwidgets.org/trunk/classwx_xml_document.html > I agree that the hex flags are ugly, it was just something I still had > in mind for the future :) > > I don't know yet what to do with the PicFamily, This one is quite > necessary for the firmware... I agree; I think the best way to add such PicFamily value to the various PICs is to leave untouched the various Piklab XML files (so we can replace them with newer Piklab files in future) and rather add a new index.xml file which would go like this: <xml ..> <upp> ... <device name="16F84A" upp_family="P16F84A"/> ... <device name="P16F683" upp_family="P12F6XX"/> ... </upp> it would allow us: 1) to load from all Piklab XML files only the data for those which UPP actually supports 2) to specify custom UPP data for each PIC (e.g. upp_family, but if we can't go without the devIdMask we may add a upp_devidmask attribute, too) > The config mask won't be necessary anymore since the flag names replace it. ah, ok > The devid mask is something very important, since the devid is divided > into two portions, devid and revision. Some devid's have 4 bits for the > revision and some have 5, so we can't just hard-code it to 4 or 5 bits. > Let me check out how piklab does it... ok; anyway as I said if it's really necessary to have it we may add an "upp_devidmask" attribute in the index.xml file. Francesco PS: do you think it would be better to create a separate branch for experimenting with the XML approach or should I commit the changes directly in trunk? -- |