[build] Remove PyYAML dependency

This converts all the YAML files to JSON files, as json parsing is built
into python instead of being a separate library requiring installation.

YAML is a superset of JSON, but putting comments in is not quite as obvious
as it is in yaml.

The following glue was used to convert yaml to json:
python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' < $1 > $2

Clearly I haven't tested this on every single platform, and this
doesn't address the large blobs of yaml in the lpc4300 scripts directory,
only the cortex NVIC generation process.

I've tested a few IRQ driven example apps, and I've checked the generated
output of some known cases like the LM3s that has explicit gaps, and they are
all generated correctly.
This commit is contained in:
Karl Palsson
2013-09-06 23:43:39 +00:00
committed by Piotr Esden-Tempski
parent b4eb8a6971
commit 5c14780403
37 changed files with 1030 additions and 994 deletions

9
README
View File

@@ -35,19 +35,14 @@ TIP: Include this repository as a GIT submodule in your project. To make sure
Prerequisites
-------------
Building requires python, and a python YAML module. (Some code is generated)
Building requires python. (Some code is generated)
For Ubuntu
$ [sudo] apt-get install python-yaml
For Fedora
$ [sudo] yum install PyYAML
For Ubuntu/Fedora, you already have everything you need.
For Windows
Download and install:
msys - sourceforge.net/projects/mingw/files/MSYS/Base/msys-core/msys-1.0.11/MSYS-1.0.11.exe
Python - http://www.python.org/ftp/python/2.7/python-2.7.msi (use installer to get the right registry keys for PyYAML)
PyYAML - http://pyyaml.org/download/pyyaml/PyYAML-3.10.win32-py2.7.exe
arm-none-eabi toolchain - for example this one https://launchpad.net/gcc-arm-embedded
Run msys shell and set the path without standard Windows paths, so Windows programs such as 'find' won't interfere:
export PATH="/c//Python27:/c/ARMToolchain/bin:/usr/local/bin:/usr/bin:/bin"