1347 Commits

Author SHA1 Message Date
chrysn
a8a6eb39e9 add irq cound to existing nvic.h files 2012-10-18 13:19:55 +02:00
chrysn
f705d1cd6e dispatch for chip specific nvic 2012-10-18 12:46:30 +02:00
chrysn
a7f5f9f576 merge irq and nvic code using a script 2012-10-18 12:44:41 +02:00
chrysn
837de3ff97 nvic.h factored out (incomplete) 2012-10-18 10:27:51 +02:00
chrysn
7c33025c31 Merge branch 'master' into generalizations
Conflicts:
	lib/lm3s/vector.c -- split out to lm3s/irq.h
	lib/stm32/f4/vector.c -- put the floating point initialization code into a function like in lpc43xx
2012-10-17 18:55:54 +02:00
Felix Ruess
4e4496f70d [fix] GCC < 4.5 that does not accept any argument for the deprecated attribute. 2012-10-17 11:45:52 +02:00
Felix Ruess
0a48344965 add the copied ld scripts in lib dir to gitignore 2012-10-16 14:09:50 -07:00
Felix Ruess
b7ebe6e705 fix clean target for example makefiles if the compiler is not in PATH 2012-10-16 14:09:42 -07:00
Ken Sarkies
0c779512d6 Initial documentation for SPI, I2C and CRC
(no code changes)
2012-10-16 14:08:04 -07:00
Ken Sarkies
c4b7e2a76a Additional stm32/usart.c functions to enable/disable Rx/Tx
interrupts, return a status flag and check for interrupt source.
2012-10-16 14:07:34 -07:00
Ken Sarkies
6ee8e44bd7 Initial documentation for stm32/usart.c, usart.h
Some minor documentation corrections to timer.h
2012-10-16 14:07:27 -07:00
Ken Sarkies
0834f41383 stm32f1:
Add object files to Makefile to include new modules into lib.

Correct typo in pwr.c

Add two new functions to timer.c to preset the counter (for use
with deadman style timeouts) and to identify an interrupt
source.

Also noticed lib/makefile.include didn't clean lib/stm32, which
isn't a target. Added a fix.
2012-10-16 14:05:45 -07:00
Thomas W. Barr
f94d71efee add _end and __end symbols for compatibility with code written against CodeSourcery linkers 2012-10-08 16:42:47 -05:00
Thomas W. Barr
8f9f2bdc00 complete peripheral handlers in vector table 2012-10-08 16:40:36 -05:00
Stephen Dwyer
2b8fbfc433 updated the lisa_m_2 (STM32 F1) ADC examples for recent code changes to stm32f1 adc.c and adc.h 2012-10-07 17:53:09 -06:00
Stephen Dwyer
794f3fbeda oops, had to update bin names in makefiles for adc examples 2012-10-07 15:38:02 -06:00
Stephen Dwyer
bece4c30d3 added different ADC sampling examples for the LisaM v2 including:
* simple polling of an injected channel
 * timer triggered sampling of an injected channel
 * timer triggered sampling and IRQ handling of an injected channel
 * timer triggered sampling and IRQ handling of 4 injected channels
2012-10-07 15:38:02 -06:00
Piotr Esden-Tempski
9e77f8c361 Merging pull request #28 Random number generator defenition and example.
Merge remote-tracking branch 'tiltit/master'
2012-10-05 13:08:03 -07:00
Piotr Esden-Tempski
cb60e37608 Merging pull request #37 Adds hard-float support to stm32f4, with a nice mandelbrot example
Merge remote-tracking branch 'schodet/hard-float'
2012-10-05 13:03:58 -07:00
Ken Sarkies
4efa64c278 Doc changes to go with previous commit 2012-10-05 14:04:40 +09:30
Ken Sarkies
7d0611609b Code changes to stm32f1 adc.c and adc.h
remove rcc_set_adc_clk - use rcc version
Added functions:
 - adc_power_on
 - adc_start_conversion_direct
 - adc_set_dual_mode
 - adc_eoc
 - adc_eoc_injected
 - adc_read_regular
 - adc_read_injected
 - adc_set_injected_offset
