There isn't even certainty regarding the historical accuracy of the use of peasants as cannon fodder in medieval warfare. The accounts of it are questionable at best, because they're largely based on descriptions that tried to make the battles sound epic by saying "thousands of men fought for king and country and died heroically!" Other accounts speak of "grave losses" and mention numbers in the dozens rather than hundreds or thousands, but then they might only be talking about the people who were worth mentioning (i.e. not peasants). No official records of actual army compositions exist.
One of the only things that's certain is that there were laws that stated young adult men had to be prepared to take up arms to defend their own region in an organised fashion if it was attacked by outsiders. The reason for this was that it wasn't possible to keep a regular army stationed on all borders to guard it from invaders. For example, these laws required people who lived in or near coastal towns of England to fend off viking raids when there wasn't anyone else around to do it. These laws did not force those men to join in on conquests abroad.
It's also certain that the regular army consisted for a large part of lesser nobles and their entourage, including personal servants and men at arms (who did receive professional training!) that were assigned to them to fight in their battles. Another large portion of the armies consisted of mercenaries, who naturally trained a lot and used part of their money to buy proper equipment.
The vikings did force their commoners to join warbands, but they didn't just toss farmers on the front line with crappy gear. They wore leather and hides (which was normal because it can be f*cking cold in Norway without central heating) or sometimes chainmail, shields, swords/axes and spears. They basically all became the equivalent of the men at arms of western European kingdoms.
The only known fact supporting the cannon fodder theory is that inhabitants of recently conquered (especially non-Christian) territory were sometimes sent to the front line of the battlefield by invading armies to reduce the losses of their main force. These weren't the invading country's own peasants, but the peasants and military captives of the country that was being invaded, basically fighting against their own countrymen. If those men had the bright idea to turn around and fight alongside the force of their own country to push the invaders back, they'd probably just get caught between both armies and die.