saniljhaveri / avr-project-ide

Automatically exported from code.google.com/p/avr-project-ide
0 stars 0 forks source link

Hardware explorer - missing information #34

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
In a project for an ATmega328p I noticed in the hardwaree explorer 
interrupts pane that some vectors are missing.

E.g. Timer0 supports Compare match A and Compare match B, but only Compare 
match B is listed. Timer2 also supports Compare match A and B, but none 
are listed. Looking at the raw Xml file I see some odd (misspelled) 
descriptions, but at least the vectors are there.

Original issue reported on code.google.com by bflaglie@c2i.net on 5 Nov 2009 at 9:48

GoogleCodeExporter commented 8 years ago
all the data from that xml file was automatically generated from
http://www.nongnu.org/avr-libc/user-manual/group__avr__interrupts.html

the generation looks correct, but that webpage is missing the atmega328p for 
timer0
compare match A

i will include the updated xml in the next update (56)

Original comment by frank.zhao.main@gmail.com on 6 Nov 2009 at 1:03

GoogleCodeExporter commented 8 years ago
Compare match B showed, but "Timer2 also supports Compare match A and B, but 
none 
are listed.".

The content seems a bit flaky. Is it perhaps an option to get these XML 
definitions 
from AVR studio - other Atmel maintained sources?

Original comment by bflaglie@c2i.net on 6 Nov 2009 at 6:38

GoogleCodeExporter commented 8 years ago
Although the atmel xml files do list interrupts, they do not show the vector 
names as
used by the functions that look like

ISR(vector_name_vect)
{
  code goes here
}

If you want to view the data from the atmel XML file for your chip, use the "XML
View" tab.

the data looks something like this:

-----------
<VECTOR2>
      <PROGRAM_ADDRESS>$002</PROGRAM_ADDRESS>
      <SOURCE>INT0</SOURCE>
      <DEFINITION>External Interrupt Request 0</DEFINITION>
      <ENABLEADDRESS/>
      <ENABLEMASK/>
      <FLAGADDRESS/>
      <FLAGMASK/>
      <FLAGVALUE/>
    </VECTOR2>

-----------

which is not very useful

Original comment by frank.zhao.main@gmail.com on 9 Nov 2009 at 1:59

GoogleCodeExporter commented 8 years ago
My guess is that the AVR vector definitions were generated from the Atmel XML's 
with 
vector names constructed from the "SOURCE" tag (e.g. "INT0" becomes "INT0_vect" 
and "USART,TX" becomes "USART_TX_vect").

Combined with the "DEFINITION" tag this could serve as an alternative and not 
least 
authoritative source. Also the program address is useful as vector names can 
always 
be substituted with the syntax "_VECTOR(0x02)" when in doubt.

As reference information goes there is no room for errors - if you can't trust 
it, 
you shouldn't use it.

Original comment by bflaglie@c2i.net on 9 Nov 2009 at 7:38

GoogleCodeExporter commented 8 years ago
hmm... I do agree with providing as much information as possible, I'll try to 
merge
the information from both sources

i did not know about the _VECTOR(x) syntax, where is this documented?

Original comment by frank.zhao.main@gmail.com on 10 Nov 2009 at 12:54

GoogleCodeExporter commented 8 years ago
i can't possibly merge the two data sources into one list, some of the "SOURCE" 
tags
don't translate well into the xxx_vect notation, also the "DEFINITION" tags 
don't
match the descriptions from AVR-Libc

i have compromised by providing both data sources, each in its own tab

Original comment by frank.zhao.main@gmail.com on 10 Nov 2009 at 3:08