Commit Graph

61 Commits

Author SHA1 Message Date
Jonas Meyer 6aeb55c5d7 mk rules: Improve behaviour when DEVICE is set to family. Improved Warning
The warning now uses family instead of subfamily, which is available
sooner.
2016-08-18 22:07:36 +00:00
Jonas Meyer 60ca09c61e genlink.awk: no need to make mode a regexp
Since I don't understand regular expressions and don't see how they are
useful in this case I made the mode selection a simple string match
2016-08-18 22:07:36 +00:00
Jonas Meyer c025dc0327 mk/genlink: change devices.data format to remove gcc specific options
As discussed with karlp on irc the devices.data file should not contain
gcc specific command line options.

For that reason the command line options for gcc are now generated from
the variables CPU and FPU by the rules in the mk directory.

This breaks the genlink tests.

genlink: simplified devices.data

devices.data already had the information about the family name.
By using the first field (by the pattern used to match it) as family name information that data doesn't
have to be provided explicitly. The same data is used to generate the
CPPFLAGS, such as -DSTM32F1

The architectures block of the devices.data file was redundant.

genlink-config.mk uses family and subfamily to figure out which libopencm3
variant actually exists.
2016-08-18 22:07:36 +00:00
Karl Palsson 2db3d290e7 stylecheck: fix deprecation warnings for newer perl
Simply escape the { chars as directed.
2016-08-16 21:23:03 +00:00
Torsten Raudssus 0cb1db0967 genlink: properly escape regexp special characters
Fixes compatibility with mawk, as used on debian and ubuntu now.
2016-07-08 22:24:48 +00:00
Anatol Pomozov ae41782e1a Fix misspellings using codespell tool 2016-03-08 08:52:54 -08:00
Karl Palsson bd2cfc8ac4 drop BMP helper scripts.
They should have been mmoved to the -examples repo when it was originally split
out.  (Clearly, they weren't being used)
2016-02-29 21:34:19 +00:00
Jim Paris 01f08c4638 Remove WEAK from handler prototypes
These prototypes affect functions defined by application code.  Only
the implementations in libopencm3 are supposed to be weak; the
functions in application code should definitely not be.  Otherwise,
you'll end up with two weak symbols being linked together, and
it's luck as to which one the linker picks.
2015-11-24 09:55:27 +00:00
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