AnsweredAssumed Answered

IAR configuration

Question asked by drazer.alf on Nov 27, 2015
Latest reply on Nov 28, 2015 by karpavicius.linas
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 line

Error[Pe077]: this declaration has no storage class or type specifier
Error[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.