In order to help the programming aspects, it could be nice to generate an header file containing the netlabel with the arduino pin (or any other programmable part).
example, for a net label named “temperature sensor” #define TEMPERATURE_SENSOR PIN_A0
I looked at the fzz file and other fzp files to make that tool externally. It seems more or less possible to do it, except there is no reference to “PIN_A0” in those files. This implies a mapping file is required to map:
I expect this would be better done (if a lot of work for old parts!) by adding an attribute for the PIN_A0 label in the part’s .fzp file rather than have a separate map file. Currently as you note there isn’t such an attribute though.
I thought about this solution as a non intrusive one, as it does not imply to modify existing parts (fzp files). Adding an attribute in the part files would sure be an easier solution.
Then I did a dry run with an XSLT file and other parts poped up(lcd screen, uart, gsm, …) and I remember having hard time to choose libraries which have their own API that’s why I added an extra attribute (api-version).
I think I saw competitive commercial API for arduino or other controllers. So if true, the final solution should stay open and be able to generate for such libraries too.
As long as the new attribute will be ignored (which will break the .h generation I expect), it is likely the best solution. In the case of a missing attribute the user (or more likely in the usual case, one of us) can create a new part with the attribute present without great difficulty. I assume the idea of the .h file is to automatically create the association of the processor I/O pin with the part or parts it is connected to? That seems like a useful function to have as long as all the issues can be worked out.