MediaTek LinkIt™ Smart 7688 Developer's Guide
© 2015, 2016 MediaTek Inc.
Page 89
This document contains information that is proprietary to MediaTek Inc.
Unauthorized reproduction or disclosure of this information in whole or in part is strictly prohibited.
6.6.9.
Using LinkIt Smart 7688 Duo to program boot loader on another LinkIt
Smart 7688 Duo
In the following example, there are two LinkIt Smart 7688 Duo boards called A and B. The first
board A will act as the programmer to program the second board B.
1)
In Arduino IDE, go to
Tools > Board > and select LinkIt Smart 7688 Duo
2)
Open the sketch
Example
> ArduinoISP
3)
Modify the code line
#define RESET SS
to
#define RESET 10
4)
Upload the modified sketch to board
A
5)
Connect pins
S0, S1, S2, GND
of board
A
to the same pins of board
B
6)
Connect pin
D10
of board
A
to pin
RST
of board
B
7)
In Arduino IDE, go to
Tools > Programmer >
and select
LinkIt Smart 7688 Duo
as
ISP
8)
Finally, go to
Tools >
and select
Burn Boot loader
6.6.10.
Using AVRDUDE from OpenWrt To Program Boot loader
You can also program ATmega32U4 from the Linux side
(MT7688). The system image is
preloaded with AVRDUDE package that allows you to program the ATmega32U4. AVRDUDE is a
command line tool for flashing codes to MCU on Linux.
1)
Copy the boot loader file to a storage device (USB drive or SD card) or to your computer.
The boot loader file is located in the following path:
{ARDUINO_IDE_PREFERENCE_LOCATION}Arduino15\packages\LinkIt\hardware\
avr\0.1.5\bootloaders\caterina\Caterina-smart7688.hex
Please see
for Arduino preference location.
2)
Transfer the boot loader to LinkIt Smart 7688 Duo. You can use a storage device or SCP
tool to transfer the boot loader. In this example, a USB drive called
USB-A1
is used.
Connect the USB drive to LinkIt Smart 7688 Duo and in the system console, go to the root
directory by typing the following command:
cd /Media/USB-A1
3)
In the system console, execute the following command:
avrdude –p m32u4 –c linuxgpio –v –e –U flash:w:Caterina-smart7688.hex –U
lock:w:0x0f:m
4)
After the boot loader is programmed into the ATmega32U4, you should see a screen
similar to Figure 60.