Clearer message for functions not supported on platform
Posted: Wed May 15, 2019 11:18 am
chSysPolledDelayX() and other functions are not supported on the 32L0 family. The error message is 'undefined function'; took me a little while to realise it was really 'unsupported function'.
It's possible to generate clearer error messages for this scenario; the following change to chsys.h works:
(Documentation on _Pragma: https://gcc.gnu.org/onlinedocs/gcc-8.3. ... agmas.html)
It's possible to generate clearer error messages for this scenario; the following change to chsys.h works:
Code: Select all
#if PORT_SUPPORTS_RT == TRUE
bool chSysIsCounterWithinX(rtcnt_t cnt, rtcnt_t start, rtcnt_t end);
void chSysPolledDelayX(rtcnt_t cycles);
#else
#define chSysIsCounterWithinX(a, b, c) _Pragma("GCC error \"chSysIsCounterWithinX() not available on platform\"")
#define chSysPolledDelayX(a) _Pragma("GCC error \"chSysPolledDelayX() not available on platform\"")
#endif
(Documentation on _Pragma: https://gcc.gnu.org/onlinedocs/gcc-8.3. ... agmas.html)