Skip to content

Commit 10d0190

Browse files
authored
Migrate to SDK v4.6.0 (#66)
* Update soure files & Travis CI script for LinkIt SDK v4.6.0 * Copy additional include path for file `flash_sfc.h` * Remove upload progress report bar : remove the ascii art progress bar, since it does not update properly in Arduino IDE and confuses user. * Update SDK v4.6.0 WiFi firmware * Update SDK version in readme
1 parent cd36c1c commit 10d0190

File tree

9 files changed

+119
-5
lines changed

9 files changed

+119
-5
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
language: c
22
before_install:
33
- sudo apt-get install libc6-i386
4-
- wget http://download.labs.mediatek.com/LinkIt_SDK_V4.3.1_travis.tar.gz
4+
- wget http://download.labs.mediatek.com/LinkIt_SDK_V4.6.0_travis.tar.gz
55
install:
6-
- tar --skip-old-files -zxf LinkIt_SDK_V4.3.1_travis.tar.gz -C .
6+
- tar --skip-old-files -zxf LinkIt_SDK_V4.6.0_travis.tar.gz -C .
77
script:
88
- cd project/linkit7697_hdk/apps/arduino/arduino_lib/GCC/
99
- echo -en 'travis_fold:start:arduino_lib\\r'

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ This is the **source code** for Arduino Add-On package for LinkIt 7697. To insta
66
The source code is an add-on to LinkIt SDK v4.x. To build the board support package, you need following prerequisites:
77

88
## Build Prerequisites
9-
* You need a working LinkIt SDK v4.3 public version. To obtain public version of LinkIt SDK v4.3, visit https://docs.labs.mediatek.com/resource/mt7687-mt7697/en/downloads
9+
* You need a working LinkIt SDK v4.6 public version. To obtain public version of LinkIt SDK v4.6, visit https://docs.labs.mediatek.com/resource/mt7687-mt7697/en/downloads
1010
* You must build this package on a Linux machine with `make` and `perl` installed.
1111

1212
## Building the Board Supporting Package
1313
* Copy LinkIt SDK v4 public version into the source repo. We want to keep existing files, since this is an add-on package. We assume the SDK is unpacked in `Arduino-Add-On-for-LinkIt-SDK`.
1414
```bash
1515
git clone --depth 1 https://github.com/MediaTek-Labs/Arduino-Add-On-for-LinkIt-SDK.git
16-
tar --keep-old-files -zxf LinkIt_SDK_V4.3.1.tar.gz -C Arduino-Add-On-for-LinkIt-SDK
16+
tar --keep-old-files -zxf LinkIt_SDK_V4.6.0.tar.gz -C Arduino-Add-On-for-LinkIt-SDK
1717
```
1818
* Use following command to build the board support package:
1919
```bash

middleware/third_party/arduino/hardware/arduino/mt7697/boards.txt

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ linkit_7697.build.lib_ble_multi_adv=libble_multi_adv.a
3535
linkit_7697.build.lib_btdriver_7697=libbtdriver_7697.a
3636

3737
linkit_7697.build.chip_mt7697_inc=driver/chip/mt7687/inc/
38+
linkit_7697.build.chip_mt7697_src_inc=driver/chip/mt7687/src/common/include/
3839
linkit_7697.build.chin_inc=driver/chip/inc/
3940
linkit_7697.build.cmsis_mt7697_inc=driver/CMSIS/Device/MTK/mt7687/Include/
4041
linkit_7697.build.cmsis_inc=driver/CMSIS/Include/

middleware/third_party/arduino/hardware/arduino/mt7697/cores/arduino/Tone.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ extern "C" {
1414
#define PWM_SRC_CLOCK HAL_PWM_CLOCK_32KHZ
1515
#define PWM_MAX_FREQUENCY (6500ul)
1616
#define PWM_MIN_FREQUENCY (10ul)
17+
#ifndef HAL_PWM_MAX
18+
#define HAL_PWM_MAX HAL_PWM_MAX_CHANNEL
19+
#endif
1720

1821
#include "hal_gpt.h"
1922

middleware/third_party/arduino/hardware/arduino/mt7697/platform.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
1414

1515
# 1.2 Indicate extra include and lib (archive file)
1616
# ---------------------
17-
compiler.path.extra_inc="-I{build.system.path}/{build.board}/src/{build.chip_mt7697_inc}" "-I{build.system.path}/{build.board}/src/{build.chin_inc}" "-I{build.system.path}/{build.board}/src/{build.cmsis_mt7697_inc}" "-I{build.system.path}/{build.board}/src/{build.cmsis_inc}" "-I{build.system.path}/{build.board}/src/{build.rtos_inc}" "-I{build.system.path}/{build.board}/src/{build.kernel_service_inc}" "-I{build.system.path}/{build.board}/src/{build.rtos_cm4_inc}" "-I{build.system.path}/{build.board}/src/{build.lwip_inc}" "-I{build.system.path}/{build.board}/src/{build.lwip_ports_inc}" "-I{build.system.path}/{build.board}/src/{build.mbedtls_configs_inc}" "-I{build.system.path}/{build.board}/src/{build.mbedtls_inc}" "-I{build.system.path}/{build.board}/src/{build.httpclient_inc}" "-I{build.system.path}/{build.board}/src/{build.connsys_inc}" "-I{build.system.path}/{build.board}/src/{build.wifi_inc}" "-I{build.system.path}/{build.board}/src/{build.ble_inc}" "-I{build.system.path}/{build.board}/src/{build.prebuilt_ble_inc}" "-I{build.system.path}/{build.board}/src/{build.nvdm_inc}" "-I{build.system.path}/{build.board}/src/{build.dhcpd_inc}"
17+
compiler.path.extra_inc="-I{build.system.path}/{build.board}/src/{build.chip_mt7697_inc}" "-I{build.system.path}/{build.board}/src/{build.chip_mt7697_src_inc}" "-I{build.system.path}/{build.board}/src/{build.chin_inc}" "-I{build.system.path}/{build.board}/src/{build.cmsis_mt7697_inc}" "-I{build.system.path}/{build.board}/src/{build.cmsis_inc}" "-I{build.system.path}/{build.board}/src/{build.rtos_inc}" "-I{build.system.path}/{build.board}/src/{build.kernel_service_inc}" "-I{build.system.path}/{build.board}/src/{build.rtos_cm4_inc}" "-I{build.system.path}/{build.board}/src/{build.lwip_inc}" "-I{build.system.path}/{build.board}/src/{build.lwip_ports_inc}" "-I{build.system.path}/{build.board}/src/{build.mbedtls_configs_inc}" "-I{build.system.path}/{build.board}/src/{build.mbedtls_inc}" "-I{build.system.path}/{build.board}/src/{build.httpclient_inc}" "-I{build.system.path}/{build.board}/src/{build.connsys_inc}" "-I{build.system.path}/{build.board}/src/{build.wifi_inc}" "-I{build.system.path}/{build.board}/src/{build.ble_inc}" "-I{build.system.path}/{build.board}/src/{build.prebuilt_ble_inc}" "-I{build.system.path}/{build.board}/src/{build.nvdm_inc}" "-I{build.system.path}/{build.board}/src/{build.dhcpd_inc}"
1818

1919
compiler.path.extra_lib="{build.system.path}/{build.board}/libs/{build.lib_linkit}" "{build.system.path}/{build.board}/libs/{build.lib_hal_core_CM4_GCC}" "{build.system.path}/{build.board}/libs/{build.lib_nvdm_CM4_GCC}" "{build.system.path}/{build.board}/libs/{build.lib_hal_protected_CM4_GCC}" "{build.system.path}/{build.board}/libs/{build.lib_minicli_CM4_GCC}" "{build.system.path}/{build.board}/libs/{build.lib_wifi}" "{build.system.path}/{build.board}/libs/{build.lib_minisupp_wps}" "{build.system.path}/{build.board}/libs/{build.lib_ble}" "{build.system.path}/{build.board}/libs/{build.lib_ble_multi_adv}" "{build.system.path}/{build.board}/libs/{build.lib_btdriver_7697}"
2020

middleware/third_party/arduino/hardware/arduino/mt7697/variants/linkit_7697/hal_feature_config.h

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ extern "C" {
6767
#define HAL_UART_MODULE_ENABLED
6868
#define HAL_WDT_MODULE_ENABLED
6969
#define HAL_SLEEP_MANAGER_ENABLED
70+
#define HAL_DWT_MODULE_ENABLED
7071

7172
/*****************************************************************************
7273
* customization module feature option
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
/* Copyright Statement:
2+
*
3+
* (C) 2005-2016 MediaTek Inc. All rights reserved.
4+
*
5+
* This software/firmware and related documentation ("MediaTek Software") are
6+
* protected under relevant copyright laws. The information contained herein
7+
* is confidential and proprietary to MediaTek Inc. ("MediaTek") and/or its licensors.
8+
* Without the prior written permission of MediaTek and/or its licensors,
9+
* any reproduction, modification, use or disclosure of MediaTek Software,
10+
* and information contained herein, in whole or in part, shall be strictly prohibited.
11+
* You may only use, reproduce, modify, or distribute (as applicable) MediaTek Software
12+
* if you have agreed to and been bound by the applicable license agreement with
13+
* MediaTek ("License Agreement") and been granted explicit permission to do so within
14+
* the License Agreement ("Permitted User"). If you are not a Permitted User,
15+
* please cease any access or use of MediaTek Software immediately.
16+
* BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
17+
* THAT MEDIATEK SOFTWARE RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES
18+
* ARE PROVIDED TO RECEIVER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
19+
* WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
20+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
21+
* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
22+
* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
23+
* SUPPLIED WITH MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
24+
* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
25+
* THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
26+
* CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
27+
* SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
28+
* STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
29+
* CUMULATIVE LIABILITY WITH RESPECT TO MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
30+
* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE MEDIATEK SOFTWARE AT ISSUE,
31+
* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
32+
* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
33+
*/
34+
35+
#include "exception_handler.h"
36+
37+
/******************************************************************************/
38+
/* Memory Regions Definition */
39+
/******************************************************************************/
40+
#if defined(__GNUC__)
41+
42+
extern unsigned int __FLASH_segment_start__[];
43+
extern unsigned int __FLASH_segment_end__[];
44+
extern unsigned int __SRAM_segment_start__[];
45+
extern unsigned int __SRAM_segment_end__[];
46+
extern unsigned int __ramtext_start__[];
47+
extern unsigned int __ramtext_end__[];
48+
extern unsigned int __tcmbss_start__[];
49+
extern unsigned int __tcmbss_end__[];
50+
51+
const memory_region_type memory_regions[] =
52+
{
53+
{"flash", __FLASH_segment_start__, __FLASH_segment_end__, 0},
54+
{"sram", __SRAM_segment_start__, __SRAM_segment_end__, 1},
55+
{"ramtext", __ramtext_start__, __ramtext_end__, 1},
56+
{"tcmbss", __tcmbss_start__, __tcmbss_end__, 1},
57+
{"scs", (unsigned int*)SCS_BASE, (unsigned int*)(SCS_BASE + 0x1000), 1},
58+
{0}
59+
};
60+
61+
#endif /* __GNUC__ */
62+
63+
#if defined (__CC_ARM)
64+
65+
extern unsigned int Image$$TEXT$$Base[];
66+
extern unsigned int Image$$TEXT$$Limit[];
67+
extern unsigned int Image$$DATA$$Base[];
68+
extern unsigned int Image$$DATA$$ZI$$Limit[];
69+
extern unsigned int Image$$TCM$$Base[];
70+
extern unsigned int Image$$TCM$$ZI$$Limit[];
71+
extern unsigned int Image$$STACK$$Base[];
72+
extern unsigned int Image$$STACK$$ZI$$Limit[];
73+
74+
const memory_region_type memory_regions[] =
75+
{
76+
{"text", Image$$TEXT$$Base, Image$$TEXT$$Limit, 0},
77+
{"data", Image$$DATA$$Base, Image$$DATA$$ZI$$Limit, 1},
78+
{"tcm", Image$$TCM$$Base, Image$$TCM$$ZI$$Limit, 1},
79+
{"stack", Image$$STACK$$Base, Image$$STACK$$ZI$$Limit, 1},
80+
{"scs", (unsigned int *)SCS_BASE, (unsigned int *)(SCS_BASE + 0x1000), 1},
81+
{0}
82+
};
83+
84+
#endif /* __CC_ARM */
85+
86+
87+
#if defined(__ICCARM__)
88+
89+
extern unsigned int RAM_BLOCK$$Base[];
90+
extern unsigned int RAM_BLOCK$$Limit[];
91+
extern unsigned int TCM_BLOCK$$Base[];
92+
extern unsigned int TCM_BLOCK$$Limit[];
93+
extern unsigned int CSTACK$$Base[];
94+
extern unsigned int CSTACK$$Limit[];
95+
96+
const memory_region_type memory_regions[] =
97+
{
98+
{"ram", RAM_BLOCK$$Base, RAM_BLOCK$$Limit, 1},
99+
{"tcm", TCM_BLOCK$$Base, TCM_BLOCK$$Limit, 1},
100+
{"stack", CSTACK$$Base, CSTACK$$Limit, 1},
101+
{"scs", (unsigned int*)SCS_BASE, (unsigned int*)(SCS_BASE + 0x1000), 1},
102+
{0}
103+
};
104+
105+
106+
#endif /* __ICCARM__ */
107+
108+

mk_ide_pkg.pl

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ sub build_system_src
2626
my @source_list=(
2727
"driver/chip/mt7687/inc/",
2828
"driver/chip/inc/",
29+
"driver/chip/mt7687/src/common/include/",
2930
"driver/CMSIS/Device/MTK/mt7687/Include/",
3031
"driver/CMSIS/Include/",
3132
"kernel/service/inc",

0 commit comments

Comments
 (0)