Having trouble building and uploading to device #230
Replies: 4 comments 5 replies
-
Here's the just recipes I used for one of my project. It's a bit dated, but hopefully, it still works, or at least can give you some pointers to find a solution. The build:
# build for simulator
cargo playdate package --release --locked
# build for device
cargo playdate package --release --device --locked Then the (replace package: build
# Copy the PDX to the root directory
cp -r target/thumbv7em-none-eabihf/release/playdate/{{project_name}}.pdx .
# Copy the Linux library into the PDX, so that it contains both the `.bin` file for device and `.so` for simulator
cp target/release/playdate/{{project_name}}.pdx/pdex.so {{project_name}}.pdx/
# Strib debug symbol to make the Linux library smaller
strip {{project_name}}.pdx/pdex.so
# Add a build number to the pdxinfo, I decided to have the build number being the number of commit in the git history
echo "buildNumber=$(git log --oneline | wc -l)" >> {{project_name}}.pdx/pdxinfo
# Zip the result
zip -r {{project_name}}.pdx.zip {{project_name}}.pdx The resulting zip file works for both Linux simulator and device. The device will simply ignore the I haven't tried it for a while, but it was definitely working, and I am also on archlinux ;-) I hope it helps |
Beta Was this translation helpful? Give feedback.
-
Builds for sim and device are different, definitely. So there are two options:
What OS you're using? Possible workaround for now: |
Beta Was this translation helpful? Give feedback.
-
Here (also #231) is new build of pdtool. @jcornaz, @Boingboingsplat, please could you try it on your system with connected device? It will be incredibly helpful. 🥹 |
Beta Was this translation helpful? Give feedback.
-
@Boingboingsplat, would you please update to latest versions and give some feedback - is problem solved for you? |
Beta Was this translation helpful? Give feedback.
-
This project is looking really promising and I'm very interested! I'm having trouble with building and uploading examples to my device. I'm running things from Arch Linux.
I can use the commands from the example readme without any issues, which starts up the simulator and allows me to test the example. Uploading game to device from simulator results in
Couldn't find pdz file main.pdz
on device, but I expected to need to build for device using cargo-playdate anyways.However, when I add
--device
and build it, the build succeeds, but when it comes to running the build I geterror: Playdate device not found
. Is there some setup step to allow cargo-playdate to see my device that I'm missing? The simulator is able to access the device without issue.Full command I'm trying is:
cargo playdate run -p=playdate-controls --example=accelerometer --features=sys/lang-items,sys/entry-point --device
Beta Was this translation helpful? Give feedback.
All reactions