Total noob question

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

linuxnoob
Posts: 1
Joined: Thu May 21, 2020 4:09 pm

Total noob question

Thu May 21, 2020 5:16 pm

Hi,
I apologize for this, but I need to get my head around using linux for an embedded headless platform. I have build a system with both yocto and buildroot and can build kernel drivers. I am trying to write a system to periodically read from an ADC over SPI and send the data out over a wireless network. Having only really done bare metal development, would I write a single application to talk to the various drivers, sleeping between reads or separate systems talking to each other?
Many thanks!
blue_z
Location: USA
Posts: 2079
Joined: Thu Apr 19, 2007 10:15 pm

Re: Total noob question

Fri May 22, 2020 1:36 am

linuxnoob wrote: I have build a system with both yocto and buildroot ...
Why do you think you need both Yocto and Buildroot?
Choose one tool.

linuxnoob wrote: I am trying to write a system to periodically read from an ADC over SPI and send the data out over a wireless network
....
would I write a single application to talk to the various drivers, sleeping between reads ...
You haven't provided any criteria for a reasonable response.
An application program makes system calls (aka syscalls) to perform I/O, and does not "talk to the various drivers".
Explicit "sleeping between reads" by a program may be a programming mistake that would be better (i.e. efficiently) handled by the OS and blocking mode.

linuxnoob wrote: ... or separate systems talking to each other?
You seem to overuse the word "system" so that exactly what you're referring to is unclear.
"Separate systems" could be a handful of SBCs.
I've seen a product use multiple programs that I thought could be also be implemented with a single program with threads.
But then you might not even need multi-threading.
Pick your poison (presumably after you have determined the requirements).

Regards

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 3 guests