diff options
Diffstat (limited to 'support')
-rw-r--r-- | support/codeblocks/libmaple.cbp | 300 | ||||
-rwxr-xr-x | support/codeblocks/program_flash.sh | 4 | ||||
-rwxr-xr-x | support/codeblocks/program_ram.sh | 4 | ||||
-rw-r--r-- | support/gdb/gpio/gpio.gdb (renamed from support/gdb/gpio.gdb) | 0 | ||||
-rw-r--r-- | support/gdb/i2c/test.gdb | 112 |
5 files changed, 112 insertions, 308 deletions
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 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> -<CodeBlocks_project_file> - <FileVersion major="1" minor="6" /> - <Project> - <Option title="libmaple" /> - <Option makefile_is_custom="1" /> - <Option pch_mode="2" /> - <Option compiler="gcc" /> - <Build> - <Target title="flash"> - <Option output="support/codeblocks/program_flash.sh" prefix_auto="0" extension_auto="0" /> - <Option working_dir="support/codeblocks" /> - <Option object_output="/home/bnewbold/leaf/libmaple/.objs" /> - <Option type="1" /> - <Option compiler="gcc" /> - <Option use_console_runner="0" /> - <MakeCommands> - <Build command="$make -f $makefile MAPLE_TARGET=$target" /> - <CompileFile command="$make -f $makefile MAPLE_TARGET=$target $file" /> - <Clean command="$make -f $makefile clean" /> - <DistClean command="$make -f $makefile distclean$target" /> - </MakeCommands> - </Target> - <Target title="ram"> - <Option output="support/codeblocks/program_ram.sh" prefix_auto="0" extension_auto="0" /> - <Option working_dir="support/codeblocks" /> - <Option type="1" /> - <Option compiler="gcc" /> - <Option use_console_runner="0" /> - <MakeCommands> - <Build command="$make -f $makefile MAPLE_TARGET=$target" /> - <CompileFile command="$make -f $makefile MAPLE_TARGET=$target $file" /> - <Clean command="$make -f $makefile clean" /> - <DistClean command="$make -f $makefile distclean" /> - </MakeCommands> - </Target> - </Build> - <Compiler> - <Add option="-Wall" /> - </Compiler> - <Unit filename="libmaple/adc.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/adc.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/exc.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/exti.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/exti.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/flash.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/flash.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/gpio.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/gpio.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/libmaple.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/libmaple_types.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/nvic.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/nvic.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/rcc.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/rcc.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/spi.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/spi.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/syscalls.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/systick.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/systick.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/timers.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/timers.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usart.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usart.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/descriptors.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/descriptors.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/usb.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/usb.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/usb_callbacks.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/usb_callbacks.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/usb_config.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/usb_hardware.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/usb_hardware.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/usb_lib/usb_core.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/usb_lib/usb_core.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/usb_lib/usb_def.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/usb_lib/usb_init.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/usb_lib/usb_init.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/usb_lib/usb_int.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/usb_lib/usb_int.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/usb_lib/usb_lib.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/usb_lib/usb_mem.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/usb_lib/usb_mem.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/usb_lib/usb_regs.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/usb_lib/usb_regs.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/usb/usb_lib/usb_type.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/util.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="libmaple/util.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="main.cpp"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/Print.cpp"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/Print.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/WProgram.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/bits.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/comm/HardwareSPI.cpp"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/comm/HardwareSPI.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/comm/HardwareSerial.cpp"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/comm/HardwareSerial.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/cxxabi-compat.cpp"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/ext_interrupts.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/ext_interrupts.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/io.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/main.cxx"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/pwm.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/pwm.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/time.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/time.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/usb_serial.cpp"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/usb_serial.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/wirish.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/wirish.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/wirish_analog.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/wirish_digital.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/wirish_math.cpp"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/wirish_math.h"> - <Option target="<{~None~}>" /> - </Unit> - <Unit filename="wirish/wirish_shift.c"> - <Option compilerVar="CC" /> - <Option target="<{~None~}>" /> - </Unit> - <Extensions> - <code_completion /> - <debugger /> - </Extensions> - </Project> -</CodeBlocks_project_file> 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/gpio.gdb index 4376cfd..4376cfd 100644 --- a/support/gdb/gpio.gdb +++ b/support/gdb/gpio/gpio.gdb 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 + + |