[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/diy/ - Do It Yourself


View post   

File: 335 KB, 1770x1180, STM32_F4_2MB_p3357big.jpg [View same] [iqdb] [saucenao] [google]
488035 No.488035 [Reply] [Original]

I'm working on a project where i need multitasking on a STM32(Cortex M4F). So what i basically need is a scheduler, and the best place to get one is as part of a operating system.

The problem i'm facing is there just doesn't seem to be many options for something that isn't a cluster fuck of "features" or would perform very well on an embedded device. I was originally going to use chibios since its the most straight forward one to use, but the HAL, libraries and peripherals(i.e. i2c bit bang) it provides are already part of the standard blob that ST ships for free(its BSD licensed so why not use it).

So i need recommendations for something very light as all i need is a task manager and maybe a heap memory manager since the ST one is not fully featured. Everything else will be implemented natively, security isn't a concern.

>> No.488051

Multitasker isn't exactly difficult to write. If you have no need for the rest of the OS and you don't need particularly sophisticated task handling, write it by yourself.

>> No.488060

There's a fuckton of free microcontroller soft-realtime kernels ported to Cortex-M with liberal licenses (GPL with linking exception, BSD, MIT or similar). Most consist of a scheduler and memory allocator, maybe some libraries like TCP/IP, FAT, less commonly USB and so on. Full HALs with drivers are usually limited to those with at least a commercial licensing alternative.

If you want to use CMSIS, take a look at Keil's open-sourced version of their RTX kernel. It uses the CMSIS-RTOS API and everything.

>> No.488062

I should add that writing your own scheduler is educational and as >>488051 said, not too difficult either.

>> No.488066

>>488051
i'll look into doing this eventually, but not for this project
>>488060
i was just looking at the keil implementation, its very attractive so far, but the package they're providing doesn't seem to support the M4, or at least it doesn't appear too. I'm also using stm32plus which has a FAT driver i'll be using.
>>488062
hrmm maybe...

>> No.488070

>>488035
You sound like you have the chops to do it, so if you have all the source for an OS that runs on that, why not just pare it down to exactly what you want?

>> No.488098

>>488066
RTX supports Cortex-M4, maybe you have an old version? The latest is 4.7.

>> No.488104

>>488098
correct, i was looking in the wrong directory, reading the documentation helps heaps.

and although its disgusting _ENTERPRISE_QUALITY_ code it looks like it'll do the business, plus the interface is quite nice.

ty /diy/