Commit Graph

116 Commits

Author SHA1 Message Date
Fabio Pugliese Ornellas d60d7802fd Make GENHDR build faster 2020-10-07 22:02:39 +00:00
Karl Palsson 4e70d06d63 stm32g4: Add basic support
* memorymap
* vectors
* rcc
* gpios
* makefiles
* devices for linker script generation
* doc structure
2020-04-09 23:29:00 +00:00
dima 72274d3caf Remove SRCLIBDIR definition from the top Makefile
All submakefiles have sensible defaults (either .. or ../..), so there is no need to fiddle with whitespaces in the dir name.
2020-02-02 10:55:01 +00:00
Brian Viele 53302439df stm32h7: Initial introduction into libopencm3.
Updates to a base set of includes to map to the h7 include files which are
mainly based on the f7 versions for simple devices (e.g. SPI, USART, GPIO).

Custom files that have been implemented from the datasheet/ref manual include
the memory map, RCC, PWR definitions, and irq.json file for generation of
nvic files for interrupt mapping.

Additional functionality, especially PLL and tweaks for non-F7 compatible
implementations coming in future commits.

Added documentation tree configuration.

Reviewed-by: Karl Palsson <karlp@tweak.net.au>
Changed dmaX_streamX to dmaX_strX in a few places for consistency
2019-11-28 22:15:24 +00:00
Brian Viele dd18b9fdbc Qorvo pac55xx: initial support
Qorvo (Nee Active Semi) PAC55xx "Intelligent Motor Control" parts,
cortex-m4 SoCs
2019-11-26 23:28:02 +00:00
Karl Palsson 7be50a5e75 make: use $(PREFIX)gcc instead of $(PREFIX)-gcc
The leading - makes it rather inconsistent with the majority of other
projects around the world.  Use the form everyone else uses.
To solve this, properly pass prefix to inner makes as was always
intended.

Fixes: https://github.com/libopencm3/libopencm3/issues/1058
2019-06-07 21:25:46 +00:00
Icenowy Zheng 54eff24e7c swm050: new MCU family
SWM050 is a series of MCU made by Foshan Synwit Tech. It contains a
Cortex-M0 CPU core, 8KiB of Flash and 1KiB of SRAM. The only peripherals
are GPIO, Timer and WDT. There's only two parts in this series, with
either TSSOP-8 or SSOP-16 packages.

This commit introduces the interrupt vector and GPIO support for them.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
2019-06-05 20:25:43 +00:00
Karl Palsson 9051480e7f irq2nvic: support V=1 make style to see the actual commands. 2019-06-03 22:29:25 +00:00
Guillaume Revaillot b8d4b03722 stm32g0: add base, irqs, memorymap and current devices. 2019-05-20 23:43:41 +00:00
Guillaume Revaillot ebe8c4a66c Makefile: pass TARGETS to doc Makefile. 2019-04-15 12:41:21 +00:00
Icenowy Zheng 330d5fd5be gd32: add new chip series f1x0
GD32F1X0 (X can be 3, 5, 7 and 9) is a series of Cortex-M3 MCUs by
GigaDevice, which features pin-to-pin package compatibility with
STM32F030 MCU line. F150 adds USB support to F130, and F170/F190 adds
CAN support.

Currently the code mainly targets GD32F130 and F150 chips. Some register
are different between F130/150 and F170/190, just like the difference
between STM32F1 Performance line and Connectivity line.

From the perspective of registers and memory map, GD32F1X0 seems like a
mixture between STM32F1 and STM32F0 (because it is designed to be
pin-to-pin compatible with F0, but with Cortex-M3 like F1). A bunch of
code are shared between STM32 and GD32, and these code are specially
processed to include the GD32 headers instead of STM32 headers when meet
GD32F1X0.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>

Reviewed-by: Karl Palsson <karlp@tweak.net.au>
gd32/rcc.[ch] are forks of stm32f1/rcc
gd32/flash.[ch] are forks of stm32f0/flash
No attempts at deduplicating this have been done at this stage.  We can
see where they move in the future.
2019-04-03 12:53:33 +00:00
Dmitry Rezvanov 2adefd95fe msp432/e4: new target
Basic memory map and system control.

