Author Topic: STM32F7 - RTOS vs. Embedded Linux  (Read 4448 times)

0 Members and 1 Guest are viewing this topic.

Offline braden_sunTopic starter

  • Newbie
  • Posts: 7
  • Country: us
STM32F7 - RTOS vs. Embedded Linux
« on: March 11, 2020, 01:13:10 am »
Hi everyone,

I am trying to build a digital motorcycle speedometer using the STM32F7 how best to go about it. I don't have much experience with embedded linux or RTOS but am trying to determine what would be best. I know I don't really need a hard RTOS but I am having a hard time thinking of how I would use linux. For example, I'm not sure how all the different sensors would connect. Also, how does embedded linux interact with things such as the build in LCD Display Controller? I think I have a more clear picture of what an RTOS would look like for this but could see it getting very complicated once you add in driving an LCD, reading speed sensors, talking with a phone over bluetooth, etc.

I would really appreciate any good resources for learning about embedded linux.
« Last Edit: March 11, 2020, 01:20:15 am by braden_sun »
 

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: STM32F7 - RTOS vs. Embedded Linux
« Reply #1 on: March 11, 2020, 07:39:53 am »
STM32F7 won't run Linux. Use that MCU series with your favourite RTOS (e.g. FreeRTOS that is supported by the STM32Cube tool, this also provides kind of driver support for the internal LCD controller) or no OS at all. If you've never worked with an embedded MCU like that, it'll be a mess ... At least you have all the driver support for I2C, SPI, UART available from the Cube tool (although this doesn't always work as expected and you'd have to deal with DMA / IRQ channel assignment manually).

For embedded Linux, have a look at the STM32MP1 series, here you'd get all the typical Linux stuff. You'd have a working TCP/IP stack, display drivers, mass storage drivers and most probably working serial comms (UART) through the usual Linux devices. For connecting sensors through SPI / I2C I don't know if or how well implemented drivers (kernel modules) are available.
Safety devices hinder evolution
 

Online Psi

  • Super Contributor
  • ***
  • Posts: 9950
  • Country: nz
Re: STM32F7 - RTOS vs. Embedded Linux
« Reply #2 on: March 11, 2020, 07:55:51 am »
You could make a digital speedometer by interfacing a LCD that includes its own HMI/graphicalAPI with any generic micro-controller like an Arduino or STM32Fx.
The graphical API removes the need to use a super fast MCU because the LCD handles most of the complex 2D drawing stuff itself.
It also means you don't have to write all that drawing and font code yourself.

You simply tell the LCD module to draw you a box or a line at position x,y with width and height for example.
Or the text "KPH" at position x,y etc..
Some of those LCDs with GUIs built in will even draw you meters, dials and gauges with touchscreen support etc...
« Last Edit: March 13, 2020, 12:49:25 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: STM32F7 - RTOS vs. Embedded Linux
« Reply #3 on: March 11, 2020, 01:20:27 pm »
STM32F7 won't run Linux.
You can run nommu Linux them. The mainline kernel has support for some STM32F4 and F7 boards. See eg. here.

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14472
  • Country: fr
Re: STM32F7 - RTOS vs. Embedded Linux
« Reply #4 on: March 12, 2020, 04:03:52 pm »
An RTOS just to implement a cute speedometer? That's way overkill IMO.

But Linux? It would be more than overkill here. It will be hard to configure, it won't be close to real-time unless you put great effort into it, and even a very stripped-down Linux will take much longer to boot. Annoying. (And those are general considerations - good luck with Linux on the STM32F7 anyway.)

Why do you want an OS for this project to begin with?
 

Offline blacksheeplogic

  • Frequent Contributor
  • **
  • Posts: 532
  • Country: nz
Re: STM32F7 - RTOS vs. Embedded Linux
« Reply #5 on: March 13, 2020, 12:34:04 am »
Why do you want an OS for this project to begin with?

What an absurd statement to make, for a start, this implies that a speedometer does not need to be IOT enabled. How would you remotely telnet into it? What if you want to quickly check your email? web browser? The list of missing (and essential functionality) is endless..... Personally, I think this is going need a custom ASIC to off-load work from the applications processor (handle data acquisition) and I would certainly be looking at running Linux if I could get away with it to save licensing fees especially if licensing is per core.
 
The following users thanked this post: thm_w, I wanted a rude username

Offline ralphrmartin

  • Frequent Contributor
  • **
  • Posts: 480
  • Country: gb
    • Me
Re: STM32F7 - RTOS vs. Embedded Linux
« Reply #6 on: March 13, 2020, 04:41:20 pm »
Why do you want an OS for this project to begin with?

Indeed, a few mechanical bits should do the job. Why use electronics at all?  >:D >:D >:D
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14472
  • Country: fr
Re: STM32F7 - RTOS vs. Embedded Linux
« Reply #7 on: March 13, 2020, 05:55:37 pm »
How would you remotely telnet into it? What if you want to quickly check your email? web browser? The list of missing (and essential functionality) is endless..... Personally, I think this is going need a custom ASIC to off-load work from the applications processor (handle data acquisition) and I would certainly be looking at running Linux if I could get away with it to save licensing fees especially if licensing is per core.

 :-DD
 

Offline Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1670
  • Country: us
Complexity is the number-one enemy of high-quality code.
 
The following users thanked this post: cgroen

Offline jeremy

  • Super Contributor
  • ***
  • Posts: 1079
  • Country: au
Re: STM32F7 - RTOS vs. Embedded Linux
« Reply #9 on: April 09, 2020, 01:12:15 am »
FreeRTOS will do fine if you are interested in using an OS. LittleVGL if you want to make a nice GUI.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14472
  • Country: fr
 

Offline TomS_

  • Frequent Contributor
  • **
  • Posts: 834
  • Country: gb
Re: STM32F7 - RTOS vs. Embedded Linux
« Reply #11 on: May 01, 2020, 09:07:01 am »
And if something like FreeRTOS is too heavy you could look at something like TinyRTX. I think it has mostly been written to work on PIC microcontrollers, and lacks some synchronisation features like semaphores and mutexes, but is probably small enough that you could re-work it for some other platform, and shoe horn in any features that are missing.

I'm considering it for some projects because it looks incredibly light weight in comparison.
 

Online Siwastaja

  • Super Contributor
  • ***
  • Posts: 8172
  • Country: fi
Re: STM32F7 - RTOS vs. Embedded Linux
« Reply #12 on: May 01, 2020, 01:38:43 pm »
Neither.

Bare metal.

Put a Raspberry Pi or Android tablet there if you need a computer. Develop a small low-level bare metal module (a small Cortex-M0 likely works) if you need something such a computer can't do.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf