uC and Embedded Linux

Thread Starter

engr_david_ee

Joined Mar 10, 2023
358
What is the difference between uC Linux and Petalinux and Embedded Linux ? Which one is the most simplest and lighter then others.
 

nsaspook

Joined Aug 27, 2009
16,251
uClinux is an old toy OS that got merged in the mainline Linux kernel long ago, Petalinux is a tool suite and Embedded Linux is just a name for types of Linux controlled systems.
 

Thread Starter

engr_david_ee

Joined Mar 10, 2023
358
uClinux still exists ? Can we run on PIC32 Microcontroller ?

I have heard that most Xilinx SoC support Petalinux. Never worked with it.
 

Thread Starter

engr_david_ee

Joined Mar 10, 2023
358
Thanks for reply. Trying to grab the consept.

I guess in PIC Microcontroller FreeRTOS is used commonly.

uCLinux might be for Raspberry pi.
 

nsaspook

Joined Aug 27, 2009
16,251
uClinux still exists ? Can we run on PIC32 Microcontroller ?

I have heard that most Xilinx SoC support Petalinux. Never worked with it.
The PIC32 (original) is a MIPS processor (some PIC32 controllers have MMU and VM support for a proper protected mode OS) so it's possible to run (boot a custom Linux kernel) Linux on it and there are several old demo projects that did but running Linux doesn't make a lot of sense for the vast majority of controller based applications.

https://github.com/MicrochipTech/linux-pic32/tree/pic32-4.2.y/arch/mips/pic32
https://github.com/MicrochipTech/linux-pic32
 

Ya’akov

Joined Jan 27, 2019
10,226
The PIC32 (original) is a MIPS processor (some PIC32 controllers have MMU and VM support for a proper protected mode OS) so it's possible to run (boot a custom Linux kernel) Linux on it and there are several old demo projects that did but running Linux doesn't make a lot of sense for the vast majority of controller based applications.

https://github.com/MicrochipTech/linux-pic32/tree/pic32-4.2.y/arch/mips/pic32
https://github.com/MicrochipTech/linux-pic32
FreeRTOS or its moral equivalent makes some sense—I can't think of a use case for Linux, though.
 

nsaspook

Joined Aug 27, 2009
16,251
Last edited:

Ya’akov

Joined Jan 27, 2019
10,226
There are some complex networking and filtering applications like routers, firewalls and such where a 32-bit controller running Linux can leverage the standard networking power of Linux to great advantage.
https://openwrt.org/
https://git.openwrt.org/?p=openwrt/openwrt.git;a=shortlog;h=refs/tags/v24.10.0-rc4
Sure, but why would wouldn't you go with an ARM or other CPU, the MCU's real advantage is in its peripherals, and routing is a bit CPU intensive anyway. I guess there might be a case for it where light routing but battery power is called for... or something like that.
 

nsaspook

Joined Aug 27, 2009
16,251
Sure, but why would wouldn't you go with an ARM or other CPU, the MCU's real advantage is in its peripherals, and routing is a bit CPU intensive anyway. I guess there might be a case for it where light routing but battery power is called for... or something like that.
The 32-bit controllers are ARM/MIPS cores in some cases but with the onboard flash, memory and peripherals expected of a controller. They can handle fairly sizable networking loads.
https://openwrt.org/docs/techref/targets/start

Don't underestimate what's possible today with small Linux controller based systems that don't need user-land based programming access.
 

Ya’akov

Joined Jan 27, 2019
10,226
The 32-bit controllers are ARM/MIPS cores in some cases but with the onboard flash, memory and peripherals expected of a controller. They can handle fairly sizable networking loads.
https://openwrt.org/docs/techref/targets/start

Don't underestimate what's possible today with small Linux controllers based systems that don't need user-land based programming access.
Well... such an MCU is the other side of the blurry line from the RPi Zero between MCU dev boards and SBCs. But, maybe that's a useful spot to be in from some projects.
 

nsaspook

Joined Aug 27, 2009
16,251
Well... such an MCU is the other side of the blurry line from the RPi Zero between MCU dev boards and SBCs. But, maybe that's a useful spot to be in from some projects.
I've used PIC32MK controllers (with MIPS cores and hardware FP) to do some pretty heavy double precision math with IMU data.
https://forum.allaboutcircuits.com/...sing-accelerometer-sensor.174107/post-1568515

The power of these types of 32-bit controllers is what makes high efficiency BLDC motor controllers possible but that application is mainly brute power banging hardware with no need for a OS like Linux. Embedded Linux on similar hardware can use that same controller power for complex, secure networking and high throughput (DMA with highly efficient memory access hardware) in a single controller package.
https://ww1.microchip.com/downloads...oductDocuments/ReferenceManuals/60001214A.pdf
 
Top