31 Commits

Author SHA1 Message Date
chrysn
5afa53f01a drop two-line vector.c dispatchers in favor of central dispatch 2012-10-18 16:29:58 +02:00
chrysn
9c13299f25 unified nvic.c 2012-10-18 13:22:12 +02:00
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
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
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
Nicolas Schodet
2a35377980 Clean up and make linker scripts more uniform
This includes:

 - fix some comments indent,
 - add entry point,
 - align exported symbols,
 - remove unneeded "." assignments.
2012-09-03 19:53:43 +02:00
Piotr Esden-Tempski
3441bba1c4 Changed local build target for library and linker files.
- 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.
2012-08-13 15:19:57 -07:00
TitanMKD
81317c02ab * Updated GPIO added gpio_toggle() function.
* Fixed ROM to RAM Linker script (libopencm3_lpc43xx/libopencm3_lpc43xx_rom_to_ram.ld).
2012-06-25 22:12:00 +02:00
TitanMKD
d80ee80e06 Merge branch 'master' of git://github.com/jboone/libopencm3 2012-06-16 12:51:44 +02:00
Jared Boone
536c922577 Modified SSP driver to wait for data to be sent before returning. This is critical when controlling device CS# pins via GPIO. Long-term, it might be better to have a different API that permits this level of control. 2012-06-15 17:20:50 -07:00
TitanMKD
c65ca01044 Fix Linker bug copy ROM to RAM & exec from RAM (need more test). 2012-06-13 01:05:49 +02:00
TitanMKD
3c8e76f679 Added ROM to RAM code copy & exec with example of how to use it (miniblink_rom_to_ram). 2012-06-10 11:44:36 +02:00
TitanMKD
8d97dbc7c3 Work on scs.h register and also nvic.h.
ARM Interrupt API (see nvic.h).
ARM SysTick API (see systick.h).
Example using both Interrupt and SysTick and blink LED1/2/3 see systickdemo.c.
2012-06-09 18:27:42 +02:00
Michael Ossmann
251687fe37 changed I2C to run directly from IRC 2012-06-06 22:05:03 -06:00
TitanMKD
8adc873e84 Fixed SSP, tested with Oscilloscope Write work fine (tested SPI Mode).
For more details on tests see ssp/README.
2012-06-06 00:30:25 +02:00
Michael Ossmann
3a4a6b75de resolved minor conflict 2012-06-04 18:00:20 -06:00
Michael Ossmann
e7941eace9 added i2c.c that I forgot earlier 2012-06-04 17:57:49 -06:00
TitanMKD
d7a7fd9d30 * Added SSP Driver (Not Tested).
* Replaced leading space by tabulations.
2012-06-05 01:41:54 +02:00
Michael Ossmann
5698016877 moved stuff out of i2cdemo.c and into drivers/headers 2012-06-04 17:30:08 -06:00
TitanMKD
686c0cf050 Minor fix 2012-06-04 19:13:53 +02:00
TitanMKD
e7fbc2220b Added JellyBean Configuration for PinMux, GPIO In/Out (work in progress).
Added scu driver file scu.c.
Modified Makefile/Makefile.include to generate .map file and use -O2 as optimization.
Modified hackrf-jellybean miniblink.c to enable 1V8 and blink LED1,2&3 with configuration of PinMux and GPIO.
2012-06-02 09:45:03 +02:00
Michael Ossmann
38abe9f01f replaced linker script I accidentally deleted 2012-05-27 23:07:13 -06:00
Michael Ossmann
82181c2cda trying to rm again 2012-05-27 23:02:18 -06:00
Michael Ossmann
27b1597c1a rm renamed file 2012-05-27 20:33:18 -06:00
Michael Ossmann
4c37af55f4 renamed linker script 2012-05-22 14:46:05 -06:00
Michael Ossmann
3a9d48923a semicolons might help 2012-05-22 14:21:11 -06:00
Michael Ossmann
61e162e3d2 Makefile updates 2012-05-22 14:20:39 -06:00
Michael Ossmann
ce14f4c077 updated linker script 2012-05-22 14:15:20 -06:00
Michael Ossmann
5e1bcaa582 gpio.c, vector.c updated for LPC43xx 2012-05-22 13:55:50 -06:00
Michael Ossmann
9439ce9d69 new lib/lpc43xx, starting with copy of lpc17xx 2012-05-22 10:59:27 -06:00