The Primer says:
MR. JOHN ROGERS, minister of the gospel in London, was the first martyr in Queen MARY's reign, and was burnt at Smithfield, February 14,1554. His wife with nine small children, and one at her breast following him to the stake; with which sorrowful sight he was not in the least daunted, but with wonderful patience died courageously for the gospel of JESUS CHRIST.
Some few days before his death, he wrote the following Advice to his Children.
Whereupon follows the famous poem (which may be read here in the 1777 ed.).
First, it should be noted that John Rogers actually was burned at the stake on February 4, 1555, rather than February 14, 1554.
Second, John Rogers had eleven children rather than nine. John Foxe and others historians of the age record that his wife attended his execution with ten children at her side and one infant at her breast. George Livermore (The Origin, History and Character of the New England Primer, p. 34) supposes that the error originated as typographical mistake:
The error may at first have been merely typographical -- arising from the transposition of the numerical letters XI, as originally printed in Foxe. Later historians, copying at second hand, have helped to perpetuate the error.
Finally, the poem itself was first published in England in 1559 in a book with the title John Rogers' Primer and ascribed to "An exhortation of Mathewe Rogers vnto his children." From early on, it was ascribed -- erroneously, as it turns out -- to John Rogers, who was the first of the Marian Martyrs, when, in fact, the true author was another by the name of Robert Smith, who was executed on August 8, 1555. He wrote several poetic compositions -- unlike Rogers -- two of which were conflated to create the poem reprinted in the Primers ("Smith was the author of several poems, and the one given in the Primer is made up, with some alterations and omissions, from two of his pieces," Livermore, ibid, p. 36). An early edition of John Rogers' Primer "bears the name of Thomas Mathew, which was assume'd by Rogers in his translation of the bible; and hence, it may be, he obtain'd the name of Mathew Rogers, unless it were, more likely, a mistake of M. (i.e. master) Rogers. He, too, was a Martyr in the same year with Smith, to whom Foxe, a diligent collector, and good authority, ascribes the poem in question" (Paul Leicester Ford, ed., The New-England Primer: A History of Its Origin and Development, p. 250).
Robert Southey, The Book of the Church, p. 342:
Robert Smith, one of the martyrs here alluded to, wrote several poems in prison. The following lines from that which he addressed to his children, are well worthy of preservation, the circumstances under which they were written giving them a deep interest.
---- That ye may follow me, your father and your friend,
And enter into that same life which never shall have end,
I leave you here a little book for you to look upon,
That you may see your father's face when I am dead and gone:
Who, for the hope of heavenly things, while he did here remain,
Gave over all his golden years in prison and in pain,
Where I among mine iron bands, enclosed in the dark,
Not many days before my death, did dedicate this work
To you, mine heirs of earthly things which I have left behind,
That ye may read, and understand, and keep it in your mind,
That as you have been heirs of that which once shall wear away,
Even so ye may possess the part which never shall decay.
In following of your father's foot in faith, and eke in love,
That ye may also be his heirs for evermore above:
And in example to your youth, to whom I wish all good,
I preach you here a perfect faith, and seal it with my blood.
HT: Henry Christoph, Jr.