Originally tracked via: https://github.com/libopencm3/libopencm3/pull/946
2018-08-27 13:34:29 +00:00
Karl Palsson b309b7e082 make: report errors from multiple sub builds properly.
The reporting of make errors wasn't catching a failure from multiple
sublibs. rework it to iterate all found, rather than trying a single
file test.
2018-07-29 20:31:17 +00:00
Karl Palsson b48b94fa07 make: catch submake errors and present them in the log
This makes it more obvious with parallel makes when a single target has
failed.
2018-07-03 22:23:00 +00:00
kbob e8154aa44a efm32: Add EZR32WG "EZRadio Wonder Gecko" family. 2018-04-27 21:37:03 +00:00
kbob c3889b91df efm32: Add EFM32WG "Wonder Gecko" family. 2018-04-27 21:37:03 +00:00
Maxim Sloyko 2b1ddc8490 sam/4l: monster commit
The original submitter of this squished everything into one series, and
has not returned. The code mostly appears good, and review comments were
followed for the most part.  The project doesn't really maintain any
testing or board farm for sam3/sam4 parts, so we're going to just trust
our users.

Reviewed-by: Karl Palsson <karlp@tweak.net.au>

sam/4l: IRQ Configuration file (irq.json)

sam/4l: Basic Memory Map.

sam/4l: GPIO Defines.

sam/4l: GPIO Functions

Added everything that needed to compile the library: Makefile, Linker
Script and common includes.

sam/4l: SCIF function to start OSC.

sam/4l: GPIO Enable/Disable and Multiplexing configuration functions.

sam/4l: PLL Clock configuration.

sam/4l: Peripheral clock configuration and basic USART support.

sam: USART Character length configuration.

sam/4l: Generic Clock configuration functions.

sam/4l: Analog to Digital Converter Interface (ADCIFE) basic support.
2018-04-14 18:40:54 +00:00
Julian Friedrich 74dd24a062 make: allow building target subsets
Usage:  make TARGETS="stm32/l1" or even make TARGETS="stm32/l1 stm32/f7"
2018-04-14 18:40:54 +00:00
Sebastian Holzapfel a86948ec6e efm32hg: add basic makefile, interrupts, device information 2018-03-02 22:42:04 +00:00
Karl Palsson 4ba3a27f80 mk: cleanup genlinktests
Even if they don't work, at least make them clean up afterthemselves
2018-02-05 21:00:43 +00:00
Karl Palsson bf882caf4d make: avoid shell find for windows compatibility
Instead of expecting a posix-ish "find" in the shell, simply leverage
our knowledge of our source structure to make a single list using make's
builtin wildcard() functionality.

Fixes https://github.com/libopencm3/libopencm3/issues/828
2017-10-18 20:08:51 +00:00
Karl Palsson 31eac1b787 makefile: make it easier to disable targets.
Sometimes you're working on a subset of targets, and want to do full
clean/builds, but don't need to clean and rebuild families you're not
working with.  This is a pure syntactic change that makes it easier to
simply comment out lines for targets, instead of having to mangle line
continuations.
2016-12-01 15:56:51 +00:00
Karl Palsson 53de290fda atmel samd: Basic framework.
Thoughts: should this be a "sam0" family rather than samd?  (Much like Atmel's
own software package lumps all the cortex-m0+ devices in one family)

This was enough to get a basic blinky working at least.
2016-08-18 22:08:58 +00:00
Kuldeep Singh Dhaka 77354cb371 Inital support for EFM32LG 2015-12-13 19:56:19 +01:00
Karl Palsson 7c1cd2e5cd Drop "install" target and documentation.
This has hurt many many many people over it's lifetime, by confusing their
multilib toolchains.  Simply drop it outright.  People who _really_ know what
they're doing are still perfectly entitled to "install" portions of this
project in suitable locations for their own use.
2015-12-06 22:17:30 +00:00
Karl Palsson 507c184456 stm32l4: initial memorymap and vector support
Values from RM0351rev1, with the correction of the duplicate TIM1_CC entry.

