C Programming Language
Develop in C on the Omega
C is a natural fit for low-level control on the Omega2. You can compile small utilities directly on the device or cross-compile on a workstation for faster turnaround.
Tooling Options
- To install the on-device toolchain, follow the Compiling C on the Omega guide.
- For larger projects, build the OpenWrt/LEDE toolchain and cross-compile firmware or packages.
Both workflows rely on opkg and the Onion package feeds, so make sure your device has the correct repositories enabled before installing development packages.
Next Steps
- Use the
libonioni2c,libonionpwmexp, andlibonionrelaylibraries from the Software Reference section to access hardware features from C. - When you are ready to ship code on boot, wrap your binaries in an init script and see Running a Command on Boot.