Commit Graph

53 Commits

Author SHA1 Message Date
Karl Palsson 00cbf86e77 scripts: clean generated cmsis headers too 2015-11-10 23:47:57 +00:00
Karl Palsson 9edde424f8 scripts: make genlinktest requires execute perms 2015-07-16 19:14:56 +00:00
Karl Palsson d3e228176f libopencmsis: Fill in missing CMSIS interrupt links
And correct a minor typo in the generated code.
2014-05-14 16:11:43 +00:00
Frantisek Burian b7785100c8 Add support of splitting parameter classes to ARCH, DEFS, LIB
in ARCH, there are all -m flags (will be expanded into ARCH_FLAGS in Makefile)
in DEFS, there are all -D flags (will be expanded into DEFS in Makefile)
in LIB, there are all -l flags (will be expanded into LIBNAME in Makefile)

If no MODE option specified, the generator behaves as in previous version.
2014-01-12 00:21:33 +01:00
BuFran d15a0e63fe [LINKER] Add single underscore to all definitions, no -D for dashed param.
This makes possibility for the script to append the definitions to CFLAGS
and LDFLAGS, and with the feature of disabling of -D prependation it will
make possible to generate ARCH_FLAGS generic to each specific chip.
2014-01-02 21:50:02 +01:00
BuFran 8d94bdc11c [GENLINK] Make tests in paralell
usage:

make genlinktests -j

speedup: 4 times on 8-core system
2014-01-02 21:50:02 +01:00
BuFran 08e08f5f84 [GENLINK] Edit the documentation to match current version 2014-01-02 21:50:02 +01:00
BuFran 30d4540d9e [GENLINK] Code Cleanup 2014-01-02 21:50:01 +01:00
BuFran 89236f0339 [GENLINK] Add Test suite + simple test 2014-01-02 21:50:01 +01:00
BuFran bfdc2cd991 [GENLINK] correct the whitespace bug 2014-01-02 21:50:01 +01:00
Karl Palsson 5c14780403 [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.
2014-01-02 20:55:15 +01:00
Ben Gamari 580be39e47 lpc43xx: Convert register definitions to YAML 2013-07-07 13:52:14 -07:00
Ben Gamari 4fd218ad4c lpc43xx/gen.py: Take YAML input 2013-07-07 13:52:14 -07:00
Ben Gamari 4d6a5d9606 lpc43xx: Move YAML OrderedDict code to separate module 2013-07-07 13:52:14 -07:00
Ben Gamari 21e4d4600f lpc43xx: Add script to convert CSV files to YAML 2013-07-07 13:52:14 -07:00
Ben Gamari 036cb51676 lpc43xx/gpdma.csv: Fix INTSTAT register name 2013-07-07 13:52:14 -07:00
Jared Boone e9eacc60ac Change header generation script to produce function-like #define macros for single-bit fields, too. 2013-07-07 13:52:10 -07:00
Jared Boone 5359dd245e Fixed typo in SGPIO_MUX_CFGx CLK_SOURCE_SLICE_MODE bit offset and width. 2013-07-07 13:52:10 -07:00
Michael Ossmann 2946de9f5d ritimer.csv 2013-07-07 13:52:10 -07:00
Michael Ossmann 922beb0730 gima.csv 2013-07-07 13:52:09 -07:00
Michael Ossmann e3ad0c6dc8 gpio.csv 2013-07-07 13:52:09 -07:00
Michael Ossmann 6a5deb7282 eventrouter.csv 2013-07-07 13:52:09 -07:00
Michael Ossmann 56361f7123 ccu.csv 2013-07-07 13:52:08 -07:00
Michael Ossmann 7b0cc0c6a3 atimer.csv 2013-07-07 13:52:08 -07:00
Michael Ossmann 299806bc4e csv contributions from GNU Radio Conference 2012 HackFest. Thanks, David! 2013-07-07 13:52:08 -07:00
Michael Ossmann df2ac8bbac scu.csv 2013-07-07 13:52:08 -07:00
Jared Boone b5ba6451af Fixed typo from user manual. 2013-07-07 13:52:08 -07:00
Jared Boone 24d8d81b43 Add generated bit/shift/mask #defines for CGU, CREG, RGU, USB (USB0 only) peripherals.
Added script used to generate #defines above.
Fixed one small change in the #define naming scheme in i2c0_init().
2013-07-07 13:52:08 -07:00
Jared Boone 49b2be5224 Added CGU PLL0USB_CTRL bit 3, DIRECTO to cgu.csv. 2013-07-07 13:52:07 -07:00
Michael Ossmann 77a1f68ea3 gpdma.csv 2013-07-07 13:52:07 -07:00
Michael Ossmann 0f7e6cf54d cgu.csv 2013-07-07 13:52:07 -07:00
Michael Ossmann 07ee98420c sgpio.csv 2013-07-07 13:52:07 -07:00
Michael Ossmann ae9a6ae4af started csv files for generation of register field stuff 2013-07-07 13:52:07 -07:00
Piotr Esden-Tempski db1f19c8f8 [Stylecheck] Also accept the usage of the x defines. 2013-07-05 19:56:08 -07:00
Piotr Esden-Tempski 66b9d658bb [Stylecheck] Accept defines using lower case x.
It is considerede CamelCase but we do accept those as it makes the code
more readable knowing that the lower case x is a placeholder for a
number or letter in the define and the define applies to all "banks",
"buffers", "subsystems".
2013-07-05 19:45:31 -07:00
Piotr Esden-Tempski 21e01edc63 [Stylecheck] We actually prefer __attribute__. 2013-07-05 19:25:23 -07:00
Piotr Esden-Tempski 01f690d0d6 [Stylecheck] Adapted checkpatch.pl to coding style. 2013-07-05 18:56:16 -07:00
Piotr Esden-Tempski 56e2928ebe [Style] Removed trailing spaces. 2013-06-30 23:40:44 -07:00
BuFran c2f7128459 Linker generation script for most of the supported chips 2013-06-30 23:30:35 -07:00
Piotr Esden-Tempski 7df63fcae0 First coarse run to fix coding style in locm3.
Added --terse and --mailback options to the make stylecheck target. It
also does continue even if it enounters a possible error.

We decided on two exceptions from the linux kernel coding standard:
- Empty wait while loops may end with ; on the same line.
- All blocks after while, if, for have to be in brackets even if they
  only contain one statement. Otherwise it is easy to introduce an
  error.

Checkpatch needs to be adapted to reflect those changes.
2013-06-12 18:22:56 -07:00
Piotr Esden-Tempski 48e0f3326b Added linux kernel checkpatch.pl script and stylecheck target.
To make it easier on everyone to keep a uniform coding style throughout
the project we will be using this target to verify our code for
complience.

Currently a lot of files in the project don't fully follow the coding
style. We need to reach that spot over time though. :)
2013-06-11 18:10:29 -07:00
chrysn a1f4c29872 Merge branch 'efm32'
this adds support for energy micro's efm32 tiny gecko, gecko, leopard gecko and
giant gecko series.

