Marcus Shawcroft wrote (on Thursday, October 06, 2016 3:18AM):
This design make sense from the perspective that the read only configActually it goes into the ROM data section anyway, despite the lack of
const. This is controlled in device.h by declaring the device_config
struct to be in the "devconfig.init" section. This then is placed by
the linker script (one per arhicecture right now, sigh) into the
ROMable region, right before the compiler-managed .rodata (which of
course *is* the stuff that depends on const).
The lack of const is (well, should be) just a missed opportunity for
compiler warnings. But AFAICT it's wrong and should be fixed.