From 80b8f6d28f23a45a0c37275c5df775bd2e989e5e Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Fri, 11 Mar 2011 16:46:33 -0500 Subject: Cleanups; new support/gdb/gpio.gdb. --- support/gdb/gpio.gdb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 support/gdb/gpio.gdb (limited to 'support/gdb') diff --git a/support/gdb/gpio.gdb b/support/gdb/gpio.gdb new file mode 100644 index 0000000..4376cfd --- /dev/null +++ b/support/gdb/gpio.gdb @@ -0,0 +1,12 @@ +set print pretty on + +print "GPIOA registers:" +p/x *GPIOA->regs +print "GPIOB registers:" +p/x *GPIOB->regs +print "GPIOC registers:" +p/x *GPIOC->regs +print "GPIOD registers:" +p/x *GPIOD->regs +print "AFIO registers:" +p/x *(struct afio_reg_map*)0x40010000 -- cgit v1.2.3 From 351f9a097fb8e005e9465a8a883b2f063e5c5160 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Thu, 14 Apr 2011 14:28:23 -0400 Subject: Ancillary file cleanups. --- README | 32 ++-- TODO | 56 +------ support/codeblocks/libmaple.cbp | 300 ------------------------------------ support/codeblocks/program_flash.sh | 4 - support/codeblocks/program_ram.sh | 4 - support/gdb/gpio.gdb | 12 -- support/gdb/gpio/gpio.gdb | 12 ++ support/gdb/i2c/test.gdb | 112 ++++++++++++++ test.gdb | 112 -------------- 9 files changed, 141 insertions(+), 503 deletions(-) delete mode 100644 support/codeblocks/libmaple.cbp delete mode 100755 support/codeblocks/program_flash.sh delete mode 100755 support/codeblocks/program_ram.sh delete mode 100644 support/gdb/gpio.gdb create mode 100644 support/gdb/gpio/gpio.gdb create mode 100644 support/gdb/i2c/test.gdb delete mode 100644 test.gdb (limited to 'support/gdb') diff --git a/README b/README index f37999b..6e4c400 100644 --- a/README +++ b/README @@ -12,21 +12,25 @@ The latest version of this repository can be found here: http://github.com/leaflabs/libmaple -Instructions to Compile for ARM Targets +General information ------------------------------------------------------------------------------ -A HOWTO is available in the "Unix Toolchain Quickstart" guide at: +A HOWTO on setting up this library for use in a Unix environment is +available in our online HTML documentation: http://leaflabs.com/docs/unix-toolchain.html -HTML documentation for this repository is automatically generated from -the source code and the files under the top-level /docs/ directory. -It is available online at: +The HTML docs for this repository are automatically generated from the +source code and the files under the top-level /docs/ directory. For +more information, see /docs/README. - http://leaflabs.com/docs/ +Our bugtracker is available at: -(For more information on how this documentation is generated, see -/docs/README). + http://code.google.com/p/leaflabs/issues/list + +For changes that block official releases, see our wiki: + + http://wiki.leaflabs.com/index.php?title=Blocking_Changes Instructions to Create a Library ------------------------------------------------------------------------------ @@ -93,10 +97,7 @@ Repository Layout /notes/ - Unstructured text notes that may be useful. The 45-maple.rules - udev file can be placed in /etc/udev/rules.d/ on compatible Linux - machines to allow non-root access to the Maple USB device for - uploading. + Unstructured text notes that may be useful. /README/ @@ -106,7 +107,6 @@ Repository Layout Support files and scripts for various purposes. - codeblocks/ [OBSOLETE] Config files for the Code::Blocks IDE. gdb/ GDB scripts. ld/ Linker scripts. make/ Additional scripts used by the top-level Makefile. @@ -114,12 +114,6 @@ Repository Layout scripts/ Miscellany. stm32loader.py Script for uploading via the built-in USART bootloader. -TODO - - Various undone tasks. Also see our bugtracker at - - http://code.google.com/p/leaflabs/issues/list - /wirish/ Extra wrappers and functionality around the lower level code in diff --git a/TODO b/TODO index af8ef80..7c2f6e8 100644 --- a/TODO +++ b/TODO @@ -1,55 +1,7 @@ -Quick TODO -------------------------------------------------------------------- +Bugtracker: -- write language unit test -- more maple-specific example programs -- maple mini serial bootloader HOWTO -- maple and mini jtag HOWTO +http://code.google.com/p/leaflabs/issues/list -Peripherals ------------------------------------------------------------------- - -- I2C wrap up -- SPI wrap up - -Arduino Library functions to port (these are LGPL) ---------------------------- - -EEPROM: - functions: - uint8 read(int) - void write(int, uint8) - -Firmata: - edit Firmata.h for capabilities - -Matrix: - soft spi port stuff - -SoftwareSerial: - clockCyclesToMicroseconds(int) - -Sprite: - all good? - -LiquidCrystal: - timing on soft serial send() commands - -Stepper: - requires millis() - -Wire: - reimplementation of the utility/twi.{c/h} code: - void twi_init(void); - void twi_setAddress(uint8_t); - uint8_t twi_readFrom(uint8_t, uint8_t*, uint8_t); - uint8_t twi_writeTo(uint8_t, uint8_t*, uint8_t, uint8_t); - uint8_t twi_transmit(uint8_t*, uint8_t); - void twi_attachSlaveRxEvent( void (*)(uint8_t*, int) ); - void twi_attachSlaveTxEvent( void (*)(void) ); - void twi_reply(uint8_t); - void twi_stop(void); - void twi_releaseBus(void); - -Ethernet: - ho baby... - uses avr/interrupt.h - reimplement utility/spi stuff +Blocking changes for official releases: +http://wiki.leaflabs.com/index.php?title=Blocking_Changes diff --git a/support/codeblocks/libmaple.cbp b/support/codeblocks/libmaple.cbp deleted file mode 100644 index 4766275..0000000 --- a/support/codeblocks/libmaple.cbp +++ /dev/null @@ -1,300 +0,0 @@ - - - - - - diff --git a/support/codeblocks/program_flash.sh b/support/codeblocks/program_flash.sh deleted file mode 100755 index 9dfe9f1..0000000 --- a/support/codeblocks/program_flash.sh +++ /dev/null @@ -1,4 +0,0 @@ -#/usr/bin/env sh - -cd ../.. -make MAPLE_TARGET=flash install diff --git a/support/codeblocks/program_ram.sh b/support/codeblocks/program_ram.sh deleted file mode 100755 index 55fe73d..0000000 --- a/support/codeblocks/program_ram.sh +++ /dev/null @@ -1,4 +0,0 @@ -#/usr/bin/env sh - -cd ../.. -make MAPLE_TARGET=ram install diff --git a/support/gdb/gpio.gdb b/support/gdb/gpio.gdb deleted file mode 100644 index 4376cfd..0000000 --- a/support/gdb/gpio.gdb +++ /dev/null @@ -1,12 +0,0 @@ -set print pretty on - -print "GPIOA registers:" -p/x *GPIOA->regs -print "GPIOB registers:" -p/x *GPIOB->regs -print "GPIOC registers:" -p/x *GPIOC->regs -print "GPIOD registers:" -p/x *GPIOD->regs -print "AFIO registers:" -p/x *(struct afio_reg_map*)0x40010000 diff --git a/support/gdb/gpio/gpio.gdb b/support/gdb/gpio/gpio.gdb new file mode 100644 index 0000000..4376cfd --- /dev/null +++ b/support/gdb/gpio/gpio.gdb @@ -0,0 +1,12 @@ +set print pretty on + +print "GPIOA registers:" +p/x *GPIOA->regs +print "GPIOB registers:" +p/x *GPIOB->regs +print "GPIOC registers:" +p/x *GPIOC->regs +print "GPIOD registers:" +p/x *GPIOD->regs +print "AFIO registers:" +p/x *(struct afio_reg_map*)0x40010000 diff --git a/support/gdb/i2c/test.gdb b/support/gdb/i2c/test.gdb new file mode 100644 index 0000000..8b71320 --- /dev/null +++ b/support/gdb/i2c/test.gdb @@ -0,0 +1,112 @@ +define i2c_sr1_flags +set $s = $arg0 +printf "SR1: " + +if (($s & (1 << 15))) + printf "SMBALERT " +end + +if (($s & (1 << 14))) + printf "TIMEOUT " +end + +if (($s & (1 << 12))) + printf "PECERR " +end + +if (($s & (1 << 11))) + printf "OVR " +end + +if (($s & (1 << 10))) + printf "AF " +end + +if (($s & (1 << 9))) + printf "ARLO " +end + +if (($s & (1 << 8))) + printf "BERR " +end + +if (($s & (1 << 7))) + printf "TXE " +end + +if (($s & (1 << 6))) + printf "RXNE " +end + +if (($s & (1 << 4))) + printf "STOPF " +end + +if (($s & (1 << 3))) + printf "ADD10 " +end + +if (($s & (1 << 2))) + printf "BTF " +end + +if (($s & (1 << 1))) + printf "ADDR " +end + +if (($s & (1 << 0))) + printf "SB " +end +end + +define i2c_sr2_flags +set $s = $arg0 +printf "SR2: " + +if (($s & (1 << 7))) + printf "DUALF " +end + +if (($s & (1 << 6))) + printf "SMBHOST " +end + +if (($s & (1 << 5))) + printf "SMBDEFAULT " +end + +if (($s & (1 << 4))) + printf "GENCALL " +end + + +if (($s & (1 << 2))) + printf "TRA " +end + +if (($s & (1 << 1))) + printf "BUSY " +end + +if (($s & (1 << 0))) + printf "MSL " +end + +end + +define pbc +set $c = crumbs +while ($c->event) + if ($c->event != 0) + printf "Event: %d ", $c->event + if ($c->event == 1) + i2c_sr1_flags $c->sr1 + printf "\t" + i2c_sr2_flags $c->sr2 + end + printf "\n" + end + set $c = $c + 1 +end + + diff --git a/test.gdb b/test.gdb deleted file mode 100644 index 8b71320..0000000 --- a/test.gdb +++ /dev/null @@ -1,112 +0,0 @@ -define i2c_sr1_flags -set $s = $arg0 -printf "SR1: " - -if (($s & (1 << 15))) - printf "SMBALERT " -end - -if (($s & (1 << 14))) - printf "TIMEOUT " -end - -if (($s & (1 << 12))) - printf "PECERR " -end - -if (($s & (1 << 11))) - printf "OVR " -end - -if (($s & (1 << 10))) - printf "AF " -end - -if (($s & (1 << 9))) - printf "ARLO " -end - -if (($s & (1 << 8))) - printf "BERR " -end - -if (($s & (1 << 7))) - printf "TXE " -end - -if (($s & (1 << 6))) - printf "RXNE " -end - -if (($s & (1 << 4))) - printf "STOPF " -end - -if (($s & (1 << 3))) - printf "ADD10 " -end - -if (($s & (1 << 2))) - printf "BTF " -end - -if (($s & (1 << 1))) - printf "ADDR " -end - -if (($s & (1 << 0))) - printf "SB " -end -end - -define i2c_sr2_flags -set $s = $arg0 -printf "SR2: " - -if (($s & (1 << 7))) - printf "DUALF " -end - -if (($s & (1 << 6))) - printf "SMBHOST " -end - -if (($s & (1 << 5))) - printf "SMBDEFAULT " -end - -if (($s & (1 << 4))) - printf "GENCALL " -end - - -if (($s & (1 << 2))) - printf "TRA " -end - -if (($s & (1 << 1))) - printf "BUSY " -end - -if (($s & (1 << 0))) - printf "MSL " -end - -end - -define pbc -set $c = crumbs -while ($c->event) - if ($c->event != 0) - printf "Event: %d ", $c->event - if ($c->event == 1) - i2c_sr1_flags $c->sr1 - printf "\t" - i2c_sr2_flags $c->sr2 - end - printf "\n" - end - set $c = $c + 1 -end - - -- cgit v1.2.3