also, the experimental libopencmsis is included in this branch, as it is
required for full operation of the free energymicro standard library
2012-10-29 14:44:37 +01:00
chrysn f594af86c8 fixes for generated header cleanup
* make target phony
* don't complain about missing files
2012-10-23 01:59:41 +02:00
chrysn efce73f815 make make clean work again
the irq2nvic_h generates files in a way make doesn't understand, so it
now also provides an option to clean up again
2012-10-23 01:38:27 +02:00
chrysn 2ad04777bf only generate irq headers on demand
as header file generation is not directly controlled by make (which, by
the way, makes the generatedheaders target phony), the script has to
take care of not needlessly generating files itself lest to have make
rebuild everything everytime
2012-10-23 01:31:30 +02:00
chrysn a818dbe729 use generalized libopencm3 functions in cmsis 2012-10-19 00:18:49 +02:00
chrysn 75c9cfc287 BEGIN_DECLS wrap nivc.h declarations for c++ 2012-10-18 21:19:04 +02:00
chrysn 41c8c229cc nvic.h generation script: be on safe side with directories
now tries to mkdir its way to the output files

this wouldn't be a problem currently if it wasn't for the efm32 data
lingering in the wrong branch, but otoh it's just on the safe side in
case we meet architectures that don't need other specializations at all.
2012-10-18 21:12:00 +02:00
chrysn c69916ffb6 integrate irq2nvic_h script in buildprocess 2012-10-18 17:58:12 +02:00
chrysn ae832b4ee8 split irq.yaml output in nvic.h and vector_nvic.h
the weak pragmas need to be used in the very compilation unit where
their target is defined, requiring another dispatch
2012-10-18 17:33:20 +02:00