ok, i know this doesn't fit early medieval, but still, it would be awesome for shits and giggles, and i think i have a way to make it work.
use either rocks, but more likely a special type of rock, grind it up into powder, and use wood or metal and string to create Dynamite. When you light dynamite, it has a 50% chance of working like it is supposed to (light it, place it, and run before it blows), a 25% chance of a super big boom (like 5x or 10x what it is suppossed to be, so run very very fast), and a 25% chance of exploding in your hands, killing you
Dynamite can destroy a Wooden Wall segment easily. BUT a Dynamite Bomb (three Dynamite tied to together) can destroy a Brick Wall segment. BUT the down side is Bombs have a 25% chance to work, a 50% chance to make a super really big boom (don't even try to outrun it, you will die tired) and a 25% chance to blow up instantly.
and yah, i'm only half serious...but half is all it takes!