Question
IAR configuration
Posted on November 27, 2015 at 22:38
I am trying to perform a memory read operation in a STM32L152 discovery board using the following code:
#include ''stm32l1xx.h''#include ''stdio.h''uint16_t ts_cal1;uint32_t address1=0x1FF800FB;uint32_t address2=0x1FF800FE;ts_cal1 = *((uint16_t*)address1);I am getting several errors in the fourth lineError[Pe077]: this declaration has no storage class or type specifierError[Pe147]: declaration is incompatible with ''uint16_t ts_cal1'' (declared at line 4) Error[Pe028]: expression must have a constant value I am not sure whether this is an IAR configuration error or not. Any suggestions will be appreciated.