Closed timsifive closed 3 years ago
The idea of this change is good. However the concerns of some tool-generated code for the firmware are,
I understand the implementation you have now is small and the code is generated on demand. In order to have a common CS decoder on the firmware solutions, the above should be considered. But I think don't have to do it right away, maybe just wait until we choose custom binary as the format of CS.
It sounds like in the future we want two source options:
I think the overall code might be smaller if we generate 2 schema-specific parsers than if we have a single generic parser with shared code. We'll have to experiment with that, though.
Does that sound right? I must admit I'm still not entirely clear on the OEM use case you have in mind. Let's talk about that in email.
Supports any number of bits from 1 to 128. The user can use types by specifying Int1, Int2, Int3, all the way up to Int128.
To keep this efficient, I pulled the separate cs_decode.[ch] into the python tool, which now reads c_code.c and c_header.h and puts the contents into the files it generates.
Code size did go up a bit, from 1774/1856 to 1819/1873.