Open j-hui opened 2 years ago
This doesn't sound like it should be an issue.
Perhaps when we parameterise the whole thing over platforms & boards, maybe we can tag such escape hatches with a platform?
"this escape-thing is relevant for platform X -- all others should ignore"
I would like a statement in the EDSL that allows us to inject arbitrary C statements into the generated C code. This would be extremely useful for platform-specific debugging and prototyping. For instance, we can insert
escStm [cstm|printk("hello\r\n");|]
to insert a printk statement.For the purpose of testing, these statements can be left out of the trace build (we can make a pass that prunes these out of the AST before feeding it to the backend).