If it’s a compile thing, then I think it’s a tool, not a driver.
I think of a driver as something that would talk over a USB port to a device
to do something.
I am developing an actual driver for a RTD to temperature converter IC. I could document how to generate a custom lookup table with a spreadsheet, but I might as well develop a piece of C++ code.
I know where to put the driver code. The question is, where do I put this utility/tool code?
I’ve seen something similar to what you describe for generating ISR vector tables and clock configurations for stm32. See cpu/stm32/dist/. In general try doing a find -name dist and you should find some more examples to work from.
So, you’re suggesting a Python script in RIOT/drivers/my_driver? It looks fine to me, because it’s clear that a Python script is only supposed to be run on the host.
C++ would be fine too in my opinion, but I don’t know if there are any opinions about what languages are allowed so as to not overburden maintainers. Since RIOT has C++ support, I don’t think it should be a problem. I believe, but have not verified, that anything in a dist dir is for this kind of thing. So this would be drivers/my_driver/dist