Work in progress on running PewPew games on the Playdate.
-
Apply this change to your Playdate SDK to fix linker errors about undefined references to various functions (I have not examined yet where exactly in MicroPython the references come from and whether they could be avoided):
--- PlaydateSDK/C_API/buildsupport/common.mk 2024-04-01 18:56:16 +++ PlaydateSDK/C_API/buildsupport/common.mk 2024-04-01 18:56:16 @@ -104,6 +104,9 @@ LDFLAGS = -nostartfiles $(MCFLAGS) -T$(LDSCRIPT) -Wl,-Map=$(OBJDIR)/pdex.map,--cref,--gc-sections,--no-warn-mismatch,--emit-relocs $(LIBDIR) +# see https://devforum.play.date/t/undefined-reference-to-exit-and-friends/7263/2 +LDFLAGS += --specs=nosys.specs + # Generate dependency information CPFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
-
Clone this repository.
git clone https://github.com/cwalther/pew-playdate.git pewpew cd pewpew
-
Initialize submodules – this pulls in MicroPython, among others. (Don't use
--recursive
, MicroPython has a lot of submodules and most are not needed!)git submodule update --init
-
Initialize the required ones among MicroPython’s submodules.
make -f micropython_embed.mk submodules
-
Build the embed port of MicroPython, including
mpy-cross
.make -f micropython_embed.mk
-
Build PewPew.
make
-
Run.
open pewpew.pdx