[sw] Add Meson as software build system
Overview:
This commit adds the following changes:
* Meson build files for sw/ targets. There are two supported build
configurations:
* build-fpga: Nexys FPGA
* build-sim: Verilator
* RISCV crosstool support via toolchain.txt
* Add util/embedded_target.py to generate additional objects per
embedded_target.
* Breakdown sw/lib/ot_lib.a intp per IP libraries. Each target now
includes the dependencies it needs, e.g. sw_lib_uart_ot can be used to
include the UART device library.
New build system requirements:
```console
$ pip3 install --user meson
$ apt-get install ninja-build
```
Steps for using Meson:
```console
$ cd ${REPO_TOP}
$ ./meson_init.sh
$ ninja -C build-fpga
$ ninja -C build-verilator
```
To build an individual target:
In the following example, just build the flash_test.bin
target:
```console
$ ninja -C build-fpga sw/tests/flash_ctrl/flash_test.bin
```
meson_init.sh configuration options:
* `-f`: Delete build directories before calling meson.
* `-r`: Call Meson with `--reconfigure` flag. Requires valid build
directories.
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..e78fb4c
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1 @@
+option('target', type : 'combo', choices: ['verilator', 'fpga', 'undef'], value : 'undef')