From 07dc739c7237f1c0ab367d82a0c49bb63d7b5381 Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Thu, 20 Feb 2020 19:32:21 +0100 Subject: [PATCH] add --- 861-tinycore-test/Blink.ino | 26 +++++++++++++ 861-tinycore-test/Makefile | 53 +++++++++++++++++++++++++++ 861-tinycore-test/hardware | 1 + 861-tinycore-test/libraries/GFX | 1 + 861-tinycore-test/libraries/SPI | 1 + 861-tinycore-test/libraries/SSD1306 | 1 + 861-tinycore-test/libraries/TinyWireM | 1 + 861-tinycore-test/libraries/Wire | 1 + 8 files changed, 85 insertions(+) create mode 100644 861-tinycore-test/Blink.ino create mode 100644 861-tinycore-test/Makefile create mode 120000 861-tinycore-test/hardware create mode 120000 861-tinycore-test/libraries/GFX create mode 120000 861-tinycore-test/libraries/SPI create mode 120000 861-tinycore-test/libraries/SSD1306 create mode 120000 861-tinycore-test/libraries/TinyWireM create mode 120000 861-tinycore-test/libraries/Wire diff --git a/861-tinycore-test/Blink.ino b/861-tinycore-test/Blink.ino new file mode 100644 index 0000000..c19db15 --- /dev/null +++ b/861-tinycore-test/Blink.ino @@ -0,0 +1,26 @@ +/* -*-c++-*- + Blink + Turns on an LED on for one second, then off for one second, repeatedly. + This example code is in the public domain. + */ + +#include + +void setup() { + // initialize the digital pin as an output. + // Pin 13 has an LED connected on most Arduino boards: + Serial.begin(9600); + Serial.print("Press any key: "); + + pinMode(PB0, OUTPUT); +} + +void loop() { + digitalWrite(13, HIGH); // set the LED on + delay(1000); // wait for a second + digitalWrite(13, LOW); // set the LED off + delay(1000); // wait for a second + if (Serial.available()) { + Serial.println("blinked\n"); + } +} diff --git a/861-tinycore-test/Makefile b/861-tinycore-test/Makefile new file mode 100644 index 0000000..f01697b --- /dev/null +++ b/861-tinycore-test/Makefile @@ -0,0 +1,53 @@ +# Arduino Make file. Refer to https://github.com/sudar/Arduino-Makefile + +# attiny841: +# BOARD_TAG = attinyx41 +# BOARD_SUB = 841 +# attiny861: +# BOARD_TAG = attinyx61 +# BOARD_SUB = 861 +# attiny85: +# BOARD_TAG = attinyx5 +# BOARD_SUB = 85 +# attiny84: +# BOARD_TAG = attinyx4 +# BOARD_SUB = 84 + +ARDUINO_VERSION = 10810 + +PROJECT_DIR = $(shell pwd) +BOARD_TAG = attinyx61 +BOARD_SUB = 861 +ARDUINO_DIR = /usr/local/arduino +ARDMK_DIR = /usr/local/arduino/Arduino-Makefile +MONITOR_PORT = /dev/ttyACM0 +ISP_PORT = /dev/ttyACM0 +AVRDUDE = /usr/local/bin/avrdude +# +# WORKS: +#ARDUINO_LIBS = Wire SPI +# +# DOESNT WORK: +ARDUINO_LIBS = Wire SPI GFX + +ARDUINO_SKETCHBOOK = . + +# mk stuff +ALTERNATE_CORE = ATTinyCore +F_CPU = 8000000L +MONITOR_BAUDRATE = 115200 +AVRDUDE_ARD_PROGRAMMER = stk500v2 +AVRDUDE_ARD_BAUDRATE = 9600 +AVR_TOOLS_DIR = /usr/local/avr +AVRDUDE_CONF = /usr/local/etc/avrdude.conf + +# compiler stuff +CFLAGS_STD = -std=gnu11 +CXXFLAGS_STD = -std=gnu++11 +CXXFLAGS + = -pedantic -Wall -Wextra +CURRENT_DIR = $(shell pwd) + +# keep this! +include $(ARDMK_DIR)/Arduino.mk + + diff --git a/861-tinycore-test/hardware b/861-tinycore-test/hardware new file mode 120000 index 0000000..d34e522 --- /dev/null +++ b/861-tinycore-test/hardware @@ -0,0 +1 @@ +/usr/local/arduino/hardware \ No newline at end of file diff --git a/861-tinycore-test/libraries/GFX b/861-tinycore-test/libraries/GFX new file mode 120000 index 0000000..4ade844 --- /dev/null +++ b/861-tinycore-test/libraries/GFX @@ -0,0 +1 @@ +/usr/local/esp32/arduino-core/libraries/GFX \ No newline at end of file diff --git a/861-tinycore-test/libraries/SPI b/861-tinycore-test/libraries/SPI new file mode 120000 index 0000000..56e807e --- /dev/null +++ b/861-tinycore-test/libraries/SPI @@ -0,0 +1 @@ +/usr/local/arduino/hardware/ATTinyCore/avr/libraries/SPI \ No newline at end of file diff --git a/861-tinycore-test/libraries/SSD1306 b/861-tinycore-test/libraries/SSD1306 new file mode 120000 index 0000000..c2d18df --- /dev/null +++ b/861-tinycore-test/libraries/SSD1306 @@ -0,0 +1 @@ +/usr/local/esp32/arduino-core/libraries/SSD1306 \ No newline at end of file diff --git a/861-tinycore-test/libraries/TinyWireM b/861-tinycore-test/libraries/TinyWireM new file mode 120000 index 0000000..a6a4ed0 --- /dev/null +++ b/861-tinycore-test/libraries/TinyWireM @@ -0,0 +1 @@ +/usr/local/esp32/arduino-core/libraries/TinyWireM \ No newline at end of file diff --git a/861-tinycore-test/libraries/Wire b/861-tinycore-test/libraries/Wire new file mode 120000 index 0000000..0211f71 --- /dev/null +++ b/861-tinycore-test/libraries/Wire @@ -0,0 +1 @@ +/usr/local/arduino/hardware/ATTinyCore/avr/libraries/Wire \ No newline at end of file