Cannot watch bit-fields using elf parser in 4.11.410 SP3

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

When I debug the following variable compiled with WinAVR 20050214 , I cannot watch the "USI_UART_status" variable. Each member of the structure is shown having the same value.

The value displayed for each member is the "unsigned char" aggregate value.

Can anyone help ? (Hopefully someone from the Atmel dev team will sympathise and include support in the next release)

//Test Code Taken from AVR 307 USI Example & Modified

struct usi_uart_status          // Status byte holding flags.
    {
	unsigned char ongoing_Transmission_From_Buffer:1;
	unsigned char ongoing_Transmission_Of_Package:1;
	unsigned char ongoing_Reception_Of_Package:1;
	unsigned char reception_Buffer_Overflow:1;
	unsigned char flag4:1;
	unsigned char flag5:1;
	unsigned char flag6:1;
	unsigned char flag7:1;
    } USI_UART_status = {0,0,0,0,0,0,0,0};

Nigel Winterbottom

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Nigel.

I do sympathize, and tried to add this feature in the original version of the elf/dwarf parser.
However, the debuginformation for bitfields produced by avr-gcc is not correct.

http://gcc.gnu.org/bugzilla/show...

Regards,

Torleif Sandnes
Atmel AVR Software Team