The TSR2 was unfortunate to be under development when it was. It was cutting edge in many ways and new technology and new craft are of course expensive to start with. Budgetary constraints were hitting hard, inter-service conflicts over the budget didn't help, and the specification for the Air Staff Requirement, GOR 339, kept changing. That eventually became ASR343 which stretched the capability envelope too far. Low level height was reduced to 200ft, speed at altitude went from M1.7 to M2, ferry range was increased and the Load Classification went from 40 to 20 (ie concrete strips to grass strips for take-off and landings). All of these conspired to make development more and more protracted and costly. The loss of Empire, as former colonies gained independence further complicated matters as ferry routes could no longer be assured of the landing strips envisioned when TSR2 was first mooted, which pushed ferry ranges up to 2,500nm. From it's relatively narrow role at the start it became an aircraft that was required to do more and more within the same airframe. These moving goalposts pushed development costs higher and higher. Australia was looking to buy some, which would have aided costs somewhat but they then decided on the new TFX/F-111 instead, a move that didn't prove to be as cheap as they thought. Whilst I am a great fan of the 'vark, the early versions had their faults and were pushed into service too quickly. Later models are just fine though (of course the biggest problem really was saddling it with an F designation, as Fighter it ain't!).
An excellent source on this aircraft is the Osprey X-Planes book. As so often with government projects, it absorbed too much money for too long and was then cancelled.