Tested dual mode scanned regular, but no tests of injected yet.
Changes: "discontinuous" was misspelled.
 - adc_set_discontinuous_mode_regular - added "length" parameter
 - adc_disable_discontinuous_mode_regular - name change
 - adc_enable_discontinuous_mode_injected - name change
 - adc_enable_automatic_injected_group_conversion - disable triggers
 - adc_enable_jeoc_interrupt - name change to match common usage in lib
 - adc_disable_jeoc_interrupt - ditto
 - adc_enable_external_trigger_regular - remove incorrect test on parameter
 - adc_enable_external_trigger_injected - ditto
 - adc_set_sample_time - name change to match function's purpose
 - adc_set_conversion_time_on_all_channels - ditto
 - adc_set_injected_sequence - changed order of register loading (ref Barlow's issue)
 - adc_enable_analog_watchdog_on_all_channels - flipped AWDSGL
 - adc_enable_analog_watchdog_on_selected_channel - ditto
added aliases for expected commonly used functions to avoid sudden user code breakage

In adc.h, corrected errors in SQR names
added "deprecated" compiler warnings to adc_on and to aliases defined in adc.c
2012-10-05 13:50:42 +09:30
chrysn
a69d83d312 unified vector table initialization
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.
2012-10-05 00:55:24 +02:00
Piotr Esden-Tempski
ecb0cbbf78 Merged pull request #38 Add assert macros to aid in debugging.
Merge remote-tracking branch 'avian2/assert-macros'
2012-10-04 14:18:55 -07:00
chrysn
b5de267b06 use _data_loadaddr instead of _etext
this change was done in master in [1] and just merged here.

[1] 74cd991e7e8972cf22933743c847b5ce2b165798
2012-10-02 12:05:36 +02:00
chrysn
36f95447a8 add back minimal support libraries
some of the libraries removed in [1] were essential to building
anything on efm32 (especially, irq.h).

[1] 4a6f4c0f7d62858a4a9afba18f11289cb0bb8358
2012-10-02 11:55:05 +02:00
Tomaz Solc
fc4047e4b4 Add assert macros to aid in debugging.
Adds libopencm3/cm3/assert.h header that provides assertion check macros
similar to those provided by the standard C library.

Thanks to Nicolas Schodet for help.
2012-10-02 08:48:45 +02:00
Daniel Serpell
aac5909ff1 Add a floating-point example to the stm32f4.
This example calculates a mandelbrot fractal using floating point
in C.
2012-09-27 23:12:18 +02:00
Daniel Serpell
e4819d3cd2 Enable floating-point coprocessor on reset.
Always enable the floating-point coprocessor with full access on
reset, allowing usage of hard-fp toolchains.
2012-09-27 23:12:18 +02:00
Daniel Serpell
584052c28c Compile stm32-f4 library with floating point support.
This enables hard-float in the compilation of library and examples
for the stm32f40* chips.
2012-09-27 23:12:18 +02:00
Daniel Serpell
c9ab75878f Add all SCB registers mentioned in ARM DDI 0403D manual.
See table B3-4 and B3-5 for the definitions and B3-24 for the
bit assignments of SBC_CPACR.
2012-09-27 23:12:18 +02:00
Paul Sokolovsky
d6e0e6e976 Explicitly link example binaries statically.
This allow good share of binaries be linkable (and actually run) with a
typical distro-packaged ARM toolchain (Cortex-A and Linux targetted).
2012-09-25 00:31:31 +03:00
Nicolas Schodet
7851515c5c Fix merge error
This line was removed in commit acc276a612d4, but it has been restored in the
merge 02ea612142fb.
2012-09-17 17:27:50 -07:00
Ken Sarkies
ff83a1ae1c Setup to document entire project using doxygen.
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.
2012-09-15 12:51:46 +09:30
chrysn
4a6f4c0f7d remove the support libraries for efm32
i don't plan to extend or support them, and they'll just grow stale
2012-09-15 01:29:31 +02:00
chrysn
50b3c92d7f removed efm32lib examples
they would have needed migration work from efm32lib to emlib, and depend
on non-free cmsis anyway.
2012-09-13 23:41:52 +02:00
chrysn
0508f30d2d Merge branch 'master' into efm32
Conflicts:
	Doxyfile
	Makefile
2012-09-13 22:32:28 +02:00
Jason Kotzin
e8ec29e636 Adding vendor class definition 2012-09-13 10:43:35 -07:00
Jason Kotzin
fb110dd3e6 stm32 F2/F4 gpio_set_af() fix 2012-09-13 10:43:35 -07:00
Jason Kotzin
34beeae925 USB core updated for reentrance based on Christian Cier-Zniewski's branch 2012-09-13 10:43:35 -07:00
Jason Kotzin
4958fae906 fixing usb and alignment issue 2012-09-13 10:43:26 -07:00
Piotr Esden-Tempski
dcd98dde86 Renamed adc example to be more descriptive. 2012-09-10 14:01:24 -07:00
Piotr Esden-Tempski
d1cc8ca2b3 Added simple adc example for lisa/m 2. 2012-09-10 14:01:23 -07:00
Piotr Esden-Tempski
7373bfcb9b Merging pull request #26 "Linker script cleanup/improvements"
Merge remote-tracking branch 'schodet/linker-script'
2012-09-10 13:42:10 -07:00
Piotr Esden-Tempski
03807ddd6c Merge pull request #27 "added a make target stlink-flash to use the stlink on the stm32f4-disovery"
Merge remote-tracking branch 'twaldecker/stlink'
2012-09-10 12:29:37 -07:00
Piotr Esden-Tempski
02ea612142 Merge pull request #25 "Add support for C++ and fix some comments typo"
Merge remote-tracking branch 'schodet/master'

Conflicts:
	include/libopencm3/stm32/f1/adc.h
2012-09-10 12:21:21 -07:00
Oliver Dille
099a5626db Random number generator example. 2012-09-07 22:43:10 +02:00
Oliver Dille
e99896120b Random number generator register definitions. 2012-09-07 22:03:36 +02:00
Thomas Waldecker
5604182467 added a make target stlink-flash to use the stlink on the stm32f4-disovery 2012-09-06 11:33:01 +02:00
Nicolas Schodet
82ef2936a6 Support exceptions on all targets 2012-09-03 20:41:15 +02:00
Nicolas Schodet
74cd991e7e Use a specific symbol for data source address in flash
That way, data source address does not depend on any other unrelated change in
linker script.

This also fixes cases when .data input section is aligned on 8 bytes.  The new
version does not provide any address for the output section so that it is
aligned to the strictest input section.  The _data_loadaddr symbol will
always take this alignment into account.
2012-09-03 20:28:12 +02:00