this is very similar to what was done here: https://forum.bela.io/d/314-is-anyone-successfully-using-i2c-oled-lcd/81
Does your RTIMULib program have the render/setup/cleanup Bela functions? It shouldn't! This way you can run it alongside another Bela program such as scsynth. Once your program is built, you can run it alongside Supercollider on the board by starting it manually. This is not supported by the Bela IDE, so you will have to do it from the terminal (you can keep using the IDE for the Supercollider workflow).
You will need to ssh onto the board (ssh root@bela.local) and run the pre-build project. A command such as:
/root/Bela/projects/PROJECTNAME/PROJECTNAME
will run it. You can use this workflow to test that the program is behaving as expected and troubleshoot it. Once it's ready to go, you can have it start automatically at boot. This involves creating the file /lib/systemd/system/rtimu-osc.service with this content:
[Unit]
Description= RTIMU-OSC Launcher
After=network-online.target
[Service]
ExecStart=/root/Bela/projects/PROJECTNAME/PROJECTNAME
Type=simple
Restart=always
RestartSec=1
WorkingDirectory=/root/Bela/projects/PROJECTNAME
Environment=HOME=/root
KillMode=process
[Install]
WantedBy=default.target
then systemctl start rtimu-osc will start it as a one-off (use systemctl stop rtimu-osc to stop it. You can see the program log with journalctl -fu rtimu-osc. Once this also works fine, you can enable it to run at boot: systemctl enable rtimu-osc ( and disable it with systemctl disable rtimu-osc).