From bc012bb9fe9f8787db18460dd56f233284c93430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Boczar?= Date: Fri, 29 Nov 2019 15:09:23 +0100 Subject: [PATCH] remove old fx2lib examples --- examples/common.mk | 90 ------------------------ examples/lights/Makefile | 30 -------- examples/lights/README.md | 11 --- examples/lights/TODO | 1 - examples/lights/lights.c | 77 -------------------- examples/serial/Makefile | 31 -------- examples/serial/README.md | 32 --------- examples/serial/docs/serial_diagram.png | Bin 11295 -> 0 bytes examples/serial/serial.c | 74 ------------------- 9 files changed, 346 deletions(-) delete mode 100644 examples/common.mk delete mode 100644 examples/lights/Makefile delete mode 100644 examples/lights/README.md delete mode 100644 examples/lights/TODO delete mode 100644 examples/lights/lights.c delete mode 100644 examples/serial/Makefile delete mode 100644 examples/serial/README.md delete mode 100644 examples/serial/docs/serial_diagram.png delete mode 100644 examples/serial/serial.c diff --git a/examples/common.mk b/examples/common.mk deleted file mode 100644 index ce7a082..0000000 --- a/examples/common.mk +++ /dev/null @@ -1,90 +0,0 @@ -# -# Copyright (C) 2009-2012 Chris McClelland -# Copyright (C) 2015 Joel Stanley -# Copyright (C) 2017 Kyle Robbertze -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation, either version 3 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 Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see . -# - -# To build the firmware you will need: -# SDCC from http://sdcc.sourceforge.net -# Git from https://git-scm.com/ -# -# To load the firmware you will need: -# HDMI2USB-mode-swtich from https://github.com/timvideos/HDMI2USB-mode-switch -# -LIBS ?= $(FX2LIBDIR)/lib/fx2.lib -INCS += -I sdcc -I$(FX2LIBDIR)/include -I. -I../../common/boards - -USE_16K ?= 1 - -CC_OBJS ?= $(CC_SRCS:%.c=%.rel) - -CC = sdcc - -CFLAGS += -mmcs51 --xram-size 0x0200 $(FLAGS) -CFLAGS += -DBOARD_$(BOARD) - -ifeq ($(USE_16K),1) - CFLAGS += --code-size 0x3e00 -else - CFLAGS += --code-size 0x1e00 -endif - -# Use make V=1 for a verbose build. -ifndef V - Q_CC=@echo ' CC ' $@; - Q_AS=@echo ' AS ' $@; - Q_LINK=@echo ' LINK ' $@; - Q_RM=@echo ' CLEAN '; - Q_OBJCOPY=@echo ' OBJCOPY ' $@; - Q_GEN=@echo ' GEN ' $@; -endif - -.PHONY: all clean - -all: $(TARGET).hex - -$(CC_SRCS): $(FX2LIBDIR)/lib/fx2.lib - -$(FX2LIBDIR)/lib/fx2.lib: $(FX2LIBDIR)/.git - cd $(dir $@) && make -j1 - - -# We depend on a file inside the directory as git creates an -# empty dir for us. -# -# Note that although we have the variable FX2LIBDIR, the submodule -# magic will always check it out in fx2lib/ -$(FX2LIBDIR)/.git: $(GITMODULESDIR) - git submodule sync --recursive -- $$(dirname $@) - git submodule update --recursive --init $$(dirname $@) - touch $@ -r $< - -$(TARGET).hex: $(CC_OBJS) - $(Q_LINK)$(CC) $(CFLAGS) -o $@ $+ $(LIBS) - -%.rel: %.c - $(Q_CC)$(CC) $(CFLAGS) -c --disable-warning 85 $(INCS) $? - -clean: - $(Q_RM)$(RM) *.iic *.asm *.lnk *.lst *.map *.mem *.rel *.rst *.sym \ - *.lk serial.hex - cd $(FX2LIBDIR) && make clean - -distclean: clean - $(RM) -r $(FX2LIBDIR) - -load: $(TARGET).hex - hdmi2usb-mode-switch --load-fx2-firmware $(TARGET).hex diff --git a/examples/lights/Makefile b/examples/lights/Makefile deleted file mode 100644 index eb1a06a..0000000 --- a/examples/lights/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (C) 2009-2012 Chris McClelland -# Copyright (C) 2015 Joel Stanley -# Copyright (C) 2017 Kyle Robbertze -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation, either version 3 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 Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see . -# -# To build the firmware you will need: -# SDCC from http://sdcc.sourceforge.net -# fx2lib from http://fx2lib.wiki.sourceforge.net -# -TARGET := lights -FX2LIBDIR := ../../third_party/fx2lib -GITMODULESDIR := ../../.gitmodules -BOARD ?= fx2miniboard - -CC_SRCS := lights.c - -include ../common.mk diff --git a/examples/lights/README.md b/examples/lights/README.md deleted file mode 100644 index e157a73..0000000 --- a/examples/lights/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Lights Example -This example flashes the LEDs present on the FX2LP CY7C68013A mini board. It -can be used for testing loading of firmware onto these boards. The expected -pattern is D1 turning on, then D2 250ms later, then D1 off, then D2 off and the -cycle repeats - -The firmware is built using `make` and loaded using `make load`, which uses the -[HDMI2USB-mode-switch](https://github.com/timvideos/HDMI2USB-mode-switch) -utility to load the firmware onto the FX2 chip. - -![](../../docs/lights_example.gif) diff --git a/examples/lights/TODO b/examples/lights/TODO deleted file mode 100644 index f1c8035..0000000 --- a/examples/lights/TODO +++ /dev/null @@ -1 +0,0 @@ -Make this compatible with the Atlys and Opsis boards diff --git a/examples/lights/lights.c b/examples/lights/lights.c deleted file mode 100644 index c69f3da..0000000 --- a/examples/lights/lights.c +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (C) 2009 Ubixum, Inc. -// Copyright (C) 2016 Matthew Iselin -// Copyright (C) 2017 Kyle Robbertze -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library 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 -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -/** \file lights.c - * Example firmware that flashes LEDs. - * - * On the Atlys this is LD14 (DONE), on the FX2 miniboard D1 and D2 and on the - * Opsis it is D2 - */ - -#include -#include -#include - -#include "fx2lights.h" - -void init_lights(void) { - // Set pins to port mode instead of GPIF master/slave mode - IFCONFIG &= ~(bmIFCFGMASK); - // No alternate functions -#ifdef BOARD_fx2miniboard - PORTACFG = 0x00; -#endif // BOARD_fx2miniboard -#ifdef BOARD_opsis - PORTECFG = 0x00; -#endif // BOARD_opsis -} - -void main(void) { - BYTE n=0; - - init_lights(); - - while(TRUE) { - switch(n) { - case 0: - /** - * d1 is the LED labelled LD14 on the Atlys and the LED labelled - * D1 on the FX2LP CY7C68013A mini-board. It is not connected on - * the Opsis - */ - d1on(); - break; - case 1: - /** - * d2 is the LED labelled D2 on the Numato Opsis and the LED - * labelled D2 on the FX2LP CY7C68013A mini-board. It is not - * connected on the Atlys - */ - d2on(); - break; - case 2: - d1off(); - break; - default: - d2off(); - break; - } - delay(250); - n = (n + 1) % 4; - } -} diff --git a/examples/serial/Makefile b/examples/serial/Makefile deleted file mode 100644 index 11fc546..0000000 --- a/examples/serial/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright (C) 2009-2012 Chris McClelland -# Copyright (C) 2015 Joel Stanley -# Copyright (C) 2017 Kyle Robbertze -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation, either version 3 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 Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see . -# - -# To build the firmware you will need: -# SDCC from http://sdcc.sourceforge.net -# fx2lib from http://fx2lib.wiki.sourceforge.net -# -TARGET := serial -FX2LIBDIR := ../../third_party/fx2lib -GITMODULESDIR := ../../.gitmodules -BOARD ?= fx2miniboard - -CC_SRCS := serial.c - -include ../common.mk diff --git a/examples/serial/README.md b/examples/serial/README.md deleted file mode 100644 index 8456a2b..0000000 --- a/examples/serial/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# Serial Example - -This serial example is for testing serial connections from the FX2 chip. It is -uses the same setup as the HDMI2USB firmware, which is: - - * Baud rate of 115200 - * Serial device /dev/ttyUSB0 (default on linux) - * Connections - - RXD -> PD3 - - GND -> GND - -This example prints "This is the serial example for the HDMI2USB firmware" to -the TXD pin every two seconds - -To build the firmware run `make`, which will pull in the required dependencies -and build the `serial.hex` firmware image. This can be loaded using the -[HDMI2USB-mode-switch](https://github.com/timvideos/HDMI2USB-mode-switch) -utility, which is what `make load` uses. - -Under linux serial can be read using minicom. This example was tested using the -Digilent PmodUSBUART Serial to USB adaptor. - -FIXME: Add minicom example. - -FIXME: Only the Atlys and FX2 Dev board uses bit banging, the Opsis uses the -hardware serial. - -## Wiring Diagram - -FIXME: Use real pictures in the diagram. - -![](docs/serial_diagram.png) diff --git a/examples/serial/docs/serial_diagram.png b/examples/serial/docs/serial_diagram.png deleted file mode 100644 index f82d14efedcf2f30393ab27834c507710b491be8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11295 zcmeI2cTkg0+wT(y#Q;j^y(7H|0#X%2300~{H%RYN1p`3^5~_j_5CQ3+RDsYTY6KfK zp@kOVCrAgSNj>p-=bV4une*S7^E@+eX71c`Z?e0|?zMY;ug|sUTjqvLU>-040APX{ zL9GA)Dt*cYpr@sjq^@xZP;Q`5J(vwW<@J#M9*XjOA=v0nC;)H~|MvoB%UtB86mo~@ z+lN^Pd4@&az3%~tjEt1`3G@qfzZ>i!A9UX*S{j>MPdJ&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{e@YMClrJ+IX=d_n>yY)oUkWnimt+2*=#-*KsqWO~{)Hf)gzsBB<# z@eGgIy+VG2<4AC<4o}{f9SJNYR@fAWw+H|QzVe6W6DyAiN($1=x*7qx*?nV4$E-K* zo$F0sMIW3hDm`kE&-O?d$1EK+J4bi_P~rD^0Zr|hHCi+p^g>-%xi+yW0KYNd|9TyP z51Rxpgq?l!!1bE!`q074R!VkVj#&sLUmJ%z#$}sxY(f)DNN?DZbtpOBq?}2$r-yG5 z&(+Oh@A*1z?*EwywFoSBj(|PgPb^so;bbYbkID9)r&DK&N}>;MLX(@G*eAaFnX!`l zk!tV$+gmnW-TI&cIMeX5bsT2IUM5V`Y$$j-*`6jwsZrzL3Vd%nvPz!qhAFqasNS$1 z{N7e2SF-QGEwSo~Bj)q!Zxw$~38YPJJZ9mI$9}z;DLPyFB%x3Fy=UcO&BS}ZZi7Y4 z2EDOsD3b{4+vP|2U=p@xM4iX*;j0jyno*Srdbo`bms0sYDDA4&#|Tk^(lTb!m6)+4 zY8*uPRjzF(TJbiKSyZpQLd1~SkDp0o+$K7q%J7TDaoS~_l>5E6YD`j{fmvyv3Z9$`uS_Dik0^(E0Wf`YXq}$hqyGhttOG6p diff --git a/examples/serial/serial.c b/examples/serial/serial.c deleted file mode 100644 index b9d1a52..0000000 --- a/examples/serial/serial.c +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2017 Kyle Robbertze - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ -#include -#include -#include -#include - -#define PD3 0xB3 -#define BAUD 32 // FIXME: Figure out why this is 32 - -__sbit __at PD3 USART; // USART slave send from port D3 - -void usart_init(void) { - SETCPUFREQ(CLK_48M); - USART = 1; - OED |= 0xff; // Set all pins' outputs enabled -} - -void usart_send_byte(BYTE c) { - (void)c; /* argument passed in DPL */ - __asm - mov a, dpl - mov r1, #9 // Move 9 into r1 for loop to execute 8 times (byte) - clr c - loop: - mov _USART, c // Move c into USART register - rrc a // Rotate accumulator 1 bit right - mov r0, #BAUD // Indicate ready to send - djnz r0, . // Wait for r0 to be cleared - nop - djnz r1, loop // Reduce r1 and start loop again - - setb _USART // Stop bit - mov r0, #BAUD // Indicate ready to send - djnz r0, . // Wait to be sent - __endasm; -} - -void usart_send_string(const char *s) { - while (*s) { - switch (*s) { - case '\r': // Send new line and carriage return so there is less - case '\n': // configuration of serial software needed. - usart_send_byte('\n'); - usart_send_byte('\r'); - break; - default: - usart_send_byte(*s); - } - *s++; - } -} - -void main(void) { - usart_init(); - while (1) { - usart_send_string("This is the serial example for the HDMI2USB firmware\n"); - delay(2000); - } -}