Skip to content

Commit

Permalink
Merge branch 'release/v3.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
valeros committed Mar 29, 2021
2 parents 5dd9fe4 + 07526dd commit 245e5b1
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 11 deletions.
2 changes: 1 addition & 1 deletion boards/attiny1634.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"build": {
"core": "tinymodern",
"extra_flags": "-DARDUINO_AVR_ATTINY1634",
"extra_flags": "-DARDUINO_AVR_ATTINY1634 -DLOWERCAL=9",
"f_cpu": "8000000L",
"mcu": "attiny1634"
},
Expand Down
2 changes: 1 addition & 1 deletion boards/attiny25.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"build": {
"core": "tiny",
"extra_flags": "-DARDUINO_AVR_ATTINYX5",
"extra_flags": "-DARDUINO_AVR_ATTINYX5 -DNEOPIXELPORT=PORTB",
"f_cpu": "8000000L",
"mcu": "attiny25",
"variant": "tinyX5"
Expand Down
2 changes: 1 addition & 1 deletion boards/attiny441.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"build": {
"core": "tinymodern",
"extra_flags": "-DARDUINO_AVR_ATTINYX41",
"extra_flags": "-DARDUINO_AVR_ATTINYX41 -DLOWERCAL -DWIRE_MASTER_ONLY -DNEW_PINOUT",
"f_cpu": "8000000L",
"mcu": "attiny441"
},
Expand Down
2 changes: 1 addition & 1 deletion boards/attiny45.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"build": {
"core": "tiny",
"extra_flags": "-DARDUINO_AVR_ATTINYX5",
"extra_flags": "-DARDUINO_AVR_ATTINYX5 -DNEOPIXELPORT=PORTB",
"f_cpu": "8000000L",
"mcu": "attiny45",
"variant": "tinyX5"
Expand Down
2 changes: 1 addition & 1 deletion boards/attiny828.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"build": {
"core": "tinymodern",
"extra_flags": "-DARDUINO_AVR_AVR_ATTINY828",
"extra_flags": "-DARDUINO_AVR_AVR_ATTINY828 -DLOWERCAL=9",
"f_cpu": "8000000L",
"mcu": "attiny828"
},
Expand Down
2 changes: 1 addition & 1 deletion boards/attiny841.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"build": {
"core": "tinymodern",
"extra_flags": "-DARDUINO_AVR_ATTINYX41",
"extra_flags": "-DARDUINO_AVR_ATTINYX41 -DLOWERCAL -DWIRE_MASTER_ONLY -DNEW_PINOUT",
"f_cpu": "8000000L",
"mcu": "attiny841"
},
Expand Down
2 changes: 1 addition & 1 deletion boards/attiny85.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"build": {
"core": "tiny",
"extra_flags": "-DARDUINO_AVR_ATTINYX5",
"extra_flags": "-DARDUINO_AVR_ATTINYX5 -DNEOPIXELPORT=PORTB",
"f_cpu": "8000000L",
"mcu": "attiny85",
"variant": "tinyX5"
Expand Down
11 changes: 11 additions & 0 deletions builder/frameworks/arduino.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,17 @@ def get_bootloader_size():
upload_section["maximum_size"] -= board.get(
"bootloader.size", get_bootloader_size()
)
elif build_core in ("tiny", "tinymodern"):
flatten_defines = env.Flatten(env["CPPDEFINES"])
extra_defines = []
if "CLOCK_SOURCE" not in flatten_defines:
extra_defines.append(("CLOCK_SOURCE", 0))
if "NEOPIXELPORT" not in flatten_defines:
extra_defines.append(("NEOPIXELPORT", "PORTA"))

if extra_defines:
env.AppendUnique(CPPDEFINES=extra_defines)

# copy CCFLAGS to ASFLAGS (-x assembler-with-cpp mode)
env.Append(ASFLAGS=env.get("CCFLAGS", [])[:])

Expand Down
3 changes: 2 additions & 1 deletion builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
return

env.AutodetectUploadPort()
env.Append(UPLOADERFLAGS=["-P", '"$UPLOAD_PORT"'])
env.Append(UPLOADERFLAGS=["-P", "$UPLOAD_PORT"])

if env.subst("$BOARD") in ("raspduino", "emonpi", "sleepypi"):

Expand Down Expand Up @@ -161,6 +161,7 @@ def _rpi_sysgpio(path, value):
else:
target_elf = env.BuildProgram()
target_firm = env.ElfToHex(join("$BUILD_DIR", "${PROGNAME}"), target_elf)
env.Depends(target_firm, "checkprogsize")

AlwaysBuild(env.Alias("nobuild", target_firm))
target_buildprog = env.Alias("buildprog", target_firm, target_firm)
Expand Down
4 changes: 2 additions & 2 deletions platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"type": "git",
"url": "https://github.com/platformio/platform-atmelavr.git"
},
"version": "3.2.0",
"version": "3.3.0",
"frameworks": {
"arduino": {
"package": "framework-arduino-avr",
Expand All @@ -45,7 +45,7 @@
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~1.3.2"
"version": "~1.5.2"
},
"framework-arduino-avr-bean": {
"type": "framework",
Expand Down
2 changes: 1 addition & 1 deletion platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def _add_default_debug_tools(self, board):
"end",
"target remote $DEBUG_PORT",
"$INIT_BREAK",
"$LOAD_CMD"
"$LOAD_CMDS"
],
"port": ":1234",
"server": {
Expand Down

0 comments on commit 245e5b1

Please sign in to comment.