Hello,
the compilation of the following code fails when any of the commented case statements is uncommented:
#include <stdint.h>
#define RAMLS0_BASE_ADDR 0x008000
#define RAMD1_LAST_ADDR 0x00BFFF
#define FLASH_SECTA_BASE_ADDR 0x080000
#define FLASH_SECTD_LAST_ADDR 0x087FFF
#define FLASH_SECTE_BASE_ADDR 0x088000
#define FLASH_SECTJ_LAST_ADDR 0x0B7FFF
#define FLASH_SECTK_BASE_ADDR 0x0B8000
#define FLASH_SECTN_LAST_ADDR 0x0BFFFF
/**
* main.c
*/
int main(void)
{
uintptr_t addr = 0x090000;
switch(addr)
{
case RAMLS0_BASE_ADDR ... RAMD1_LAST_ADDR:
break;
//case FLASH_SECTA_BASE_ADDR ... FLASH_SECTD_LAST_ADDR:
//break;
//case FLASH_SECTE_BASE_ADDR ... FLASH_SECTJ_LAST_ADDR:
//break;
case FLASH_SECTK_BASE_ADDR ... FLASH_SECTN_LAST_ADDR:
break;
}
return 0;
}
It seems a compiler-related problem (v22.6.0.LTS) since no description of the encountered error is given during the compilation.
For the moment I have bypassed the problem by using a slower if .. elsif statement but any suggestion on how to successfully use the switch statement would be very appreciated.
Thank you for your support,
Best Regards


