Re: How to handle a board with a dozen SoC's?


Jon Medhurst (Tixy) <tixy@...>
 

On Tue, 2016-09-06 at 16:03 +0000, Boie, Andrew P wrote:
What I did for Nios II (which is a soft-CPU that runs on Altera FPGAs)
is to define each different Nios II configuration as a different soc
in the Zephyr build.

So for example I have the "nios2f-zephyr" soc which is the reference
config. Then another one "nios2-qemu" for the QEMU emulator which has
slightly different settings. Each one has a system.h header file with
all the configuration details. In this case the system.h was generated
by the Altera tools.

See arch/nios2/soc/ for what I mean.
This is assuming that the CPU types you want to support are of a
family of the same basic architecture with different configuration
options.
Well, they are all ARM at least :-). Some v7 some v8 architecture, some
single core, some multi core, some with caches, memory and security
protection areas. Some with DMA.

From looking at the nios stuff, it seems there is a separate board and
soc for each combinations, so in my case 20 socs and 20 boards. :-(

Perhaps I'll end up with some custom makefiles and scripts to generate
all these from some kind of meta config. Though possibly it might be as
simple as one board, one SoC and multiple defconfigs (but zephyr top
level scripts seem to assume one board == one defconfig ??).

For now, I hacked up a couple of board directories and a soc directory
just so I can write and test device drivers, but I'm aware I'll need to
dealing with this properly at some point.

As a slight tangent, I'm also doing other things in 'non-standard'
Zephyr ways for things like drivers, because I can't bring myself to
cut'n'paste Kconfig and code segments to support multiple instances of
drivers (most boards have 5 UARTs and 5 SPI devices).

HTH,
Andrew
Not sure it did, but thanks for reply. :-)

--
Tixy

Join devel@lists.zephyrproject.org to automatically receive all group messages.