jOS
A studio terminal with a shared software core.
I’m building a custom studio control terminal whose firmware and desktop simulator share one C11 core. The first component, jos-core, is open source.
- Type
- Hardware and embedded systems
- Core
- C11, with no heap and no RTOS dependency
- Status
- In development. jos-core is public.
- Licence
- Apache-2.0 for jos-core
typedef struct {
unsigned seconds;
uint64_t elapsed_ms;
} Counter;
static void tick(JosAppContext *context, uint64_t elapsed_ms) {
Counter *state = context->state;
state->elapsed_ms += elapsed_ms;
state->seconds = (unsigned)(state->elapsed_ms / 1000);
}
static const JosAppModule counter = {
.api_version = JOS_API_VERSION,
.id = 42,
.name = "COUNTER",
.state_bytes = sizeof(Counter),
.tick = tick
};
The whole system
I’m designing the control terminal’s hardware and interface alongside its firmware. The firmware and desktop simulator use the same core, so I can run the same software on the device and in the simulator.
jos-core
The first public piece is jos-core, a small C11 application runtime for microcontrollers. It has no heap allocation, no hardware or RTOS dependency and no GUI. The owner supplies typed state and monotonic time, and apps receive ticks and directed commands. It runs from a bare-metal loop, an RTOS task or a desktop test harness.
Version 0.2 registers up to eight apps, each with up to 64 bytes of declared state, plus an optional countdown timer. The timer defaults to twenty minutes and adjusts from five to ninety-five.
What stays private
I haven’t published the terminal’s hardware design. You can read about the software and how the system fits together here.