When compiling with all warnings enabled, some defines can lead to
warning due to missing unsigned type suffix:
warning: integer overflow in expression [-Woverflow]
This fix should not affected behavior at all, since calculation with
such overflows lead to the same actual address when writing to that
location. However, it makes the warning disappear and also defines
the right data type for a memory location.
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.
to remove errors, duplications and inconsistencies.
File lib/stm32/f1/pwr.c - all code removed as it duplicates that in common/pwr_common.c
Remaining changes do not affect code. Compiles OK.
TODO efm32 has no code so generates no modules
TODO F2 needs pwr.c
TODO L1 needs dma.h and dma.c
the cortex generic interrupts get moved to lib/cm3/vector.c, the
platorms' individual irq names, initialization and handler prototypes go
to platoform specific irq.h files.
as the vector.c file heavily depends on platoform specific headers, it
can't be built once-and-for-all in lib/cm3/, so there are inclusion
stubs in the various architecture dirs; this might be better solved with
Makefile / include path handling.
one particular file is lib/lpc43xx/vector.c; that platform's
initialization code contains an additional section to copy everything
from flash to ram (which probably performs better there). that code
still resides in the inclusion stub, and gets mashed in using defines.
would need a cleaner implementation together with the Makefile solution.
this commit contains some files of the upcoming efm32 branch, from which
it was cherry-picked.
the .bin files produced from before and after this commit only differ in
lpc43xx, where the startup sequence was subtly modified.
* don't reference sections that don't exist (typically happens for
registers that don't contain any fields and are interpreted
numerically.
* allow templates to use override_backref for surpressing the list of
registers that use it
* print doc for fields even when it uses values or only exports a mask
* allow fields to define their own mask; those fields have to define
their values explicitly too, and don't have to provide a shift
* don't print a "No values defined for the field" lines, as there's
always a mask in that case by now.
registers that have the same structure can now use shared value
definitions. the abstraction is kept active through the header
generation; that is, no cartesian product code is generated.
the header file genertion mechanism here is designed to:
* use human readable source data that is better structured and less
repetitive than the header files themselves
* produce same quality header files than the manual process of writing
them. some features were not yet enabled to show that the existing
headers didn't change. (look at emu.h's differences. whitespace
switched from tabs to spaces as they are easier to handle, use
--color-words to see the few differences that stemmed from
inconsistencies in the original file.)
* be less tedious and thus error prone when doing large modifications
(eg, i forgot to add _MASK to bitfields, would like to enable
bitbanding acces, and to overhaul the naming in doxygen modules)
this follows the license change of the master branches in [43561de]. all
files whose copyright is not my own are originally based on files whose
license has been changed in master.
the expression used for the conversion was:
sed -i -e 's/This program is free software: you can redistribute/This library is free software: you can redistribute/g' -e 's/under the terms of the GNU General Public License as published/under the terms of the GNU Lesser General Public License as published/' -e 's/This program is distributed in the hope that/This library is distributed in the hope that/g' -e 's/You should have received a copy of the GNU General/You should have received a copy of the GNU Lesser General/' -e 's/along with this program. If not/along with this library. If not/' -e 's/GNU General Public License for more details/GNU Lesser General Public License for more details/' */**/efm32/**/*(.)
[43561de] 43561de3297b88d68753cb4625d6dc48bfb43d71
along with the actual implementation comes a first attempt to better
structure the doxygen groups. putting all the groups in a bigger one
makes it easier to reference them from the file itself, and makes the
structure clearer on the module page.
includes minor refactoring in example code and modification of how the
generic and the tinygecko specific vector.h go together (bringing it in
line with stm32/f1's memorymap.h)