Commit graph

1184 commits

Author SHA1 Message Date
Marti Bolivar ed59489f57 added skeleton sphinx docs 2010-10-07 06:47:57 -04:00
Michael Hope 6fcd4cd306 Merge remote branch 'upstream/master' 2010-09-29 20:45:57 +13:00
Michael Hope 368e4fc166 Fixed up the build due to a missing header file. 2010-09-29 20:42:18 +13:00
Michael Hope b43977a8f6 Added automake scripts that can be used to build the libraries instead of custom Makefiles. 2010-09-29 20:40:55 +13:00
Michael Hope 0fcccd921e Added support for programming ELF files without converting first. 2010-09-29 20:28:39 +13:00
Michael Hope d470dc6daa Do basic validation on the boot version and chip IDs. 2010-09-29 20:21:52 +13:00
Michael Hope 97f6b77b58 Make the initial chip detection much more robust. 2010-09-29 20:20:32 +13:00
Michael Hope 3b48e21018 Changed the exception handling so that Ctrl-C passes through and isn't treated as a timeout. 2010-09-29 20:06:51 +13:00
Michael Hope 1169dc6e3b Added auto detection of the USB to serial port under Linux and MacOS. 2010-09-29 20:01:10 +13:00
Perry Hung adde11b099 Fix HardwareSPI to pass SPI modes for CPOL and CPHA 2010-09-28 19:21:16 -04:00
Marti Bolivar 7b72956308 added notes/coding_standard.txt, more cleanups 2010-09-27 03:47:47 -04:00
Marti Bolivar 994f1f1e36 cleanups 2010-09-27 00:51:11 -04:00
Marti Bolivar 753f89de35 whitespace cleanups 2010-09-27 00:40:44 -04:00
Marti Bolivar 849bc0f8f6 wirish reformatted and code-styled 2010-09-26 21:47:55 -04:00
Perry Hung c13e850abe Enable external interrupts on all Maple GPIOs.
Extend the wirish attachInterrupt() and detachInterrupt() interface to
work with all GPIOs.

Note: The STM32 external interrupt lines are multiplexed between GPIO
ports. While any GPIO can be used as an external interrupt, not all of
them can be used at the same time. Each EXTI[n] line selects between
PA[n], PB[n], PC[n], etc. For example, line EXTI5 can be used with STM32
pins PA5, PB5, or PC5, but not all at the same time. See table:

EXTI Line       Maple Pin       STM32 Pin
  0             D2              PA0
  0             D27             PB0
  0             D15             PC0
  1             D3              PA1
  1             D28             PB1
  1             D16             PC1
  2             D1              PA2
  2             D17             PC2
  2             D25             PD2
  3             D0              PA3
  3             D18             PC3
  4             D10             PA4
  4             D19             PC4
  5             D13             PA5
  5             D4              PB5
  5             D20             PC5
  6             D12             PA6
  6             D5              PB6
  6             D35             PC6
  7             D11             PA7
  7             D9              PB7
  7             D36             PC7
  8             D6              PA8
  8             D14             PB8
  8             D37             PC8
  9             D7              PA9
  9             D24             PB9
  9             D38             PC9 (BUT)
 10             D8              PA10
 10             D29             PB10
 10             D26             PC10
 11             D30             PB11
 12             D31             PB12
 13             D32             PB13
 13             D21             PC13
 14             D33             PB14
 14             D22             PC14
 15             D34             PB15
 15             D23             PC15
