This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

const uint16_t addr = (uint16_t)function; Report an error

Fullscreen
1
2
3
4
5
6
void function(void)
{
printf("test");
}
const uint16_t addr = (uint16_t)function;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Why MDK(ARM) report an error: initializer element is not a compile-time constant ?

0