Grunddaten
This commit is contained in:
28
firmware/.dep/ctrl.o.d
Normal file
28
firmware/.dep/ctrl.o.d
Normal file
@@ -0,0 +1,28 @@
|
||||
ctrl.o: ctrl.c /usr/lib/avr/include/avr/io.h \
|
||||
/usr/lib/avr/include/avr/sfr_defs.h /usr/lib/avr/include/inttypes.h \
|
||||
/usr/lib/gcc/avr/4.8.2/include/stdint.h /usr/lib/avr/include/stdint.h \
|
||||
/usr/lib/avr/include/avr/iom8.h /usr/lib/avr/include/avr/portpins.h \
|
||||
/usr/lib/avr/include/avr/common.h /usr/lib/avr/include/avr/version.h \
|
||||
/usr/lib/avr/include/avr/fuse.h /usr/lib/avr/include/avr/lock.h
|
||||
|
||||
/usr/lib/avr/include/avr/io.h:
|
||||
|
||||
/usr/lib/avr/include/avr/sfr_defs.h:
|
||||
|
||||
/usr/lib/avr/include/inttypes.h:
|
||||
|
||||
/usr/lib/gcc/avr/4.8.2/include/stdint.h:
|
||||
|
||||
/usr/lib/avr/include/stdint.h:
|
||||
|
||||
/usr/lib/avr/include/avr/iom8.h:
|
||||
|
||||
/usr/lib/avr/include/avr/portpins.h:
|
||||
|
||||
/usr/lib/avr/include/avr/common.h:
|
||||
|
||||
/usr/lib/avr/include/avr/version.h:
|
||||
|
||||
/usr/lib/avr/include/avr/fuse.h:
|
||||
|
||||
/usr/lib/avr/include/avr/lock.h:
|
45
firmware/.dep/dbt03.o.d
Normal file
45
firmware/.dep/dbt03.o.d
Normal file
@@ -0,0 +1,45 @@
|
||||
dbt03.o: dbt03.c /usr/lib/avr/include/avr/io.h \
|
||||
/usr/lib/avr/include/avr/sfr_defs.h /usr/lib/avr/include/inttypes.h \
|
||||
/usr/lib/gcc/avr/4.8.2/include/stdint.h /usr/lib/avr/include/stdint.h \
|
||||
/usr/lib/avr/include/avr/iom8.h /usr/lib/avr/include/avr/portpins.h \
|
||||
/usr/lib/avr/include/avr/common.h /usr/lib/avr/include/avr/version.h \
|
||||
/usr/lib/avr/include/avr/fuse.h /usr/lib/avr/include/avr/lock.h \
|
||||
/usr/lib/gcc/avr/4.8.2/include/stdbool.h \
|
||||
/usr/lib/avr/include/avr/interrupt.h /usr/lib/avr/include/util/parity.h \
|
||||
dbt03.h uart.h delay.h ctrl.h
|
||||
|
||||
/usr/lib/avr/include/avr/io.h:
|
||||
|
||||
/usr/lib/avr/include/avr/sfr_defs.h:
|
||||
|
||||
/usr/lib/avr/include/inttypes.h:
|
||||
|
||||
/usr/lib/gcc/avr/4.8.2/include/stdint.h:
|
||||
|
||||
/usr/lib/avr/include/stdint.h:
|
||||
|
||||
/usr/lib/avr/include/avr/iom8.h:
|
||||
|
||||
/usr/lib/avr/include/avr/portpins.h:
|
||||
|
||||
/usr/lib/avr/include/avr/common.h:
|
||||
|
||||
/usr/lib/avr/include/avr/version.h:
|
||||
|
||||
/usr/lib/avr/include/avr/fuse.h:
|
||||
|
||||
/usr/lib/avr/include/avr/lock.h:
|
||||
|
||||
/usr/lib/gcc/avr/4.8.2/include/stdbool.h:
|
||||
|
||||
/usr/lib/avr/include/avr/interrupt.h:
|
||||
|
||||
/usr/lib/avr/include/util/parity.h:
|
||||
|
||||
dbt03.h:
|
||||
|
||||
uart.h:
|
||||
|
||||
delay.h:
|
||||
|
||||
ctrl.h:
|
40
firmware/.dep/delay.o.d
Normal file
40
firmware/.dep/delay.o.d
Normal file
@@ -0,0 +1,40 @@
|
||||
delay.o: delay.c /usr/lib/avr/include/util/delay.h \
|
||||
/usr/lib/avr/include/inttypes.h /usr/lib/gcc/avr/4.8.2/include/stdint.h \
|
||||
/usr/lib/avr/include/stdint.h /usr/lib/avr/include/util/delay_basic.h \
|
||||
/usr/lib/avr/include/math.h /usr/lib/avr/include/avr/interrupt.h \
|
||||
/usr/lib/avr/include/avr/io.h /usr/lib/avr/include/avr/sfr_defs.h \
|
||||
/usr/lib/avr/include/avr/iom8.h /usr/lib/avr/include/avr/portpins.h \
|
||||
/usr/lib/avr/include/avr/common.h /usr/lib/avr/include/avr/version.h \
|
||||
/usr/lib/avr/include/avr/fuse.h /usr/lib/avr/include/avr/lock.h delay.h
|
||||
|
||||
/usr/lib/avr/include/util/delay.h:
|
||||
|
||||
/usr/lib/avr/include/inttypes.h:
|
||||
|
||||
/usr/lib/gcc/avr/4.8.2/include/stdint.h:
|
||||
|
||||
/usr/lib/avr/include/stdint.h:
|
||||
|
||||
/usr/lib/avr/include/util/delay_basic.h:
|
||||
|
||||
/usr/lib/avr/include/math.h:
|
||||
|
||||
/usr/lib/avr/include/avr/interrupt.h:
|
||||
|
||||
/usr/lib/avr/include/avr/io.h:
|
||||
|
||||
/usr/lib/avr/include/avr/sfr_defs.h:
|
||||
|
||||
/usr/lib/avr/include/avr/iom8.h:
|
||||
|
||||
/usr/lib/avr/include/avr/portpins.h:
|
||||
|
||||
/usr/lib/avr/include/avr/common.h:
|
||||
|
||||
/usr/lib/avr/include/avr/version.h:
|
||||
|
||||
/usr/lib/avr/include/avr/fuse.h:
|
||||
|
||||
/usr/lib/avr/include/avr/lock.h:
|
||||
|
||||
delay.h:
|
50
firmware/.dep/main.o.d
Normal file
50
firmware/.dep/main.o.d
Normal file
@@ -0,0 +1,50 @@
|
||||
main.o: main.c /usr/lib/avr/include/avr/io.h \
|
||||
/usr/lib/avr/include/avr/sfr_defs.h /usr/lib/avr/include/inttypes.h \
|
||||
/usr/lib/gcc/avr/4.8.2/include/stdint.h /usr/lib/avr/include/stdint.h \
|
||||
/usr/lib/avr/include/avr/iom8.h /usr/lib/avr/include/avr/portpins.h \
|
||||
/usr/lib/avr/include/avr/common.h /usr/lib/avr/include/avr/version.h \
|
||||
/usr/lib/avr/include/avr/fuse.h /usr/lib/avr/include/avr/lock.h \
|
||||
/usr/lib/avr/include/stdio.h /usr/lib/gcc/avr/4.8.2/include/stdarg.h \
|
||||
/usr/lib/gcc/avr/4.8.2/include/stddef.h \
|
||||
/usr/lib/avr/include/avr/pgmspace.h /usr/lib/avr/include/avr/interrupt.h \
|
||||
uart.h dbt03.h ctrl.h delay.h
|
||||
|
||||
/usr/lib/avr/include/avr/io.h:
|
||||
|
||||
/usr/lib/avr/include/avr/sfr_defs.h:
|
||||
|
||||
/usr/lib/avr/include/inttypes.h:
|
||||
|
||||
/usr/lib/gcc/avr/4.8.2/include/stdint.h:
|
||||
|
||||
/usr/lib/avr/include/stdint.h:
|
||||
|
||||
/usr/lib/avr/include/avr/iom8.h:
|
||||
|
||||
/usr/lib/avr/include/avr/portpins.h:
|
||||
|
||||
/usr/lib/avr/include/avr/common.h:
|
||||
|
||||
/usr/lib/avr/include/avr/version.h:
|
||||
|
||||
/usr/lib/avr/include/avr/fuse.h:
|
||||
|
||||
/usr/lib/avr/include/avr/lock.h:
|
||||
|
||||
/usr/lib/avr/include/stdio.h:
|
||||
|
||||
/usr/lib/gcc/avr/4.8.2/include/stdarg.h:
|
||||
|
||||
/usr/lib/gcc/avr/4.8.2/include/stddef.h:
|
||||
|
||||
/usr/lib/avr/include/avr/pgmspace.h:
|
||||
|
||||
/usr/lib/avr/include/avr/interrupt.h:
|
||||
|
||||
uart.h:
|
||||
|
||||
dbt03.h:
|
||||
|
||||
ctrl.h:
|
||||
|
||||
delay.h:
|
45
firmware/.dep/uart.o.d
Normal file
45
firmware/.dep/uart.o.d
Normal file
@@ -0,0 +1,45 @@
|
||||
uart.o: uart.c /usr/lib/avr/include/avr/io.h \
|
||||
/usr/lib/avr/include/avr/sfr_defs.h /usr/lib/avr/include/inttypes.h \
|
||||
/usr/lib/gcc/avr/4.8.2/include/stdint.h /usr/lib/avr/include/stdint.h \
|
||||
/usr/lib/avr/include/avr/iom8.h /usr/lib/avr/include/avr/portpins.h \
|
||||
/usr/lib/avr/include/avr/common.h /usr/lib/avr/include/avr/version.h \
|
||||
/usr/lib/avr/include/avr/fuse.h /usr/lib/avr/include/avr/lock.h \
|
||||
/usr/lib/avr/include/avr/interrupt.h \
|
||||
/usr/lib/gcc/avr/4.8.2/include/stdbool.h \
|
||||
/usr/lib/avr/include/util/delay.h \
|
||||
/usr/lib/avr/include/util/delay_basic.h /usr/lib/avr/include/math.h \
|
||||
uart.h
|
||||
|
||||
/usr/lib/avr/include/avr/io.h:
|
||||
|
||||
/usr/lib/avr/include/avr/sfr_defs.h:
|
||||
|
||||
/usr/lib/avr/include/inttypes.h:
|
||||
|
||||
/usr/lib/gcc/avr/4.8.2/include/stdint.h:
|
||||
|
||||
/usr/lib/avr/include/stdint.h:
|
||||
|
||||
/usr/lib/avr/include/avr/iom8.h:
|
||||
|
||||
/usr/lib/avr/include/avr/portpins.h:
|
||||
|
||||
/usr/lib/avr/include/avr/common.h:
|
||||
|
||||
/usr/lib/avr/include/avr/version.h:
|
||||
|
||||
/usr/lib/avr/include/avr/fuse.h:
|
||||
|
||||
/usr/lib/avr/include/avr/lock.h:
|
||||
|
||||
/usr/lib/avr/include/avr/interrupt.h:
|
||||
|
||||
/usr/lib/gcc/avr/4.8.2/include/stdbool.h:
|
||||
|
||||
/usr/lib/avr/include/util/delay.h:
|
||||
|
||||
/usr/lib/avr/include/util/delay_basic.h:
|
||||
|
||||
/usr/lib/avr/include/math.h:
|
||||
|
||||
uart.h:
|
512
firmware/Makefile
Normal file
512
firmware/Makefile
Normal file
@@ -0,0 +1,512 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# WinAVR Makefile Template written by Eric B. Weddington, J<>rg Wunsch, et al.
|
||||
#
|
||||
# Released to the Public Domain
|
||||
#
|
||||
# Additional material for this makefile was written by:
|
||||
# Peter Fleury
|
||||
# Tim Henigan
|
||||
# Colin O'Flynn
|
||||
# Reiner Patommel
|
||||
# Markus Pfaff
|
||||
# Sander Pool
|
||||
# Frederik Rouleau
|
||||
#
|
||||
#----------------------------------------------------------------------------
|
||||
# On command line:
|
||||
#
|
||||
# make all = Make software.
|
||||
#
|
||||
# make clean = Clean out built project files.
|
||||
#
|
||||
# make coff = Convert ELF to AVR COFF.
|
||||
#
|
||||
# make extcoff = Convert ELF to AVR Extended COFF.
|
||||
#
|
||||
# make program = Download the hex file to the device, using avrdude.
|
||||
# Please customize the avrdude settings below first!
|
||||
#
|
||||
# make debug = Start either simulavr or avarice as specified for debugging,
|
||||
# with avr-gdb or avr-insight as the front end for debugging.
|
||||
#
|
||||
# make filename.s = Just compile filename.c into the assembler code only.
|
||||
#
|
||||
# make filename.i = Create a preprocessed source file for use in submitting
|
||||
# bug reports to the GCC project.
|
||||
#
|
||||
# To rebuild project do "make clean" then "make all".
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
||||
# MCU name
|
||||
MCU = atmega8
|
||||
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
# Output format. (can be srec, ihex, binary)
|
||||
FORMAT = binary
|
||||
|
||||
|
||||
# Target file name (without extension).
|
||||
TARGET = main
|
||||
|
||||
|
||||
# List C source files here. (C dependencies are automatically generated.)
|
||||
SRC = $(TARGET).c uart.c delay.c dbt03.c ctrl.c
|
||||
# List Assembler source files here.
|
||||
# Make them always end in a capital .S. Files ending in a lowercase .s
|
||||
# will not be considered source files but generated files (assembler
|
||||
# output from the compiler), and will be deleted upon "make clean"!
|
||||
# Even though the DOS/Win* filesystem matches both .s and .S the same,
|
||||
# it will preserve the spelling of the filenames, and gcc itself does
|
||||
# care about how the name is spelled on its command-line.
|
||||
ASRC =
|
||||
|
||||
|
||||
# Optimization level, can be [0, 1, 2, 3, s].
|
||||
# 0 = turn off optimization. s = optimize for size.
|
||||
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
|
||||
OPT =s
|
||||
|
||||
|
||||
# Debugging format.
|
||||
# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.
|
||||
# AVR Studio 4.10 requires dwarf-2.
|
||||
# AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.
|
||||
#DEBUG = dwarf-2
|
||||
|
||||
|
||||
# List any extra directories to look for include files here.
|
||||
# Each directory must be seperated by a space.
|
||||
# Use forward slashes for directory separators.
|
||||
# For a directory that has spaces, enclose it in quotes.
|
||||
EXTRAINCDIRS =
|
||||
|
||||
|
||||
# Compiler flag to set the C Standard level.
|
||||
# c89 = "ANSI" C
|
||||
# gnu89 = c89 plus GCC extensions
|
||||
# c99 = ISO C99 standard (not yet fully implemented)
|
||||
# gnu99 = c99 plus GCC extensions
|
||||
CSTANDARD = -std=gnu99
|
||||
|
||||
|
||||
# Place -D or -U options here
|
||||
CDEFS = -DF_CPU=$(F_CPU)UL
|
||||
|
||||
|
||||
# Place -I options here
|
||||
CINCS =
|
||||
|
||||
|
||||
|
||||
#---------------- Compiler Options ----------------
|
||||
# -g*: generate debugging information
|
||||
# -O*: optimization level
|
||||
# -f...: tuning, see GCC manual and avr-libc documentation
|
||||
# -Wall...: warning level
|
||||
# -Wa,...: tell GCC to pass this to the assembler.
|
||||
# -adhlns...: create assembler listing
|
||||
#CFLAGS = -g$(DEBUG)
|
||||
CFLAGS += $(CDEFS) $(CINCS)
|
||||
CFLAGS += -O$(OPT)
|
||||
CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
|
||||
CFLAGS += -Wall -Wstrict-prototypes
|
||||
CFLAGS += -Wa,-adhlns=$(<:.c=.lst)
|
||||
CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
|
||||
CFLAGS += $(CSTANDARD)
|
||||
|
||||
|
||||
#---------------- Assembler Options ----------------
|
||||
# -Wa,...: tell GCC to pass this to the assembler.
|
||||
# -ahlms: create listing
|
||||
# -gstabs: have the assembler create line number information; note that
|
||||
# for use in COFF files, additional information about filenames
|
||||
# and function names needs to be present in the assembler source
|
||||
# files -- see avr-libc docs [FIXME: not yet described there]
|
||||
ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
|
||||
|
||||
|
||||
#---------------- Library Options ----------------
|
||||
# Minimalistic printf version
|
||||
PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min
|
||||
|
||||
# Floating point printf version (requires MATH_LIB = -lm below)
|
||||
PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt
|
||||
|
||||
# If this is left blank, then it will use the Standard printf version.
|
||||
PRINTF_LIB =
|
||||
#PRINTF_LIB = $(PRINTF_LIB_MIN)
|
||||
#PRINTF_LIB = $(PRINTF_LIB_FLOAT)
|
||||
|
||||
|
||||
# Minimalistic scanf version
|
||||
SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min
|
||||
|
||||
# Floating point + %[ scanf version (requires MATH_LIB = -lm below)
|
||||
SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt
|
||||
|
||||
# If this is left blank, then it will use the Standard scanf version.
|
||||
SCANF_LIB =
|
||||
#SCANF_LIB = $(SCANF_LIB_MIN)
|
||||
#SCANF_LIB = $(SCANF_LIB_FLOAT)
|
||||
|
||||
|
||||
MATH_LIB = -lm
|
||||
|
||||
|
||||
|
||||
#---------------- External Memory Options ----------------
|
||||
|
||||
# 64 KB of external RAM, starting after internal RAM (ATmega128!),
|
||||
# used for variables (.data/.bss) and heap (malloc()).
|
||||
#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff
|
||||
|
||||
# 64 KB of external RAM, starting after internal RAM (ATmega128!),
|
||||
# only used for heap (malloc()).
|
||||
#EXTMEMOPTS = -Wl,--defsym=__heap_start=0x801100,--defsym=__heap_end=0x80ffff
|
||||
|
||||
EXTMEMOPTS =
|
||||
|
||||
|
||||
|
||||
#---------------- Linker Options ----------------
|
||||
# -Wl,...: tell GCC to pass this to linker.
|
||||
# -Map: create map file
|
||||
# --cref: add cross reference to map file
|
||||
LDFLAGS = -Wl,-Map=$(TARGET).map,--cref
|
||||
LDFLAGS += $(EXTMEMOPTS)
|
||||
LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
|
||||
|
||||
|
||||
|
||||
#---------------- Programming Options (avrdude) ----------------
|
||||
|
||||
# Programming hardware: alf avr910 avrisp bascom bsd
|
||||
# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
|
||||
#
|
||||
# Type: avrdude -c ?
|
||||
# to get a full listing.
|
||||
#
|
||||
#AVRDUDE_PROGRAMMER = stk200 #Parallelport
|
||||
AVRDUDE_PROGRAMMER = avrispv2 #USB
|
||||
|
||||
# com1 = serial port. Use lpt1 to connect to parallel port.
|
||||
#AVRDUDE_PORT = /dev/parport0 # programmer connected to serial device
|
||||
AVRDUDE_PORT = usb
|
||||
|
||||
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
|
||||
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
|
||||
|
||||
# Uncomment the following if you want avrdude's erase cycle counter.
|
||||
# Note that this counter needs to be initialized first using -Yn,
|
||||
# see avrdude manual.
|
||||
#AVRDUDE_ERASE_COUNTER = -y
|
||||
|
||||
# Uncomment the following if you do /not/ wish a verification to be
|
||||
# performed after programming the device.
|
||||
#AVRDUDE_NO_VERIFY = -V
|
||||
|
||||
# Increase verbosity level. Please use this when submitting bug
|
||||
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
|
||||
# to submit bug reports.
|
||||
#AVRDUDE_VERBOSE = -v -v
|
||||
|
||||
AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
|
||||
AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
|
||||
AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
|
||||
AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
|
||||
|
||||
|
||||
|
||||
|
||||
#---------------- Debugging Options ----------------
|
||||
|
||||
# For simulavr only - target MCU frequency.
|
||||
DEBUG_MFREQ = $(F_CPU)
|
||||
|
||||
# Set the DEBUG_UI to either gdb or insight.
|
||||
# DEBUG_UI = gdb
|
||||
DEBUG_UI = insight
|
||||
|
||||
# Set the debugging back-end to either avarice, simulavr.
|
||||
DEBUG_BACKEND = avarice
|
||||
#DEBUG_BACKEND = simulavr
|
||||
|
||||
# GDB Init Filename.
|
||||
GDBINIT_FILE = __avr_gdbinit
|
||||
|
||||
# When using avarice settings for the JTAG
|
||||
JTAG_DEV = /dev/com1
|
||||
|
||||
# Debugging port used to communicate between GDB / avarice / simulavr.
|
||||
DEBUG_PORT = 4242
|
||||
|
||||
# Debugging host used to communicate between GDB / avarice / simulavr, normally
|
||||
# just set to localhost unless doing some sort of crazy debugging when
|
||||
# avarice is running on a different computer.
|
||||
DEBUG_HOST = localhost
|
||||
|
||||
|
||||
|
||||
#============================================================================
|
||||
|
||||
|
||||
# Define programs and commands.
|
||||
SHELL = sh
|
||||
CC = avr-gcc
|
||||
OBJCOPY = avr-objcopy
|
||||
OBJDUMP = avr-objdump
|
||||
SIZE = avr-size
|
||||
NM = avr-nm
|
||||
AVRDUDE = avrdude
|
||||
REMOVE = rm -f
|
||||
COPY = cp
|
||||
WINSHELL = cmd
|
||||
|
||||
|
||||
# Define Messages
|
||||
# English
|
||||
MSG_ERRORS_NONE = Errors: none
|
||||
MSG_BEGIN = -------- begin --------
|
||||
MSG_END = -------- end --------
|
||||
MSG_SIZE_BEFORE = Size before:
|
||||
MSG_SIZE_AFTER = Size after:
|
||||
MSG_COFF = Converting to AVR COFF:
|
||||
MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
|
||||
MSG_FLASH = Creating load file for Flash:
|
||||
MSG_EEPROM = Creating load file for EEPROM:
|
||||
MSG_EXTENDED_LISTING = Creating Extended Listing:
|
||||
MSG_SYMBOL_TABLE = Creating Symbol Table:
|
||||
MSG_LINKING = Linking:
|
||||
MSG_COMPILING = Compiling:
|
||||
MSG_ASSEMBLING = Assembling:
|
||||
MSG_CLEANING = Cleaning project:
|
||||
|
||||
|
||||
|
||||
|
||||
# Define all object files.
|
||||
OBJ = $(SRC:.c=.o) $(ASRC:.S=.o)
|
||||
|
||||
# Define all listing files.
|
||||
LST = $(SRC:.c=.lst) $(ASRC:.S=.lst)
|
||||
|
||||
|
||||
# Compiler flags to generate dependency files.
|
||||
GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
|
||||
|
||||
|
||||
# Combine all necessary flags and optional flags.
|
||||
# Add target processor to flags.
|
||||
ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)
|
||||
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Default target.
|
||||
all: begin gccversion sizebefore build sizeafter end
|
||||
|
||||
build: elf hex eep lss sym
|
||||
|
||||
elf: $(TARGET).elf
|
||||
hex: $(TARGET).hex
|
||||
eep: $(TARGET).eep
|
||||
lss: $(TARGET).lss
|
||||
sym: $(TARGET).sym
|
||||
|
||||
|
||||
|
||||
# Eye candy.
|
||||
# AVR Studio 3.x does not check make's exit code but relies on
|
||||
# the following magic strings to be generated by the compile job.
|
||||
begin:
|
||||
@echo
|
||||
@echo $(MSG_BEGIN)
|
||||
|
||||
end:
|
||||
@echo $(MSG_END)
|
||||
@echo
|
||||
|
||||
|
||||
# Display size of file.
|
||||
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
|
||||
ELFSIZE = $(SIZE) -A $(TARGET).elf
|
||||
AVRMEM = avr-mem.sh $(TARGET).elf $(MCU)
|
||||
|
||||
sizebefore:
|
||||
@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
|
||||
$(AVRMEM) 2>/dev/null; echo; fi
|
||||
|
||||
sizeafter:
|
||||
@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \
|
||||
$(AVRMEM) 2>/dev/null; echo; fi
|
||||
|
||||
|
||||
|
||||
# Display compiler version information.
|
||||
gccversion :
|
||||
@$(CC) --version
|
||||
|
||||
|
||||
|
||||
# Program the device.
|
||||
program: $(TARGET).hex $(TARGET).eep
|
||||
sudo $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
|
||||
|
||||
fuse:
|
||||
$(AVRDUDE) $(AVRDUDE_FLAGS) -q -U lfuse:w:0x20:m -U hfuse:w:0xd9:m
|
||||
|
||||
|
||||
# Generate avr-gdb config/init file which does the following:
|
||||
# define the reset signal, load the target file, connect to target, and set
|
||||
# a breakpoint at main().
|
||||
gdb-config:
|
||||
@$(REMOVE) $(GDBINIT_FILE)
|
||||
@echo define reset >> $(GDBINIT_FILE)
|
||||
@echo SIGNAL SIGHUP >> $(GDBINIT_FILE)
|
||||
@echo end >> $(GDBINIT_FILE)
|
||||
@echo file $(TARGET).elf >> $(GDBINIT_FILE)
|
||||
@echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE)
|
||||
ifeq ($(DEBUG_BACKEND),simulavr)
|
||||
@echo load >> $(GDBINIT_FILE)
|
||||
endif
|
||||
@echo break main >> $(GDBINIT_FILE)
|
||||
|
||||
debug: gdb-config $(TARGET).elf
|
||||
ifeq ($(DEBUG_BACKEND), avarice)
|
||||
@echo Starting AVaRICE - Press enter when "waiting to connect" message displays.
|
||||
@$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \
|
||||
$(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)
|
||||
@$(WINSHELL) /c pause
|
||||
|
||||
else
|
||||
@$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \
|
||||
$(DEBUG_MFREQ) --port $(DEBUG_PORT)
|
||||
endif
|
||||
@$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)
|
||||
|
||||
|
||||
|
||||
|
||||
# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
|
||||
COFFCONVERT=$(OBJCOPY) --debugging \
|
||||
--change-section-address .data-0x800000 \
|
||||
--change-section-address .bss-0x800000 \
|
||||
--change-section-address .noinit-0x800000 \
|
||||
--change-section-address .eeprom-0x810000
|
||||
|
||||
|
||||
coff: $(TARGET).elf
|
||||
@echo
|
||||
@echo $(MSG_COFF) $(TARGET).cof
|
||||
$(COFFCONVERT) -O coff-avr $< $(TARGET).cof
|
||||
|
||||
|
||||
extcoff: $(TARGET).elf
|
||||
@echo
|
||||
@echo $(MSG_EXTENDED_COFF) $(TARGET).cof
|
||||
$(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
|
||||
|
||||
|
||||
|
||||
# Create final output files (.hex, .eep) from ELF output file.
|
||||
%.hex: %.elf
|
||||
@echo
|
||||
@echo $(MSG_FLASH) $@
|
||||
$(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
|
||||
|
||||
%.eep: %.elf
|
||||
@echo
|
||||
@echo $(MSG_EEPROM) $@
|
||||
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
|
||||
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
|
||||
|
||||
# Create extended listing file from ELF output file.
|
||||
%.lss: %.elf
|
||||
@echo
|
||||
@echo $(MSG_EXTENDED_LISTING) $@
|
||||
$(OBJDUMP) -h -S $< > $@
|
||||
|
||||
# Create a symbol table from ELF output file.
|
||||
%.sym: %.elf
|
||||
@echo
|
||||
@echo $(MSG_SYMBOL_TABLE) $@
|
||||
$(NM) -n $< > $@
|
||||
|
||||
|
||||
|
||||
# Link: create ELF output file from object files.
|
||||
.SECONDARY : $(TARGET).elf
|
||||
.PRECIOUS : $(OBJ)
|
||||
%.elf: $(OBJ)
|
||||
@echo
|
||||
@echo $(MSG_LINKING) $@
|
||||
$(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)
|
||||
|
||||
|
||||
# Compile: create object files from C source files.
|
||||
%.o : %.c
|
||||
@echo
|
||||
@echo $(MSG_COMPILING) $<
|
||||
$(CC) -c $(ALL_CFLAGS) $< -o $@
|
||||
|
||||
|
||||
# Compile: create assembler files from C source files.
|
||||
%.s : %.c
|
||||
$(CC) -S $(ALL_CFLAGS) $< -o $@
|
||||
|
||||
|
||||
# Assemble: create object files from assembler source files.
|
||||
%.o : %.S
|
||||
@echo
|
||||
@echo $(MSG_ASSEMBLING) $<
|
||||
$(CC) -c $(ALL_ASFLAGS) $< -o $@
|
||||
|
||||
# Create preprocessed source for use in sending a bug report.
|
||||
%.i : %.c
|
||||
$(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@
|
||||
|
||||
|
||||
# Target: clean project.
|
||||
clean: begin clean_list end
|
||||
|
||||
clean_list :
|
||||
@echo
|
||||
@echo $(MSG_CLEANING)
|
||||
$(REMOVE) $(TARGET).hex
|
||||
$(REMOVE) $(TARGET).eep
|
||||
$(REMOVE) $(TARGET).cof
|
||||
$(REMOVE) $(TARGET).elf
|
||||
$(REMOVE) $(TARGET).map
|
||||
$(REMOVE) $(TARGET).sym
|
||||
$(REMOVE) $(TARGET).lss
|
||||
$(REMOVE) $(OBJ)
|
||||
$(REMOVE) $(LST)
|
||||
$(REMOVE) $(SRC:.c=.s)
|
||||
$(REMOVE) $(SRC:.c=.d)
|
||||
$(REMOVE) .dep/*
|
||||
|
||||
|
||||
|
||||
# Include the dependency files.
|
||||
-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
|
||||
|
||||
|
||||
# Listing of phony targets.
|
||||
.PHONY : all begin finish end sizebefore sizeafter gccversion \
|
||||
build elf hex eep lss sym coff extcoff \
|
||||
clean clean_list program debug gdb-config
|
||||
|
||||
|
||||
|
61
firmware/ctrl.c
Normal file
61
firmware/ctrl.c
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
####################################################################################
|
||||
# #
|
||||
# Bildschirmtricks Firmware V1.0.0 #
|
||||
# Control-line-Handler #
|
||||
# #
|
||||
# Copyright (C) 2008 Philipp Fabian Benedikt Maier (aka. Dexter) #
|
||||
# #
|
||||
# This program is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program; if not, write to the Free Software #
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #
|
||||
# #
|
||||
#################################################################################### */
|
||||
|
||||
|
||||
/* ## HEADER ########################################################################## */
|
||||
#include <avr/io.h> /* Include I/O definitions */
|
||||
#include <stdint.h> /* Include Integer types */
|
||||
/* #################################################################################### */
|
||||
|
||||
|
||||
/* #################################################################################### */
|
||||
/* Initalize Control lines */
|
||||
void systemCtrlInit(void)
|
||||
{
|
||||
PORTB |= (1 << PB1); /* Set PB1 to high level */
|
||||
DDRB |= (1 << DDB1); /* Set PB1 as output */
|
||||
PORTB |= (1 << PB2); /* Enable PB2 (inhibit) pullup resistor */
|
||||
PORTD |= (1 << PD4); /* Enable PD4 (terminate) pullup resistor */
|
||||
return;
|
||||
}
|
||||
|
||||
/* Toggle ready signal (ready => low) */
|
||||
void systemCtrlReady(void)
|
||||
{
|
||||
PORTB &= ~(1 << PB1); /* Set PB1 to low level */
|
||||
}
|
||||
|
||||
/* Check if inhibit signal is present (Low=Inhibit=0 , High=Normal=1) */
|
||||
uint8_t systemCtrlCheckInhibit(void)
|
||||
{
|
||||
return ((PINB >> PB2) & 1);
|
||||
}
|
||||
|
||||
/* Check if terminate signal is present (Low=Terminate=0 , High=Normal=1 */
|
||||
uint8_t systemCtrlCheckTerminate(void)
|
||||
{
|
||||
return ((PIND >> PD4) & 1);
|
||||
}
|
||||
|
||||
/* #################################################################################### */
|
38
firmware/ctrl.h
Normal file
38
firmware/ctrl.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
####################################################################################
|
||||
# #
|
||||
# Bildschirmtricks Firmware V1.0.0 #
|
||||
# Control-line-Handler #
|
||||
# #
|
||||
# Copyright (C) 2008 Philipp Fabian Benedikt Maier (aka. Dexter) #
|
||||
# #
|
||||
# This program is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program; if not, write to the Free Software #
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #
|
||||
# #
|
||||
#################################################################################### */
|
||||
|
||||
|
||||
/* ## HEADER ########################################################################## */
|
||||
#ifndef CTRL_H
|
||||
#define CTRL_H
|
||||
|
||||
void systemCtrlInit(void); /* Initalize Control lines */
|
||||
void systemCtrlReady(void); /* Toggle ready signal (ready => low) */
|
||||
uint8_t systemCtrlCheckInhibit(void); /* Check if inhibit signal is present (Low=Inhibit=0 , High=Normal=1) */
|
||||
uint8_t systemCtrlCheckTerminate(void); /* Check if terminate signal is present (Low=Terminate=0 , High=Normal=1 */
|
||||
|
||||
#endif /*CTRL_H*/
|
||||
/* #################################################################################### */
|
||||
|
||||
|
61
firmware/ctrl.lst
Normal file
61
firmware/ctrl.lst
Normal file
@@ -0,0 +1,61 @@
|
||||
1 .file "ctrl.c"
|
||||
2 __SP_H__ = 0x3e
|
||||
3 __SP_L__ = 0x3d
|
||||
4 __SREG__ = 0x3f
|
||||
5 __tmp_reg__ = 0
|
||||
6 __zero_reg__ = 1
|
||||
7 .text
|
||||
8 .global systemCtrlInit
|
||||
10 systemCtrlInit:
|
||||
11 /* prologue: function */
|
||||
12 /* frame size = 0 */
|
||||
13 /* stack size = 0 */
|
||||
14 .L__stack_usage = 0
|
||||
15 0000 C19A sbi 0x18,1
|
||||
16 0002 B99A sbi 0x17,1
|
||||
17 0004 C29A sbi 0x18,2
|
||||
18 0006 949A sbi 0x12,4
|
||||
19 0008 0895 ret
|
||||
21 .global systemCtrlReady
|
||||
23 systemCtrlReady:
|
||||
24 /* prologue: function */
|
||||
25 /* frame size = 0 */
|
||||
26 /* stack size = 0 */
|
||||
27 .L__stack_usage = 0
|
||||
28 000a C198 cbi 0x18,1
|
||||
29 000c 0895 ret
|
||||
31 .global systemCtrlCheckInhibit
|
||||
33 systemCtrlCheckInhibit:
|
||||
34 /* prologue: function */
|
||||
35 /* frame size = 0 */
|
||||
36 /* stack size = 0 */
|
||||
37 .L__stack_usage = 0
|
||||
38 000e 86B3 in r24,0x16
|
||||
39 0010 82FB bst r24,2
|
||||
40 0012 8827 clr r24
|
||||
41 0014 80F9 bld r24,0
|
||||
42 0016 0895 ret
|
||||
44 .global systemCtrlCheckTerminate
|
||||
46 systemCtrlCheckTerminate:
|
||||
47 /* prologue: function */
|
||||
48 /* frame size = 0 */
|
||||
49 /* stack size = 0 */
|
||||
50 .L__stack_usage = 0
|
||||
51 0018 80B3 in r24,0x10
|
||||
52 001a 8295 swap r24
|
||||
53 001c 8170 andi r24,1
|
||||
54 001e 0895 ret
|
||||
56 .ident "GCC: (GNU) 4.8.2"
|
||||
DEFINED SYMBOLS
|
||||
*ABS*:0000000000000000 ctrl.c
|
||||
/tmp/ccdBCC9Q.s:2 *ABS*:000000000000003e __SP_H__
|
||||
/tmp/ccdBCC9Q.s:3 *ABS*:000000000000003d __SP_L__
|
||||
/tmp/ccdBCC9Q.s:4 *ABS*:000000000000003f __SREG__
|
||||
/tmp/ccdBCC9Q.s:5 *ABS*:0000000000000000 __tmp_reg__
|
||||
/tmp/ccdBCC9Q.s:6 *ABS*:0000000000000001 __zero_reg__
|
||||
/tmp/ccdBCC9Q.s:10 .text:0000000000000000 systemCtrlInit
|
||||
/tmp/ccdBCC9Q.s:23 .text:000000000000000a systemCtrlReady
|
||||
/tmp/ccdBCC9Q.s:33 .text:000000000000000e systemCtrlCheckInhibit
|
||||
/tmp/ccdBCC9Q.s:46 .text:0000000000000018 systemCtrlCheckTerminate
|
||||
|
||||
NO UNDEFINED SYMBOLS
|
197
firmware/dbt03.c
Normal file
197
firmware/dbt03.c
Normal file
@@ -0,0 +1,197 @@
|
||||
/*
|
||||
####################################################################################
|
||||
# #
|
||||
# Bildschirmtricks Firmware V2.0.0 #
|
||||
# dbt03 emulator layer #
|
||||
# #
|
||||
# Copyright (C) 2008 Philipp Fabian Benedikt Maier (aka. Dexter) #
|
||||
# #
|
||||
# This program is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program; if not, write to the Free Software #
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #
|
||||
# #
|
||||
#################################################################################### */
|
||||
|
||||
|
||||
/* ## HEADER ########################################################################## */
|
||||
#include <avr/io.h> /* Include I/O definitions */
|
||||
#include <stdbool.h> /* Include Boolean types */
|
||||
#include <avr/interrupt.h> /* Include Interrupt control */
|
||||
#include <util/parity.h> /* Include parity calculation functions */
|
||||
|
||||
#include "dbt03.h" /* Include own header file */
|
||||
#include "uart.h" /* Include serial port control */
|
||||
#include "delay.h" /* Include Delay control mechanisms */
|
||||
#include "ctrl.h" /* Include control line handler */
|
||||
/* #################################################################################### */
|
||||
|
||||
|
||||
/* #################################################################################### */
|
||||
|
||||
/* Internal subroutine: Toggle display I/O pin */
|
||||
static void dbt03IoCtrl(const uint8_t status)
|
||||
{
|
||||
if(status == 1)
|
||||
PORTB |= (1 << PB0);
|
||||
else
|
||||
PORTB &= ~(1 << PB0);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* Internal subroutine: Perform 425Hz tone (as a TTL signal) */
|
||||
static void dbt03Dialtone(const uint16_t cycles)
|
||||
{
|
||||
uint16_t i;
|
||||
|
||||
for(i=0; i<cycles; i++)
|
||||
{
|
||||
dbt03IoCtrl(0);
|
||||
systemDelay100us(10);
|
||||
dbt03IoCtrl(1);
|
||||
systemDelay100us(10);
|
||||
}
|
||||
}
|
||||
|
||||
/* Internal subroutine: Perform 1300Hz tone (as a TTL signal) */
|
||||
static void dbt03Carriertone(const uint16_t cycles)
|
||||
{
|
||||
uint16_t i;
|
||||
|
||||
for(i=0; i<cycles; i++)
|
||||
{
|
||||
dbt03IoCtrl(0);
|
||||
systemDelay10us(38);
|
||||
dbt03IoCtrl(1);
|
||||
systemDelay10us(38);
|
||||
}
|
||||
}
|
||||
|
||||
/* Initalize dbt03 emulation layer */
|
||||
void systemDbt03Init(void)
|
||||
{
|
||||
dbt03IoCtrl(1); /* Set initial state of serial output line */
|
||||
|
||||
DDRB |= (1 << DDB0); /* Set PB0 as output */
|
||||
PORTD &= ~(1 << PD2); /* Disable pullup resistor on PB2 */
|
||||
|
||||
GIMSK |= (1<<INT0); /* Configure interrupt driven receiver */
|
||||
MCUCR |= (1<<ISC01);
|
||||
sei();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* Send character to the BTX-Terminal */
|
||||
void systemDbt03Transmit(uint8_t character)
|
||||
{
|
||||
uint8_t i;
|
||||
|
||||
cli();
|
||||
|
||||
dbt03IoCtrl(1); /* Perform start bit */
|
||||
systemDelay10us(DBT03_TX_BAUDRATE);
|
||||
|
||||
for(i=0; i<=7; i++) /* Transmit data bits */
|
||||
{
|
||||
dbt03IoCtrl((~character >> i) & 1);
|
||||
systemDelay10us(DBT03_TX_BAUDRATE);
|
||||
}
|
||||
|
||||
dbt03IoCtrl(0);
|
||||
systemDelay10us(DBT03_TX_BAUDRATE);
|
||||
|
||||
sei();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* Receive a character from the BTX-Terminal */
|
||||
uint8_t systemDbt03Receive(void)
|
||||
{
|
||||
uint8_t i;
|
||||
uint8_t result = 0;
|
||||
|
||||
if(systemCtrlCheckInhibit() == 0)
|
||||
{
|
||||
cli();
|
||||
|
||||
while(((PIND >> PD2) & 1) == 1); /* Wait for incoming start bit */
|
||||
systemDelay100us(DBT03_RX_BAUDRATE);
|
||||
|
||||
for(i=0; i<=7; i++) /* Read data bits */
|
||||
{
|
||||
systemDelay100us(DBT03_RX_BAUDRATE / 2);
|
||||
|
||||
result |= (((PIND >> PD2) & 1) << i);
|
||||
|
||||
systemDelay100us(DBT03_RX_BAUDRATE / 2);
|
||||
}
|
||||
|
||||
sei();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Tell the BTX-Terminal that connection went ok */
|
||||
void systemDbt03ConnectionOk(void)
|
||||
{
|
||||
systemDelay100ms(DBT03_HOOK_OFF_DELAY); /* Modem startup time (about 3s) */
|
||||
dbt03Dialtone(DBT03_DAILTONE_CYCLES); /* Perform dialtone */
|
||||
systemDelay100ms(DBT03_DIALIN_DELAY); /* Delay dialintime (Terminal beleves now that the modem dials) */
|
||||
dbt03Dialtone(DBT03_RINGTONE_CYCLES); /* Perform ringtone */
|
||||
systemDelay100ms(DBT03_POST_RINGTONE_DELAY); /* Delay aftr ringtone */
|
||||
dbt03Carriertone(DBT03_CARRIERTONE_CYCLES); /* Perform carrier tone */
|
||||
dbt03IoCtrl(0); /* Pull I/O line to low level */
|
||||
systemDelay100ms(DBT03_POST_DIALIN_DELAY); /* Delay time after dailin */
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* Tell the BTX-Terminal that the connection has terminated */
|
||||
void systemDbt03ConnectionTerminate(void)
|
||||
{
|
||||
dbt03IoCtrl(1); /* Pull I/O line to high level */
|
||||
while(1); /* Halt in endless loop (Terminal will cause reset of power off, so do not worry about deadlock) */
|
||||
return;
|
||||
}
|
||||
|
||||
/* Receive a character from the BTX-Terminal via interrupt and pass it through the UART */
|
||||
SIGNAL(INT0_vect)
|
||||
{
|
||||
uint8_t i;
|
||||
uint8_t result = 0;
|
||||
|
||||
if(systemCtrlCheckInhibit() == 1)
|
||||
{
|
||||
systemDelay100us(DBT03_RX_BAUDRATE/2); /* let start bit pass by and check whether it is a real start bit */
|
||||
if(((PIND >> PD2) & 1) != 0)
|
||||
return;
|
||||
systemDelay100us(DBT03_RX_BAUDRATE / 2);
|
||||
|
||||
for(i=0; i<=7; i++) /* Read data bits */
|
||||
{
|
||||
systemDelay100us(DBT03_RX_BAUDRATE / 2);
|
||||
result |= (((PIND >> PD2) & 1) << i);
|
||||
systemDelay100us(DBT03_RX_BAUDRATE / 2);
|
||||
}
|
||||
|
||||
systemDelay100us(DBT03_RX_BAUDRATE/2); /* let start bit pass by */
|
||||
systemUartTransmit(result);
|
||||
}
|
||||
}
|
||||
|
||||
/* #################################################################################### */
|
||||
|
||||
|
127
firmware/dbt03.h
Normal file
127
firmware/dbt03.h
Normal file
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
####################################################################################
|
||||
# #
|
||||
# Bildschirmtricks Firmware V2.0.0 #
|
||||
# dbt03 emulator layer #
|
||||
# #
|
||||
# Copyright (C) 2008 Philipp Fabian Benedikt Maier (aka. Dexter) #
|
||||
# #
|
||||
# This program is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program; if not, write to the Free Software #
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #
|
||||
# #
|
||||
#################################################################################### */
|
||||
|
||||
|
||||
/* ## HEADER ########################################################################## */
|
||||
#ifndef DBT03_H
|
||||
#define DBT03_H
|
||||
|
||||
/*
|
||||
|
||||
==OVERVIEW==
|
||||
|
||||
Note: Every BTX Terminal was connected to a propritary modem that that could only dial the number
|
||||
of the BTX-Mainframe (PAD). The microcontroller in the modem also conained a secret that was
|
||||
necessary to associate with the BTX-Mainfraime. The Modem were sealed and opening was a
|
||||
punishable offence.
|
||||
|
||||
2 7=START (Power modem up and initaiate connection)
|
||||
o 5=ED (Data receive and status report, 1200 baud, 8n1)
|
||||
4 o o 5 6=SD (Data send port, 75 baud)
|
||||
1 o o 3 2=E (GND)
|
||||
6 o o 7
|
||||
^
|
||||
View at the
|
||||
terminal/modem
|
||||
side
|
||||
|
||||
The DBT03 was a V.23 modem from the BUNDESPOST (a telecommunications service in germany, now history)
|
||||
to dial into the BTX (=BILDSCHIRMTEXT) system. This modem was switched on by pulling the the START
|
||||
line to high. Then the modem dials automaticly and does the BTX negotiation. Then the modem reports
|
||||
the connection status in a very easy way: It just takes the dialtones and hands them through as normal
|
||||
TTL signals.
|
||||
|
||||
________________________________________________________________________________________
|
||||
START ___|
|
||||
|
||||
___ Start bits ____
|
||||
| Stop bit ___ |
|
||||
V | V
|
||||
_______________ ______________ ______ _ _ _ _ _ _ V _
|
||||
ED ___| |||||||| ||||||| ||||||_____| |_| |_| |_| |_|.|____ And so on....
|
||||
|
||||
<---------------><-----><------------><-----><----><----><----><---Serial data at 1200 Baud-->
|
||||
T1 T2 T3 T4 T5 T6 T7
|
||||
(dialtone) (dialing) (ring)
|
||||
|
||||
|
||||
T1: Time between modem activision and hook-off, typicaly 3s.
|
||||
Configurable with DBT03_HOOK_OFF_DELAY macro.
|
||||
|
||||
T2: Dialtone appeareance time, a dialtone cycle is about 2,35ms long.
|
||||
Number of cyceles is configurable with DBT03_DAILTONE_CYCLES
|
||||
|
||||
T3: Dialin delay time, time that goes by whil a real modem dials the BTX-PAD number (019 or 01910)
|
||||
Typicaly it takes 4 seconds to dial that number. The dialin delay time is configurable
|
||||
with DBT03_DIALIN_DELAY
|
||||
|
||||
T4: Ringtone appearance time, nealy the same as T2 but in this case this tone stands for
|
||||
a successful dial process and tells the BTX-Terminal that the pone of the BTX-PAD is ringing.
|
||||
In this emulation we assume that the BTX-PAD is fast and hooks off with the first ringtone.
|
||||
The ringtone-appeareance-time is configurable with DBT03_RINGTONE_CYCLES
|
||||
|
||||
T5: Post ringtone delay, time between the dialtone and the carrier signal. This time can be configured
|
||||
with DBT03_POST_RINGTONE_DELAY
|
||||
|
||||
T6: Carrier tone appereance time: The original DBT-03 modem needed about 1,6 - 1,7 ms time to detect the
|
||||
carrier signal. As long as the carrier signal is not recognized the modem passes the signal through.
|
||||
That is why the carrier signal is also a part of this simulation.
|
||||
|
||||
T7: To finish the dialin procedure the modem pulls the ED line to low level and waits some time.
|
||||
This time is configurable with DBT03_POST_DIALIN_DELAY
|
||||
|
||||
|
||||
Note: The configured values are based on some old documentation i found on the net as well as on
|
||||
experiments with various types of terminals. if this does not work on your setup or if you
|
||||
unhappy with the long dialin procedure you can try to tune the timing.
|
||||
|
||||
|
||||
==CONFIGURATION== */
|
||||
|
||||
/* Timing configuration for serial data transmission */
|
||||
#define DBT03_TX_BAUDRATE 82 /* (x10us) Should be 1200 baud/833,333us bit legth */
|
||||
#define DBT03_RX_BAUDRATE 133 /* (x100us) Should be 75 baud/13,333ms bit legth */
|
||||
|
||||
/* Timing configuration for dialin simulation */
|
||||
#define DBT03_HOOK_OFF_DELAY 30 /* (x100ms) Hook off delay time, typical 3,0s */
|
||||
#define DBT03_DAILTONE_CYCLES 800 /* (x2,35ms) Dialtone appearance time */
|
||||
#define DBT03_DIALIN_DELAY 40 /* (x100ms) Dailin delay time, maximum 4,3s */
|
||||
#define DBT03_RINGTONE_CYCLES 200 /* (x2,35ms) Ringtone appearance time */
|
||||
#define DBT03_POST_RINGTONE_DELAY 5 /* (x100ms) Time between ringtone and carrier tone */
|
||||
#define DBT03_CARRIERTONE_CYCLES 2080 /* (x760us) Carrier tone appereance time */
|
||||
#define DBT03_POST_DIALIN_DELAY 5 /* (x100ms) Time between successful dialin notification and transmission start */
|
||||
|
||||
|
||||
/* ==Function set==
|
||||
This proviedes a set of basic functions that emulate the typical dbt03 signals */
|
||||
|
||||
void systemDbt03Init(void); /* Initalize dbt03 emulation layer */
|
||||
void systemDbt03Transmit(uint8_t character); /* Send character to the BTX-Terminal */
|
||||
uint8_t systemDbt03Receive(void); /* Receive a character from the BTX-Terminal */
|
||||
void systemDbt03ConnectionOk(void); /* Tell the BTX-Terminal that connection went ok */
|
||||
void systemDbt03ConnectionTerminate(void); /* Tell the BTX-Terminal that the connection has terminated */
|
||||
|
||||
#endif /*DBT03_H*/
|
||||
/* #################################################################################### */
|
||||
|
355
firmware/dbt03.lst
Normal file
355
firmware/dbt03.lst
Normal file
@@ -0,0 +1,355 @@
|
||||
1 .file "dbt03.c"
|
||||
2 __SP_H__ = 0x3e
|
||||
3 __SP_L__ = 0x3d
|
||||
4 __SREG__ = 0x3f
|
||||
5 __tmp_reg__ = 0
|
||||
6 __zero_reg__ = 1
|
||||
7 .text
|
||||
9 dbt03IoCtrl.part.0:
|
||||
10 /* prologue: function */
|
||||
11 /* frame size = 0 */
|
||||
12 /* stack size = 0 */
|
||||
13 .L__stack_usage = 0
|
||||
14 0000 C09A sbi 0x18,0
|
||||
15 0002 0895 ret
|
||||
18 dbt03Dialtone:
|
||||
19 0004 0F93 push r16
|
||||
20 0006 1F93 push r17
|
||||
21 0008 CF93 push r28
|
||||
22 000a DF93 push r29
|
||||
23 /* prologue: function */
|
||||
24 /* frame size = 0 */
|
||||
25 /* stack size = 4 */
|
||||
26 .L__stack_usage = 4
|
||||
27 000c 8C01 movw r16,r24
|
||||
28 000e C0E0 ldi r28,0
|
||||
29 0010 D0E0 ldi r29,0
|
||||
30 .L3:
|
||||
31 0012 C017 cp r28,r16
|
||||
32 0014 D107 cpc r29,r17
|
||||
33 0016 01F0 breq .L6
|
||||
34 0018 C098 cbi 0x18,0
|
||||
35 001a 8AE0 ldi r24,lo8(10)
|
||||
36 001c 00D0 rcall systemDelay100us
|
||||
37 001e 00D0 rcall dbt03IoCtrl.part.0
|
||||
38 0020 8AE0 ldi r24,lo8(10)
|
||||
39 0022 00D0 rcall systemDelay100us
|
||||
40 0024 2196 adiw r28,1
|
||||
41 0026 00C0 rjmp .L3
|
||||
42 .L6:
|
||||
43 /* epilogue start */
|
||||
44 0028 DF91 pop r29
|
||||
45 002a CF91 pop r28
|
||||
46 002c 1F91 pop r17
|
||||
47 002e 0F91 pop r16
|
||||
48 0030 0895 ret
|
||||
50 .global systemDbt03Init
|
||||
52 systemDbt03Init:
|
||||
53 /* prologue: function */
|
||||
54 /* frame size = 0 */
|
||||
55 /* stack size = 0 */
|
||||
56 .L__stack_usage = 0
|
||||
57 0032 00D0 rcall dbt03IoCtrl.part.0
|
||||
58 0034 B89A sbi 0x17,0
|
||||
59 0036 9298 cbi 0x12,2
|
||||
60 0038 8BB7 in r24,0x3b
|
||||
61 003a 8064 ori r24,lo8(64)
|
||||
62 003c 8BBF out 0x3b,r24
|
||||
63 003e 85B7 in r24,0x35
|
||||
64 0040 8260 ori r24,lo8(2)
|
||||
65 0042 85BF out 0x35,r24
|
||||
66 /* #APP */
|
||||
67 ; 90 "dbt03.c" 1
|
||||
68 0044 7894 sei
|
||||
69 ; 0 "" 2
|
||||
70 /* #NOAPP */
|
||||
71 0046 0895 ret
|
||||
73 .global systemDbt03Transmit
|
||||
75 systemDbt03Transmit:
|
||||
76 0048 0F93 push r16
|
||||
77 004a 1F93 push r17
|
||||
78 004c CF93 push r28
|
||||
79 004e DF93 push r29
|
||||
80 /* prologue: function */
|
||||
81 /* frame size = 0 */
|
||||
82 /* stack size = 4 */
|
||||
83 .L__stack_usage = 4
|
||||
84 0050 082F mov r16,r24
|
||||
85 /* #APP */
|
||||
86 ; 100 "dbt03.c" 1
|
||||
87 0052 F894 cli
|
||||
88 ; 0 "" 2
|
||||
89 /* #NOAPP */
|
||||
90 0054 00D0 rcall dbt03IoCtrl.part.0
|
||||
91 0056 82E5 ldi r24,lo8(82)
|
||||
92 0058 00D0 rcall systemDelay10us
|
||||
93 005a C0E0 ldi r28,0
|
||||
94 005c D0E0 ldi r29,0
|
||||
95 005e 10E0 ldi r17,0
|
||||
96 0060 0095 com r16
|
||||
97 0062 1095 com r17
|
||||
98 .L12:
|
||||
99 0064 C801 movw r24,r16
|
||||
100 0066 0C2E mov r0,r28
|
||||
101 0068 00C0 rjmp 2f
|
||||
102 1:
|
||||
103 006a 9595 asr r25
|
||||
104 006c 8795 ror r24
|
||||
105 2:
|
||||
106 006e 0A94 dec r0
|
||||
107 0070 02F4 brpl 1b
|
||||
108 0072 80FF sbrs r24,0
|
||||
109 0074 00C0 rjmp .L9
|
||||
110 0076 00D0 rcall dbt03IoCtrl.part.0
|
||||
111 0078 00C0 rjmp .L10
|
||||
112 .L9:
|
||||
113 007a C098 cbi 0x18,0
|
||||
114 .L10:
|
||||
115 007c 82E5 ldi r24,lo8(82)
|
||||
116 007e 00D0 rcall systemDelay10us
|
||||
117 0080 2196 adiw r28,1
|
||||
118 0082 C830 cpi r28,8
|
||||
119 0084 D105 cpc r29,__zero_reg__
|
||||
120 0086 01F4 brne .L12
|
||||
121 0088 C098 cbi 0x18,0
|
||||
122 008a 82E5 ldi r24,lo8(82)
|
||||
123 008c 00D0 rcall systemDelay10us
|
||||
124 /* #APP */
|
||||
125 ; 114 "dbt03.c" 1
|
||||
126 008e 7894 sei
|
||||
127 ; 0 "" 2
|
||||
128 /* epilogue start */
|
||||
129 /* #NOAPP */
|
||||
130 0090 DF91 pop r29
|
||||
131 0092 CF91 pop r28
|
||||
132 0094 1F91 pop r17
|
||||
133 0096 0F91 pop r16
|
||||
134 0098 0895 ret
|
||||
136 .global systemDbt03Receive
|
||||
138 systemDbt03Receive:
|
||||
139 009a FF92 push r15
|
||||
140 009c 0F93 push r16
|
||||
141 009e 1F93 push r17
|
||||
142 00a0 CF93 push r28
|
||||
143 00a2 DF93 push r29
|
||||
144 /* prologue: function */
|
||||
145 /* frame size = 0 */
|
||||
146 /* stack size = 5 */
|
||||
147 .L__stack_usage = 5
|
||||
148 00a4 00D0 rcall systemCtrlCheckInhibit
|
||||
149 00a6 8111 cpse r24,__zero_reg__
|
||||
150 00a8 00C0 rjmp .L19
|
||||
151 /* #APP */
|
||||
152 ; 127 "dbt03.c" 1
|
||||
153 00aa F894 cli
|
||||
154 ; 0 "" 2
|
||||
155 /* #NOAPP */
|
||||
156 .L16:
|
||||
157 00ac 8299 sbic 0x10,2
|
||||
158 00ae 00C0 rjmp .L16
|
||||
159 00b0 85E8 ldi r24,lo8(-123)
|
||||
160 00b2 00D0 rcall systemDelay100us
|
||||
161 00b4 00E0 ldi r16,0
|
||||
162 00b6 10E0 ldi r17,0
|
||||
163 00b8 F12C mov r15,__zero_reg__
|
||||
164 .L18:
|
||||
165 00ba 82E4 ldi r24,lo8(66)
|
||||
166 00bc 00D0 rcall systemDelay100us
|
||||
167 00be 80B3 in r24,0x10
|
||||
168 00c0 82FB bst r24,2
|
||||
169 00c2 8827 clr r24
|
||||
170 00c4 80F9 bld r24,0
|
||||
171 00c6 C82F mov r28,r24
|
||||
172 00c8 002E mov r0,r16
|
||||
173 00ca 00C0 rjmp 2f
|
||||
174 1:
|
||||
175 00cc CC0F lsl r28
|
||||
176 2:
|
||||
177 00ce 0A94 dec r0
|
||||
178 00d0 02F4 brpl 1b
|
||||
179 00d2 FC2A or r15,r28
|
||||
180 00d4 82E4 ldi r24,lo8(66)
|
||||
181 00d6 00D0 rcall systemDelay100us
|
||||
182 00d8 0F5F subi r16,-1
|
||||
183 00da 1F4F sbci r17,-1
|
||||
184 00dc 0830 cpi r16,8
|
||||
185 00de 1105 cpc r17,__zero_reg__
|
||||
186 00e0 01F4 brne .L18
|
||||
187 /* #APP */
|
||||
188 ; 141 "dbt03.c" 1
|
||||
189 00e2 7894 sei
|
||||
190 ; 0 "" 2
|
||||
191 /* #NOAPP */
|
||||
192 00e4 00C0 rjmp .L14
|
||||
193 .L19:
|
||||
194 00e6 F12C mov r15,__zero_reg__
|
||||
195 .L14:
|
||||
196 00e8 8F2D mov r24,r15
|
||||
197 /* epilogue start */
|
||||
198 00ea DF91 pop r29
|
||||
199 00ec CF91 pop r28
|
||||
200 00ee 1F91 pop r17
|
||||
201 00f0 0F91 pop r16
|
||||
202 00f2 FF90 pop r15
|
||||
203 00f4 0895 ret
|
||||
205 .global systemDbt03ConnectionOk
|
||||
207 systemDbt03ConnectionOk:
|
||||
208 00f6 CF93 push r28
|
||||
209 00f8 DF93 push r29
|
||||
210 /* prologue: function */
|
||||
211 /* frame size = 0 */
|
||||
212 /* stack size = 2 */
|
||||
213 .L__stack_usage = 2
|
||||
214 00fa 8EE1 ldi r24,lo8(30)
|
||||
215 00fc 00D0 rcall systemDelay100ms
|
||||
216 00fe 80E2 ldi r24,lo8(32)
|
||||
217 0100 93E0 ldi r25,lo8(3)
|
||||
218 0102 00D0 rcall dbt03Dialtone
|
||||
219 0104 88E2 ldi r24,lo8(40)
|
||||
220 0106 00D0 rcall systemDelay100ms
|
||||
221 0108 88EC ldi r24,lo8(-56)
|
||||
222 010a 90E0 ldi r25,0
|
||||
223 010c 00D0 rcall dbt03Dialtone
|
||||
224 010e 85E0 ldi r24,lo8(5)
|
||||
225 0110 00D0 rcall systemDelay100ms
|
||||
226 0112 C0E2 ldi r28,lo8(32)
|
||||
227 0114 D8E0 ldi r29,lo8(8)
|
||||
228 .L22:
|
||||
229 0116 C098 cbi 0x18,0
|
||||
230 0118 86E2 ldi r24,lo8(38)
|
||||
231 011a 00D0 rcall systemDelay10us
|
||||
232 011c 00D0 rcall dbt03IoCtrl.part.0
|
||||
233 011e 86E2 ldi r24,lo8(38)
|
||||
234 0120 00D0 rcall systemDelay10us
|
||||
235 0122 2197 sbiw r28,1
|
||||
236 0124 2097 sbiw r28,0
|
||||
237 0126 01F4 brne .L22
|
||||
238 0128 C098 cbi 0x18,0
|
||||
239 012a 85E0 ldi r24,lo8(5)
|
||||
240 /* epilogue start */
|
||||
241 012c DF91 pop r29
|
||||
242 012e CF91 pop r28
|
||||
243 0130 00C0 rjmp systemDelay100ms
|
||||
245 .global systemDbt03ConnectionTerminate
|
||||
247 systemDbt03ConnectionTerminate:
|
||||
248 /* prologue: function */
|
||||
249 /* frame size = 0 */
|
||||
250 /* stack size = 0 */
|
||||
251 .L__stack_usage = 0
|
||||
252 0132 00D0 rcall dbt03IoCtrl.part.0
|
||||
253 .L24:
|
||||
254 0134 00C0 rjmp .L24
|
||||
256 .global __vector_1
|
||||
258 __vector_1:
|
||||
259 0136 1F92 push r1
|
||||
260 0138 0F92 push r0
|
||||
261 013a 0FB6 in r0,__SREG__
|
||||
262 013c 0F92 push r0
|
||||
263 013e 1124 clr __zero_reg__
|
||||
264 0140 FF92 push r15
|
||||
265 0142 0F93 push r16
|
||||
266 0144 1F93 push r17
|
||||
267 0146 2F93 push r18
|
||||
268 0148 3F93 push r19
|
||||
269 014a 4F93 push r20
|
||||
270 014c 5F93 push r21
|
||||
271 014e 6F93 push r22
|
||||
272 0150 7F93 push r23
|
||||
273 0152 8F93 push r24
|
||||
274 0154 9F93 push r25
|
||||
275 0156 AF93 push r26
|
||||
276 0158 BF93 push r27
|
||||
277 015a CF93 push r28
|
||||
278 015c DF93 push r29
|
||||
279 015e EF93 push r30
|
||||
280 0160 FF93 push r31
|
||||
281 /* prologue: Signal */
|
||||
282 /* frame size = 0 */
|
||||
283 /* stack size = 20 */
|
||||
284 .L__stack_usage = 20
|
||||
285 0162 00D0 rcall systemCtrlCheckInhibit
|
||||
286 0164 8130 cpi r24,lo8(1)
|
||||
287 0166 01F4 brne .L25
|
||||
288 0168 82E4 ldi r24,lo8(66)
|
||||
289 016a 00D0 rcall systemDelay100us
|
||||
290 016c 8299 sbic 0x10,2
|
||||
291 016e 00C0 rjmp .L25
|
||||
292 0170 82E4 ldi r24,lo8(66)
|
||||
293 0172 00D0 rcall systemDelay100us
|
||||
294 0174 00E0 ldi r16,0
|
||||
295 0176 10E0 ldi r17,0
|
||||
296 0178 F12C mov r15,__zero_reg__
|
||||
297 .L30:
|
||||
298 017a 82E4 ldi r24,lo8(66)
|
||||
299 017c 00D0 rcall systemDelay100us
|
||||
300 017e 80B3 in r24,0x10
|
||||
301 0180 82FB bst r24,2
|
||||
302 0182 8827 clr r24
|
||||
303 0184 80F9 bld r24,0
|
||||
304 0186 C82F mov r28,r24
|
||||
305 0188 002E mov r0,r16
|
||||
306 018a 00C0 rjmp 2f
|
||||
307 1:
|
||||
308 018c CC0F lsl r28
|
||||
309 2:
|
||||
310 018e 0A94 dec r0
|
||||
311 0190 02F4 brpl 1b
|
||||
312 0192 FC2A or r15,r28
|
||||
313 0194 82E4 ldi r24,lo8(66)
|
||||
314 0196 00D0 rcall systemDelay100us
|
||||
315 0198 0F5F subi r16,-1
|
||||
316 019a 1F4F sbci r17,-1
|
||||
317 019c 0830 cpi r16,8
|
||||
318 019e 1105 cpc r17,__zero_reg__
|
||||
319 01a0 01F4 brne .L30
|
||||
320 01a2 82E4 ldi r24,lo8(66)
|
||||
321 01a4 00D0 rcall systemDelay100us
|
||||
322 01a6 8F2D mov r24,r15
|
||||
323 01a8 00D0 rcall systemUartTransmit
|
||||
324 .L25:
|
||||
325 /* epilogue start */
|
||||
326 01aa FF91 pop r31
|
||||
327 01ac EF91 pop r30
|
||||
328 01ae DF91 pop r29
|
||||
329 01b0 CF91 pop r28
|
||||
330 01b2 BF91 pop r27
|
||||
331 01b4 AF91 pop r26
|
||||
332 01b6 9F91 pop r25
|
||||
333 01b8 8F91 pop r24
|
||||
334 01ba 7F91 pop r23
|
||||
335 01bc 6F91 pop r22
|
||||
336 01be 5F91 pop r21
|
||||
337 01c0 4F91 pop r20
|
||||
338 01c2 3F91 pop r19
|
||||
339 01c4 2F91 pop r18
|
||||
340 01c6 1F91 pop r17
|
||||
341 01c8 0F91 pop r16
|
||||
342 01ca FF90 pop r15
|
||||
343 01cc 0F90 pop r0
|
||||
344 01ce 0FBE out __SREG__,r0
|
||||
345 01d0 0F90 pop r0
|
||||
346 01d2 1F90 pop r1
|
||||
347 01d4 1895 reti
|
||||
349 .ident "GCC: (GNU) 4.8.2"
|
||||
DEFINED SYMBOLS
|
||||
*ABS*:0000000000000000 dbt03.c
|
||||
/tmp/ccDZmxBL.s:2 *ABS*:000000000000003e __SP_H__
|
||||
/tmp/ccDZmxBL.s:3 *ABS*:000000000000003d __SP_L__
|
||||
/tmp/ccDZmxBL.s:4 *ABS*:000000000000003f __SREG__
|
||||
/tmp/ccDZmxBL.s:5 *ABS*:0000000000000000 __tmp_reg__
|
||||
/tmp/ccDZmxBL.s:6 *ABS*:0000000000000001 __zero_reg__
|
||||
/tmp/ccDZmxBL.s:9 .text:0000000000000000 dbt03IoCtrl.part.0
|
||||
/tmp/ccDZmxBL.s:18 .text:0000000000000004 dbt03Dialtone
|
||||
/tmp/ccDZmxBL.s:52 .text:0000000000000032 systemDbt03Init
|
||||
/tmp/ccDZmxBL.s:75 .text:0000000000000048 systemDbt03Transmit
|
||||
/tmp/ccDZmxBL.s:138 .text:000000000000009a systemDbt03Receive
|
||||
/tmp/ccDZmxBL.s:207 .text:00000000000000f6 systemDbt03ConnectionOk
|
||||
/tmp/ccDZmxBL.s:247 .text:0000000000000132 systemDbt03ConnectionTerminate
|
||||
/tmp/ccDZmxBL.s:258 .text:0000000000000136 __vector_1
|
||||
|
||||
UNDEFINED SYMBOLS
|
||||
systemDelay100us
|
||||
systemDelay10us
|
||||
systemCtrlCheckInhibit
|
||||
systemDelay100ms
|
||||
systemUartTransmit
|
109
firmware/delay.c
Normal file
109
firmware/delay.c
Normal file
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
####################################################################################
|
||||
# #
|
||||
# Bildschirmtricks Firmware V1.0.0 #
|
||||
# Delay-Routines #
|
||||
# #
|
||||
# Copyright (C) 2008 Philipp Fabian Benedikt Maier (aka. Dexter) #
|
||||
# #
|
||||
# This program is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program; if not, write to the Free Software #
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #
|
||||
# #
|
||||
#################################################################################### */
|
||||
|
||||
|
||||
/* ## HEADER ########################################################################## */
|
||||
#include <util/delay.h> /* Include delay functions */
|
||||
#include <avr/interrupt.h> /* Include Interrupt control */
|
||||
|
||||
#include "delay.h" /* Include own header file */
|
||||
/* #################################################################################### */
|
||||
|
||||
|
||||
/* ## DELAY CONTROL ################################################################### */
|
||||
void systemDelay1s(uint8_t value)
|
||||
{
|
||||
while(value--)
|
||||
systemDelay10ms(100);
|
||||
return;
|
||||
}
|
||||
|
||||
void systemDelay10ms(uint8_t value)
|
||||
{
|
||||
while(value--)
|
||||
_delay_ms(10);
|
||||
return;
|
||||
}
|
||||
|
||||
void systemDelay100ms(uint8_t value)
|
||||
{
|
||||
while(value--)
|
||||
systemDelay10ms(10);
|
||||
return;
|
||||
}
|
||||
|
||||
void systemDelay1ms(uint8_t value)
|
||||
{
|
||||
while(value--)
|
||||
_delay_ms(1);
|
||||
return;
|
||||
}
|
||||
|
||||
void systemDelay10us(uint8_t value)
|
||||
{
|
||||
while(value--)
|
||||
_delay_us(10);
|
||||
return;
|
||||
}
|
||||
|
||||
void systemDelay100us(uint8_t value)
|
||||
{
|
||||
while(value--)
|
||||
systemDelay10us(10);
|
||||
return;
|
||||
}
|
||||
|
||||
void systemDelay1us(uint8_t value)
|
||||
{
|
||||
while(value--)
|
||||
_delay_us(1);
|
||||
return;
|
||||
}
|
||||
|
||||
void systemDelay05us(uint8_t value)
|
||||
{
|
||||
while(value--)
|
||||
_delay_us(0.5);
|
||||
return;
|
||||
}
|
||||
|
||||
void systemDelay01us(uint8_t value)
|
||||
{
|
||||
while(value--)
|
||||
_delay_us(0.1);
|
||||
return;
|
||||
}
|
||||
|
||||
void systemDelay16(uint16_t value)
|
||||
{
|
||||
_delay_loop_2(value);
|
||||
return;
|
||||
}
|
||||
|
||||
void systemDelay8(uint8_t value)
|
||||
{
|
||||
_delay_loop_1(value);
|
||||
return;
|
||||
}
|
||||
/* #################################################################################### */
|
43
firmware/delay.h
Normal file
43
firmware/delay.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
####################################################################################
|
||||
# #
|
||||
# Bildschirmtricks Firmware V1.0.0 #
|
||||
# Delay-Routines #
|
||||
# #
|
||||
# Copyright (C) 2008 Philipp Fabian Benedikt Maier (aka. Dexter) #
|
||||
# #
|
||||
# This program is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program; if not, write to the Free Software #
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #
|
||||
# #
|
||||
#################################################################################### */
|
||||
|
||||
|
||||
/* ## HEADER ########################################################################## */
|
||||
#ifndef DELAY_H
|
||||
#define DELAY_H
|
||||
|
||||
void systemDelay1s(uint8_t value);
|
||||
void systemDelay10ms(uint8_t value);
|
||||
void systemDelay100ms(uint8_t value);
|
||||
void systemDelay1ms(uint8_t value);
|
||||
void systemDelay10us(uint8_t value);
|
||||
void systemDelay100us(uint8_t value);
|
||||
void systemDelay1us(uint8_t value);
|
||||
void systemDelay05us(uint8_t value);
|
||||
void systemDelay01us(uint8_t value);
|
||||
void systemDelay16(uint16_t value);
|
||||
void systemDelay8(uint8_t value);
|
||||
|
||||
#endif /*DELAY_H*/
|
||||
/* #################################################################################### */
|
220
firmware/delay.lst
Normal file
220
firmware/delay.lst
Normal file
@@ -0,0 +1,220 @@
|
||||
1 .file "delay.c"
|
||||
2 __SP_H__ = 0x3e
|
||||
3 __SP_L__ = 0x3d
|
||||
4 __SREG__ = 0x3f
|
||||
5 __tmp_reg__ = 0
|
||||
6 __zero_reg__ = 1
|
||||
7 .text
|
||||
8 .global systemDelay10ms
|
||||
10 systemDelay10ms:
|
||||
11 /* prologue: function */
|
||||
12 /* frame size = 0 */
|
||||
13 /* stack size = 0 */
|
||||
14 .L__stack_usage = 0
|
||||
15 .L2:
|
||||
16 0000 8823 tst r24
|
||||
17 0002 01F0 breq .L5
|
||||
18 0004 EFE3 ldi r30,lo8(-25537)
|
||||
19 0006 FCE9 ldi r31,hi8(-25537)
|
||||
20 0008 3197 1: sbiw r30,1
|
||||
21 000a 01F4 brne 1b
|
||||
22 000c 00C0 rjmp .
|
||||
23 000e 0000 nop
|
||||
24 0010 8150 subi r24,lo8(-(-1))
|
||||
25 0012 00C0 rjmp .L2
|
||||
26 .L5:
|
||||
27 /* epilogue start */
|
||||
28 0014 0895 ret
|
||||
30 .global systemDelay1s
|
||||
32 systemDelay1s:
|
||||
33 0016 CF93 push r28
|
||||
34 /* prologue: function */
|
||||
35 /* frame size = 0 */
|
||||
36 /* stack size = 1 */
|
||||
37 .L__stack_usage = 1
|
||||
38 0018 C82F mov r28,r24
|
||||
39 .L7:
|
||||
40 001a CC23 tst r28
|
||||
41 001c 01F0 breq .L9
|
||||
42 001e 84E6 ldi r24,lo8(100)
|
||||
43 0020 00D0 rcall systemDelay10ms
|
||||
44 0022 C150 subi r28,lo8(-(-1))
|
||||
45 0024 00C0 rjmp .L7
|
||||
46 .L9:
|
||||
47 /* epilogue start */
|
||||
48 0026 CF91 pop r28
|
||||
49 0028 0895 ret
|
||||
51 .global systemDelay100ms
|
||||
53 systemDelay100ms:
|
||||
54 002a CF93 push r28
|
||||
55 /* prologue: function */
|
||||
56 /* frame size = 0 */
|
||||
57 /* stack size = 1 */
|
||||
58 .L__stack_usage = 1
|
||||
59 002c C82F mov r28,r24
|
||||
60 .L11:
|
||||
61 002e CC23 tst r28
|
||||
62 0030 01F0 breq .L13
|
||||
63 0032 8AE0 ldi r24,lo8(10)
|
||||
64 0034 00D0 rcall systemDelay10ms
|
||||
65 0036 C150 subi r28,lo8(-(-1))
|
||||
66 0038 00C0 rjmp .L11
|
||||
67 .L13:
|
||||
68 /* epilogue start */
|
||||
69 003a CF91 pop r28
|
||||
70 003c 0895 ret
|
||||
72 .global systemDelay1ms
|
||||
74 systemDelay1ms:
|
||||
75 /* prologue: function */
|
||||
76 /* frame size = 0 */
|
||||
77 /* stack size = 0 */
|
||||
78 .L__stack_usage = 0
|
||||
79 .L15:
|
||||
80 003e 8823 tst r24
|
||||
81 0040 01F0 breq .L17
|
||||
82 0042 EFE9 ldi r30,lo8(3999)
|
||||
83 0044 FFE0 ldi r31,hi8(3999)
|
||||
84 0046 3197 1: sbiw r30,1
|
||||
85 0048 01F4 brne 1b
|
||||
86 004a 00C0 rjmp .
|
||||
87 004c 0000 nop
|
||||
88 004e 8150 subi r24,lo8(-(-1))
|
||||
89 0050 00C0 rjmp .L15
|
||||
90 .L17:
|
||||
91 /* epilogue start */
|
||||
92 0052 0895 ret
|
||||
94 .global systemDelay10us
|
||||
96 systemDelay10us:
|
||||
97 /* prologue: function */
|
||||
98 /* frame size = 0 */
|
||||
99 /* stack size = 0 */
|
||||
100 .L__stack_usage = 0
|
||||
101 .L19:
|
||||
102 0054 8823 tst r24
|
||||
103 0056 01F0 breq .L21
|
||||
104 0058 95E3 ldi r25,lo8(53)
|
||||
105 005a 9A95 1: dec r25
|
||||
106 005c 01F4 brne 1b
|
||||
107 005e 0000 nop
|
||||
108 0060 8150 subi r24,lo8(-(-1))
|
||||
109 0062 00C0 rjmp .L19
|
||||
110 .L21:
|
||||
111 /* epilogue start */
|
||||
112 0064 0895 ret
|
||||
114 .global systemDelay100us
|
||||
116 systemDelay100us:
|
||||
117 0066 CF93 push r28
|
||||
118 /* prologue: function */
|
||||
119 /* frame size = 0 */
|
||||
120 /* stack size = 1 */
|
||||
121 .L__stack_usage = 1
|
||||
122 0068 C82F mov r28,r24
|
||||
123 .L23:
|
||||
124 006a CC23 tst r28
|
||||
125 006c 01F0 breq .L25
|
||||
126 006e 8AE0 ldi r24,lo8(10)
|
||||
127 0070 00D0 rcall systemDelay10us
|
||||
128 0072 C150 subi r28,lo8(-(-1))
|
||||
129 0074 00C0 rjmp .L23
|
||||
130 .L25:
|
||||
131 /* epilogue start */
|
||||
132 0076 CF91 pop r28
|
||||
133 0078 0895 ret
|
||||
135 .global systemDelay1us
|
||||
137 systemDelay1us:
|
||||
138 /* prologue: function */
|
||||
139 /* frame size = 0 */
|
||||
140 /* stack size = 0 */
|
||||
141 .L__stack_usage = 0
|
||||
142 .L27:
|
||||
143 007a 8823 tst r24
|
||||
144 007c 01F0 breq .L29
|
||||
145 007e 95E0 ldi r25,lo8(5)
|
||||
146 0080 9A95 1: dec r25
|
||||
147 0082 01F4 brne 1b
|
||||
148 0084 0000 nop
|
||||
149 0086 8150 subi r24,lo8(-(-1))
|
||||
150 0088 00C0 rjmp .L27
|
||||
151 .L29:
|
||||
152 /* epilogue start */
|
||||
153 008a 0895 ret
|
||||
155 .global systemDelay05us
|
||||
157 systemDelay05us:
|
||||
158 /* prologue: function */
|
||||
159 /* frame size = 0 */
|
||||
160 /* stack size = 0 */
|
||||
161 .L__stack_usage = 0
|
||||
162 .L31:
|
||||
163 008c 8823 tst r24
|
||||
164 008e 01F0 breq .L33
|
||||
165 0090 92E0 ldi r25,lo8(2)
|
||||
166 0092 9A95 1: dec r25
|
||||
167 0094 01F4 brne 1b
|
||||
168 0096 00C0 rjmp .
|
||||
169 0098 8150 subi r24,lo8(-(-1))
|
||||
170 009a 00C0 rjmp .L31
|
||||
171 .L33:
|
||||
172 /* epilogue start */
|
||||
173 009c 0895 ret
|
||||
175 .global systemDelay01us
|
||||
177 systemDelay01us:
|
||||
178 /* prologue: function */
|
||||
179 /* frame size = 0 */
|
||||
180 /* stack size = 0 */
|
||||
181 .L__stack_usage = 0
|
||||
182 .L35:
|
||||
183 009e 8823 tst r24
|
||||
184 00a0 01F0 breq .L37
|
||||
185 00a2 00C0 rjmp .
|
||||
186 00a4 8150 subi r24,lo8(-(-1))
|
||||
187 00a6 00C0 rjmp .L35
|
||||
188 .L37:
|
||||
189 /* epilogue start */
|
||||
190 00a8 0895 ret
|
||||
192 .global systemDelay16
|
||||
194 systemDelay16:
|
||||
195 /* prologue: function */
|
||||
196 /* frame size = 0 */
|
||||
197 /* stack size = 0 */
|
||||
198 .L__stack_usage = 0
|
||||
199 /* #APP */
|
||||
200 ; 105 "/usr/lib/avr/include/util/delay_basic.h" 1
|
||||
201 00aa 0197 1: sbiw r24,1
|
||||
202 00ac 01F4 brne 1b
|
||||
203 ; 0 "" 2
|
||||
204 /* #NOAPP */
|
||||
205 00ae 0895 ret
|
||||
207 .global systemDelay8
|
||||
209 systemDelay8:
|
||||
210 /* prologue: function */
|
||||
211 /* frame size = 0 */
|
||||
212 /* stack size = 0 */
|
||||
213 .L__stack_usage = 0
|
||||
214 /* #APP */
|
||||
215 ; 83 "/usr/lib/avr/include/util/delay_basic.h" 1
|
||||
216 00b0 8A95 1: dec r24
|
||||
217 00b2 01F4 brne 1b
|
||||
218 ; 0 "" 2
|
||||
219 /* #NOAPP */
|
||||
220 00b4 0895 ret
|
||||
222 .ident "GCC: (GNU) 4.8.2"
|
||||
DEFINED SYMBOLS
|
||||
*ABS*:0000000000000000 delay.c
|
||||
/tmp/cchzLu0J.s:2 *ABS*:000000000000003e __SP_H__
|
||||
/tmp/cchzLu0J.s:3 *ABS*:000000000000003d __SP_L__
|
||||
/tmp/cchzLu0J.s:4 *ABS*:000000000000003f __SREG__
|
||||
/tmp/cchzLu0J.s:5 *ABS*:0000000000000000 __tmp_reg__
|
||||
/tmp/cchzLu0J.s:6 *ABS*:0000000000000001 __zero_reg__
|
||||
/tmp/cchzLu0J.s:10 .text:0000000000000000 systemDelay10ms
|
||||
/tmp/cchzLu0J.s:32 .text:0000000000000016 systemDelay1s
|
||||
/tmp/cchzLu0J.s:53 .text:000000000000002a systemDelay100ms
|
||||
/tmp/cchzLu0J.s:74 .text:000000000000003e systemDelay1ms
|
||||
/tmp/cchzLu0J.s:96 .text:0000000000000054 systemDelay10us
|
||||
/tmp/cchzLu0J.s:116 .text:0000000000000066 systemDelay100us
|
||||
/tmp/cchzLu0J.s:137 .text:000000000000007a systemDelay1us
|
||||
/tmp/cchzLu0J.s:157 .text:000000000000008c systemDelay05us
|
||||
/tmp/cchzLu0J.s:177 .text:000000000000009e systemDelay01us
|
||||
/tmp/cchzLu0J.s:194 .text:00000000000000aa systemDelay16
|
||||
/tmp/cchzLu0J.s:209 .text:00000000000000b0 systemDelay8
|
||||
|
||||
NO UNDEFINED SYMBOLS
|
67
firmware/main.c
Normal file
67
firmware/main.c
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
####################################################################################
|
||||
# #
|
||||
# Bildschirmtricks Firmware V1.0.0 #
|
||||
# Main-Program #
|
||||
# #
|
||||
# Copyright (C) 2008 Philipp Fabian Benedikt Maier (aka. Dexter) #
|
||||
# #
|
||||
# This program is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program; if not, write to the Free Software #
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #
|
||||
# #
|
||||
#################################################################################### */
|
||||
|
||||
|
||||
/* ## HEADER ########################################################################## */
|
||||
#include <avr/io.h> /* Include I/O definitions */
|
||||
#include <stdint.h> /* Include Integer types */
|
||||
#include <stdio.h> /* Include standard I/O */
|
||||
#include <avr/pgmspace.h> /* Include pgmspace definition */
|
||||
#include <avr/interrupt.h> /* Include Interrupt control */
|
||||
|
||||
#include "uart.h" /* Include serial port control */
|
||||
#include "dbt03.h" /* Include dbt03 emulator layer */
|
||||
#include "ctrl.h" /* Include control line handler */
|
||||
#include "delay.h" /* Include delay function set */
|
||||
|
||||
#define MINIBTX_HOOKOFF 0x01
|
||||
#define MINIBTX_CONNECT 0x00
|
||||
/* #################################################################################### */
|
||||
|
||||
|
||||
/* ## MAIN ############################################################################ */
|
||||
int main(void)
|
||||
{
|
||||
systemUartInit(832); /* Initalize UART with 1200 Baud */
|
||||
systemCtrlInit(); /* Initalize control line handler (inhibit, ready) */
|
||||
systemDbt03Init(); /* Initalize dbt03 emulation (communication line to the terminal */
|
||||
|
||||
systemUartTransmit(MINIBTX_HOOKOFF); /* Tell the V24 side that terminal hooked off the line */
|
||||
|
||||
systemDbt03ConnectionOk(); /* Make the terminal think that the connection is sucessfully set up */
|
||||
|
||||
systemUartTransmit(MINIBTX_CONNECT); /* Tell the V24 side that connection to terminal is made */
|
||||
systemCtrlReady(); /* Tell the V24 side that connection to terminal is made (the low level method) */
|
||||
|
||||
while(1) /* Enter main-loop (Pass all data from uart to dbt03) */
|
||||
{
|
||||
systemDbt03Transmit(systemUartRecive());
|
||||
|
||||
if(systemCtrlCheckTerminate() == 0) /* Terminate connection if terminate control line is pulled low */
|
||||
systemDbt03ConnectionTerminate();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
/* #################################################################################### */
|
0
firmware/main.eep
Normal file
0
firmware/main.eep
Normal file
511
firmware/main.lss
Normal file
511
firmware/main.lss
Normal file
@@ -0,0 +1,511 @@
|
||||
|
||||
main.elf: file format elf32-avr
|
||||
|
||||
Sections:
|
||||
Idx Name Size VMA LMA File off Algn
|
||||
0 .text 00000358 00000000 00000000 00000074 2**1
|
||||
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
||||
1 .data 00000000 00800060 00000358 000003cc 2**0
|
||||
CONTENTS, ALLOC, LOAD, DATA
|
||||
2 .stab 000006cc 00000000 00000000 000003cc 2**2
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
3 .stabstr 00000054 00000000 00000000 00000a98 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
4 .comment 00000011 00000000 00000000 00000aec 2**0
|
||||
CONTENTS, READONLY
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <__vectors>:
|
||||
0: 12 c0 rjmp .+36 ; 0x26 <__ctors_end>
|
||||
2: 36 c1 rjmp .+620 ; 0x270 <__vector_1>
|
||||
4: 18 c0 rjmp .+48 ; 0x36 <__bad_interrupt>
|
||||
6: 17 c0 rjmp .+46 ; 0x36 <__bad_interrupt>
|
||||
8: 16 c0 rjmp .+44 ; 0x36 <__bad_interrupt>
|
||||
a: 15 c0 rjmp .+42 ; 0x36 <__bad_interrupt>
|
||||
c: 14 c0 rjmp .+40 ; 0x36 <__bad_interrupt>
|
||||
e: 13 c0 rjmp .+38 ; 0x36 <__bad_interrupt>
|
||||
10: 12 c0 rjmp .+36 ; 0x36 <__bad_interrupt>
|
||||
12: 11 c0 rjmp .+34 ; 0x36 <__bad_interrupt>
|
||||
14: 10 c0 rjmp .+32 ; 0x36 <__bad_interrupt>
|
||||
16: 0f c0 rjmp .+30 ; 0x36 <__bad_interrupt>
|
||||
18: 0e c0 rjmp .+28 ; 0x36 <__bad_interrupt>
|
||||
1a: 0d c0 rjmp .+26 ; 0x36 <__bad_interrupt>
|
||||
1c: 0c c0 rjmp .+24 ; 0x36 <__bad_interrupt>
|
||||
1e: 0b c0 rjmp .+22 ; 0x36 <__bad_interrupt>
|
||||
20: 0a c0 rjmp .+20 ; 0x36 <__bad_interrupt>
|
||||
22: 09 c0 rjmp .+18 ; 0x36 <__bad_interrupt>
|
||||
24: 08 c0 rjmp .+16 ; 0x36 <__bad_interrupt>
|
||||
|
||||
00000026 <__ctors_end>:
|
||||
26: 11 24 eor r1, r1
|
||||
28: 1f be out 0x3f, r1 ; 63
|
||||
2a: cf e5 ldi r28, 0x5F ; 95
|
||||
2c: d4 e0 ldi r29, 0x04 ; 4
|
||||
2e: de bf out 0x3e, r29 ; 62
|
||||
30: cd bf out 0x3d, r28 ; 61
|
||||
32: 7e d1 rcall .+764 ; 0x330 <main>
|
||||
34: 8f c1 rjmp .+798 ; 0x354 <_exit>
|
||||
|
||||
00000036 <__bad_interrupt>:
|
||||
36: e4 cf rjmp .-56 ; 0x0 <__vectors>
|
||||
|
||||
00000038 <systemUartInit>:
|
||||
38: 20 b5 in r18, 0x20 ; 32
|
||||
3a: 28 60 ori r18, 0x08 ; 8
|
||||
3c: 20 bd out 0x20, r18 ; 32
|
||||
3e: 20 b5 in r18, 0x20 ; 32
|
||||
40: 20 bd out 0x20, r18 ; 32
|
||||
42: 20 b5 in r18, 0x20 ; 32
|
||||
44: 24 60 ori r18, 0x04 ; 4
|
||||
46: 20 bd out 0x20, r18 ; 32
|
||||
48: 20 b5 in r18, 0x20 ; 32
|
||||
4a: 22 60 ori r18, 0x02 ; 2
|
||||
4c: 20 bd out 0x20, r18 ; 32
|
||||
4e: 20 b5 in r18, 0x20 ; 32
|
||||
50: 20 bd out 0x20, r18 ; 32
|
||||
52: 20 b5 in r18, 0x20 ; 32
|
||||
54: 20 bd out 0x20, r18 ; 32
|
||||
56: 90 bd out 0x20, r25 ; 32
|
||||
58: 89 b9 out 0x09, r24 ; 9
|
||||
5a: 53 9a sbi 0x0a, 3 ; 10
|
||||
5c: 54 9a sbi 0x0a, 4 ; 10
|
||||
5e: 08 95 ret
|
||||
|
||||
00000060 <systemUartTransmit>:
|
||||
60: 5d 9b sbis 0x0b, 5 ; 11
|
||||
62: fe cf rjmp .-4 ; 0x60 <systemUartTransmit>
|
||||
64: 8c b9 out 0x0c, r24 ; 12
|
||||
66: 08 95 ret
|
||||
|
||||
00000068 <systemUartRecive>:
|
||||
68: 5f 9b sbis 0x0b, 7 ; 11
|
||||
6a: fe cf rjmp .-4 ; 0x68 <systemUartRecive>
|
||||
6c: 8c b1 in r24, 0x0c ; 12
|
||||
6e: 08 95 ret
|
||||
|
||||
00000070 <USART0_RX_vect>:
|
||||
70: 1f 92 push r1
|
||||
72: 0f 92 push r0
|
||||
74: 0f b6 in r0, 0x3f ; 63
|
||||
76: 0f 92 push r0
|
||||
78: 11 24 eor r1, r1
|
||||
7a: 0f 90 pop r0
|
||||
7c: 0f be out 0x3f, r0 ; 63
|
||||
7e: 0f 90 pop r0
|
||||
80: 1f 90 pop r1
|
||||
82: 18 95 reti
|
||||
|
||||
00000084 <systemDelay10ms>:
|
||||
84: 88 23 and r24, r24
|
||||
86: 41 f0 breq .+16 ; 0x98 <systemDelay10ms+0x14>
|
||||
88: ef e3 ldi r30, 0x3F ; 63
|
||||
8a: fc e9 ldi r31, 0x9C ; 156
|
||||
8c: 31 97 sbiw r30, 0x01 ; 1
|
||||
8e: f1 f7 brne .-4 ; 0x8c <systemDelay10ms+0x8>
|
||||
90: 00 c0 rjmp .+0 ; 0x92 <systemDelay10ms+0xe>
|
||||
92: 00 00 nop
|
||||
94: 81 50 subi r24, 0x01 ; 1
|
||||
96: f6 cf rjmp .-20 ; 0x84 <systemDelay10ms>
|
||||
98: 08 95 ret
|
||||
|
||||
0000009a <systemDelay1s>:
|
||||
9a: cf 93 push r28
|
||||
9c: c8 2f mov r28, r24
|
||||
9e: cc 23 and r28, r28
|
||||
a0: 21 f0 breq .+8 ; 0xaa <systemDelay1s+0x10>
|
||||
a2: 84 e6 ldi r24, 0x64 ; 100
|
||||
a4: ef df rcall .-34 ; 0x84 <systemDelay10ms>
|
||||
a6: c1 50 subi r28, 0x01 ; 1
|
||||
a8: fa cf rjmp .-12 ; 0x9e <systemDelay1s+0x4>
|
||||
aa: cf 91 pop r28
|
||||
ac: 08 95 ret
|
||||
|
||||
000000ae <systemDelay100ms>:
|
||||
ae: cf 93 push r28
|
||||
b0: c8 2f mov r28, r24
|
||||
b2: cc 23 and r28, r28
|
||||
b4: 21 f0 breq .+8 ; 0xbe <systemDelay100ms+0x10>
|
||||
b6: 8a e0 ldi r24, 0x0A ; 10
|
||||
b8: e5 df rcall .-54 ; 0x84 <systemDelay10ms>
|
||||
ba: c1 50 subi r28, 0x01 ; 1
|
||||
bc: fa cf rjmp .-12 ; 0xb2 <systemDelay100ms+0x4>
|
||||
be: cf 91 pop r28
|
||||
c0: 08 95 ret
|
||||
|
||||
000000c2 <systemDelay1ms>:
|
||||
c2: 88 23 and r24, r24
|
||||
c4: 41 f0 breq .+16 ; 0xd6 <systemDelay1ms+0x14>
|
||||
c6: ef e9 ldi r30, 0x9F ; 159
|
||||
c8: ff e0 ldi r31, 0x0F ; 15
|
||||
ca: 31 97 sbiw r30, 0x01 ; 1
|
||||
cc: f1 f7 brne .-4 ; 0xca <systemDelay1ms+0x8>
|
||||
ce: 00 c0 rjmp .+0 ; 0xd0 <systemDelay1ms+0xe>
|
||||
d0: 00 00 nop
|
||||
d2: 81 50 subi r24, 0x01 ; 1
|
||||
d4: f6 cf rjmp .-20 ; 0xc2 <systemDelay1ms>
|
||||
d6: 08 95 ret
|
||||
|
||||
000000d8 <systemDelay10us>:
|
||||
d8: 88 23 and r24, r24
|
||||
da: 31 f0 breq .+12 ; 0xe8 <systemDelay10us+0x10>
|
||||
dc: 95 e3 ldi r25, 0x35 ; 53
|
||||
de: 9a 95 dec r25
|
||||
e0: f1 f7 brne .-4 ; 0xde <systemDelay10us+0x6>
|
||||
e2: 00 00 nop
|
||||
e4: 81 50 subi r24, 0x01 ; 1
|
||||
e6: f8 cf rjmp .-16 ; 0xd8 <systemDelay10us>
|
||||
e8: 08 95 ret
|
||||
|
||||
000000ea <systemDelay100us>:
|
||||
ea: cf 93 push r28
|
||||
ec: c8 2f mov r28, r24
|
||||
ee: cc 23 and r28, r28
|
||||
f0: 21 f0 breq .+8 ; 0xfa <systemDelay100us+0x10>
|
||||
f2: 8a e0 ldi r24, 0x0A ; 10
|
||||
f4: f1 df rcall .-30 ; 0xd8 <systemDelay10us>
|
||||
f6: c1 50 subi r28, 0x01 ; 1
|
||||
f8: fa cf rjmp .-12 ; 0xee <systemDelay100us+0x4>
|
||||
fa: cf 91 pop r28
|
||||
fc: 08 95 ret
|
||||
|
||||
000000fe <systemDelay1us>:
|
||||
fe: 88 23 and r24, r24
|
||||
100: 31 f0 breq .+12 ; 0x10e <systemDelay1us+0x10>
|
||||
102: 95 e0 ldi r25, 0x05 ; 5
|
||||
104: 9a 95 dec r25
|
||||
106: f1 f7 brne .-4 ; 0x104 <systemDelay1us+0x6>
|
||||
108: 00 00 nop
|
||||
10a: 81 50 subi r24, 0x01 ; 1
|
||||
10c: f8 cf rjmp .-16 ; 0xfe <systemDelay1us>
|
||||
10e: 08 95 ret
|
||||
|
||||
00000110 <systemDelay05us>:
|
||||
110: 88 23 and r24, r24
|
||||
112: 31 f0 breq .+12 ; 0x120 <systemDelay05us+0x10>
|
||||
114: 92 e0 ldi r25, 0x02 ; 2
|
||||
116: 9a 95 dec r25
|
||||
118: f1 f7 brne .-4 ; 0x116 <systemDelay05us+0x6>
|
||||
11a: 00 c0 rjmp .+0 ; 0x11c <systemDelay05us+0xc>
|
||||
11c: 81 50 subi r24, 0x01 ; 1
|
||||
11e: f8 cf rjmp .-16 ; 0x110 <systemDelay05us>
|
||||
120: 08 95 ret
|
||||
|
||||
00000122 <systemDelay01us>:
|
||||
122: 88 23 and r24, r24
|
||||
124: 19 f0 breq .+6 ; 0x12c <systemDelay01us+0xa>
|
||||
126: 00 c0 rjmp .+0 ; 0x128 <systemDelay01us+0x6>
|
||||
128: 81 50 subi r24, 0x01 ; 1
|
||||
12a: fb cf rjmp .-10 ; 0x122 <systemDelay01us>
|
||||
12c: 08 95 ret
|
||||
|
||||
0000012e <systemDelay16>:
|
||||
12e: 01 97 sbiw r24, 0x01 ; 1
|
||||
130: f1 f7 brne .-4 ; 0x12e <systemDelay16>
|
||||
132: 08 95 ret
|
||||
|
||||
00000134 <systemDelay8>:
|
||||
134: 8a 95 dec r24
|
||||
136: f1 f7 brne .-4 ; 0x134 <systemDelay8>
|
||||
138: 08 95 ret
|
||||
|
||||
0000013a <dbt03IoCtrl.part.0>:
|
||||
13a: c0 9a sbi 0x18, 0 ; 24
|
||||
13c: 08 95 ret
|
||||
|
||||
0000013e <dbt03Dialtone>:
|
||||
13e: 0f 93 push r16
|
||||
140: 1f 93 push r17
|
||||
142: cf 93 push r28
|
||||
144: df 93 push r29
|
||||
146: 8c 01 movw r16, r24
|
||||
148: c0 e0 ldi r28, 0x00 ; 0
|
||||
14a: d0 e0 ldi r29, 0x00 ; 0
|
||||
14c: c0 17 cp r28, r16
|
||||
14e: d1 07 cpc r29, r17
|
||||
150: 41 f0 breq .+16 ; 0x162 <dbt03Dialtone+0x24>
|
||||
152: c0 98 cbi 0x18, 0 ; 24
|
||||
154: 8a e0 ldi r24, 0x0A ; 10
|
||||
156: c9 df rcall .-110 ; 0xea <systemDelay100us>
|
||||
158: f0 df rcall .-32 ; 0x13a <dbt03IoCtrl.part.0>
|
||||
15a: 8a e0 ldi r24, 0x0A ; 10
|
||||
15c: c6 df rcall .-116 ; 0xea <systemDelay100us>
|
||||
15e: 21 96 adiw r28, 0x01 ; 1
|
||||
160: f5 cf rjmp .-22 ; 0x14c <dbt03Dialtone+0xe>
|
||||
162: df 91 pop r29
|
||||
164: cf 91 pop r28
|
||||
166: 1f 91 pop r17
|
||||
168: 0f 91 pop r16
|
||||
16a: 08 95 ret
|
||||
|
||||
0000016c <systemDbt03Init>:
|
||||
16c: e6 df rcall .-52 ; 0x13a <dbt03IoCtrl.part.0>
|
||||
16e: b8 9a sbi 0x17, 0 ; 23
|
||||
170: 92 98 cbi 0x12, 2 ; 18
|
||||
172: 8b b7 in r24, 0x3b ; 59
|
||||
174: 80 64 ori r24, 0x40 ; 64
|
||||
176: 8b bf out 0x3b, r24 ; 59
|
||||
178: 85 b7 in r24, 0x35 ; 53
|
||||
17a: 82 60 ori r24, 0x02 ; 2
|
||||
17c: 85 bf out 0x35, r24 ; 53
|
||||
17e: 78 94 sei
|
||||
180: 08 95 ret
|
||||
|
||||
00000182 <systemDbt03Transmit>:
|
||||
182: 0f 93 push r16
|
||||
184: 1f 93 push r17
|
||||
186: cf 93 push r28
|
||||
188: df 93 push r29
|
||||
18a: 08 2f mov r16, r24
|
||||
18c: f8 94 cli
|
||||
18e: d5 df rcall .-86 ; 0x13a <dbt03IoCtrl.part.0>
|
||||
190: 82 e5 ldi r24, 0x52 ; 82
|
||||
192: a2 df rcall .-188 ; 0xd8 <systemDelay10us>
|
||||
194: c0 e0 ldi r28, 0x00 ; 0
|
||||
196: d0 e0 ldi r29, 0x00 ; 0
|
||||
198: 10 e0 ldi r17, 0x00 ; 0
|
||||
19a: 00 95 com r16
|
||||
19c: 10 95 com r17
|
||||
19e: c8 01 movw r24, r16
|
||||
1a0: 0c 2e mov r0, r28
|
||||
1a2: 02 c0 rjmp .+4 ; 0x1a8 <systemDbt03Transmit+0x26>
|
||||
1a4: 95 95 asr r25
|
||||
1a6: 87 95 ror r24
|
||||
1a8: 0a 94 dec r0
|
||||
1aa: e2 f7 brpl .-8 ; 0x1a4 <systemDbt03Transmit+0x22>
|
||||
1ac: 80 ff sbrs r24, 0
|
||||
1ae: 02 c0 rjmp .+4 ; 0x1b4 <systemDbt03Transmit+0x32>
|
||||
1b0: c4 df rcall .-120 ; 0x13a <dbt03IoCtrl.part.0>
|
||||
1b2: 01 c0 rjmp .+2 ; 0x1b6 <systemDbt03Transmit+0x34>
|
||||
1b4: c0 98 cbi 0x18, 0 ; 24
|
||||
1b6: 82 e5 ldi r24, 0x52 ; 82
|
||||
1b8: 8f df rcall .-226 ; 0xd8 <systemDelay10us>
|
||||
1ba: 21 96 adiw r28, 0x01 ; 1
|
||||
1bc: c8 30 cpi r28, 0x08 ; 8
|
||||
1be: d1 05 cpc r29, r1
|
||||
1c0: 71 f7 brne .-36 ; 0x19e <systemDbt03Transmit+0x1c>
|
||||
1c2: c0 98 cbi 0x18, 0 ; 24
|
||||
1c4: 82 e5 ldi r24, 0x52 ; 82
|
||||
1c6: 88 df rcall .-240 ; 0xd8 <systemDelay10us>
|
||||
1c8: 78 94 sei
|
||||
1ca: df 91 pop r29
|
||||
1cc: cf 91 pop r28
|
||||
1ce: 1f 91 pop r17
|
||||
1d0: 0f 91 pop r16
|
||||
1d2: 08 95 ret
|
||||
|
||||
000001d4 <systemDbt03Receive>:
|
||||
1d4: ff 92 push r15
|
||||
1d6: 0f 93 push r16
|
||||
1d8: 1f 93 push r17
|
||||
1da: cf 93 push r28
|
||||
1dc: df 93 push r29
|
||||
1de: 9f d0 rcall .+318 ; 0x31e <systemCtrlCheckInhibit>
|
||||
1e0: 81 11 cpse r24, r1
|
||||
1e2: 1e c0 rjmp .+60 ; 0x220 <systemDbt03Receive+0x4c>
|
||||
1e4: f8 94 cli
|
||||
1e6: 82 99 sbic 0x10, 2 ; 16
|
||||
1e8: fe cf rjmp .-4 ; 0x1e6 <systemDbt03Receive+0x12>
|
||||
1ea: 85 e8 ldi r24, 0x85 ; 133
|
||||
1ec: 7e df rcall .-260 ; 0xea <systemDelay100us>
|
||||
1ee: 00 e0 ldi r16, 0x00 ; 0
|
||||
1f0: 10 e0 ldi r17, 0x00 ; 0
|
||||
1f2: f1 2c mov r15, r1
|
||||
1f4: 82 e4 ldi r24, 0x42 ; 66
|
||||
1f6: 79 df rcall .-270 ; 0xea <systemDelay100us>
|
||||
1f8: 80 b3 in r24, 0x10 ; 16
|
||||
1fa: 82 fb bst r24, 2
|
||||
1fc: 88 27 eor r24, r24
|
||||
1fe: 80 f9 bld r24, 0
|
||||
200: c8 2f mov r28, r24
|
||||
202: 00 2e mov r0, r16
|
||||
204: 01 c0 rjmp .+2 ; 0x208 <systemDbt03Receive+0x34>
|
||||
206: cc 0f add r28, r28
|
||||
208: 0a 94 dec r0
|
||||
20a: ea f7 brpl .-6 ; 0x206 <systemDbt03Receive+0x32>
|
||||
20c: fc 2a or r15, r28
|
||||
20e: 82 e4 ldi r24, 0x42 ; 66
|
||||
210: 6c df rcall .-296 ; 0xea <systemDelay100us>
|
||||
212: 0f 5f subi r16, 0xFF ; 255
|
||||
214: 1f 4f sbci r17, 0xFF ; 255
|
||||
216: 08 30 cpi r16, 0x08 ; 8
|
||||
218: 11 05 cpc r17, r1
|
||||
21a: 61 f7 brne .-40 ; 0x1f4 <systemDbt03Receive+0x20>
|
||||
21c: 78 94 sei
|
||||
21e: 01 c0 rjmp .+2 ; 0x222 <systemDbt03Receive+0x4e>
|
||||
220: f1 2c mov r15, r1
|
||||
222: 8f 2d mov r24, r15
|
||||
224: df 91 pop r29
|
||||
226: cf 91 pop r28
|
||||
228: 1f 91 pop r17
|
||||
22a: 0f 91 pop r16
|
||||
22c: ff 90 pop r15
|
||||
22e: 08 95 ret
|
||||
|
||||
00000230 <systemDbt03ConnectionOk>:
|
||||
230: cf 93 push r28
|
||||
232: df 93 push r29
|
||||
234: 8e e1 ldi r24, 0x1E ; 30
|
||||
236: 3b df rcall .-394 ; 0xae <systemDelay100ms>
|
||||
238: 80 e2 ldi r24, 0x20 ; 32
|
||||
23a: 93 e0 ldi r25, 0x03 ; 3
|
||||
23c: 80 df rcall .-256 ; 0x13e <dbt03Dialtone>
|
||||
23e: 88 e2 ldi r24, 0x28 ; 40
|
||||
240: 36 df rcall .-404 ; 0xae <systemDelay100ms>
|
||||
242: 88 ec ldi r24, 0xC8 ; 200
|
||||
244: 90 e0 ldi r25, 0x00 ; 0
|
||||
246: 7b df rcall .-266 ; 0x13e <dbt03Dialtone>
|
||||
248: 85 e0 ldi r24, 0x05 ; 5
|
||||
24a: 31 df rcall .-414 ; 0xae <systemDelay100ms>
|
||||
24c: c0 e2 ldi r28, 0x20 ; 32
|
||||
24e: d8 e0 ldi r29, 0x08 ; 8
|
||||
250: c0 98 cbi 0x18, 0 ; 24
|
||||
252: 86 e2 ldi r24, 0x26 ; 38
|
||||
254: 41 df rcall .-382 ; 0xd8 <systemDelay10us>
|
||||
256: 71 df rcall .-286 ; 0x13a <dbt03IoCtrl.part.0>
|
||||
258: 86 e2 ldi r24, 0x26 ; 38
|
||||
25a: 3e df rcall .-388 ; 0xd8 <systemDelay10us>
|
||||
25c: 21 97 sbiw r28, 0x01 ; 1
|
||||
25e: 20 97 sbiw r28, 0x00 ; 0
|
||||
260: b9 f7 brne .-18 ; 0x250 <systemDbt03ConnectionOk+0x20>
|
||||
262: c0 98 cbi 0x18, 0 ; 24
|
||||
264: 85 e0 ldi r24, 0x05 ; 5
|
||||
266: df 91 pop r29
|
||||
268: cf 91 pop r28
|
||||
26a: 21 cf rjmp .-446 ; 0xae <systemDelay100ms>
|
||||
|
||||
0000026c <systemDbt03ConnectionTerminate>:
|
||||
26c: 66 df rcall .-308 ; 0x13a <dbt03IoCtrl.part.0>
|
||||
26e: ff cf rjmp .-2 ; 0x26e <systemDbt03ConnectionTerminate+0x2>
|
||||
|
||||
00000270 <__vector_1>:
|
||||
270: 1f 92 push r1
|
||||
272: 0f 92 push r0
|
||||
274: 0f b6 in r0, 0x3f ; 63
|
||||
276: 0f 92 push r0
|
||||
278: 11 24 eor r1, r1
|
||||
27a: ff 92 push r15
|
||||
27c: 0f 93 push r16
|
||||
27e: 1f 93 push r17
|
||||
280: 2f 93 push r18
|
||||
282: 3f 93 push r19
|
||||
284: 4f 93 push r20
|
||||
286: 5f 93 push r21
|
||||
288: 6f 93 push r22
|
||||
28a: 7f 93 push r23
|
||||
28c: 8f 93 push r24
|
||||
28e: 9f 93 push r25
|
||||
290: af 93 push r26
|
||||
292: bf 93 push r27
|
||||
294: cf 93 push r28
|
||||
296: df 93 push r29
|
||||
298: ef 93 push r30
|
||||
29a: ff 93 push r31
|
||||
29c: 40 d0 rcall .+128 ; 0x31e <systemCtrlCheckInhibit>
|
||||
29e: 81 30 cpi r24, 0x01 ; 1
|
||||
2a0: 09 f5 brne .+66 ; 0x2e4 <__vector_1+0x74>
|
||||
2a2: 82 e4 ldi r24, 0x42 ; 66
|
||||
2a4: 22 df rcall .-444 ; 0xea <systemDelay100us>
|
||||
2a6: 82 99 sbic 0x10, 2 ; 16
|
||||
2a8: 1d c0 rjmp .+58 ; 0x2e4 <__vector_1+0x74>
|
||||
2aa: 82 e4 ldi r24, 0x42 ; 66
|
||||
2ac: 1e df rcall .-452 ; 0xea <systemDelay100us>
|
||||
2ae: 00 e0 ldi r16, 0x00 ; 0
|
||||
2b0: 10 e0 ldi r17, 0x00 ; 0
|
||||
2b2: f1 2c mov r15, r1
|
||||
2b4: 82 e4 ldi r24, 0x42 ; 66
|
||||
2b6: 19 df rcall .-462 ; 0xea <systemDelay100us>
|
||||
2b8: 80 b3 in r24, 0x10 ; 16
|
||||
2ba: 82 fb bst r24, 2
|
||||
2bc: 88 27 eor r24, r24
|
||||
2be: 80 f9 bld r24, 0
|
||||
2c0: c8 2f mov r28, r24
|
||||
2c2: 00 2e mov r0, r16
|
||||
2c4: 01 c0 rjmp .+2 ; 0x2c8 <__vector_1+0x58>
|
||||
2c6: cc 0f add r28, r28
|
||||
2c8: 0a 94 dec r0
|
||||
2ca: ea f7 brpl .-6 ; 0x2c6 <__vector_1+0x56>
|
||||
2cc: fc 2a or r15, r28
|
||||
2ce: 82 e4 ldi r24, 0x42 ; 66
|
||||
2d0: 0c df rcall .-488 ; 0xea <systemDelay100us>
|
||||
2d2: 0f 5f subi r16, 0xFF ; 255
|
||||
2d4: 1f 4f sbci r17, 0xFF ; 255
|
||||
2d6: 08 30 cpi r16, 0x08 ; 8
|
||||
2d8: 11 05 cpc r17, r1
|
||||
2da: 61 f7 brne .-40 ; 0x2b4 <__vector_1+0x44>
|
||||
2dc: 82 e4 ldi r24, 0x42 ; 66
|
||||
2de: 05 df rcall .-502 ; 0xea <systemDelay100us>
|
||||
2e0: 8f 2d mov r24, r15
|
||||
2e2: be de rcall .-644 ; 0x60 <systemUartTransmit>
|
||||
2e4: ff 91 pop r31
|
||||
2e6: ef 91 pop r30
|
||||
2e8: df 91 pop r29
|
||||
2ea: cf 91 pop r28
|
||||
2ec: bf 91 pop r27
|
||||
2ee: af 91 pop r26
|
||||
2f0: 9f 91 pop r25
|
||||
2f2: 8f 91 pop r24
|
||||
2f4: 7f 91 pop r23
|
||||
2f6: 6f 91 pop r22
|
||||
2f8: 5f 91 pop r21
|
||||
2fa: 4f 91 pop r20
|
||||
2fc: 3f 91 pop r19
|
||||
2fe: 2f 91 pop r18
|
||||
300: 1f 91 pop r17
|
||||
302: 0f 91 pop r16
|
||||
304: ff 90 pop r15
|
||||
306: 0f 90 pop r0
|
||||
308: 0f be out 0x3f, r0 ; 63
|
||||
30a: 0f 90 pop r0
|
||||
30c: 1f 90 pop r1
|
||||
30e: 18 95 reti
|
||||
|
||||
00000310 <systemCtrlInit>:
|
||||
310: c1 9a sbi 0x18, 1 ; 24
|
||||
312: b9 9a sbi 0x17, 1 ; 23
|
||||
314: c2 9a sbi 0x18, 2 ; 24
|
||||
316: 94 9a sbi 0x12, 4 ; 18
|
||||
318: 08 95 ret
|
||||
|
||||
0000031a <systemCtrlReady>:
|
||||
31a: c1 98 cbi 0x18, 1 ; 24
|
||||
31c: 08 95 ret
|
||||
|
||||
0000031e <systemCtrlCheckInhibit>:
|
||||
31e: 86 b3 in r24, 0x16 ; 22
|
||||
320: 82 fb bst r24, 2
|
||||
322: 88 27 eor r24, r24
|
||||
324: 80 f9 bld r24, 0
|
||||
326: 08 95 ret
|
||||
|
||||
00000328 <systemCtrlCheckTerminate>:
|
||||
328: 80 b3 in r24, 0x10 ; 16
|
||||
32a: 82 95 swap r24
|
||||
32c: 81 70 andi r24, 0x01 ; 1
|
||||
32e: 08 95 ret
|
||||
|
||||
00000330 <main>:
|
||||
330: 80 e4 ldi r24, 0x40 ; 64
|
||||
332: 93 e0 ldi r25, 0x03 ; 3
|
||||
334: 81 de rcall .-766 ; 0x38 <systemUartInit>
|
||||
336: ec df rcall .-40 ; 0x310 <systemCtrlInit>
|
||||
338: 19 df rcall .-462 ; 0x16c <systemDbt03Init>
|
||||
33a: 81 e0 ldi r24, 0x01 ; 1
|
||||
33c: 91 de rcall .-734 ; 0x60 <systemUartTransmit>
|
||||
33e: 78 df rcall .-272 ; 0x230 <systemDbt03ConnectionOk>
|
||||
340: 80 e0 ldi r24, 0x00 ; 0
|
||||
342: 8e de rcall .-740 ; 0x60 <systemUartTransmit>
|
||||
344: ea df rcall .-44 ; 0x31a <systemCtrlReady>
|
||||
346: 90 de rcall .-736 ; 0x68 <systemUartRecive>
|
||||
348: 1c df rcall .-456 ; 0x182 <systemDbt03Transmit>
|
||||
34a: ee df rcall .-36 ; 0x328 <systemCtrlCheckTerminate>
|
||||
34c: 81 11 cpse r24, r1
|
||||
34e: fb cf rjmp .-10 ; 0x346 <main+0x16>
|
||||
350: 8d df rcall .-230 ; 0x26c <systemDbt03ConnectionTerminate>
|
||||
352: f9 cf rjmp .-14 ; 0x346 <main+0x16>
|
||||
|
||||
00000354 <_exit>:
|
||||
354: f8 94 cli
|
||||
|
||||
00000356 <__stop_program>:
|
||||
356: ff cf rjmp .-2 ; 0x356 <__stop_program>
|
53
firmware/main.lst
Normal file
53
firmware/main.lst
Normal file
@@ -0,0 +1,53 @@
|
||||
1 .file "main.c"
|
||||
2 __SP_H__ = 0x3e
|
||||
3 __SP_L__ = 0x3d
|
||||
4 __SREG__ = 0x3f
|
||||
5 __tmp_reg__ = 0
|
||||
6 __zero_reg__ = 1
|
||||
7 .section .text.startup,"ax",@progbits
|
||||
8 .global main
|
||||
10 main:
|
||||
11 /* prologue: function */
|
||||
12 /* frame size = 0 */
|
||||
13 /* stack size = 0 */
|
||||
14 .L__stack_usage = 0
|
||||
15 0000 80E4 ldi r24,lo8(64)
|
||||
16 0002 93E0 ldi r25,lo8(3)
|
||||
17 0004 00D0 rcall systemUartInit
|
||||
18 0006 00D0 rcall systemCtrlInit
|
||||
19 0008 00D0 rcall systemDbt03Init
|
||||
20 000a 81E0 ldi r24,lo8(1)
|
||||
21 000c 00D0 rcall systemUartTransmit
|
||||
22 000e 00D0 rcall systemDbt03ConnectionOk
|
||||
23 0010 80E0 ldi r24,0
|
||||
24 0012 00D0 rcall systemUartTransmit
|
||||
25 0014 00D0 rcall systemCtrlReady
|
||||
26 .L3:
|
||||
27 0016 00D0 rcall systemUartRecive
|
||||
28 0018 00D0 rcall systemDbt03Transmit
|
||||
29 001a 00D0 rcall systemCtrlCheckTerminate
|
||||
30 001c 8111 cpse r24,__zero_reg__
|
||||
31 001e 00C0 rjmp .L3
|
||||
32 0020 00D0 rcall systemDbt03ConnectionTerminate
|
||||
33 0022 00C0 rjmp .L3
|
||||
35 .ident "GCC: (GNU) 4.8.2"
|
||||
DEFINED SYMBOLS
|
||||
*ABS*:0000000000000000 main.c
|
||||
/tmp/ccA9iM3F.s:2 *ABS*:000000000000003e __SP_H__
|
||||
/tmp/ccA9iM3F.s:3 *ABS*:000000000000003d __SP_L__
|
||||
/tmp/ccA9iM3F.s:4 *ABS*:000000000000003f __SREG__
|
||||
/tmp/ccA9iM3F.s:5 *ABS*:0000000000000000 __tmp_reg__
|
||||
/tmp/ccA9iM3F.s:6 *ABS*:0000000000000001 __zero_reg__
|
||||
/tmp/ccA9iM3F.s:10 .text.startup:0000000000000000 main
|
||||
|
||||
UNDEFINED SYMBOLS
|
||||
systemUartInit
|
||||
systemCtrlInit
|
||||
systemDbt03Init
|
||||
systemUartTransmit
|
||||
systemDbt03ConnectionOk
|
||||
systemCtrlReady
|
||||
systemUartRecive
|
||||
systemDbt03Transmit
|
||||
systemCtrlCheckTerminate
|
||||
systemDbt03ConnectionTerminate
|
479
firmware/main.map
Normal file
479
firmware/main.map
Normal file
@@ -0,0 +1,479 @@
|
||||
Archive member included because of file (symbol)
|
||||
|
||||
/usr/lib/gcc/avr/4.8.2/avr4/libgcc.a(_exit.o)
|
||||
/usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o (exit)
|
||||
|
||||
Memory Configuration
|
||||
|
||||
Name Origin Length Attributes
|
||||
text 0x0000000000000000 0x0000000000002000 xr
|
||||
data 0x0000000000800060 0x000000000000ffa0 rw !x
|
||||
eeprom 0x0000000000810000 0x0000000000010000 rw !x
|
||||
fuse 0x0000000000820000 0x0000000000000400 rw !x
|
||||
lock 0x0000000000830000 0x0000000000000400 rw !x
|
||||
signature 0x0000000000840000 0x0000000000000400 rw !x
|
||||
user_signatures 0x0000000000850000 0x0000000000000400 rw !x
|
||||
*default* 0x0000000000000000 0xffffffffffffffff
|
||||
|
||||
Linker script and memory map
|
||||
|
||||
LOAD /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
LOAD main.o
|
||||
LOAD uart.o
|
||||
LOAD delay.o
|
||||
LOAD dbt03.o
|
||||
LOAD ctrl.o
|
||||
LOAD /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/libm.a
|
||||
START GROUP
|
||||
LOAD /usr/lib/gcc/avr/4.8.2/avr4/libgcc.a
|
||||
LOAD /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/libm.a
|
||||
LOAD /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/libc.a
|
||||
END GROUP
|
||||
|
||||
.hash
|
||||
*(.hash)
|
||||
|
||||
.dynsym
|
||||
*(.dynsym)
|
||||
|
||||
.dynstr
|
||||
*(.dynstr)
|
||||
|
||||
.gnu.version
|
||||
*(.gnu.version)
|
||||
|
||||
.gnu.version_d
|
||||
*(.gnu.version_d)
|
||||
|
||||
.gnu.version_r
|
||||
*(.gnu.version_r)
|
||||
|
||||
.rel.init
|
||||
*(.rel.init)
|
||||
|
||||
.rela.init
|
||||
*(.rela.init)
|
||||
|
||||
.rel.text
|
||||
*(.rel.text)
|
||||
*(.rel.text.*)
|
||||
*(.rel.gnu.linkonce.t*)
|
||||
|
||||
.rela.text
|
||||
*(.rela.text)
|
||||
*(.rela.text.*)
|
||||
*(.rela.gnu.linkonce.t*)
|
||||
|
||||
.rel.fini
|
||||
*(.rel.fini)
|
||||
|
||||
.rela.fini
|
||||
*(.rela.fini)
|
||||
|
||||
.rel.rodata
|
||||
*(.rel.rodata)
|
||||
*(.rel.rodata.*)
|
||||
*(.rel.gnu.linkonce.r*)
|
||||
|
||||
.rela.rodata
|
||||
*(.rela.rodata)
|
||||
*(.rela.rodata.*)
|
||||
*(.rela.gnu.linkonce.r*)
|
||||
|
||||
.rel.data
|
||||
*(.rel.data)
|
||||
*(.rel.data.*)
|
||||
*(.rel.gnu.linkonce.d*)
|
||||
|
||||
.rela.data
|
||||
*(.rela.data)
|
||||
*(.rela.data.*)
|
||||
*(.rela.gnu.linkonce.d*)
|
||||
|
||||
.rel.ctors
|
||||
*(.rel.ctors)
|
||||
|
||||
.rela.ctors
|
||||
*(.rela.ctors)
|
||||
|
||||
.rel.dtors
|
||||
*(.rel.dtors)
|
||||
|
||||
.rela.dtors
|
||||
*(.rela.dtors)
|
||||
|
||||
.rel.got
|
||||
*(.rel.got)
|
||||
|
||||
.rela.got
|
||||
*(.rela.got)
|
||||
|
||||
.rel.bss
|
||||
*(.rel.bss)
|
||||
|
||||
.rela.bss
|
||||
*(.rela.bss)
|
||||
|
||||
.rel.plt
|
||||
*(.rel.plt)
|
||||
|
||||
.rela.plt
|
||||
*(.rela.plt)
|
||||
|
||||
.text 0x0000000000000000 0x358
|
||||
*(.vectors)
|
||||
.vectors 0x0000000000000000 0x26 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
0x0000000000000000 __vectors
|
||||
0x0000000000000000 __vector_default
|
||||
*(.vectors)
|
||||
*(.progmem.gcc*)
|
||||
*(.progmem*)
|
||||
0x0000000000000026 . = ALIGN (0x2)
|
||||
0x0000000000000026 __trampolines_start = .
|
||||
*(.trampolines)
|
||||
.trampolines 0x0000000000000026 0x0 linker stubs
|
||||
*(.trampolines*)
|
||||
0x0000000000000026 __trampolines_end = .
|
||||
*(.jumptables)
|
||||
*(.jumptables*)
|
||||
*(.lowtext)
|
||||
*(.lowtext*)
|
||||
0x0000000000000026 __ctors_start = .
|
||||
*(.ctors)
|
||||
0x0000000000000026 __ctors_end = .
|
||||
0x0000000000000026 __dtors_start = .
|
||||
*(.dtors)
|
||||
0x0000000000000026 __dtors_end = .
|
||||
SORT(*)(.ctors)
|
||||
SORT(*)(.dtors)
|
||||
*(.init0)
|
||||
.init0 0x0000000000000026 0x0 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
0x0000000000000026 __init
|
||||
*(.init0)
|
||||
*(.init1)
|
||||
*(.init1)
|
||||
*(.init2)
|
||||
.init2 0x0000000000000026 0xc /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
*(.init2)
|
||||
*(.init3)
|
||||
*(.init3)
|
||||
*(.init4)
|
||||
*(.init4)
|
||||
*(.init5)
|
||||
*(.init5)
|
||||
*(.init6)
|
||||
*(.init6)
|
||||
*(.init7)
|
||||
*(.init7)
|
||||
*(.init8)
|
||||
*(.init8)
|
||||
*(.init9)
|
||||
.init9 0x0000000000000032 0x4 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
*(.init9)
|
||||
*(.text)
|
||||
.text 0x0000000000000036 0x2 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
0x0000000000000036 __vector_12
|
||||
0x0000000000000036 __bad_interrupt
|
||||
0x0000000000000036 __vector_6
|
||||
0x0000000000000036 __vector_3
|
||||
0x0000000000000036 __vector_11
|
||||
0x0000000000000036 __vector_13
|
||||
0x0000000000000036 __vector_17
|
||||
0x0000000000000036 __vector_7
|
||||
0x0000000000000036 __vector_5
|
||||
0x0000000000000036 __vector_4
|
||||
0x0000000000000036 __vector_9
|
||||
0x0000000000000036 __vector_2
|
||||
0x0000000000000036 __vector_15
|
||||
0x0000000000000036 __vector_8
|
||||
0x0000000000000036 __vector_14
|
||||
0x0000000000000036 __vector_10
|
||||
0x0000000000000036 __vector_16
|
||||
0x0000000000000036 __vector_18
|
||||
.text 0x0000000000000038 0x0 main.o
|
||||
.text 0x0000000000000038 0x4c uart.o
|
||||
0x0000000000000038 systemUartInit
|
||||
0x0000000000000060 systemUartTransmit
|
||||
0x0000000000000068 systemUartRecive
|
||||
0x0000000000000070 USART0_RX_vect
|
||||
.text 0x0000000000000084 0xb6 delay.o
|
||||
0x0000000000000084 systemDelay10ms
|
||||
0x000000000000009a systemDelay1s
|
||||
0x00000000000000ae systemDelay100ms
|
||||
0x00000000000000c2 systemDelay1ms
|
||||
0x00000000000000d8 systemDelay10us
|
||||
0x00000000000000ea systemDelay100us
|
||||
0x00000000000000fe systemDelay1us
|
||||
0x0000000000000110 systemDelay05us
|
||||
0x0000000000000122 systemDelay01us
|
||||
0x000000000000012e systemDelay16
|
||||
0x0000000000000134 systemDelay8
|
||||
.text 0x000000000000013a 0x1d6 dbt03.o
|
||||
0x000000000000016c systemDbt03Init
|
||||
0x0000000000000182 systemDbt03Transmit
|
||||
0x00000000000001d4 systemDbt03Receive
|
||||
0x0000000000000230 systemDbt03ConnectionOk
|
||||
0x000000000000026c systemDbt03ConnectionTerminate
|
||||
0x0000000000000270 __vector_1
|
||||
.text 0x0000000000000310 0x20 ctrl.o
|
||||
0x0000000000000310 systemCtrlInit
|
||||
0x000000000000031a systemCtrlReady
|
||||
0x000000000000031e systemCtrlCheckInhibit
|
||||
0x0000000000000328 systemCtrlCheckTerminate
|
||||
.text 0x0000000000000330 0x0 /usr/lib/gcc/avr/4.8.2/avr4/libgcc.a(_exit.o)
|
||||
0x0000000000000330 . = ALIGN (0x2)
|
||||
*(.text.*)
|
||||
.text.startup 0x0000000000000330 0x24 main.o
|
||||
0x0000000000000330 main
|
||||
.text.libgcc.mul
|
||||
0x0000000000000354 0x0 /usr/lib/gcc/avr/4.8.2/avr4/libgcc.a(_exit.o)
|
||||
.text.libgcc.div
|
||||
0x0000000000000354 0x0 /usr/lib/gcc/avr/4.8.2/avr4/libgcc.a(_exit.o)
|
||||
.text.libgcc 0x0000000000000354 0x0 /usr/lib/gcc/avr/4.8.2/avr4/libgcc.a(_exit.o)
|
||||
.text.libgcc.prologue
|
||||
0x0000000000000354 0x0 /usr/lib/gcc/avr/4.8.2/avr4/libgcc.a(_exit.o)
|
||||
.text.libgcc.builtins
|
||||
0x0000000000000354 0x0 /usr/lib/gcc/avr/4.8.2/avr4/libgcc.a(_exit.o)
|
||||
.text.libgcc.fmul
|
||||
0x0000000000000354 0x0 /usr/lib/gcc/avr/4.8.2/avr4/libgcc.a(_exit.o)
|
||||
.text.libgcc.fixed
|
||||
0x0000000000000354 0x0 /usr/lib/gcc/avr/4.8.2/avr4/libgcc.a(_exit.o)
|
||||
0x0000000000000354 . = ALIGN (0x2)
|
||||
*(.fini9)
|
||||
.fini9 0x0000000000000354 0x0 /usr/lib/gcc/avr/4.8.2/avr4/libgcc.a(_exit.o)
|
||||
0x0000000000000354 exit
|
||||
0x0000000000000354 _exit
|
||||
*(.fini9)
|
||||
*(.fini8)
|
||||
*(.fini8)
|
||||
*(.fini7)
|
||||
*(.fini7)
|
||||
*(.fini6)
|
||||
*(.fini6)
|
||||
*(.fini5)
|
||||
*(.fini5)
|
||||
*(.fini4)
|
||||
*(.fini4)
|
||||
*(.fini3)
|
||||
*(.fini3)
|
||||
*(.fini2)
|
||||
*(.fini2)
|
||||
*(.fini1)
|
||||
*(.fini1)
|
||||
*(.fini0)
|
||||
.fini0 0x0000000000000354 0x4 /usr/lib/gcc/avr/4.8.2/avr4/libgcc.a(_exit.o)
|
||||
*(.fini0)
|
||||
0x0000000000000358 _etext = .
|
||||
|
||||
.data 0x0000000000800060 0x0 load address 0x0000000000000358
|
||||
0x0000000000800060 PROVIDE (__data_start, .)
|
||||
*(.data)
|
||||
.data 0x0000000000800060 0x0 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
.data 0x0000000000800060 0x0 main.o
|
||||
.data 0x0000000000800060 0x0 uart.o
|
||||
.data 0x0000000000800060 0x0 delay.o
|
||||
.data 0x0000000000800060 0x0 dbt03.o
|
||||
.data 0x0000000000800060 0x0 ctrl.o
|
||||
.data 0x0000000000800060 0x0 /usr/lib/gcc/avr/4.8.2/avr4/libgcc.a(_exit.o)
|
||||
*(.data*)
|
||||
*(.rodata)
|
||||
*(.rodata*)
|
||||
*(.gnu.linkonce.d*)
|
||||
0x0000000000800060 . = ALIGN (0x2)
|
||||
0x0000000000800060 _edata = .
|
||||
0x0000000000800060 PROVIDE (__data_end, .)
|
||||
|
||||
.bss 0x0000000000800060 0x0
|
||||
0x0000000000800060 PROVIDE (__bss_start, .)
|
||||
*(.bss)
|
||||
.bss 0x0000000000800060 0x0 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
.bss 0x0000000000800060 0x0 main.o
|
||||
.bss 0x0000000000800060 0x0 uart.o
|
||||
.bss 0x0000000000800060 0x0 delay.o
|
||||
.bss 0x0000000000800060 0x0 dbt03.o
|
||||
.bss 0x0000000000800060 0x0 ctrl.o
|
||||
.bss 0x0000000000800060 0x0 /usr/lib/gcc/avr/4.8.2/avr4/libgcc.a(_exit.o)
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
0x0000000000800060 PROVIDE (__bss_end, .)
|
||||
0x0000000000000358 __data_load_start = LOADADDR (.data)
|
||||
0x0000000000000358 __data_load_end = (__data_load_start + SIZEOF (.data))
|
||||
|
||||
.noinit 0x0000000000800060 0x0
|
||||
0x0000000000800060 PROVIDE (__noinit_start, .)
|
||||
*(.noinit*)
|
||||
0x0000000000800060 PROVIDE (__noinit_end, .)
|
||||
0x0000000000800060 _end = .
|
||||
0x0000000000800060 PROVIDE (__heap_start, .)
|
||||
|
||||
.eeprom 0x0000000000810000 0x0
|
||||
*(.eeprom*)
|
||||
0x0000000000810000 __eeprom_end = .
|
||||
|
||||
.fuse
|
||||
*(.fuse)
|
||||
*(.lfuse)
|
||||
*(.hfuse)
|
||||
*(.efuse)
|
||||
|
||||
.lock
|
||||
*(.lock*)
|
||||
|
||||
.signature
|
||||
*(.signature*)
|
||||
|
||||
.user_signatures
|
||||
*(.user_signatures*)
|
||||
|
||||
.stab 0x0000000000000000 0x6cc
|
||||
*(.stab)
|
||||
.stab 0x0000000000000000 0x6cc /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
|
||||
.stabstr 0x0000000000000000 0x54
|
||||
*(.stabstr)
|
||||
.stabstr 0x0000000000000000 0x54 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
|
||||
.stab.excl
|
||||
*(.stab.excl)
|
||||
|
||||
.stab.exclstr
|
||||
*(.stab.exclstr)
|
||||
|
||||
.stab.index
|
||||
*(.stab.index)
|
||||
|
||||
.stab.indexstr
|
||||
*(.stab.indexstr)
|
||||
|
||||
.comment 0x0000000000000000 0x11
|
||||
*(.comment)
|
||||
.comment 0x0000000000000000 0x11 main.o
|
||||
0x12 (size before relaxing)
|
||||
.comment 0x0000000000000000 0x12 uart.o
|
||||
.comment 0x0000000000000000 0x12 delay.o
|
||||
.comment 0x0000000000000000 0x12 dbt03.o
|
||||
.comment 0x0000000000000000 0x12 ctrl.o
|
||||
|
||||
.debug
|
||||
*(.debug)
|
||||
|
||||
.line
|
||||
*(.line)
|
||||
|
||||
.debug_srcinfo
|
||||
*(.debug_srcinfo)
|
||||
|
||||
.debug_sfnames
|
||||
*(.debug_sfnames)
|
||||
|
||||
.debug_aranges
|
||||
*(.debug_aranges)
|
||||
|
||||
.debug_pubnames
|
||||
*(.debug_pubnames)
|
||||
|
||||
.debug_info
|
||||
*(.debug_info)
|
||||
*(.gnu.linkonce.wi.*)
|
||||
|
||||
.debug_abbrev
|
||||
*(.debug_abbrev)
|
||||
|
||||
.debug_line
|
||||
*(.debug_line)
|
||||
|
||||
.debug_frame
|
||||
*(.debug_frame)
|
||||
|
||||
.debug_str
|
||||
*(.debug_str)
|
||||
|
||||
.debug_loc
|
||||
*(.debug_loc)
|
||||
|
||||
.debug_macinfo
|
||||
*(.debug_macinfo)
|
||||
|
||||
.debug_pubtypes
|
||||
*(.debug_pubtypes)
|
||||
|
||||
.debug_ranges
|
||||
*(.debug_ranges)
|
||||
|
||||
.debug_macro
|
||||
*(.debug_macro)
|
||||
OUTPUT(main.elf elf32-avr)
|
||||
LOAD linker stubs
|
||||
|
||||
Cross Reference Table
|
||||
|
||||
Symbol File
|
||||
USART0_RX_vect uart.o
|
||||
__bad_interrupt /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__heap_end /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__init /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__stack /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__vector_1 dbt03.o
|
||||
/usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__vector_10 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__vector_11 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__vector_12 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__vector_13 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__vector_14 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__vector_15 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__vector_16 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__vector_17 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__vector_18 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__vector_2 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__vector_3 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__vector_4 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__vector_5 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__vector_6 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__vector_7 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__vector_8 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__vector_9 /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__vector_default /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
__vectors /usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
_exit /usr/lib/gcc/avr/4.8.2/avr4/libgcc.a(_exit.o)
|
||||
exit /usr/lib/gcc/avr/4.8.2/avr4/libgcc.a(_exit.o)
|
||||
/usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
main main.o
|
||||
/usr/lib/gcc/avr/4.8.2/../../../avr/lib/avr4/crtm8.o
|
||||
systemCtrlCheckInhibit ctrl.o
|
||||
dbt03.o
|
||||
systemCtrlCheckTerminate ctrl.o
|
||||
main.o
|
||||
systemCtrlInit ctrl.o
|
||||
main.o
|
||||
systemCtrlReady ctrl.o
|
||||
main.o
|
||||
systemDbt03ConnectionOk dbt03.o
|
||||
main.o
|
||||
systemDbt03ConnectionTerminate dbt03.o
|
||||
main.o
|
||||
systemDbt03Init dbt03.o
|
||||
main.o
|
||||
systemDbt03Receive dbt03.o
|
||||
systemDbt03Transmit dbt03.o
|
||||
main.o
|
||||
systemDelay01us delay.o
|
||||
systemDelay05us delay.o
|
||||
systemDelay100ms delay.o
|
||||
dbt03.o
|
||||
systemDelay100us delay.o
|
||||
dbt03.o
|
||||
systemDelay10ms delay.o
|
||||
systemDelay10us delay.o
|
||||
dbt03.o
|
||||
systemDelay16 delay.o
|
||||
systemDelay1ms delay.o
|
||||
systemDelay1s delay.o
|
||||
systemDelay1us delay.o
|
||||
systemDelay8 delay.o
|
||||
systemUartInit uart.o
|
||||
main.o
|
||||
systemUartRecive uart.o
|
||||
main.o
|
||||
systemUartTransmit uart.o
|
||||
dbt03.o
|
||||
main.o
|
91
firmware/main.sym
Normal file
91
firmware/main.sym
Normal file
@@ -0,0 +1,91 @@
|
||||
00000000 W __heap_end
|
||||
00000000 a __tmp_reg__
|
||||
00000000 a __tmp_reg__
|
||||
00000000 a __tmp_reg__
|
||||
00000000 a __tmp_reg__
|
||||
00000000 a __tmp_reg__
|
||||
00000000 W __vector_default
|
||||
00000000 T __vectors
|
||||
00000001 a __zero_reg__
|
||||
00000001 a __zero_reg__
|
||||
00000001 a __zero_reg__
|
||||
00000001 a __zero_reg__
|
||||
00000001 a __zero_reg__
|
||||
00000026 T __ctors_end
|
||||
00000026 T __ctors_start
|
||||
00000026 T __dtors_end
|
||||
00000026 T __dtors_start
|
||||
00000026 W __init
|
||||
00000026 T __trampolines_end
|
||||
00000026 T __trampolines_start
|
||||
00000036 T __bad_interrupt
|
||||
00000036 W __vector_10
|
||||
00000036 W __vector_11
|
||||
00000036 W __vector_12
|
||||
00000036 W __vector_13
|
||||
00000036 W __vector_14
|
||||
00000036 W __vector_15
|
||||
00000036 W __vector_16
|
||||
00000036 W __vector_17
|
||||
00000036 W __vector_18
|
||||
00000036 W __vector_2
|
||||
00000036 W __vector_3
|
||||
00000036 W __vector_4
|
||||
00000036 W __vector_5
|
||||
00000036 W __vector_6
|
||||
00000036 W __vector_7
|
||||
00000036 W __vector_8
|
||||
00000036 W __vector_9
|
||||
00000038 T systemUartInit
|
||||
0000003d a __SP_L__
|
||||
0000003d a __SP_L__
|
||||
0000003d a __SP_L__
|
||||
0000003d a __SP_L__
|
||||
0000003d a __SP_L__
|
||||
0000003e a __SP_H__
|
||||
0000003e a __SP_H__
|
||||
0000003e a __SP_H__
|
||||
0000003e a __SP_H__
|
||||
0000003e a __SP_H__
|
||||
0000003f a __SREG__
|
||||
0000003f a __SREG__
|
||||
0000003f a __SREG__
|
||||
0000003f a __SREG__
|
||||
0000003f a __SREG__
|
||||
00000060 T systemUartTransmit
|
||||
00000068 T systemUartRecive
|
||||
00000070 T USART0_RX_vect
|
||||
00000084 T systemDelay10ms
|
||||
0000009a T systemDelay1s
|
||||
000000ae T systemDelay100ms
|
||||
000000c2 T systemDelay1ms
|
||||
000000d8 T systemDelay10us
|
||||
000000ea T systemDelay100us
|
||||
000000fe T systemDelay1us
|
||||
00000110 T systemDelay05us
|
||||
00000122 T systemDelay01us
|
||||
0000012e T systemDelay16
|
||||
00000134 T systemDelay8
|
||||
0000013a t dbt03IoCtrl.part.0
|
||||
0000013e t dbt03Dialtone
|
||||
0000016c T systemDbt03Init
|
||||
00000182 T systemDbt03Transmit
|
||||
000001d4 T systemDbt03Receive
|
||||
00000230 T systemDbt03ConnectionOk
|
||||
0000026c T systemDbt03ConnectionTerminate
|
||||
00000270 T __vector_1
|
||||
00000310 T systemCtrlInit
|
||||
0000031a T systemCtrlReady
|
||||
0000031e T systemCtrlCheckInhibit
|
||||
00000328 T systemCtrlCheckTerminate
|
||||
00000330 T main
|
||||
00000354 W exit
|
||||
00000354 T _exit
|
||||
00000356 t __stop_program
|
||||
00000358 A __data_load_end
|
||||
00000358 A __data_load_start
|
||||
00000358 T _etext
|
||||
0000045f W __stack
|
||||
00800060 D _edata
|
||||
00800060 D _end
|
||||
00810000 D __eeprom_end
|
88
firmware/uart.c
Normal file
88
firmware/uart.c
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
####################################################################################
|
||||
# #
|
||||
# Bildschirmtricks Firmware V1.0.0 #
|
||||
# Uart-Handler #
|
||||
# #
|
||||
# Copyright (C) 2008 Philipp Fabian Benedikt Maier (aka. Dexter) #
|
||||
# #
|
||||
# This program is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program; if not, write to the Free Software #
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #
|
||||
# #
|
||||
#################################################################################### */
|
||||
|
||||
|
||||
/* ## HEADER ########################################################################## */
|
||||
#include <avr/io.h> /* Include I/O definitions */
|
||||
#include <avr/interrupt.h> /* Include Interrupt control */
|
||||
#include <stdint.h> /* Include Integer types */
|
||||
#include <stdbool.h> /* Include Boolean types */
|
||||
#include <util/delay.h> /* Include delay functions */
|
||||
|
||||
#include "uart.h" /* Include own header file */
|
||||
/* #################################################################################### */
|
||||
|
||||
|
||||
/* ## INITALIZE UART INTERFACE ######################################################## */
|
||||
/* Initalize UART */
|
||||
void systemUartInit(uint16_t UartBaudrate)
|
||||
{
|
||||
UCSRC |= (1<<USBS); /* Configure UART to operate in asynchronous mode */
|
||||
|
||||
UCSRC &= ~(0<<UCSZ2); /* Configure UART ... */
|
||||
UCSRC |= (1<<UCSZ1); /* ...to operate */
|
||||
UCSRC |= (1<<UCSZ0); /* ...with 8 data bits */
|
||||
|
||||
UCSRC &= ~(0<<UPM1); /* don't know what... */
|
||||
UCSRC &= ~(0<<UPM0); /* ...this funny bits do */
|
||||
|
||||
UBRRH = (uint8_t)(UartBaudrate >> 8); /* Configure UART0... */
|
||||
UBRRL = (uint8_t)(UartBaudrate & 0x00FF); /* ... to selected baudrate */
|
||||
|
||||
UCSRB |= (1<<TXEN); /* Enable transmitter of UART */
|
||||
UCSRB |= (1<<RXEN); /* Enable reviver of UART */
|
||||
|
||||
/* DISABLED: UCSRB |= (1<<RXCIE); */ /* Enable reciver interrupt */
|
||||
/* DISABLED: UCSRA |= (1<<U2X); */ /* Enable doubble speed */
|
||||
}
|
||||
/* #################################################################################### */
|
||||
|
||||
|
||||
/* ## TRANSMIT TROUGH UART INTERFACES ################################################# */
|
||||
void systemUartTransmit(uint8_t byte2transmit)
|
||||
{
|
||||
while ( !( UCSRA & (1<<UDRE)) ) /* Wait till the interface becomes ready */
|
||||
{
|
||||
}
|
||||
UDR = byte2transmit; /* Transmit byte */
|
||||
}
|
||||
/* #################################################################################### */
|
||||
|
||||
|
||||
/* ## RECIVE TROUGH UART INTERFACES ################################################### */
|
||||
uint8_t systemUartRecive(void)
|
||||
{
|
||||
while (!(UCSRA & (1<<RXC))); /* Wait until a byte is recived, always true on ISR call */
|
||||
return UDR; /* Return the recived byte */
|
||||
}
|
||||
/* #################################################################################### */
|
||||
|
||||
|
||||
/* ## RECIVER INTERRUPT SERVICE ROUTINES ############################################## */
|
||||
/* ISR for UART0 */
|
||||
ISR(USART0_RX_vect)
|
||||
{
|
||||
/* This interrupt service routine is not used, so it is left empty */
|
||||
}
|
||||
/* #################################################################################### */
|
36
firmware/uart.h
Normal file
36
firmware/uart.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
####################################################################################
|
||||
# #
|
||||
# Bildschirmtricks Firmware V1.0.0 #
|
||||
# Uart-Handler #
|
||||
# #
|
||||
# Copyright (C) 2008 Philipp Fabian Benedikt Maier (aka. Dexter) #
|
||||
# #
|
||||
# This program is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program; if not, write to the Free Software #
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #
|
||||
# #
|
||||
#################################################################################### */
|
||||
|
||||
|
||||
/* ## HEADER ########################################################################## */
|
||||
#ifndef UART_H
|
||||
#define UART_H
|
||||
|
||||
void systemUartInit(uint16_t UartBaudrate); /* Initalize UART */
|
||||
void systemUartTransmit(uint8_t byte2transmit); /* Transmit a byte */
|
||||
uint8_t systemUartRecive(void); /* Receive a byte */
|
||||
|
||||
#endif /*UART_H*/
|
||||
/* #################################################################################### */
|
||||
|
86
firmware/uart.lst
Normal file
86
firmware/uart.lst
Normal file
@@ -0,0 +1,86 @@
|
||||
1 .file "uart.c"
|
||||
2 __SP_H__ = 0x3e
|
||||
3 __SP_L__ = 0x3d
|
||||
4 __SREG__ = 0x3f
|
||||
5 __tmp_reg__ = 0
|
||||
6 __zero_reg__ = 1
|
||||
7 .text
|
||||
8 .global systemUartInit
|
||||
10 systemUartInit:
|
||||
11 /* prologue: function */
|
||||
12 /* frame size = 0 */
|
||||
13 /* stack size = 0 */
|
||||
14 .L__stack_usage = 0
|
||||
15 0000 20B5 in r18,0x20
|
||||
16 0002 2860 ori r18,lo8(8)
|
||||
17 0004 20BD out 0x20,r18
|
||||
18 0006 20B5 in r18,0x20
|
||||
19 0008 20BD out 0x20,r18
|
||||
20 000a 20B5 in r18,0x20
|
||||
21 000c 2460 ori r18,lo8(4)
|
||||
22 000e 20BD out 0x20,r18
|
||||
23 0010 20B5 in r18,0x20
|
||||
24 0012 2260 ori r18,lo8(2)
|
||||
25 0014 20BD out 0x20,r18
|
||||
26 0016 20B5 in r18,0x20
|
||||
27 0018 20BD out 0x20,r18
|
||||
28 001a 20B5 in r18,0x20
|
||||
29 001c 20BD out 0x20,r18
|
||||
30 001e 90BD out 0x20,r25
|
||||
31 0020 89B9 out 0x9,r24
|
||||
32 0022 539A sbi 0xa,3
|
||||
33 0024 549A sbi 0xa,4
|
||||
34 0026 0895 ret
|
||||
36 .global systemUartTransmit
|
||||
38 systemUartTransmit:
|
||||
39 /* prologue: function */
|
||||
40 /* frame size = 0 */
|
||||
41 /* stack size = 0 */
|
||||
42 .L__stack_usage = 0
|
||||
43 .L4:
|
||||
44 0028 5D9B sbis 0xb,5
|
||||
45 002a 00C0 rjmp .L4
|
||||
46 002c 8CB9 out 0xc,r24
|
||||
47 002e 0895 ret
|
||||
49 .global systemUartRecive
|
||||
51 systemUartRecive:
|
||||
52 /* prologue: function */
|
||||
53 /* frame size = 0 */
|
||||
54 /* stack size = 0 */
|
||||
55 .L__stack_usage = 0
|
||||
56 .L8:
|
||||
57 0030 5F9B sbis 0xb,7
|
||||
58 0032 00C0 rjmp .L8
|
||||
59 0034 8CB1 in r24,0xc
|
||||
60 0036 0895 ret
|
||||
62 .global USART0_RX_vect
|
||||
64 USART0_RX_vect:
|
||||
65 0038 1F92 push r1
|
||||
66 003a 0F92 push r0
|
||||
67 003c 0FB6 in r0,__SREG__
|
||||
68 003e 0F92 push r0
|
||||
69 0040 1124 clr __zero_reg__
|
||||
70 /* prologue: Signal */
|
||||
71 /* frame size = 0 */
|
||||
72 /* stack size = 3 */
|
||||
73 .L__stack_usage = 3
|
||||
74 /* epilogue start */
|
||||
75 0042 0F90 pop r0
|
||||
76 0044 0FBE out __SREG__,r0
|
||||
77 0046 0F90 pop r0
|
||||
78 0048 1F90 pop r1
|
||||
79 004a 1895 reti
|
||||
81 .ident "GCC: (GNU) 4.8.2"
|
||||
DEFINED SYMBOLS
|
||||
*ABS*:0000000000000000 uart.c
|
||||
/tmp/ccg2IVBH.s:2 *ABS*:000000000000003e __SP_H__
|
||||
/tmp/ccg2IVBH.s:3 *ABS*:000000000000003d __SP_L__
|
||||
/tmp/ccg2IVBH.s:4 *ABS*:000000000000003f __SREG__
|
||||
/tmp/ccg2IVBH.s:5 *ABS*:0000000000000000 __tmp_reg__
|
||||
/tmp/ccg2IVBH.s:6 *ABS*:0000000000000001 __zero_reg__
|
||||
/tmp/ccg2IVBH.s:10 .text:0000000000000000 systemUartInit
|
||||
/tmp/ccg2IVBH.s:38 .text:0000000000000028 systemUartTransmit
|
||||
/tmp/ccg2IVBH.s:51 .text:0000000000000030 systemUartRecive
|
||||
/tmp/ccg2IVBH.s:64 .text:0000000000000038 USART0_RX_vect
|
||||
|
||||
NO UNDEFINED SYMBOLS
|
Reference in New Issue
Block a user