1347 Commits

Author SHA1 Message Date
Jeff Ciesielski
dd5e797d61 stm32/f1/can: Add function to detect if can system has an available mailbox 2012-10-22 13:26:58 -07:00
chrysn
a67a070438 deprecation macro (closes #48) 2012-10-22 15:56:21 +02:00
Silvio Gissi
0a1cf977eb Added irq.yaml to lpc_13xx and lpc_17xx families 2012-10-21 08:54:40 +02:00
Jeff Ciesielski
ffe392c11b stm32/f1/i2c: remove unnecessary parenthesis 2012-10-19 23:16:08 -07:00
Jeff Ciesielski
24a35126bf stm32/f1/can: Replace mistaken logical operators with bitwise operators.
also: remove unnecessary parenthesis
2012-10-19 23:05:37 -07:00
Jeff Ciesielski
1cb373464c stm32/f1/gpio: use |= instead of = when setting up registers 2012-10-19 16:33:38 -07:00
Jeff Ciesielski
32924fcc15 examples: fix lisa-m-1 can example to use new can init function 2012-10-19 16:33:07 -07:00
Jeff Ciesielski
527eeacbff stm32/f1/rtc: add PLL2/3 to switch statement to avoid compiler warning 2012-10-19 16:32:37 -07:00
Jeff Ciesielski
069a758f6c stm32/f1/rcc: add 25mhz in to 72mhz out clock tree setup function.
also: added support for previously undefined PLLs
2012-10-19 16:31:52 -07:00
Jeff Ciesielski
153e81bc96 stm32/f1/vector: add ability to boot to DFU bootloader
note: Only works on CL devices
also: this could probably use a helper function
2012-10-19 16:30:27 -07:00
Jeff Ciesielski
be4ee41ef9 stm32/f1/i2c: add a whole bevy of additional helper functions 2012-10-19 16:29:20 -07:00
Jeff Ciesielski
a2fc8768c6 stm32/f1/dma: add clear_flag helper function 2012-10-19 16:28:44 -07:00
Jeff Ciesielski
4b86c28141 stm32/f1/can: Add loopback/silent vars to init function.
Also: add helper function for mailbox checking
2012-10-19 16:27:17 -07:00
chrysn
1e88ad186f remove common modules from efm32*'s explicit build list
this is 75c216582 for the efm32 branch, see there for details
2012-10-19 19:30:25 +02:00
chrysn
a433217c5d Merge branch 'generalizations' into efm32 2012-10-19 19:29:32 +02:00
chrysn
f62eee7644 remove nvic.o from stm32/f[24]'s explicit list
this was missed out in 75c216582, see there for details
2012-10-19 19:29:06 +02:00
chrysn
14a5fc78cf completing dispatch
the LM3S irq list was previously unused as it was missing in the
dispatch files; now it got added. (before HEAD^, it wouldn't have made
any difference because the discriminating constant wasn't defined
anyway)

also, this enhances the warning messages
2012-10-19 19:10:42 +02:00
chrysn
99d7b21032 define platform specific constants for all chips
previously, only stm32 chips passed the information about which chip to
build on into the compiler. this information is essential to dispatch,
thus defining LPC13XX, LPC17XX, LPC43XX and LM3S in analogy to
STM32F1..4.
2012-10-19 19:10:42 +02:00
chrysn
75c2165827 build common .o files everywhere (fixes issue #29)
vector.o, nvic.o, scb.o and assert.o are available on every platform,
but at least some of them differ between the implementations. they
already got built explicityly on some platforms; now adding them to the
common Makefile.include.
2012-10-19 18:56:39 +02:00
chrysn
1210738845 add generic OBJS to efm32 libraries
better fixes would be adding them to the generic (included) Makefile or
building the really device independent stuff in a _generic library
2012-10-19 17:03:23 +02:00
chrysn
cece71ba2f install *all* efm32 linker scripts
this will install the per-family linker scripts twice (doesn't hurt,
gets overwritten), but more importantly intalls the per-chip scripts
too.
2012-10-19 16:13:34 +02:00
chrysn
6706899551 build vector.o on lpc13xx
no idea how this ever worked...
2012-10-19 15:18:21 +02:00
chrysn
843660dbfd copied over linker scripts
this will need some generalization too...
2012-10-19 15:02:09 +02:00
chrysn
e11edaff11 build all efm32 families 2012-10-19 14:53:06 +02:00
chrysn
62345af9ee install opencmsis 2012-10-19 13:54:42 +02:00
chrysn
ab5a544d45 added irqs for the rest of the efm32 devices 2012-10-19 01:11:43 +02:00
chrysn
d526dd3268 rename tinygecko->efm32tg everywhere 2012-10-19 00:59:49 +02:00
chrysn
962f328691 renamed linker file to work with included makefile 2012-10-19 00:41:22 +02:00
chrysn
d13043d787 change discriminator in efm32 series from TINYGECKO to EFM32TG 2012-10-19 00:31:10 +02:00
chrysn
fa3c1ea6a2 pulling in a simplification in per-arch makefiles 2012-10-19 00:19:07 +02:00
chrysn
a818dbe729 use generalized libopencm3 functions in cmsis 2012-10-19 00:18:49 +02:00
chrysn
3a2e1c45aa Merge branch 'generalizations' into efm32 2012-10-18 23:00:25 +02:00
chrysn
bc5146b710 unified systick handling
the only change this results in in the example binaries is in the
hackrf-jellybean/systick example, where the the check in
systick_set_clocksource for overflowing from the stm32 area gets used.
2012-10-18 22:48:14 +02:00
chrysn
e20f1c0d8f unify scb (system control block)
these register definitions are common to all cortex mcus. some of the
registers might not be implemented everywhere (especially the floating
point registers), but defining them does no harm.

this modification does not result in any changes in the example
binaries.
2012-10-18 21:45:20 +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
c39c5c147d adapt lpc43xx example to generalizations 2012-10-18 21:09:35 +02:00
chrysn
0e3fdc57d5 remove files not required in generalizations branch any more 2012-10-18 19:18:25 +02:00
chrysn
becfbc70e1 Merge branch 'generalizations' into efm32 2012-10-18 19:06:58 +02:00
chrysn
0548317683 fix bug resulting from equally named files
the local vector.o files shadowed the ../cm3/vector.c from VPATH,
resulting in empty reset vectors.
2012-10-18 18:54:52 +02:00
chrysn
47c69695ce Merge branch 'generalizations' into efm32
Conflicts:
	Makefile
2012-10-18 18:43:44 +02:00
chrysn
771f504757 vector.c unification
this makes the previous hackish vector.c assemblies into dispatched files
(using the same mechanism as for nvic, just this time in lib).

the old irq.h files that were generated manually from the old vector.c files
were dropped in the process, as were the nvic.h files, and replaced with very
simple yaml lists that generate the headers.

file generation takes place both in the include/ and the lib/ part, as some of
it is definitely header stuff (the NVIC_name_IRQ defines), and some of it needs
to be included in specific compilation units (the weak pragmas).
2012-10-18 18:00:28 +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
chrysn
5ceb377a37 switch all interrupt lists to yaml format 2012-10-18 16:52:48 +02:00
chrysn
5afa53f01a drop two-line vector.c dispatchers in favor of central dispatch 2012-10-18 16:29:58 +02:00
chrysn
172ce56e3c nvic unification
* created include/libopencm3/cm3/nvic.h from the respective stm32 and
  lpc43xx files. the chip specific definitions were left in place (they
  were already split out in sthe stm32 case).
* created lib/cm3/nvic.c from the respective stm32 and lpc43xx files. a
  hack from the lpc43xx was taken over (for manipulating the internal
  interrupts); for now it'll work.
* created a include/libopencm3/dispatch/ directory where the dispatching
  of files with common interfaces but different implenentations can
  happen; for now, an nvic.h there includes the respective irq name
  definitions. (future implementations might have some automation or
  preprocessor magic there; so far, it's manual dispatching based on
  defines.)
* for efm32, an nvic.h gets generated from an interrupt list, the
  rationale for code generation is, in this case, that this can't be
  done easily in c preprocessor, and it's really just a list of
  definitions and not code proper.
* examples now include <libopencm3/cm3/nvic.h> instead of
  <libopencm3/stm32/nvic.h>
2012-10-18 13:31:17 +02:00
chrysn
94ce82396b modified examples to use libopencm3/cm3/nvic.h instead of /stm32/ 2012-10-18 13:28:03 +02:00
chrysn
1684ffe18d fallback for unknown chips 2012-10-18 13:27:33 +02:00
chrysn
9c13299f25 unified nvic.c 2012-10-18 13:22:12 +02:00