Trouble setting up CLion on Linux

Hey, so I'm on Arch Linux trying to get the C SDK working with the Hello Word example in CLion, and I'm very confused.

I installed the SDK from the AUR, and right off the bat it's pretty weird because it seems to have installed in both ~/.local/share/playdate-sdk AND /opt/playdate-sdk but the C_API folder is only in the latter. Anyway, I followed both the official instructions and this thread, but I'm stuck on importing the Hello World project in CLion. The API docs say this :

Open your project folder in CLion. It will detect the names of the Simulator and device targets automatically.

But this does not seem to be happening when I open the folder. I'm not even really sure what it means to be perfectly honest. What are targets ? Why is there a simulator and a device ? Then why do we only create a Device build configuration ?

Another problem I'm having is that the docs only explain where the simulator binaries are on MacOS. And then I'm not even sure what this :

Set the Program arguments to the path of the compiled pdx bundle. Use ^-F to access a file picker.


Thanks for any indication you might be able to give me. I'm sorry if all these are stupid questions; I've never used CLion or the SDK before.

What are targets ? Why is there a simulator and a device ?

The targets are simulator and device.

The Playdate Simulator runs on your computer, it does not emulate anything. When you build for the simulator (= target is simulator), the result is a Linux binary.

When you build for the device (= target is device), you build for the ARM processor of the Playdate. The resulting executable cannot be run on your computer.

The pdx format can contain multiple executables. So when you build for multiple targets, the pdx folder contains the executable of each target.

Use ^-F to access a file picker.

^ is what Ctrl is called on Mac keyboards. You have to press Ctrl + F to show the file picker.

You may be able to use which pdc (and maybe ln -l if the result is a symbolic link) to find where pdc is. The simulator should be in the same folder I think (probably in /opt/playdate-sdk/bin).