The outer part of the castle was defended by an octagonal wall, which linked the four stirrup turrets and bastions that formed the main defences for the castle. This wall had initially been built in the second phase of work on the castle, but was then supplemented in the final phase with an additional exterior facing, and was originally finished with a gun embrasure along each section, and parapets. A two-storey gallery, which provided relatively spacious barrack accommodation for the garrison, ran all the way around the inside of the wall, although only the ground floor of the gallery now survives. The gallery would have been lit by windows facing into the courtyard. The Rampire earthwork built in the early 17th century lies across the south and south-east parts of the defences, where the gunports were blocked up with stone when the earth was piled up along the inside of the castle.