{"action":"closed","issue":{"url":"https://api.github.com/repos/andysworkshop/stm32plus/issues/41","repository_url":"https://api.github.com/repos/andysworkshop/stm32plus","labels_url":"https://api.github.com/repos/andysworkshop/stm32plus/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/andysworkshop/stm32plus/issues/41/comments","events_url":"https://api.github.com/repos/andysworkshop/stm32plus/issues/41/events","html_url":"https://github.com/andysworkshop/stm32plus/issues/41","id":34184108,"number":41,"title":"Increase usage of generated code","user":{"login":"mikepurvis","id":944666,"avatar_url":"https://avatars.githubusercontent.com/u/944666?v=3","gravatar_id":"","url":"https://api.github.com/users/mikepurvis","html_url":"https://github.com/mikepurvis","followers_url":"https://api.github.com/users/mikepurvis/followers","following_url":"https://api.github.com/users/mikepurvis/following{/other_user}","gists_url":"https://api.github.com/users/mikepurvis/gists{/gist_id}","starred_url":"https://api.github.com/users/mikepurvis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikepurvis/subscriptions","organizations_url":"https://api.github.com/users/mikepurvis/orgs","repos_url":"https://api.github.com/users/mikepurvis/repos","events_url":"https://api.github.com/users/mikepurvis/events{/privacy}","received_events_url":"https://api.github.com/users/mikepurvis/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2014-05-23T15:12:32Z","updated_at":"2016-11-12T13:01:18Z","closed_at":"2016-11-12T13:01:18Z","body":"There are a few sections of the library using perl scripts to autogenerate IO mappings and such, eg: https://github.com/andysworkshop/stm32plus/tree/master/lib/include/gpio/autogen\n\nHowever, there's a lot more code being manually managed which could be candidates for this, even something as simple as [Adc1.h, Adc2.h, and Adc3.h](https://github.com/andysworkshop/stm32plus/tree/master/lib/include/adc), which are identical but for very small differences.\n\nSome steps to consider which might lower the barrier and make it possible to use source generation more broadly:\n- [ ] Hosted, generated docs, based on and including a copy of the generated sources, so that the git repo itself is no longer the primary reference for the installed source.\n- [ ] Use of an established templating scheme, for example, empy: http://www.alcyone.com/software/empy/\n- [ ] Integration with SCons, so that the templated files render as part of the build, rather than a separate manual step. The SConscript files in those directories could contain whatever simple logic feeds the template system (with any significant data remaining separate, in csv or yaml as appropriate).\n- [ ] Establishment of a few conventions about the `autogen` directories, especially with an eye toward a) minimizing the friction associated with templating up a few simple files, and b) allowing a single shared template to generate files for multiple chip series.\n\nI'm poking away at hosted docs for stm32plus—that's of immediate benefit to others on my team. Can't commit to any particular timeline for the rest, but wanted to throw it across your radar for discussion.\n"}}
{"actor":{"display_login":"andysworkshop"}}