diff --git a/avr/0BUILD b/avr/0BUILD index c4f840d..fa815ca 100644 --- a/avr/0BUILD +++ b/avr/0BUILD @@ -39,7 +39,7 @@ - + -I $(builddir) @@ -49,25 +49,7 @@ - att84_base.asm - - - - - - - - - - - -I $(builddir) - -I $(srcdir) - -I $(topsrcdir)/avr - - - - - att84_testflashimg.asm + att84_bootloader.asm diff --git a/avr/att84_base.asm b/avr/att84_bootloader.asm similarity index 92% rename from avr/att84_base.asm rename to avr/att84_bootloader.asm index 34ae2b9..a26b7d9 100644 --- a/avr/att84_base.asm +++ b/avr/att84_bootloader.asm @@ -39,8 +39,8 @@ .include "common/utils_wait.asm" -.include "modules/com2/com2_defs.asm" -.include "modules/comproto/comproto_defs.asm" +.include "modules/com2/defs.asm" +.include "modules/comproto/defs.asm" @@ -159,12 +159,12 @@ main: ; *************************************************************************** ; includes -.include "modules/com2/com2_lowlevel.asm" -.include "modules/com2/com2_crc.asm" -.include "modules/com2/com2_packets.asm" +.include "modules/com2/lowlevel.asm" +.include "modules/com2/crc.asm" +.include "modules/com2/packets.asm" .include "common/crc8.asm" -.include "modules/flash/flash.asm" -.include "modules/flash/flashproto.asm" +.include "modules/flash/main.asm" +.include "modules/flash/proto.asm" diff --git a/avr/att84_temp1.asm b/avr/att84_temp1.asm index b5802de..770c882 100644 --- a/avr/att84_temp1.asm +++ b/avr/att84_temp1.asm @@ -208,39 +208,39 @@ firmwareStart: rjmp main .include "common/crc8.asm" #ifdef MODULES_TIMER - .include "modules/timer/timer.asm" + .include "modules/timer/main.asm" #endif #ifdef MODULES_LED -.include "modules/led/led.asm" +.include "modules/led/main.asm" #endif #ifdef MODULES_COM - .include "modules/com2/com2_defs.asm" - .include "modules/com2/com2.asm" + .include "modules/com2/defs.asm" + .include "modules/com2/main.asm" #ifdef MODULES_COM_WITH_ADDR_PROTO - .include "modules/comproto/comproto_defs.asm" - .include "modules/comproto/comproto.asm" - .include "modules/comproto/comproto_addr.asm" - .include "modules/comproto/comproto_recvstats.asm" - .include "modules/comproto/comproto_sendstats.asm" - .include "modules/comproto/comproto_sysstats.asm" - .include "modules/comproto/comproto_memstats.asm" - .include "modules/comproto/comproto_pong.asm" - .include "modules/comproto/comproto_values.asm" - .include "modules/comproto/comproto_device.asm" - .include "modules/comproto/comproto_reboot.asm" + .include "modules/comproto/defs.asm" + .include "modules/comproto/main.asm" + .include "modules/comproto/addr.asm" + .include "modules/comproto/msg_recvstats.asm" + .include "modules/comproto/msg_sendstats.asm" + .include "modules/comproto/msg_sysstats.asm" + .include "modules/comproto/msg_memstats.asm" + .include "modules/comproto/msg_pong.asm" + .include "modules/comproto/msg_value.asm" + .include "modules/comproto/msg_device.asm" + .include "modules/comproto/msg_reboot.asm" #endif #endif #ifdef MODULES_TWI_MASTER - .include "modules/twimaster/twimaster.asm" + .include "modules/twimaster/main.asm" #endif #ifdef MODULES_LCD - .include "modules/lcd/lcd.asm" + .include "modules/lcd/main.asm" #endif #ifdef MODULES_SI7021 - .include "modules/si7021/si7021.asm" + .include "modules/si7021/main.asm" #endif #ifdef MODULES_STATS - .include "modules/stats/stats.asm" + .include "modules/stats/main.asm" #endif diff --git a/avr/att84_testflashimg.asm b/avr/att84_testflashimg.asm deleted file mode 100644 index ca35ea0..0000000 --- a/avr/att84_testflashimg.asm +++ /dev/null @@ -1,39 +0,0 @@ -.nolist -.include "include/tn84def.inc" ; Define device ATtiny84 -.list - -; *************************************************************************** -; defines - -; --------------------------------------------------------------------------- -; generic - -.equ clock=1000000 ; Define the clock frequency - - - -; *************************************************************************** -; code segment - -.cseg -.org 0x0200 - - -.db 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 -.db 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 -.db 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27 -.db 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37 - -.db 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47 -.db 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57 -.db 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67 -.db 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77 - -.db 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87 -.db 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97 - - - - - - diff --git a/avr/modules/com2/com2_buffer.asm b/avr/modules/com2/buffer.asm similarity index 100% rename from avr/modules/com2/com2_buffer.asm rename to avr/modules/com2/buffer.asm diff --git a/avr/modules/com2/com2_crc.asm b/avr/modules/com2/crc.asm similarity index 100% rename from avr/modules/com2/com2_crc.asm rename to avr/modules/com2/crc.asm diff --git a/avr/modules/com2/com2_defs.asm b/avr/modules/com2/defs.asm similarity index 100% rename from avr/modules/com2/com2_defs.asm rename to avr/modules/com2/defs.asm diff --git a/avr/modules/com2/com2_lowlevel.asm b/avr/modules/com2/lowlevel.asm similarity index 100% rename from avr/modules/com2/com2_lowlevel.asm rename to avr/modules/com2/lowlevel.asm diff --git a/avr/modules/com2/com2.asm b/avr/modules/com2/main.asm similarity index 98% rename from avr/modules/com2/com2.asm rename to avr/modules/com2/main.asm index a872f0e..6605f2a 100644 --- a/avr/modules/com2/com2.asm +++ b/avr/modules/com2/main.asm @@ -420,10 +420,10 @@ com2IsrPcint0_end: -.include "modules/com2/com2_packets.asm" -.include "modules/com2/com2_lowlevel.asm" -.include "modules/com2/com2_buffer.asm" -.include "modules/com2/com2_crc.asm" +.include "modules/com2/packets.asm" +.include "modules/com2/lowlevel.asm" +.include "modules/com2/buffer.asm" +.include "modules/com2/crc.asm" diff --git a/avr/modules/com2/com2_packets.asm b/avr/modules/com2/packets.asm similarity index 100% rename from avr/modules/com2/com2_packets.asm rename to avr/modules/com2/packets.asm diff --git a/avr/MESSAGES b/avr/modules/comproto/MESSAGES similarity index 100% rename from avr/MESSAGES rename to avr/modules/comproto/MESSAGES diff --git a/avr/modules/comproto/comproto_addr.asm b/avr/modules/comproto/addr.asm similarity index 99% rename from avr/modules/comproto/comproto_addr.asm rename to avr/modules/comproto/addr.asm index 2039df1..e51db8a 100644 --- a/avr/modules/comproto/comproto_addr.asm +++ b/avr/modules/comproto/addr.asm @@ -425,8 +425,8 @@ cproSendAddressPacket: -.include "modules/comproto/comproto_addr1.asm" -.include "modules/comproto/comproto_addr2.asm" +.include "modules/comproto/addr1.asm" +.include "modules/comproto/addr2.asm" #endif ; MODULES_COM_WITH_ADDR_PROTO diff --git a/avr/modules/comproto/comproto_addr1.asm b/avr/modules/comproto/addr1.asm similarity index 100% rename from avr/modules/comproto/comproto_addr1.asm rename to avr/modules/comproto/addr1.asm diff --git a/avr/modules/comproto/comproto_addr2.asm b/avr/modules/comproto/addr2.asm similarity index 100% rename from avr/modules/comproto/comproto_addr2.asm rename to avr/modules/comproto/addr2.asm diff --git a/avr/modules/comproto/comproto_defs.asm b/avr/modules/comproto/defs.asm similarity index 100% rename from avr/modules/comproto/comproto_defs.asm rename to avr/modules/comproto/defs.asm diff --git a/avr/modules/comproto/comproto.asm b/avr/modules/comproto/main.asm similarity index 100% rename from avr/modules/comproto/comproto.asm rename to avr/modules/comproto/main.asm diff --git a/avr/modules/comproto/comproto_debug.asm b/avr/modules/comproto/msg_debug.asm similarity index 100% rename from avr/modules/comproto/comproto_debug.asm rename to avr/modules/comproto/msg_debug.asm diff --git a/avr/modules/comproto/comproto_device.asm b/avr/modules/comproto/msg_device.asm similarity index 100% rename from avr/modules/comproto/comproto_device.asm rename to avr/modules/comproto/msg_device.asm diff --git a/avr/modules/comproto/comproto_memstats.asm b/avr/modules/comproto/msg_memstats.asm similarity index 100% rename from avr/modules/comproto/comproto_memstats.asm rename to avr/modules/comproto/msg_memstats.asm diff --git a/avr/modules/comproto/comproto_ping.asm b/avr/modules/comproto/msg_ping.asm similarity index 100% rename from avr/modules/comproto/comproto_ping.asm rename to avr/modules/comproto/msg_ping.asm diff --git a/avr/modules/comproto/comproto_pong.asm b/avr/modules/comproto/msg_pong.asm similarity index 100% rename from avr/modules/comproto/comproto_pong.asm rename to avr/modules/comproto/msg_pong.asm diff --git a/avr/modules/comproto/comproto_reboot.asm b/avr/modules/comproto/msg_reboot.asm similarity index 100% rename from avr/modules/comproto/comproto_reboot.asm rename to avr/modules/comproto/msg_reboot.asm diff --git a/avr/modules/comproto/comproto_recvstats.asm b/avr/modules/comproto/msg_recvstats.asm similarity index 100% rename from avr/modules/comproto/comproto_recvstats.asm rename to avr/modules/comproto/msg_recvstats.asm diff --git a/avr/modules/comproto/comproto_sendstats.asm b/avr/modules/comproto/msg_sendstats.asm similarity index 100% rename from avr/modules/comproto/comproto_sendstats.asm rename to avr/modules/comproto/msg_sendstats.asm diff --git a/avr/modules/comproto/comproto_sysstats.asm b/avr/modules/comproto/msg_sysstats.asm similarity index 100% rename from avr/modules/comproto/comproto_sysstats.asm rename to avr/modules/comproto/msg_sysstats.asm diff --git a/avr/modules/comproto/comproto_twi.asm b/avr/modules/comproto/msg_twi.asm similarity index 100% rename from avr/modules/comproto/comproto_twi.asm rename to avr/modules/comproto/msg_twi.asm diff --git a/avr/modules/comproto/comproto_values.asm b/avr/modules/comproto/msg_value.asm similarity index 100% rename from avr/modules/comproto/comproto_values.asm rename to avr/modules/comproto/msg_value.asm diff --git a/avr/modules/flash/flash.asm b/avr/modules/flash/main.asm similarity index 100% rename from avr/modules/flash/flash.asm rename to avr/modules/flash/main.asm diff --git a/avr/modules/flash/flashproto.asm b/avr/modules/flash/proto.asm similarity index 100% rename from avr/modules/flash/flashproto.asm rename to avr/modules/flash/proto.asm diff --git a/avr/modules/lcd/lcd.asm b/avr/modules/lcd/main.asm similarity index 100% rename from avr/modules/lcd/lcd.asm rename to avr/modules/lcd/main.asm diff --git a/avr/modules/led/led.asm b/avr/modules/led/main.asm similarity index 100% rename from avr/modules/led/led.asm rename to avr/modules/led/main.asm diff --git a/avr/modules/si7021/si7021.asm b/avr/modules/si7021/main.asm similarity index 100% rename from avr/modules/si7021/si7021.asm rename to avr/modules/si7021/main.asm diff --git a/avr/modules/stats/stats.asm b/avr/modules/stats/main.asm similarity index 100% rename from avr/modules/stats/stats.asm rename to avr/modules/stats/main.asm diff --git a/avr/modules/timer/timer.asm b/avr/modules/timer/main.asm similarity index 100% rename from avr/modules/timer/timer.asm rename to avr/modules/timer/main.asm diff --git a/avr/modules/twimaster/twimaster.asm b/avr/modules/twimaster/main.asm similarity index 100% rename from avr/modules/twimaster/twimaster.asm rename to avr/modules/twimaster/main.asm diff --git a/avr/test1.asm b/avr/test1.asm deleted file mode 100644 index 9890735..0000000 --- a/avr/test1.asm +++ /dev/null @@ -1,237 +0,0 @@ -; *************************************************************************** -; copyright : (C) 2023 by Martin Preuss -; email : martin@libchipcard.de -; -; *************************************************************************** -; * This file is part of the project "AqHome". * -; * Please see toplevel file COPYING of that project for license details. * -; *************************************************************************** - - - - -.nolist -.include "include/tn84def.inc" ; Define device ATtiny84 -.list -; -.equ clock=1000000 ; Define the clock frequency - - - -; *************************************************************************** -; defs about modules used - -.equ MODULE_ID_OS = 0 -.equ MODULE_ID_TIMER = 1 -.equ MODULE_ID_LED_A3 = 2 -.equ MODULE_ID_WAN = 3 -.equ MODULE_ID_PIN = 4 -.equ MODULE_ID_COUNT = 5 - - - -; *************************************************************************** -; defs for OS - -; OS module -.include "os/defs.asm" - - -; timer module -.equ TIMER_ENABLE_100Hz = 1 -.equ TIMER_ENABLE_10Hz = 1 -.equ TIMER_ENABLE_1Hz = 1 - -.include "timer/defs.asm" - - - -; led module -.include "led/defs.asm" - - - -; wan module -.include "wan/defs.asm" - - - -; pin module -.include "pin/defs.asm" - - - -; *************************************************************************** -; data segment - -.dseg -.org SRAM_START - -ledA3Sram: .byte LED_SRAM_SIZE -wanA7A1Sram: .byte WAN_IFACE_SIZE - - - -; *************************************************************************** -; code segment - -.cseg -.org 000000 - -; *************************************************************************** -; Reset and interrupt vectors - - rjmp Main ; Reset vector - reti ; EXT_INT0 - rjmp pinIsrInt0 ; PCI0 - rjmp pinIsrInt1 ; PCI1 - reti ; WATCHDOG - reti ; ICP1 - reti ; OC1A - reti ; OC1B - reti ; OVF1 - rjmp timerIrqOC0A ; OC0A - reti ; OC0B - reti ; OVF0 - reti ; ACI - reti ; ADCC - reti ; ERDY - reti ; USI_STR - reti ; USI_OVF -; -; *************************************************************************** -; Interrupt service routines from modules - -.include "timer/irq.asm" -.include "wan/irq.asm" -.include "pin/irq.asm" - - - -; *************************************************************************** -; Info list of used modules - -osModuleInfoList: - -modInfoOs: - rjmp Os_SignalHandler ; jump to handler - .db MODULE_ID_OS, 0 ; id, reserved byte (0) - .dw 0 ; pointer to flash data - .dw 0 ; pointer to SRAM data - .db "OS ", 0 ; name - -modInfoTimer: - rjmp Timer_SignalHandler ; jump to handler - .db MODULE_ID_TIMER, 0 ; id, reserved byte (0) - .dw 0 ; pointer to flash data - .dw 0 ; pointer to SRAM data - .db "TIMER ", 0 ; name - -modInfoLedA3: - rjmp Led_SignalHandler ; jump to handler - .db MODULE_ID_LED_A3, 0 ; id, reserved byte (0) - .dw ledA3Flash ; pointer to flash data - .dw ledA3Sram ; pointer to SRAM data - .db "LED ", 0 ; name - -modInfoWan: - rjmp Wan_SignalHandler ; jump to handler - .db MODULE_ID_WAN, 0 ; id, reserved byte (0) - .dw wanA7A1Flash ; pointer to flash data - .dw wanA7A1Sram ; pointer to SRAM data - .db "WAN ", 0 ; name - -modInfoPin: - rjmp Pin_SignalHandler ; jump to handler - .db MODULE_ID_PIN, 0 ; id, reserved byte (0) - .dw 0 ; pointer to flash data - .dw 0 ; pointer to SRAM data - .db "PIN ", 0 ; name - - .dw 0 ; end of module list - - - -; *************************************************************************** -; Flash data for modules - -ledA3Flash: .db DDRA+0x20, PORTA+0x20, PINA+0x20, (1<