(א) אין מתחילין להתעסק בפת בי"ד עד אחר ו' שעות
ואיתא בתשובה מעשה באחד שאפה מצות קודם ד' שעות וכבר ביער חמצו ואסרו רבותינו המצה דאיתקש לפסח וכיון דפסח אינו נשחט אלא מו' שעות ולמעלה אף מצה כן
אבל רבינו אליעזר הגדול ור' שמואל הכהן התירו אך לכתחלה יש ליזהר משום חביבה מצוה בשעתה
ואבי העזרי הביא תוספתא יוצאין במצה ישינה ובלבד שיעשנה לשם פסח וכתב דירושלמי פליג אתוספתא ואוסר אפילו עשאה לשם פסח
וכיון דירושלמי אוסר ראוי להחמיר שלא לעשות קודם חצות
ובשעת הדחק שלא ימצאו לאפות ליל מ"ש משום חג העכו"ם ראוי לסמוך על התוספתא ולהתיר מ"מ יעשו ג' מצות בליל פסח משום חביבה מצוה בשעתה
וכ"כ רב מתתי' ע"פ שחל להיות בשבת דקי"ל מבערין הכל מלפני השבת ומשיירין מזון ב' סעודות ולמה אין מבערין הכל ויאפו מצה ויאכלו בשבת כדי להדר המצוה שלאחר שמילא כריסו ממנה אינו מברך עליה הלכך אל תאפו מצה אלא במ"ש מפני מראית העין שאם אתם אופים מע"ש אחרים מזלזלים במצות ומקילין בה אף על פי שמותר לאפותה מע"ש חזקו והדרו המצוה ואפו במ"ש בזמנה ע"כ
וכיוצא בזה השיב ה"ר יהודה הכהן על ששאלוהו מהו לאפות מצות שצריכות בליל ב' מעי"ט והשיב חביבה מצוה בשעתה ויאפו בליל שני
ורב האי כתב מנהג אבותינו לבער חמץ מע"ש ולאפות מצה וגדר גדרו קדמונינו שלא לאפות מצה מע"ש שלא יבא לידי איסור ובמ"ש אופין מצה כתקונה ואנו אין לנו אלא מנהג אבותינו לאפות מע"ש ולא לטרוח בי"ט ולאחר אכילת מצה אלא זריזין מקדימין למצוה ע"כ
וא"א הרא"ש ז"ל היה מבער הכל מלפני השבת ומשייר מזון שתי סעודות ואופה מצות מע"ש
ואני ראיתי בברצלונא מהמדקדקין שהיו אופין כל מה שצריכים למועד מקודם המועד שאם יתערב עמו משהו מחמץ שיתבטל קודם איסורו:
(1) We do not begin to occupy ourselves with the bread (matzah) on the fourteenth [of Nissan] until after six hours. And it is found in a responsum: There is a story about someone who baked matzah before four hours (into the day), and he had already destroyed his chametz; and our rabbis forbade the matzah, since it is compared to the Passover offering - since the Passover offering is only slaughtered from six hours onwards, so too is it with the matzah. But Rabbenu Eliezer the Great and Rabbi Shmuel HaKohen allowed [it]. However at the outset (if one has not yet done it), one should be careful [not to do so] on account of a commandment being beloved at its time. But the Avi Ezri (R. Eliezer ben Yoel HaLevi) brought a tosefta, "We fulfill [our obligation] with an old matzah, so long as one makes it for the sake of Passover." But he wrote that the Yerushalmi disagrees with [this] tosefta, and forbids [it] even if it was made for the sake of Passover. And since the Yerushalmi forbids [it], it is appropriate to be stringent, not to make [it] before midday. But in a case of urgent need, such that he would not find to bake them on the night of the conclusion of the Shabbat on account of the holiday of the gentiles, it is appropriate to rely upon the tosefta and to permit [it]. Nevertheless, they should make three matzot on the night of Passover on account of a commandment being beloved at its time. And so did Rabbi Matatyahu write - the eve of Passover that comes out on Shabbat, we hold that we should destroy all [the chametz] before Shabbat and leave over [bread] for two meals. But why do we not destroy everything [that is chametz], make matzah and eat [from it] on Shabbat? To beautify the [performance of] the commandment. Since if he filled his stomach, he would not make a blessing upon it [on Passover night]. Hence bake the matzah only at the conclusion of Shabbat, on account of appearances. As if you bake from the eve of Shabbat, others will disparage the matzot and be lenient about it (to eat them on Shabbat as well). Even though it is permissible to bake it on the eve of Shabbat, be strong and beautify the commandment, and bake [it] at the conclusion of the Shabbat, at its time. To here [is the responsum]. And the rabbi, Rabbenu Yehudah HaKohen responded similarly to this, to that which they asked him, what is [the law] about baking matzot that they need for the second night from the eve of the holiday? And he answered [that] a commandment is beloved at its time, and they should bake [them] on the second night. And Rav Hai wrote: The custom of our forefathers was to destroy the chametz from the eve of Shabbat and to bake the matzah [then]. But those who preceded us made a fence not to bake matzah on the eve of Shabbat, so that one not come to something forbidden, and to bake the matzah as it is prescribed at the conclusion of Shabbat. But we have nothing [to follow] besides the custom of our forefathers, to bake [it] from the eve of Shabbat, and not to take pains on the holiday [to bake it then] and delay the eating of the matzah. Rather, those that are alacritous perform the commandments early. To here [are his words]. And my master, my father, the Rosh, may his memory be blessed, would destroy everything before Shabbat, leave [bread] for two meals and bake the matzot from the eve of Shabbat. And I have seen in Barcelona that some of those who are exacting bake everything they need for the festival before the festival, so that if a small amount of chametz get mixed in, it become nullified before its becoming forbidden (as once it is forbidden, it can no longer be nullified).
What is the Hekish between Pesach and Matza?
The Prisha brings a different source for the hekish
Nafka Mina
1. Is this halacha in regards to matzos of all of Yom Tov or just for the Seder?
Machlokes Beis Yosef and Prisha
2. Is the hekish to eating or to baking the matzos as well.
(יג) אין יוצאין לא בחלוט ולא במעיסה ולא בסופגנין ולא [בדובשנין] ולא באסקריטין אבל ממלא כריסו מהן ובלבד שיאכל כזית מצה באחרונה יוצאין במצה מתובלת בין שנתבלה באלפס בין שנתבלה בקדרה יוצאין בחררה ובמצה ישנה ובלבד שעשאה מתחלה לשם פסח.
(13) They do not fulfill [their obligation of eating unleavened bread] with chalut (dough kneaded with hot water), nor with meisah (flour mixed with boiling water, see Challah 1:6), and not with sponge-cakes (contra Tos. Pesachim 2:11), and not with honey-cakes, but he may fill his belly with them [on Passover night] provided that he eats [at least] an olive's-bulk of matzah after doing so. They fulfill [their obligation] with spiced matzah, whether it was spiced in a stew-pot or whether it was spiced in cooking pot. They [also] fulfill [their obligation] with a chararah (a thin cake baked on coals), and with matzah [made from] old grain, as long it was made from the start in the name of Passover (i.e., one had in mind that it was being made for the purpose of fulfilling the obligation).
יוֹצְאִין בְּמַצָּה עָבָה עַד טֶפַח כְּלֶחֶם הַפָּנִים. יוֹצְאִין בְּמַצָּה נָא כְּדִי שֶׁתִּיפָּרֵס וְלֹא תֵיעָשֶׂה גִידִין גִּידִין. מַצָּה הַיְּשָׁנָה תַפְלוּגְתָא דְבֵית שַׁמַּי וּבֵית הִלֵּל. אָמַר רִבִּי יוֹסֵה. דִּבֵרְי הַכֹּל הִיא. מִכֵּיוָן שֶׁלֹּא עֲשָׂאָהּ לְשֵׁם פֶּסַח דָּבָר בָּרִיא שֶׁלֹּא דֵיקְדֵּק בָּהּ. יוֹצְאִין בִּסְרוּקִין בֵּין מְצוּייָרִין בֵּין שֶׁאֵינָן מְצוּייָרִין. אַף עַל פִּי שֶׁאָֽמְרוּ. אֵין עוֹשִׂין סְרִיקִין מְצוּייָרִין בַּפֶּסַח.
The Yerushalmi sounds just like the Tosefta and as long as you made the matza with a shmira from chametz old matzos are fine.
The Bach uses a Yerushami regarding a sukka yeshana.
הלכה: סוּכָּה הַיְּשָׁנָה בֵּית שַׁמַּאי פּוֹסְלִין וּבֵית הִלֵּל מַכְשִׁירִין. תַּנֵּי. צָרִיךְ לְחַדֵּשׁ בָּהּ דָּבָר. חֲבֵרַייָא אָֽמְרֵי. טֶפַח. רִבִּי יוֹסֵה אוֹמֵר. כָּל־שֶׁהוּא. מָאן דְּאָמַר. כָּל־שֶׁהוּא וּבִלְבַד עַל פְּנֵי כוּלָּהּ. אַף בְּמַצָּה כֵן. מַצָּה הַיְּשָׁנָה תַּפְלוּגְתָא דְבֵית שַׁמַּי וּדְבֵית הִלֵּל. אָמַר רִבִּי יוֹסֵה. דִּבְרֵי הַכֹּל הִיא. מִכֵּיוָן שֶׁלֹּא עֲשָׂאָהּ לְשֵׁם פֶּסַח דָּבָר בָּרִיא שֶׁלֹּא דִיקְדֵּק בָּהּ.