Hi everybody,
If the "volatile" qualifier from ARM_USART_STATUS is removed, the program compiles.
I wonder why "volatile" had been added to this struct in the first place. Usually it's required when a variable may be changed from outside of the current execution flow (i.e., memory mapped registers, interrupt service routines, multithreading). I don't see why it's needed here.
Further, if need be, volatile could be added to specific members that require the use of the "volatile" qualifier, i.e.:
typedef struct _ARM_USART_STATUS {
volatile uint32_t tx_busy : 1; ///< Transmitter busy flag
volatile uint32_t rx_busy : 1; ///< Receiver busy flag
volatile uint32_t tx_underflow : 1; ///< Transmit data underflow detected (cleared on start of next send operation)
volatile uint32_t rx_overflow : 1; ///< Receive data overflow detected (cleared on start of next receive operation)
volatile uint32_t rx_break : 1; ///< Break detected on receive (cleared on start of next receive operation)
volatile uint32_t rx_framing_error : 1; ///< Framing error detected on receive (cleared on start of next receive operation)
volatile uint32_t rx_parity_error : 1; ///< Parity error detected on receive (cleared on start of next receive operation)
uint32_t reserved : 25;
} ARM_USART_STATUS;
This compiles, too.