Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for building with platformio #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion DebugWireDebuggerProgrammer/DebugWireDebuggerProgrammer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
// 1 = 0 Brown-out Detector trigger level bit 1
// 0 = 1 Brown-out Detector trigger level bit 0

#define DEVELOPER 0
#define DEVELOPER 1

#define PMODE 8 // Input - HIGH = Program Mode, LOW = Debug Mode
#define VCC 9 // Target Pin 8 - Vcc
Expand Down Expand Up @@ -2041,6 +2041,30 @@ void debugger () {
powerOff();
println(F("VCC off"));
break;

case 'G': // glitch the power to the chip
// give it 10 sec to allow window switching
getString();
byte dd = readDecimal(1);
println(F("Glitching in 3s"));
for(int i=0;i<3;i++) {
delay(1000);
}

Serial.println(dd);

for(int i=0;i<1000;i++) {
digitalWrite(VCC, LOW);
delayMicroseconds(dd);
digitalWrite(VCC, HIGH);
pinMode(VCC, OUTPUT);
delayMicroseconds(dd);
if (!(i%100))
Serial.println(":");
}
println(F("VCC Restored"));
break;

#endif

case 'B': // Cycle Vcc and Send BREAK to engage debugWire Mode
Expand Down
20 changes: 20 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
; 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
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[platformio]
default_envs = uno

[env:uno]
framework = arduino
platform = atmelavr
monitor_speed = 115200
monitor_echo = yes
board = uno
build_options = -D DEVELOPER
1 change: 1 addition & 0 deletions src