first draft
This commit is contained in:
20
fuses.py
Normal file
20
fuses.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from os.path import join
|
||||
Import("env")
|
||||
|
||||
conf_path = join(env.PioPlatform().get_package_dir("tool-avrdude"), "avrdude.conf")
|
||||
|
||||
env.Replace(
|
||||
FUSEUPLOADER="avrdude",
|
||||
FUSEFLAGS=[
|
||||
"-C", conf_path,
|
||||
"-p", "atmega328p",
|
||||
"-Pusb",
|
||||
"-c", "jtag3isp"
|
||||
],
|
||||
FUSECOMMAND="$FUSEUPLOADER $FUSEFLAGS -U lfuse:w:0xE6:m -U hfuse:w:0xDA:m -U efuse:w:0x05:m"
|
||||
)
|
||||
|
||||
def set_fuses(source, target, env):
|
||||
env.Execute(env.VerboseAction("$FUSECOMMAND", "Setting Fuses..."))
|
||||
|
||||
env.AddPreAction("upload", set_fuses)
|
||||
Reference in New Issue
Block a user