This repository has been archived by the owner on Jan 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
platformio.ini
105 lines (88 loc) · 3.13 KB
/
platformio.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
; PlatformIO Project Configuration File for MightyCore
; https://github.com/MCUdude/MightyCore/
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed, and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options
; https://github.com/MCUdude/MightyCore/blob/master/PlatformIO.md
; https://docs.platformio.org/page/projectconf.html
[platformio]
default_envs = Upload_UART ; Default build target
; Common settings for all environments
[env]
; ============================================================
; Serial configuration
; choose upload speed, serial-monitor speed
; ============================================================
;upload_speed = 115200
;upload_port = COM11
;monitor_speed = 9600
;monitor_port = COM11
; Checks for the compatibility with frameworks and dev/platforms
lib_compat_mode = strict
lib_ldf_mode = chain+
;lib_ldf_mode = deep+
lib_deps = ${common.lib_deps}
build_flags =
[env]
platform = atmelavr
framework = arduino
; ============================================================
; Choose your board by uncommenting one of the following lines
; ============================================================
; TARGET SETTINGS
; Chip in use
board = ATmega1284P
; Clock frequency in [Hz]
board_build.f_cpu = 16000000L
; Current pinout
board_build.variant = standard
; BUILD OPTIONS
; Comment out to enable LTO (this line unflags it)
build_unflags = -flto
; Extra build flags
build_flags =
; SERIAL MONITOR OPTIONS
; Serial monitor port defined in the Upload_UART environment
monitor_port = ${env:Upload_UART.upload_port}
; Serial monitor baud rate
monitor_speed = 115200
; Run the following command to upload with this environment
; pio run -e Upload_UART -t upload
[env:Upload_UART]
; Serial bootloader protocol
upload_protocol = arduino
; Serial upload port
upload_port = /dev/cu.usbserial*
; Get upload baud rate defined in the fuses_bootloader environment
board_upload.speed = ${env:fuses_bootloader.board_bootloader.speed}
; Run the following command to upload with this environment
; pio run -e Upload_ISP -t upload
[env:Upload_ISP]
; Custom upload procedure
upload_protocol = custom
; Avrdude upload flags
upload_flags =
-C$PROJECT_PACKAGES_DIR/tool-avrdude/avrdude.conf
-p$BOARD_MCU
-PUSB
-cusbasp
; Avrdude upload command
upload_command = avrdude $UPLOAD_FLAGS -U flash:w:$SOURCE:i
; Run the following command to set fuses
; pio run -e fuses_bootloader -t fuses
; Run the following command to set fuses + burn bootloader
; pio run -e fuses_bootloader -t bootloader
[env:fuses_bootloader]
board_hardware.oscillator = external ; Oscillator type
board_hardware.uart = uart0 ; Set UART to use for serial upload
board_bootloader.speed = 115200 ; Set bootloader baud rate
board_hardware.bod = 2.7v ; Set brown-out detection
board_hardware.eesave = yes ; Preserve EEPROM when uploading using programmer
upload_protocol = usbasp ; Use the USBasp as programmer
upload_flags = ; Select USB as upload port and divide the SPI clock by 8
-PUSB
-B8