First, change the hide specifications for these "barbarian giants". You want:
A) Thick skin, maybe with a layer of blubber underneath (for greater protection and cold resistance). A hippo's is two inches thick and makes them quite resistant to bullets (though a 50. cal can apparently kill them with ease) but a sperm whale's is 14 inches thick (good luck shooting a bullet/arrow through that!) I'd go with the 14-in. skin.
B) Tough skin, think rhino.
C) Plated, a la Javan Rhino (I don't know how to put picture links, hopefully you can find a good picture): you see, these guys have built-in "plates"-folds of skin-that make them harder to hurt.
D) Scales. If you really want superior protection (especially from bullets), look at crocodilians. It's almost impossible to get a bullet through their scaly skins, and with the additional toughness granted by the hide-like nature and thickness of their skin, these guys will render firearms (hopefully) useless once they are developed.
Both when fighting each other or when fighting other humans, the focus will be on blunt force. Smashing, crushing, and otherwise trauma-inducing attacks will still hurt, if not kill, these individuals. Assuming their toughness evolved to protect them when fighting against each other, they would therefore have developed adaptations that make them more resistant to blunt force. This being said, a cannonball or flung boulder (via catapult) should still do the trick.
These guys will be like Urgals in Eragon, no, Kulls, due to their large size. Fierce fighters, renowned for combat, very hard to beat unless you have cannons and catapults, which smart kingdoms will both acquire and put considerable work into developing. That being said, they will adapt to make up for these weaknesses:
Use Religion-These giants use propaganda and charismatic preachers to spread the idea that they are blessed, no, chosen of the gods to be the superior race, AKA rulers. Religion is a great medium for A) gaining power, B) maintaining power, C) shaping beliefs and values, and D) making authority stronger. Authority crumbles when it's questioned, religion usually comes with anti-questioning principles. This gives them power over everyone, and also enables them to outlaw cannons and catapults as 'unholy.'
Use Sheer Power-This requires early giants to have had both vision and determination; enough to sieze power early in history and maintain it. People may revolt, but these guys have by now (assuming Dark Ages) designed the system to benefit them, culturally, socially, and of course physically. The methods of making cannons and catapults will be well-hidden and restricted, to prevent this weakness from being exploited.
Use Saboteur and/or Intimidation-Elephants are surprisingly silent, having biological "silencers" in their feet. There are also graceful, large animals out there, as evidenced by this quote from the Huffington Post: "Despite their powerful size, bison are graceful creatures and move almost daintily, but with speed and purpose." If these giants have these traits, A) they're not the easy-to-counter slow brutes we typically see in media and B) they can sneak into places.
Let's say that when the giants hear someone is working on cannons or catapults, or weapons that would be effective against them, they attempt to put a stop to such nonsense with a show of force. This may work, but you know what's even more effective? Having whoever starts working on such a project assassinated. The resulting 'fear factor' will make anyone reluctant, if not unwilling to, develop anti-giant weaponry.
- Use Clever Tactics-If none of the above work for you, simply have the giants use clever tactics to mitigate cannons and catapults. Account for their weaknesses the same way regular humans do; through intelligence.