File tree Expand file tree Collapse file tree 5 files changed +18
-6
lines changed Expand file tree Collapse file tree 5 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -8,12 +8,14 @@ picocore.upload.using=avrdude
88picocore.bootloader.unlock_bits=0x3f
99picocore.bootloader.lock_bits=0x3e
1010picocore.build.core=picocore
11+ # board name will be used for macro define
1112picocore.build.board=attiny
1213# build flags are for compile only, not link
1314#picocore.build.extra_flags={build.timing}
1415
15- #picocore.upload.maximum_data_size=64
16+ #picocore.upload.maximum_size=1024
1617#picocore.build.mcu_compile=attiny13a
18+ #picocore.build.mcu=attiny13a
1719#picocore.build.variant=attiny13
1820
1921# default clock = 8Mhz
@@ -23,6 +25,7 @@ menu.mcu=MCU
2325
2426picocore.menu.mcu.t13=ATtiny13
2527picocore.menu.mcu.t13.build.mcu=attiny13
28+ #picocore.menu.mcu.t13.build.variant=attiny13
2629picocore.menu.mcu.t13.build.f_cpu=9600000L
2730picocore.menu.mcu.t13.upload.maximum_size=1024
2831
Original file line number Diff line number Diff line change 33 * 20200310 add digital pin functions
44 * 20200301 prototype
55 * 20200319 v0.2beta with analogRead/Write & WDT millis()
6+ * 20200416 v0.2.1 with FlashStringHelper & portxxxxRegister functions
67 */
78
89#pragma once
1314#include < util/delay.h>
1415#include " constants.h"
1516
17+ #define min (a,b ) ((a)<(b)?(a):(b))
18+ #define max (a,b ) ((a)>(b)?(a):(b))
19+ #define abs (x ) __builtin_abs(x)
20+
1621#ifdef __cplusplus
1722class __FlashStringHelper ;
1823#define F (string_literal ) (reinterpret_cast <const __FlashStringHelper *>(PSTR(string_literal)))
Original file line number Diff line number Diff line change 33
44static const uint8_t LOW = 0 ;
55static const uint8_t HIGH = 1 ;
6- static const uint8_t LED_BUILTIN = 2 ;
7- static const uint8_t NUM_DIGITAL_PINS = 6 ;
6+ //static const uint8_t LED_BUILTIN = 2;
7+ enum {LED_BUILTIN = 2 };
8+ //static const uint8_t NUM_DIGITAL_PINS = 6;
9+ enum {NUM_DIGITAL_PINS = 6 };
810
911typedef enum {MSBFIRST = 0 , LSBFIRST } _bitOrder ;
1012
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ __init:
5050 clr r1
5151
5252 .section .init9
53+ .global main
5354; main must go in .init9 to save rjmp
5455; rjmp main
5556
Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ version=0.1.0
1212# AVR compile variables
1313# ---------------------
1414
15- compiler.warning_flags=-w
15+ #compiler.warning_flags=-w
16+ compiler.warning_flags=
1617compiler.warning_flags.none=-w
1718compiler.warning_flags.default=
1819compiler.warning_flags.more=-Wall
@@ -38,7 +39,7 @@ compiler.objcopy.cmd=avr-objcopy
3839compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
3940compiler.elf2hex.flags=-O ihex -R .eeprom
4041compiler.elf2hex.cmd=avr-objcopy
41- compiler.ldflags=
42+ # compiler.ldflags=
4243compiler.size.cmd=avr-size
4344
4445# This can be overridden in boards.txt
@@ -47,7 +48,7 @@ build.extra_flags=
4748# These can be overridden in platform.local.txt
4849compiler.c.extra_flags=
4950# force linker to search for __vectors (in pcrt)
50- compiler.c.elf.extra_flags=-nostartfiles -Wl,--undefined=__vectors -Wl,--undefined=main
51+ compiler.c.elf.extra_flags=-nostartfiles -Wl,--undefined=__vectors
5152compiler.S.extra_flags=
5253compiler.cpp.extra_flags=
5354compiler.ar.extra_flags=
You can’t perform that action at this time.
0 commit comments