YadukrishnanKM/ROHINI_RTOS_Project_Genrator
It is the project generator for ROHINI_RTOS.
A Zig-based cross-platform dynamic library for generating ready-to-use RTOS project scaffolds. Designed for embedded developers who want to quickly bootstrap structured RTOS-based applications.
.so
or .dll
.callconv(.C)
for smooth FFI.Requires Zig ≥ 0.13.0
zig build
zig build -Dtarget=x86_64-linux # Linux x86_64
zig build -Dtarget=aarch64-linux # Linux aarch64
zig build -Dtarget=x86_64-windows # Windows x86_64
zig build -Dtarget=aarch64-windows # Windows aarch64
Artifacts Produced:
Target | Output Library |
---|---|
Linux x86_64 | librohini_rtos_gen_linux_x86_64.so |
Linux aarch64 | librohini_rtos_gen_linux_aarch64.so |
Windows x86_64 | rohini_rtos_gen_windows_x86_64.dll |
Windows aarch64 | rohini_rtos_gen_windows_aarch64.dll |
#include "rohini_rtos_gen.h"
#include <stdio.h>
int main() {
// Create a new RTOS project scaffold
int res = CreateRTOSProject("MyProject", "FreeRTOS");
if (res != 0) {
printf("Project creation failed with code %d\n", res);
return -1;
}
printf("RTOS project created successfully!\n");
return 0;
}
ctypes
)import ctypes
# Load the library
lib = ctypes.CDLL("./librohini_rtos_gen_linux_x86_64.so")
# Define the function signature
lib.CreateRTOSProject.argtypes = [ctypes.c_char_p, ctypes.c_char_p]
lib.CreateRTOSProject.restype = ctypes.c_int
# Create a project
res = lib.CreateRTOSProject(b"MyProject", b"FreeRTOS")
if res == 0:
print("RTOS project created successfully!")
else:
print(f"Failed with error code {res}")
MAJOR.MINOR.PATCH
GPL 3.0 LICENSE