-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplatformio.ini
79 lines (71 loc) · 3.8 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
; PlatformIO Project Configuration File
;
; 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
;
; For detailed documentation on available options and usage, visit:
; https://docs.platformio.org/page/projectconf.html
; Build and memory usage statistics:
; Without UIRBcorelib:
; RAM Usage: [==== ] 40.1% (821 bytes used from 2048 bytes)
; Flash Usage: [====== ] 55.4% (17932 bytes used from 32384 bytes)
;
; With UIRBcorelib:
; RAM Usage: [==== ] 44.8% (917 bytes used from 2048 bytes)
; Flash Usage: [======== ] 80.0% (25900 bytes used from 32384 bytes)
[platformio]
name = GirsUIRB ; Display name of the project in PlatformIO
description = AGirs firmware adapted for the Universal IR Blaster (UIRB)
default_envs = uirb-v02 ; Default environment for build/upload operations
[configuration]
default_baud_rate = 38400 ; Default UART baud rate for communication
option_1_baud = 9600 ; Alternate baud rate option 1
option_2_baud = 19200 ; Alternate baud rate option 2
option_3_baud = 250000 ; Alternate baud rate option 3
low_bat_notify_period_seconds = 15 ; Period (in seconds) for low battery notifications
; Common settings shared across all environments
[env]
platform = atmelavr ; Target platform (Atmel AVR for ATmega MCUs)
framework = arduino ; Use Arduino framework for development
lib_deps =
djordjemandic/UIRBcorelib @ ^1.2.3 ; UIRBcore library
bengtmartensson/AGirs @ ^1.0.5 ; AGirs library
monitor_speed = ${configuration.default_baud_rate} ; Set serial monitor baud rate
monitor_filters = default, time, colorize ; Add timestamps and colorize monitor output
build_flags =
-I config.h ; Include config.h file
-D SERIALBAUD=${configuration.default_baud_rate}
-D OPTION_1_BAUD=${configuration.option_1_baud}
-D OPTION_2_BAUD=${configuration.option_2_baud}
-D OPTION_3_BAUD=${configuration.option_3_baud}
-D LOW_BAT_NOTIFY_PERIOD_SECONDS=${configuration.low_bat_notify_period_seconds}
; Environment for UIRB V0.2 board with urboot bootloader
[env:uirb-v02]
board = uirb-v02-atmega328p ; Board definition file (see ./boards/)
build_type = release ; Build type: release for optimized builds
; upload_speed = 57600 ; Optional: Set upload speed if needed
; upload_port = COM6 ; Optional: Specify a fixed upload port
extra_scripts =
./scripts/pio/backup_eeprom.py ; Custom script for EEPROM backup and management
; Environment for UIRB V0.2 using USBasp programmer
[env:uirb-v02-usbasp]
extends = env:uirb-v02 ; Inherit settings from uirb-v02 environment
upload_protocol = usbasp ; Use USBasp for uploading firmware
upload_flags =
-PUSB ; Specify USB port
-B8 ; Set SPI clock speed (divide by 8) for stability
; Environment for debugging UIRB V0.2 with default options
[env:uirb-v02-dbg]
extends = env:uirb-v02 ; Inherit settings from uirb-v02 environment
build_type = debug ; Debug build type for easier troubleshooting
debug_svd_path = ./svd/atmega328p.svd ; SVD file for debugging ATmega328P
; Environment for simulation/debugging using SimAVR
[env:uirb-v02-dbg-simavr]
extends = env:uirb-v02-dbg ; Inherit settings from debug environment
debug_tool = simavr ; Use SimAVR for simulation and debugging
build_flags =
${env:uirb-v02-dbg.build_flags} ; Include flags from debug environment
-DUIRB_EEPROM_BYPASS_DEBUG ; Enable EEPROM bypass mode for testing
-DUIRB_EEPROM_RPROG_DEBUG=4990 ; Set Rprog resistance to 4990 ohms for debug