2010-09-22 03:17:45 -04:00
Perry Hung 89cd6296ea Fix improper interrupt clearing
Interrupts should be cleared by writing to the interrupt clear-enable
register (ICER). This commit fixes an improper read-modify-write on
NVIC_ICER[n] that incorrectly cleared interrupt-enable bits on
non-designated channels.
2010-09-22 02:59:26 -04:00
Perry Hung 943006daef Add PWM_OPEN_DRAIN option to pinMode()
Allow for alternate function open drain output mode to be accessed
through the wirish interface. This allows for open drain to be used on
PWM pins.
2010-09-21 20:24:04 -04:00
Marti Bolivar f2fd21628e minor bugfix to BIT definition 2010-09-21 17:21:36 -04:00
Perry Hung ff31b640dd Add MIT license on exc.S 2010-09-17 04:27:08 -04:00
Perry Hung 0f82ae884f Forgot to add exc.S
whoops.
2010-09-17 03:57:52 -04:00
Perry Hung 2e79aafb70 Enable USB auto-reset in a hard fault.
Redirect thread-mode execution to a fail routine which throbs the LED to
indicate a hard fault. Because the fail routine runs in thread mode
with interrupts on, USB auto-reset should now work. Test by executing
some bogus instruction (e.g. *(volatile int*)0xf34fdaa = 0;) and check
that the auto-reset continues to work.
2010-09-17 03:49:14 -04:00
Perry Hung bdb85a4549 Improve reset reliability on OS X.
The USB reset scheme on OS X is unreliable. Adding a little bit of sleep
seems to make it much more reliable. This will probably do until we get
a chance to rewrite the USB stack and redo the whole auto-reset
scheme...
2010-09-17 01:48:52 -04:00
Perry Hung f37e717c8a Fix maple linker memory map for jtag target 2010-09-16 21:46:36 -04:00
Perry Hung 9180233b97 Check different set of flags for SPI master transmit
Tested on wishield, would like some more testing if anybody has more
things that speak spi
2010-09-14 23:09:38 -04:00
Perry Hung 1cec807e44 Fix enable/disable global irq
Oooooops.
2010-09-14 21:59:39 -04:00
Marti Bolivar 208e35e7d7 exposed build-targets.mk 2010-09-13 15:15:39 -04:00
Marti Bolivar ee5667f54d bugfix MAPLE_RELOAD_VAL, whitespace fixes 2010-09-13 13:32:01 -04:00
bnewbold 5bfeb40e47 systick testing and simplification
ripped out marti's SystemTick for the sake of simplicity and added a
systick_resume function to libmaple. new example program demonstrates
the functionality, also demonstrates micros()/USB bug
2010-09-05 23:48:31 -04:00
bnewbold 552da87052 timer fixes for maple native 2010-09-05 23:22:19 -04:00
bnewbold ae64a19745 improved timer test program 2010-09-05 23:00:18 -04:00
bnewbold 340cdc7966 debug verbosity levels 2010-09-05 22:59:16 -04:00
bnewbold b6e3624a70 timer refactor (c, not c++)
also removed an old ASSERT()
2010-09-05 22:58:36 -04:00
bnewbold 16b4c1fce5 fixed Serial crash bug 2010-09-05 21:43:06 -04:00
bnewbold 1c6f9a9b5e Off-by-one in timer setPeriod() function
Thanks CarlO!
2010-09-02 22:29:36 -04:00
bnewbold 3b2cca3d37 changes to copy-to-ide for portable branch 2010-09-02 20:03:32 -04:00
bnewbold 6783e66eb1 added 'unused' attribs and reset default target 2010-09-02 19:23:22 -04:00
bnewbold 800b8ca1c1 board-specifc linker scripts 2010-09-02 17:39:52 -04:00
bnewbold d6a3299168 Various fixes, working with Maple 2010-09-01 00:02:36 -04:00
bnewbold 0ccec95446 Portability fixes
Still not working but fixed a lot of merge errors
2010-08-31 22:05:39 -04:00
Marti Bolivar 9c9d6c1531 added support to enable/disable systick in wirish 2010-08-31 18:28:07 -04:00
bnewbold 1e3e0862bb simplified example headers 2010-08-31 17:45:26 -04:00
bnewbold 2c2812b620 added stm32loader.py upload script 2010-08-31 17:45:26 -04:00
bnewbold 0b955fe597 D38 note 2010-08-31 17:45:26 -04:00
bnewbold 02d7b08f04 Merge maple-native changes into portable
This compiles for both maple and maple_native but is untested.
2010-08-31 17:39:46 -04:00
bnewbold e03d58f4da Further wirish portability progress
Sort of ugly changes. Compiles but untested.
2010-08-31 17:17:57 -04:00
bnewbold 01c38f5567 Partial progress on wirish portability
This version throws "defined but unused" warnings which could probably
be squashed with #pragma
2010-08-31 16:28:23 -04:00
bnewbold 695f0dc4ba MCU-specific, not BOARD-specific 2010-08-31 15:21:09 -04:00
Marti Bolivar 42fd9fdf2d Toolchain improvements
Updated Makefile to read the directory where libmaple is from the
environment variable LIBMAPLE_PATH, if it exists, defaulting to the
current working directory otherwise.

Updated reset.py to look around in /dev for the Maple serial port,
prompting the user if there appear to be multiple possibilities and
complaining if there aren't any.
2010-08-29 20:29:31 -04:00
Marti Bolivar b10ef4875f fix reset.py to work on OS X,; .gitignore leaves out ~ files; cleanup
support/make/build-rules.mk
2010-08-29 02:07:32 -04:00
bnewbold 12c351d056 inital portability work 2010-08-25 22:57:46 -04:00