Skip to content

Commit

Permalink
Can flash the arduino!
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhijith Sriram committed Oct 6, 2024
1 parent e8265f3 commit bd44706
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions flash-arduino.bat
Original file line number Diff line number Diff line change
@@ -0,0 1,6 @@
@echo off
SETLOCAL EnableDelayedExpansion
@REM Changing directory to easily reference the hex file
cd .\out\build\target
@REM Flashing the arduino
"C:\Program Files (x86)\WinAVR\bin\avrdude.exe" -C "C:\Program Files (x86)\WinAVR\bin\avrdude.conf" -v -p ATmega328P -P COM3 -c arduino -b 115200 -D -U flash:w:final_exec.hex:i
1 change: 1 addition & 0 deletions src/appl/blinkLed/blinkLed.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 12,7 @@ int main()
Write_pin(PORTB, (uint8_t)PINB5, PIN_HIGH);
Delay();
Write_pin(PORTB, (uint8_t)PINB5, PIN_LOW);
Delay();
}

return 0;
Expand Down
5 changes: 2 additions & 3 deletions src/lib/utils/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 2,9 @@

void Delay(void)
{
volatile uint8_t temp;
uint32_t indx = (uint32_t)0;
volatile uint32_t indx = (uint32_t)0;
for (; indx<DELAY_INDEX; indx )
{
temp=((uint8_t)0);
/* Do nothing, simply cause a delay*/
}
}

0 comments on commit bd44706

Please sign in to comment.