From 7e9907caa1b40f2b846d357ab84833b6f49a8473 Mon Sep 17 00:00:00 2001
From: Mike Naberezny <mike@naberezny.com>
Date: Thu, 12 Oct 2023 22:28:05 -0700
Subject: [PATCH] Build using ASxxxx 5.50

---
 .github/workflows/main.yml | 4 ++--
 firmware/Makefile          | 7 +------
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 7a89298..c2f7b1a 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -11,8 +11,8 @@ jobs:
 
     - name: Install asxxxx
       run: |
-        wget --no-verbose --content-disposition https://github.com/6502org/6502.org/blob/849e49b56798da9f81d5f0a6c0a40f84668a5d6d/public/tools/asm/asxv5p40_20211216.zip?raw=true
-        unzip -q asxv5p40_20211216.zip
+        wget --no-verbose https://github.com/6502org/6502.org/raw/74f5d0c0f9b73d5e353bde7b3b25ea7f43b527a1/public/tools/asm/asxs5p50.zip
+        unzip -q asxs5p50.zip
         make -C asxv5pxx/asxmak/linux/build all
         echo "$PWD/asxv5pxx/asxmak/linux/build" >> $GITHUB_PATH
 
diff --git a/firmware/Makefile b/firmware/Makefile
index 9fa2544..24621bf 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -9,11 +9,6 @@ ifeq ($(MCU),t212)
 # attiny212 flash 0x0000-0x07ff
 CRC16ADDR=0x07fe
 DEFSFILE=tn212def.asm
-else ifeq ($(MCU),t412)
-# attiny412 flash 0x0000-0x0fff
-CRC16ADDR=0x0ffe
-DEFSFILE=tn412def.asm
-else
 $(error Unrecognized MCU value)
 endif
 
@@ -28,7 +23,7 @@ program: $(PROJECT_FLASH).hex $(PROJECT_FUSES).hex
 
 $(PROJECT_FLASH).hex: main.asm
 	# add -i ".list" before -i ".include '$(DEFSFILE)'" to see it in the listing output
-	asavr -l -p -w -i ".include '$(DEFSFILE)'" -o $(PROJECT_FLASH) main.asm
+	asavr -l -p -w -i ".include '$(DEFSFILE)'" -o+$(PROJECT_FLASH) main.asm
 	aslink -i $(PROJECT_FLASH)
 	# srec_cat adds crc16 (requires srecord 1.64 or later)
 	srec_cat $(PROJECT_FLASH).ihx -intel -CRC16_Big_Endian $(CRC16ADDR) -broken -o $(PROJECT_FLASH).hex -intel -line-length=76 -crlf