forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 0
Building micropython for FreeDOS
pohmelie edited this page Apr 22, 2016
·
5 revisions
FreeDOS build based on unix build and use djgpp as cross-compiler. Build process tested with linux ubuntu 14.04, but should work fine with other *nix operating systems. Since resulting micropython binary is bigger than DOS can hold, DOS extender should be used. This tutorial is based on CWSDPMI DOS extender and awesome build-djgpp.
-
Building djgpp via build-djgpp project.
git clone https://github.com/andrewwutw/build-djgpp cd build-djgpp DJGPP_PREFIX=path/to/djgpp source build-djgpp.sh 5.3.0You probably will need to view build-djgpp readme for prereqs and version number.
-
Building micropython.
git clone https://github.com/micropython/micropython cd micropython/unix PATH=path/to/djgpp/bin:$PATH make freedos -
Extending with dos extender (CWSDPMI).
path/to/djgpp/i586-pc-msdosdjgpp/bin/exe2coff micropython_freedos.exe cat CWSDSTUB.EXE micropython_freedos > upython.exe
You can change extender options for upython.exe with CWSPARAM.EXE. CWSDPMI binaries are available at micropython-freedos ad-hoc module repo since official site is down sometimes.