mirror of
https://github.com/Valeh2012/PersonalVotingMachine
synced 2024-11-29 20:30:59 +02:00
25 lines
1.4 KiB
Plaintext
25 lines
1.4 KiB
Plaintext
|
|
||
|
|
||
|
001: plain as7
|
||
|
002: create a new gcc c executable project, enter a useful name and solution name
|
||
|
003: select your target device
|
||
|
004: as7 will generate a main.c file. Replace the content of the generated main.c with
|
||
|
the content of https://github.com/olikraus/u8g2/blob/master/sys/avr/atmega328/main.c
|
||
|
005: open the project Properties (Alt+F7)
|
||
|
006: Add Existing item...
|
||
|
007: Mark and add all files of the u8g2/csrc directory, press "add"
|
||
|
008: Select the project, locate Toolchain tab, select "All Configurations", select AVR/GNU C Compiler/Directories and press the green plus icon
|
||
|
Add ".." as relative include path
|
||
|
009: Select the project, locate Toolchain tab, select "All Configurations", select AVR/GNU C Compiler/Symbols and press the green plus icon
|
||
|
Add the target frequency of your controller (here: "F_CPU=8000000")
|
||
|
010: Press F7 (Build->Build Solution)
|
||
|
011: On my own Windows 10 environment, it was required to install a different usb driver for the AVRISP mkII
|
||
|
012: Open the Device Programming dialog (Tools menu)
|
||
|
013:
|
||
|
Select your ISP tool in under "Tool". Select the correct target device and interface. Press "Apply" button.
|
||
|
Read the device signature from your target controller by pressing the "Read" button.
|
||
|
Goto "Production file" tab and select the generated .elf file as a "production file"
|
||
|
014: Check "Flash" and press the "Program" button.
|
||
|
|
||
|
|