- the text in this section is copied from an article in Wikipedia
Eric (also Heirichus or Ehericus; died 799) was the Duke of Friuli (dux Foroiulensis) from 789 to his death. He was the eldest son of Gerold of Vinzgouw and by the marriage of his sister Hildegard the brother-in-law of Charlemagne.
Most of Eric's tenure was occupied by the job of subduing the Avars. In this he was accompanied by Pepin of Italy and his own father, the margrave of Avaria. In 791, he and Pepin marched a Lombard army into the Drava valley and ravaged Pannonia, while Charlemagne marched along the Danube into Avar territory. Charlemagne left the campaigning to deal with a Saxon revolt in 792. Pepin and Eric continued, however, to assault the Avars' ring-shaped strongholds. The great Ring of the Avars, their capital fortress, was taken twice. The booty was sent to Charlemagne in Aachen and redistributed to all his followers and even to foreign rulers, including King Offa of Mercia.
In 795 or 796, Eric and Pepin, allied with the Western Avar tudun, led an attack which forced the submission of the chief khagan and led to the capture of the Hunorum Hringum, or Ring of the Avars, their chief camp. The khagan was taken to Aachen, where he was baptised as Theodorus. According to the Annales Fuldenses, the khagan was killed by his own men.
According to the Annales Laurissenses, Eric sent raiders against Pannonia in 796 under Vojnomir, duke of the Pannonian Croats.
Some time between 787 and 796, Paulinus of Aquileia wrote a Liber Exhortationis for Eric. The work draws from the Bible and certain Fathers of the Church to offer instruction on how to live a morally upright Christian life while carrying out secular duties.
In 799, Eric was killed in the Battle of Trsat in Liburnia between Franks and Croats. His father died on the eve of battle with the Avars that same year. According to Frankish scholar and courtier Einhard, he was done in by the treachery of the inhabitants, but he does not explain how so. The site of the battle, Tharsatica or Tarsatica in Latin, has been traditionally identified as Trsat, a hill fort whose ruins today overlook the city of Rijeka (Fiume). It is more likely that the Tharsatica of Einhard's account was the civitas (Latin for "city") which lay on the other side of the river Rječina, today the Old Town of Rijeka. The site of Trsat was actually founded by Tharsatica's surviving inhabitants a year after the siege.