Mediates activation of long-chain fatty acids for both synthesis of cellular lipids, and degradation via beta-oxidation (PubMed:26893370, PubMed:29739804). Probably by regulating lipid storage and catabolism, plays a role in neuronal function (PubMed:25409104). a long-chain fatty acid + ATP + CoA = a long-chain fatty acyl-CoA + AMP + diphosphate Results in neurodegeneration in the central nervous system including degeneration of lamina and retina, defects in the fenestrated basement membrane, ommatidial disarray, locomotor defects and shortened lifespan (PubMed:26893370, PubMed:29739804). The phenotype is exacerbated in constant light conditions and improves in total darkness (PubMed:29739804). Effects are probably due to elevated levels of very long chain fatty acids (VLCFAs) (PubMed:29739804). Feeding the fly mutant with medium-chain fatty acids, blocks the accumulation of excess VLCFAs as well as development of the pathology (PubMed:29739804). Simultaneous knockout of bgm results in enhanced retinal degeneration and altered fatty acids metabolism (PubMed:26893370). RNAi-mediated knockdown in the adult results in reduction of triglycerides and altered neuronal function, including altered sleep rebound following sleep deprivation (PubMed:25409104). In Norse mythology, Heimdall is the fictional character that for ages guarded the bridge to Asgard without sleeping and without the consequences of sleep deprivation. Belongs to the ATP-dependent AMP-binding enzyme family. Bubblegum subfamily. Truncated C-terminus.