Recent advancements in gamma-ray detector technology have brought new opportunities to study gamma-ray bursts and other high-energy phenomena. However, there is a lack of dissemination on the development methods, tools and techniques used in the production of instrument flight firmware. This is understandable as firmware for spacecraft payloads may be proprietary or exceptionally hardware specific and so is not always published. However, this leaves a gap in the knowledge for CubeSat teams, especially those consisting of university students who may be building a custom spacecraft payload with limited initial experience. The Gamma-Ray Module (GMOD) on-board EIRSAT-1, a 2U CubeSat in the 2nd European Space Agency Fly Your Satellite! programme, is one such instrument. GMOD features a 25x25x40mm Scionix CeBr3 scintillator, coupled to an array of 16 (4x4) JSeries OnSemiconductor MicroFJ-60035-TSV silicon photomultipliers (SiPMs) with readout provided by the SIPHRA IDE3380 application specific integrated circuit. The instrument is supported by the Gamma-Ray Module motherboard which controls and configures the instrument, providing regulated voltage and current sources as well as generating time tagged event packets and a temporary on-board flash storage. At the core of this system is the Texas Instruments MSP430FR5994 microcontroller. A custom firmware was produced for the instrument by the EIRSAT-1 team over numerous cycles of testing and development to reliably perform the long duration tasks of readout, storage and transfer of time tagged event data to the EIRSAT-1 on-board computer. Recognising the value of sharing our experiences and pitfalls on firmware development with the wider CubeSat community, this paper will provide an introduction to GMOD, with focus primarily on the development approach of the firmware. The development, testing, version control, essential tools and an overview of how the resources provided by the device manufacturer were used will be examined, such that the lessons learned may be extended to other payloads from student-led missions