Freescale Vybrid is a familiy of ARM SoC, wheras the VF6xx models
have two cores in one SoC, a Cortex-A5 and a Cortex-M4. This adds
initial support for the Cortex-M4 in the libopencm3 library.
By using two different ram areas (pc_ram and ps_ram) the user can
put the code in a RAM area bounded to the code bus. The data can
be stored in the data area. However, currently the initial values
of for the variables in the data section are stored in the code
section and copied to the ram section by the initialization code
(like it's copied from ROM to RAM on microcontrollers).
When full path of a source directory has spaces in it, that makes
shell and Make split the path, so special treatment is
necessary. Additionally, @F doesn't honour the escaping, so has to be
avoided.
Reported-by: Roman Faizullin <roman@faizullin.info>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
So that the navigation pane works correctly in browsers.
Some additional doc fixes put in where found (but many more still to go).
Added some dummy .c and .h files to bring the associated docs into line.
makefile changed to allow 'make html' as well as 'make doc' (the latter only does html anyway).
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.
Each thread runs its own stylecheck script, outputing to {FILENAME}.stylecheck file. If that file is empty, it is deleted. Otherwise it is printed to the output and stays in the sources directory to indicate something in that file is not correct.
The file mangling and cat-ing is needed because of multithreaded nature of paralell make. (We like single file to be an block of text on the output).
New PHONY added that make styleclean clears all .stylecheck files.
New functionality added to check only single file (specifyilng the file with stylecheck extension) ie
make lib/usb/usb.c.stylecheck
BUG: if someone edit that file, .stylecheck file is not regenerated - missing dependency on the %.stylecheck rule. FIX: make styleclean stylecheck rebuild all style errors
Performance:
make stylecheck 1:43 -> 1:54 (slightly slower due to file creation)
make stylecheck -j8 1:43 -> 0:34 (Rapidly faster)
note the -j option must be specified with number, OS Windows cannot handle one thread per file.
make clean 34.64s -> 35.35s
make clean -j 14.00s -> 14.16s
(measured on Core2 quad, 2.84GHz, 4GB ram, windows x86)
Added overhead is logging the operation with every yamlfile to output.
- Makefiles now include building f3 src directory.
- Gpio support added. gpio_common_f24 changed to support also f3.
- f3 still not compiling, but f2 compile not broken (probably also f4).
We now have a subdirectory containing register definitions in scripts,
this confuses the install command so we have to be more specific about
which scripts to install. We actually only want to install the black
magic scripts from there as they are useful for locm3 users.
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.
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. :)
Use fixed variables for things that can't change, instead of variables
like SRCLIBDIR that was causing a shell call for every single use.
Use less functions in general and less shell expansions.
Use builtin functions like $(realpath blah) instead of $(shell
pwd)/blah In particular, this was important for me trying to build on
windows with git-shell. This should help a lot on smaller build
machines, but doesn't make a huge difference on my own.
Remove redundant clean print messages. These also cause more needless
shell expansions.
Create lm4f code infrastructure from the lm3s infrastructure.
As far as the interrupt table is concerned, don't create an irq.yaml. Just
include the LM3S nvic.h. The LM3S vector table seems to be compatible with the
LM4F
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Where the library is installed has quite an affect on what -L and -I
flags are used. If you install into the toolchain, you don't want
to use them at all, but if you install out of tree (/opt/mycm3 for
example) you need to specify the -L and -I flags.
Update the documentation and the example makefiles to support this
You cannot issue make inside a for loop if you want to let it run in
parallel. Performance increases seen:
10:03 < zyp> I tested make all -j8 without your change, it takes 8.7s
10:03 < zyp> so on my cpu, your change gives >2x speedup
My own cpu gives more modest speed increases, of only about 20%.
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
New doc directory with config files and generated html, LaTeX/pdf.
Makefile provided for autogeneration and explanatory README.
The project structure is hostile to doxygen, which can't cope with functions
of the same name. Doxygen is run for each family separately, and separately
for LaTeX generation. Customized layout files sort of "integrate" HTML, and
separate pdfs are generated for each family. Not ideal but seems the best
solution until doxygen changes, if at all.
- The library files are now being built into the lib subdirectory of the
source.
- The linker files for each library are being copied into the lib source
subdirectory.
Motivation: The relative locations of files in the source directory after make
are now the same as after make install now. This makes it easier to
reuse examples with their makefiles outside of the libopencm3
sourcecode directory.