Total Reflection X-ray Fluorescence analysis (TXRF) is a very accurate method for chemical analysis of trace elements in the range of ng/g concentrations and pg for absolute masses. The rising demand for small, mobile and also easy to handle devices for such chemical analyses led to the construction of a compact spectrometer by the Atominstitut x-ray laboratory. This spectrometer operates with a 50 W low power x-ray source and a peltier cooled silicon drift detector that does not depend on liquid nitrogen to get cooled. Special beam preparation optics has been attached to the tube to ensure a monochromatic excitation of the sample. The spectrometer can be operated with mains voltage and a mobile computer. The first part of this thesis includes the description of the spectrometer structure with all its main parts as well as the detailed setting up procedure.^ ^Some improvements has been incorporated into the former version of the spectrometer before manufacturing all the components. The spectrometer has been in- stalled on the optical table in the X-ray laboratory to ensure stable operation. One of the improvements is the rough z-and angle adjustment system. This system aids to pre adjust the height and the angle of the tube with its optics to ensure a proper beam alignment. Another improvement concerns the reflex tracing system of the beam. The old version of the spectrometer uses a fluorescence screen, a vacuum feed through and a expensive camera to display the reflex. This system has been replaced by a camera chip covered with aluminium foil at the end of the beam line that displays the reflex. The last task comprised the determination of the detection limits for this new measurement set-up.^ The second part of this thesis enfolds the description of the self written software that is capable of performing the deconvolution of TXRF spectra as well as quantify them. The fitting results of the self written software are compared with results from the well established deconvolution software AXIL. The quantification of a certified reference material from the the National Institute of Standards & Technology (NIST) form the conclusion of this thesis.