-
Notifications
You must be signed in to change notification settings - Fork 53
Building a binary
As far as the author knows, building a PRK binary, or to be exact, preparing a build environment can be done in only Linux. WSL2 should work, too.
If you are a macOS user, try docker instead. (See Docker)
-
Make sure you have CRuby (MRI) because "Static type checking" by Steep will be invoked in the build process
-
Setup Raspberry Pi Pico C/C++ SDK
- Follow the instructions on https://github.com/raspberrypi/pico-sdk#quick-start-your-own-project
- Additionally, you need to run
git submodule update --init
inpico-sdk
directory so thattinyusb
submodule locates in it - Make sure you have
PICO_SDK_PATH
environment variable
- Additionally, you need to run
- Follow the instructions on https://github.com/raspberrypi/pico-sdk#quick-start-your-own-project
-
Clone the
prk_firmware
wherever you like(be sure to add
--recursive
)git clone --recursive https://github.com/picoruby/prk_firmware.git
-
Setup (for the first time only)
cd prk_firmware/ rake setup
-
Build
rake
Now you should have
prk_firmware-[version]-[date]-[hash].uf2
file inprk_firmware/build/
directory.
You may want PRK Firmware not to be a mass storage device in case that your employer doesn't allow you to bring a USB memory 🙈
If so, you can build a binary including your keymap.rb in this way:
-
Clone a keymap repository, for example, "meishi2" which is a 2x2 matrix card-shaped keyboard in
prk_firmware/keyboards
directorycd keyboards git clone https://github.com/picoruby/prk_meishi2.git
-
Build
cd .. # back to prk_firmware/ rake build_with_keymap[prk_meishi2]
Now you should have
prk_firmware-[version]-[date]-no_msc.uf2
file inprk_firmware/keyboards/prk_meishi2/build/
directory which includes your keymap in code.
You are likely having problems while developing PRK.
These files may give you a clue regarding PRK build system:
prk_firmware
├── CMakeLists.txt
├── Rakefile
├── lib
│ └── CMakeLists.txt
└── src
└── ruby
└── Rakefile
- Getting started
- Keyboard features
- Keycodes (ja)
- Mouse (ja)
- Layers and mode key (ja)
- Debounce
- Composite key
- Split-type keyboard
- Keyscan matrix
- Num Lock, Caps Lock and Scroll Lock
- Useful methods that make you free
- BIOS mode
- Other features
- Examples
- Development
- Contribute to the Wiki
- FAQ