Some code which estimates a similar model is here: Econometrics/PracticalSummaries/20-PanelData.jl at main · mcreel/Econometrics · GitHub
This sets up regressors and instruments. The results very similar but not identical to what I get from the GRETL package. I think that the differing treatment of missings accounts for this, as well as the way covariances are estimated, perhaps. I haven’t gone into it in detail, though. So, please treat this as a starting point, but perhaps with some corrections/improvements needed.