Only stub support so far, but this opens up the beginning of build testing.
2015-11-10 23:47:57 +00:00
Frantisek Burian 3ef2c38120 [stm32f7] Add initial support of the family, GPIO support.
Most changes are noise from doxygen.
Readme udpated to explain newer FP_FLAGS for m7
stm32f7 library is skipped if the toolchain doesn't support it yet.
2015-10-15 10:34:28 +00:00
Frantisek Burian f9152eb00a [stm32l0] Initial support for STM32L0 architecture, Add GPIO peripheral 2014-10-15 19:31:41 +02:00
Stefan Agner 07b7d3e805 vf6xx: initial add of Vybrid VF6xx support
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).
2014-10-15 19:31:01 +02:00
Paul Fertser 283d8cc7d2 Makefile: fix build for directories with spaces
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>
2014-08-12 12:01:16 +00:00
Karl Palsson 5a0c305aad Clarify toolchains and install steps
Including removing the extremely unhelpful DETECT_TOOLCHAIN option.
2014-04-04 20:12:28 +00:00
Felix Held 641fbffe9a [sam3a] add irq table and memory map 2014-02-24 02:32:38 +01:00
Felix Held b5d937a00c add memory map and irq table for sam3s and sam3u devices 2014-02-06 23:06:55 +01:00
Ken Sarkies 3c6e9fd56d Fix a number of top level doxygen issues.
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).
2014-01-15 22:19:52 +01:00
Frantisek Burian eb924abc10 Add dependency of stylecheck result file to its source
In previous version, if teh file has been changed, stylecheck file was not generated.
2014-01-11 11:28:15 +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 89236f0339 [GENLINK] Add Test suite + simple test 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
BuFran 18c4d299c1 [STM32F0] Add preliminary support for the family 2013-08-22 17:18:35 -07:00
BuFran b8e8cb2f0d [BUILD] Paralelize stylecheck
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.
2013-07-07 16:22:21 -07:00
BuFran 7002bca027 [BUILD] move the definition line of yaml files search outside the targets section 2013-07-07 16:22:21 -07:00
BuFran ea28feb537 [BUILD] Paralelize BUILD HEADERS
make    1:06:47 -> 1:06:90
make -j   24:52 ->   20:18

(measured on Core2 quad, 2.84GHz, 4GB ram, windows x86)
2013-07-07 16:22:21 -07:00
BuFran 85aa16f8c9 [BUILD] Paralelize CLEAN HEADERS
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.
2013-07-07 16:22:21 -07:00
BuFran 0ff37d0dde [BUILD] Paralelize CLEAN
make clean    34.85s -> 34.64s
make clean -j 34.78s -> 14.00s

(measured on Core2 quad, 2.84GHz, 4GB ram, windows x86)
2013-07-07 16:22:21 -07:00
Federico Ruiz Ugalde 3af5833b83 Initial support for stm32f3. Changes in makefiles, gpio.
- 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).
2013-07-07 16:01:45 -07:00
Piotr Esden-Tempski 8769073266 [install] Be more specific about what scripts we want to install.
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.
2013-07-07 14:11:58 -07:00
Ben Gamari 2b027cf2de Makefile: Install everything in scripts/ 2013-07-07 13:52:14 -07:00
Ben Gamari 17fd708f66 Move lpc43xx and lpc43xx_m0 code to lpc43xx/ hierarchy
Previously there were nasty dependency issues causing M4 objects to be
linked into the M0 library
2013-07-07 13:52:13 -07:00
TitanMKD 0dec187fee lpc43xx basic IPC for multicore M4 & M0 (with basic examples for hackrf jellybean). 2013-07-07 13:52:12 -07:00
Michael Ossmann 0f180ceffd do not try to install scripts/data 2013-07-07 13:52:12 -07:00