diff --git a/bsp/amebaz/.config b/bsp/amebaz/.config index 775f77a112222fd114af2e971d2177c2b28a9c28..4a513007e70da8acf7c77167751b049911a351c3 100644 --- a/bsp/amebaz/.config +++ b/bsp/amebaz/.config @@ -19,7 +19,7 @@ CONFIG_RT_IDEL_HOOK_LIST_SIZE=4 CONFIG_IDLE_THREAD_STACK_SIZE=256 CONFIG_RT_USING_TIMER_SOFT=y CONFIG_RT_TIMER_THREAD_PRIO=4 -CONFIG_RT_TIMER_THREAD_STACK_SIZE=512 +CONFIG_RT_TIMER_THREAD_STACK_SIZE=1024 CONFIG_RT_DEBUG=y # CONFIG_RT_DEBUG_INIT_CONFIG is not set # CONFIG_RT_DEBUG_THREAD_CONFIG is not set @@ -229,7 +229,10 @@ CONFIG_LWIP_NETIF_LOOPBACK=0 # AT commands # # CONFIG_RT_USING_AT is not set -# CONFIG_LWIP_USING_DHCPD is not set +CONFIG_LWIP_USING_DHCPD=y +CONFIG_DHCPD_SERVER_IP="192.168.169.1" +CONFIG_DHCPD_USING_ROUTER=y +# CONFIG_LWIP_USING_CUSTOMER_DNS_SERVER is not set # # VBUS(Virtual Software BUS) @@ -408,5 +411,10 @@ CONFIG_PKG_REALTEK_AMEBA_VER="latest" # CONFIG_SYS_AUTO_UPDATE_PKGS is not set # CONFIG_SYS_CREATE_MDK_IAR_PROJECT is not set # CONFIG_SYS_PKGS_DOWNLOAD_ACCELERATE is not set + +# +# External Libraries +# +CONFIG_RT_USING_SMARTCONFIG_LIB=y # CONFIG_BSP_USING_UART0 is not set CONFIG_BSP_USING_WIFI=y diff --git a/bsp/amebaz/Kconfig b/bsp/amebaz/Kconfig index f623dcf57fb10681cc69d4712d0719597cb513a6..5e639f4e5f7af721e8d254950bf2fe4024d4c47e 100644 --- a/bsp/amebaz/Kconfig +++ b/bsp/amebaz/Kconfig @@ -26,6 +26,7 @@ config $ENV_DIR source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "$ENV_DIR/tools/scripts/cmds/Kconfig" +source "$BSP_DIR/libraries/Kconfig" source "$BSP_DIR/drivers/Kconfig" select PKG_USING_REALTEK_AMEBA diff --git a/bsp/amebaz/README.md b/bsp/amebaz/README.md index 31f0559a3cccb2355abfddbb12d5b04d7cf01d0e..5bc1d604265112e351a98b4d3c36d36919373a85 100644 --- a/bsp/amebaz/README.md +++ b/bsp/amebaz/README.md @@ -1,9 +1,8 @@ # amebaz on RT-Thread -## 1. 简介 +## 1 简介 -amebaz 是由Realtek推出的Cortex-M4内核的WiFi SOC芯片rtl8710b系列 -包括如下硬件特性: +amebaz 是由Realtek推出的Cortex-M4内核的WiFi SOC芯片,属于rtl8710b系列。硬件特性如下: | 硬件 | 描述 | | -- | -- | @@ -11,8 +10,7 @@ amebaz 是由Realtek推出的Cortex-M4内核的WiFi SOC芯片rtl8710b系列 |CPU| Cortex-M4 | |主频| 125MHz | -## 2. 编译说明 - +## 2 编译说明 | 环境 | 说明 | | ------------ | ------------------------------------------------------------ | @@ -21,15 +19,33 @@ amebaz 是由Realtek推出的Cortex-M4内核的WiFi SOC芯片rtl8710b系列 | 构建工具 | scons | | 依赖软件环境 | Env工具/(IAR或arm-none-eabi-gcc)/git/调试器驱动 | -1) 下载源码 +## 3 下载源码 ```bash git clone https://github.com/RT-Thread/rt-thread.git ``` -2) 配置工程并准备env +## 4 环境准备 -(Linux/Mac) +### 4.1 Windows 环境准备 + +Windows环境下有两种开发环境,`GCC toolchain` 和 `IAR IDE`,根据不同的需求自行选择。 + +#### 4.1.1 IAR 发开环境 + +IAR 开发环境需要开发者自己安装软件,安装过程这里就不特别说明了。amebaz工程当前仅支持 `IAR 7.X` 的版本。 + +#### 4.4.2 GCC 开发环境 + +GCC开发使用 RT-Thread 官方提供的 env 工具,该工具集成 GCC 工具链,还具有编译构建环境、图形化系统配置及软件包管理功能。 + +下载地址:[点击下载env工具](https://www.rt-thread.org/page/download.html) + +第一次使用env工具的开发者可以去这里查看教程:[RT-Thread env 工具用户手册](https://www.rt-thread.org/document/site/rtthread-development-guide/rtthread-tool-manual/env/env-user-manual/)。 + +### 4.2 Linux/Mac 环境准备 + +Linux/Mac 仅支持 GCC 工具链。 ```bash cd rt-thread/bsp/amebaz @@ -38,49 +54,62 @@ amebaz 是由Realtek推出的Cortex-M4内核的WiFi SOC芯片rtl8710b系列 pkgs --upgrade ``` -(Windows) +## 5 配置工程(可选) ->在[RT-Thread官网][1]下载ENV工具包,并参考官网给出的env使用教程 +### 5.1 Windows 配置工程 -3) 配置工程(可选) - -(Linux/Mac) +配置工程,需要在相应的工程目录下使用 `menuconfig` 命令打开图形界面,开发者根据自己的需求开关功能组件。 ```bash - scons --menuconfig + menuconfig ``` -(Windows(ENV环境中)) +### 5.2 Linux/Mac 配置工程 + +(Linux/Mac) ```bash - menuconfig + scons --menuconfig ``` -4) 下载package +## 6 更新软件包 -amebaz配套的驱动库以package形式提供,故需先下载对应的package(realtek-ameba),请使用env下载package +amebaz 配套的驱动库以 package 形式提供,故需先下载对应的 package(realtek-ameba),在工程目录下,使用下面命令下载软件包。 ```bash pkgs --update ``` -*该板级支持包不支持生成mdk的工程及iar工程,后续会支持iar工程 +## 7 编译 + +### 7.1 Windows 编译工程 + +#### 7.1.1 IAR 编译工程 -5) 编译 +先打开工程目录下的IAR工程(project.eww),然后单击 Project 选项卡,单击 Rebuild All 选项,进行编译 -Windows可以使用env编译工程,无需设置GCC工具链路径,直接在bsp/amebaz工程目录下编译即可。 +![ ](figures/iar_build.png) -(Linux/Mac arm-none-eabi-gcc) -使用以下指令设置gcc路径 +#### 7.1.2 GCC 编译工程 + +可以使用env编译工程,无需设置GCC工具链路径,直接在 rt-thread/bsp/amebaz 工程目录下输入 `scons` 编译即可。编译完成后,在工程目录下生成 `image2_all_ota1.bin` 文件。 + +```bash + scons +``` + +### 7.2 Linux/Mac 编译工程 + +如果没有配置GCC路径的环境变量,则需要使用以下指令设置gcc路径。 ```bash export RTT_EXEC_PATH=[GCC路径] ``` -编译(WindowsLinux/Mac arm-none-eabi-gcc) +设置 GCC 路径后,使用 `scons` 编译工程。 ```bash - scons -j4 + scons ``` 出现下列信息即为编译成功 @@ -109,35 +138,75 @@ Done... scons: done building targets. ``` -如果编译正确无误,会产生image2_all_ota1.bin文件。 +如果编译正确无误,会在工程目录下生成 image2_all_ota1.bin 文件。 + +## 8 烧写及执行 -## 3. 烧写及执行 +### 8.1 IAR下载 -烧写可以使用仿真器 串口等多种方式 此处不再赘述 +下载程序分为两部分: -### 3.1 运行结果 +(a)先使用jlink工具正确连接A14(CLK),A15(TMS),GND,VCC引脚 -如果编译 & 烧写无误,会在专用日志串口*上看到RT-Thread的启动logo信息: +(b)打开 IAR 工程并完成编译后,单击 Project 选项卡下 Download 选项,选择 Download active application 下载程序。 + +![IAR下载程序](figures/iar_download.png) + +(c)短按复位按钮,连接串口查看调试信息 + +### 8.2 串口下载 + +串口下载分为三个步骤 + +(a)板子进入下载模式 + +板子使用 `micros usb` 上电,然后按住 `FLASH` 键不放手,短按 `RST` 键,松开 `RST` 和 `FLASH` 键进入下载模式。 + +(b)配置下载工具 + +打开 Image Tool 下载工具配置使用,选择 `micros usb` 所对应的串口端口,选择波特率,默认波特率 1.5Mbps,然后打开串口端口,如下载工具图“①”所示 + +![串口下载程序](figures/image-tool_v2.2.0.png) + +boot选择工程提供的 `boot_all.bin`, OTA1 选择生成的 image2_all_ota1.bin 文件(通常在工程目录下),并且注意在这两个选项前面打勾确认,其他默认即可,如下载工具图“②”。 + +(c)下载程序 + +按下 Download(如下载工具图 “③”),即可开始下载程序,并且可以从日志窗口查看到下载信息。 + +## 9 运行 + +下载程序后,连接串口(默认使用板子上 `micro usb`),打开串口工具,配置串口波特率 115200,数据位 8 位,停止位 1 位,无校验,无流控;短按 `RST` 键复位,串口将输出调试信息,如下所示: ```bash \ | / - RT - Thread Operating System - / | \ 3.0.4 build May 15 2018 + / | \ 3.1.1 build Oct 25 2018 2006 - 2018 Copyright by rt-thread team -msh /> -``` +lwIP-2.0.2 initialized! + +Initializing WIFI ... +LDO Mode, BD_Info: 0 -*默认串口 +LDO Mode, BD_Info: 0 -## 4. WIFI简单使用 +WIFI initialized +[I/WIFI] amebaz_wifi_start success +build time: Oct 25 2018 10:52:02 +Hello RT-Thread! +[I/WLAN.dev] wlan init success +[I/WLAN.lwip] eth device init ok name:w0 +msh > +``` +## 10 WIFI简单使用 -### 4.1 wifi扫描命令 +### wifi扫描命令 wifi 扫描命令格式如下 -```unknown - wifi scan +```bash + wifi scan ``` 命令说明 @@ -149,8 +218,7 @@ wifi 扫描命令格式如下 在调试工具中输入该命令,即可进行 wifi 命令扫描,调试信息如下 -```unknown - +```bash scan ap down SSID MAC security rssi chn Mbps ------------------------------- ----------------- -------------- ---- --- ---- @@ -159,19 +227,16 @@ WQ1 88:25:93:94:51:54 WPA2_AES_PSK -76 13 shyc1 a0:40:a0:a3:e8:c9 WPA2_AES_PSK -77 13 0 KVIP 70:65:82:3b:71:43 WPA2_AES_PSK -83 11 0 YST2016 88:25:93:c6:67:d1 WPA2_TKIP_PSK -84 4 0 - ``` -> 注: -> -> 测试命令有关 wifi,均以wifi开头。 +> 注:wifi 有关的命令,均以wifi开头。 -### 4.2 wifi 接入 +### wifi 接入 接入 wifi 之前,先介绍一下其接入的命令 ,如下 -```unknown - wifi join ssid 123456789 +```bash + wifi join ssid 123456789 ``` 命令说明 @@ -185,7 +250,7 @@ YST2016 88:25:93:c6:67:d1 WPA2_TKIP_PSK -84 4 了解上述命令,并且成功完成前面步骤,在串口中输入 `wifi w0 join realthread_VIP 123456789` ,如下日志表示连接成功 -```unknown +```bash WIFI wlan0 Setting: ============================== @@ -200,8 +265,7 @@ WIFI wlan0 Setting: 另外,提供一个简单的测试使用命令,查询设备IP地址命令:ifconfig。 -```unknown - +```bash network interface: w0 (Default) MTU: 1500 MAC: 00 e0 4c d5 ac 46 @@ -211,21 +275,16 @@ gw address: 172.16.200.1 net mask : 255.255.255.0 dns server #0: 172.16.200.1 dns server #1: 223.5.5.5 - ``` -## 5. 驱动支持情况及计划 +## 驱动支持情况及计划 | 驱动 | 支持情况 | 备注 | | ---------- | :------: | :--------------------------: | | UART | 支持 | UART0 | | WLAN | 部分支持 | 仅支持STA模式 | -## 6. 已知问题 - -wlan仅支持STA模式,连接WIFI输入错误密码时,会宕机。 - -## 7. 联系人信息 +## 联系人信息 维护人: [flyingcys][4] < [flyingcys@163.com][5] > diff --git a/bsp/amebaz/applications/smartconfig_app.c b/bsp/amebaz/applications/smartconfig_app.c new file mode 100644 index 0000000000000000000000000000000000000000..4302fe7937e6f1663fc5c3291761ce79083352fe --- /dev/null +++ b/bsp/amebaz/applications/smartconfig_app.c @@ -0,0 +1,146 @@ +/* + * File : smartconfig_demo.c + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Change Logs: + * Date Author Notes + * 2018-09-13 Bernard the first version + */ +#include +#include + +#ifdef RT_USING_SMARTCONFIG_LIB + +#include +#include "smartconfig.h" + +#define NET_READY_TIME_OUT (rt_tick_from_millisecond(30 * 1000)) + +static int rt_wlan_device_connetct(char *ssid, char *passwd) +{ + int result = RT_EOK; + rt_uint8_t time_cnt = 0; + + result = rt_wlan_connect(ssid, passwd); + if (result != RT_EOK) + { + rt_kprintf("\nconnect ssid %s error:%d!\n", ssid, result); + return result; + }; + + do + { + rt_thread_mdelay(1000); + time_cnt ++; + if (rt_wlan_is_ready()) + { + break; + } + } + while (time_cnt <= (NET_READY_TIME_OUT / 1000)); + + if (time_cnt <= (NET_READY_TIME_OUT / 1000)) + { + rt_kprintf("networking ready!\n"); + } + else + { + rt_kprintf("wait ip got timeout!\n"); + result = -RT_ETIMEOUT; + } + + return result; +} + +static void airkiss_send_notification(uint8_t random) +{ + int sock = -1; + int udpbufsize = 2; + struct sockaddr_in UDPBCAddr, UDPBCServerAddr; + + sock = socket(AF_INET, SOCK_DGRAM, 0); + if (sock < 0) + { + rt_kprintf("notify create socket error!\n"); + goto _exit; + } + + UDPBCAddr.sin_family = AF_INET; + UDPBCAddr.sin_port = htons(10000); + UDPBCAddr.sin_addr.s_addr = htonl(0xffffffff); + rt_memset(&(UDPBCAddr.sin_zero), 0, sizeof(UDPBCAddr.sin_zero)); + + UDPBCServerAddr.sin_family = AF_INET; + UDPBCServerAddr.sin_port = htons(10000); + UDPBCServerAddr.sin_addr.s_addr = htonl(INADDR_ANY); + rt_memset(&(UDPBCServerAddr.sin_zero), 0, sizeof(UDPBCServerAddr.sin_zero)); + + if (setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &udpbufsize, sizeof(int)) != 0) + { + rt_kprintf("notify socket setsockopt error\n"); + goto _exit; + } + + if (bind(sock, (struct sockaddr *)&UDPBCServerAddr, sizeof(UDPBCServerAddr)) != 0) + { + rt_kprintf("notify socket bind error\n"); + goto _exit; + } + + for (int i = 0; i <= 20; i++) + { + int ret = sendto(sock, (char *)&random, 1, 0, (struct sockaddr *)&UDPBCAddr, sizeof(UDPBCAddr)); + rt_thread_delay(10); + } + + rt_kprintf("airkiss notification thread exit!\n"); + +_exit: + if (sock >= 0) + { + closesocket(sock); + } +} + +static int smartconfig_result(rt_smartconfig_type result_type, char *ssid, char *passwd, void *userdata, rt_uint8_t userdata_len) +{ + rt_uint8_t random = *(rt_uint8_t *)userdata; + + rt_kprintf("type:%d\n", result_type); + rt_kprintf("ssid:%s\n", ssid); + rt_kprintf("passwd:%s\n", passwd); + rt_kprintf("user_data:0x%02x\n", random); + if (rt_wlan_device_connetct(ssid, passwd) == RT_EOK) + { + airkiss_send_notification(random); + } + + return 0; +} + +void smartconfig_demo(void) +{ + rt_smartconfig_start(SMARTCONFIG_TYPE_AIRKISS, SMARTCONFIG_ENCRYPT_NONE, RT_NULL, smartconfig_result); +} + +#ifdef RT_USING_FINSH +#include "finsh.h" +MSH_CMD_EXPORT(smartconfig_demo, smartconfig demo); +#endif + +#endif diff --git a/bsp/amebaz/drivers/board.c b/bsp/amebaz/drivers/board.c index f343c31d5b0c6e4958ddf9476ceb32d1433d8a06..ffdc9fc68098209b3dab0f703ae55257232f105f 100644 --- a/bsp/amebaz/drivers/board.c +++ b/bsp/amebaz/drivers/board.c @@ -12,10 +12,8 @@ * 2009-01-05 Bernard first implementation * 2018-03-15 flyingcys add amebaz */ +#include #include -#include -#include - #include "board.h" #include "drv_uart.h" @@ -87,7 +85,7 @@ void rt_hw_board_init(void) { extern uint32_t SystemCoreClock; SysTick_Config(SystemCoreClock/RT_TICK_PER_SECOND); - + #ifdef RT_USING_HEAP rt_system_heap_init((void*)HEAP_BEGIN, (void*)HEAP_END); #endif diff --git a/bsp/amebaz/drivers/board.h b/bsp/amebaz/drivers/board.h index aa915a67cfeb17c5c5c4e56174047e3764ef5d00..3baf67a4d52b809c25471ea1938cbe32241d7195 100644 --- a/bsp/amebaz/drivers/board.h +++ b/bsp/amebaz/drivers/board.h @@ -17,7 +17,17 @@ #ifndef __BOARD_H__ #define __BOARD_H__ -#include "rtl8710b.h" +#ifdef _LITTLE_ENDIAN +#undef _LITTLE_ENDIAN +#endif + +#ifdef SECTION +#undef SECTION +#endif + +#include +#include +#include void rt_hw_board_init(void); diff --git a/bsp/amebaz/drivers/drv_uart.c b/bsp/amebaz/drivers/drv_uart.c index a9b58694b185a8d53f099d614e6a8cfe8878b3b6..1bf659e79f07cbaf58727f80ddc25c56ad061de1 100644 --- a/bsp/amebaz/drivers/drv_uart.c +++ b/bsp/amebaz/drivers/drv_uart.c @@ -22,11 +22,8 @@ * 2017-05-30 Bernard the first version * 2018-03-15 flyingcys add amebaz */ - -#include -#include -#include - +#include +#include #include "board.h" #include "drv_uart.h" @@ -37,6 +34,8 @@ struct device_uart rt_uint32_t irqno; }; +extern int LOGUART_SetBaud(u32 BaudRate); + #ifdef BSP_USING_UART0 static struct rt_serial_device serial0; static struct device_uart uart0; @@ -64,7 +63,6 @@ const struct rt_uart_ops _uart_ops = */ static rt_err_t ameba_uart_configure (struct rt_serial_device *serial, struct serial_configure *cfg) { - rt_uint32_t baud_div; struct device_uart * uart; RT_ASSERT(serial != RT_NULL); diff --git a/bsp/amebaz/drivers/drv_uart.h b/bsp/amebaz/drivers/drv_uart.h index 8d2f1b6db545e612f3fd670f8ffe08f96d4cf0cd..a4d326da58a9650f14b76c1771945aa3d8685123 100644 --- a/bsp/amebaz/drivers/drv_uart.h +++ b/bsp/amebaz/drivers/drv_uart.h @@ -26,9 +26,6 @@ #ifndef __DRV_UART_H__ #define __DRV_UART_H__ -#include "ameba_soc.h" -#include "serial_api.h" - #if defined(CONFIG_PLATFORM_8711B) // 8710B #define UART_TX PA_23 diff --git a/bsp/amebaz/drivers/wlan/drv_wifi.c b/bsp/amebaz/drivers/wlan/drv_wifi.c index d4ab7e9a96d98da87d613729839cdaa0ea7550ef..67a870b034e30001686934fba8baae2d391e8143 100644 --- a/bsp/amebaz/drivers/wlan/drv_wifi.c +++ b/bsp/amebaz/drivers/wlan/drv_wifi.c @@ -25,8 +25,6 @@ #include #include "board.h" #include -#include -#include #include "drv_wlan.h" #include "drv_wifi.h" @@ -153,8 +151,11 @@ static void rtw_connect_callbackfn(char *buf, int len, int flags, void *user_dat struct ameba_wifi *wifi = user_data; LOG_D("L:%d wifi connect callback flags:%d user_data:%08x", __LINE__, flags, user_data); - wifi->connected = 1; - rt_wlan_dev_indicate_event_handle(wifi->wlan, RT_WLAN_DEV_EVT_CONNECT, RT_NULL); + if( wifi_is_connected_to_ap() == 0) + { + wifi->connected = 1; + rt_wlan_dev_indicate_event_handle(wifi->wlan, RT_WLAN_DEV_EVT_CONNECT, RT_NULL); + } } static void rtw_connect_fail_callbackfn(char *buf, int len, int flags, void *user_data) @@ -371,7 +372,7 @@ static rt_err_t rthw_wlan_join (struct rt_wlan_device *wlan, str ssid = &sta_info->ssid.val[0]; if (sta_info->key.len > 0) key = &sta_info->key.val[0]; - LOG_D("bssid connect bssid: %02x:%02x:%02x:%02x:%02x:%02x ssid:%s ssid_len:%d key:%s key_len%d", + LOG_D("bssid connect bssid: %02x:%02x:%02x:%02x:%02x:%02x ssid:%s ssid_len:%d key:%s key_len%d", sta_info->bssid[0],sta_info->bssid[1],sta_info->bssid[2],sta_info->bssid[3],sta_info->bssid[4],sta_info->bssid[5], ssid, sta_info->ssid.len, @@ -649,11 +650,8 @@ int rthw_wifi_low_init(void) LOG_I("amebaz_wifi_start success"); LOG_D("F:%s L:%d wifi_sta:0x%08x wifi_ap:0x%08x", __FUNCTION__, __LINE__, &wifi_sta, &wifi_ap); - wifi_reg_event_handler(0, rtw_connect_callbackfn, &wifi_sta); - wifi_reg_event_handler(1, rtw_disconnect_callbackfn, &wifi_sta); - - wifi_reg_event_handler(8, rtw_sta_assoc_callbackfn, &wifi_ap); - wifi_reg_event_handler(9, rtw_sta_disassoc_callbackfn, &wifi_ap); + wifi_reg_event_handler(RTHW_WIFI_EVENT_FOURWAY_HANDSHAKE_DONE, rtw_connect_callbackfn, &wifi_sta); + wifi_reg_event_handler(RTHW_WIFI_EVENT_DISCONNECT, rtw_disconnect_callbackfn, &wifi_sta); _init_flag = 1; diff --git a/bsp/amebaz/drivers/wlan/drv_wlan.c b/bsp/amebaz/drivers/wlan/drv_wlan.c index f6bb30de9aabcd0928868ff4ce1cb250761f706d..c414470633345a6a741040cb884ea7e3b2ef1d28 100644 --- a/bsp/amebaz/drivers/wlan/drv_wlan.c +++ b/bsp/amebaz/drivers/wlan/drv_wlan.c @@ -26,15 +26,7 @@ #include "wifi_constants.h" #include #include - -#ifdef _LITTLE_ENDIAN -#undef _LITTLE_ENDIAN -#endif - -#include -#include -#include -#include +#include "board.h" #include "drv_wlan.h" // #define SCAN_WAIT_TIME (10000) @@ -349,7 +341,7 @@ static void rthw_wifi_promisc_callback(unsigned char *buf, unsigned int len, voi { if (monitor_callback) { - monitor_callback(buf, len, RT_NULL); + monitor_callback(userdata, len, RT_NULL); } } @@ -372,4 +364,3 @@ void rthw_wifi_monitor_enable(int enable) rthw_wifi_stop(); } } - diff --git a/bsp/amebaz/drivers/wlan/drv_wlan.h b/bsp/amebaz/drivers/wlan/drv_wlan.h index ca9ae09798ecd1dbd2adf572c1c11e60e77ee2fc..03a8db01e89ac30312aa6c290933be1dbc6a7c93 100644 --- a/bsp/amebaz/drivers/wlan/drv_wlan.h +++ b/bsp/amebaz/drivers/wlan/drv_wlan.h @@ -25,8 +25,6 @@ #ifndef __DRV_WLAN_H__ #define __DRV_WLAN_H__ -#include - typedef enum { RTHW_MODE_NONE = 0, @@ -65,6 +63,26 @@ typedef enum { RTHW_SECURITY_FORCE_32_BIT = 0x7fffffff /**< Exists only to force rtw_security_t type to 32 bits */ } rthw_security_t; +typedef enum { + RTHW_WIFI_EVENT_CONNECT = 0, + RTHW_WIFI_EVENT_DISCONNECT = 1, + RTHW_WIFI_EVENT_FOURWAY_HANDSHAKE_DONE = 2, + RTHW_WIFI_EVENT_SCAN_RESULT_REPORT = 3, + RTHW_WIFI_EVENT_SCAN_DONE = 4, + RTHW_WIFI_EVENT_RECONNECTION_FAIL = 5, + RTHW_WIFI_EVENT_SEND_ACTION_DONE = 6, + RTHW_WIFI_EVENT_RX_MGNT = 7, + RTHW_WIFI_EVENT_STA_ASSOC = 8, + RTHW_WIFI_EVENT_STA_DISASSOC = 9, + RTHW_WIFI_EVENT_STA_WPS_START = 10, + RTHW_WIFI_EVENT_WPS_FINISH = 11, + RTHW_WIFI_EVENT_EAPOL_START = 12, + RTHW_WIFI_EVENT_EAPOL_RECVD = 13, + RTHW_WIFI_EVENT_NO_NETWORK = 14, + RTHW_WIFI_EVENT_BEACON_AFTER_DHCP = 15, + RTHW_WIFI_EVENT_MAX, +}rthw_event_indicate_t; + typedef enum { RTHW_802_11_BAND_5GHZ = 0, /**< Denotes 5GHz radio band */ RTHW_802_11_BAND_2_4GHZ = 1 /**< Denotes 2.4GHz radio band */ @@ -72,13 +90,13 @@ typedef enum { struct rthw_wlan_info { - char *ssid; + char *ssid; rt_uint8_t *bssid; rthw_802_11_band_t band; rt_uint32_t datarate; rt_uint16_t channel; rt_int16_t rssi; - rthw_security_t security; + rthw_security_t security; }; typedef void (*scan_callback_fn)(struct rthw_wlan_info *info, void *user_data); diff --git a/bsp/amebaz/figures/iar_build.png b/bsp/amebaz/figures/iar_build.png new file mode 100644 index 0000000000000000000000000000000000000000..ee373d785c56fc4618a90a14bb02838f09e877d3 Binary files /dev/null and b/bsp/amebaz/figures/iar_build.png differ diff --git a/bsp/amebaz/figures/iar_download.png b/bsp/amebaz/figures/iar_download.png new file mode 100644 index 0000000000000000000000000000000000000000..75ebf026c5b1d06a37ae5a184ba8ec36a4b35f6b Binary files /dev/null and b/bsp/amebaz/figures/iar_download.png differ diff --git a/bsp/amebaz/figures/image-tool_v2.2.0.png b/bsp/amebaz/figures/image-tool_v2.2.0.png new file mode 100644 index 0000000000000000000000000000000000000000..fceb1b7f3e816d7fe227d8ef6bd3c7607d1ea3a8 Binary files /dev/null and b/bsp/amebaz/figures/image-tool_v2.2.0.png differ diff --git a/bsp/amebaz/libraries/Kconfig b/bsp/amebaz/libraries/Kconfig new file mode 100644 index 0000000000000000000000000000000000000000..935bb1fef9329eb76a3f700a54eb158e764178a9 --- /dev/null +++ b/bsp/amebaz/libraries/Kconfig @@ -0,0 +1,7 @@ +menu "External Libraries" + + config RT_USING_SMARTCONFIG_LIB + bool "Using RT-Thrad SmartConfig Library" + default n + +endmenu diff --git a/bsp/amebaz/libraries/SConscript b/bsp/amebaz/libraries/SConscript new file mode 100644 index 0000000000000000000000000000000000000000..ca95be14e2b891254901c1c1737c0784d9972abb --- /dev/null +++ b/bsp/amebaz/libraries/SConscript @@ -0,0 +1,12 @@ +import os +from building import * + +objs = [] +cwd = GetCurrentDir() +list = os.listdir(cwd) + +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + objs = objs + SConscript(os.path.join(item, 'SConscript')) + +Return('objs') diff --git a/bsp/amebaz/libraries/smartconfig/SConscript b/bsp/amebaz/libraries/smartconfig/SConscript new file mode 100644 index 0000000000000000000000000000000000000000..4ae07e381537b09911624041dfb39ef08246c5e9 --- /dev/null +++ b/bsp/amebaz/libraries/smartconfig/SConscript @@ -0,0 +1,18 @@ +Import('rtconfig') +from building import * + +cwd = GetCurrentDir() +src = [] +path = [cwd + '/inc'] +libs = [''] +libpath = [cwd + '/libs'] + +if rtconfig.CROSS_TOOL == 'gcc': + libs += ['libsmartconfig_armcm4_gcc'] +elif rtconfig.CROSS_TOOL == 'iar': + libs += ['libsmartconfig_armcm4_iar'] + +group = DefineGroup('smartconfig', src, depend = ['RT_USING_SMARTCONFIG_LIB'], CPPPATH = path, LIBS = libs, LIBPATH = libpath) + +Return('group') + diff --git a/bsp/amebaz/libraries/smartconfig/inc/smartconfig.h b/bsp/amebaz/libraries/smartconfig/inc/smartconfig.h new file mode 100644 index 0000000000000000000000000000000000000000..b215e983c4f509c389555a4a7d91e8eb91f4387a --- /dev/null +++ b/bsp/amebaz/libraries/smartconfig/inc/smartconfig.h @@ -0,0 +1,62 @@ +/* + * File : smartconfig.h + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Change Logs: + * Date Author Notes + * 2018-09-13 Bernard the first version + */ +#ifndef __SMARTCONFIG_H__ +#define __SMARTCONFIG_H__ + +#define SMARTCONFIG_EVENT_CHANGE_CHANNEL (1 << 0) +#define SMARTCONFIG_EVENT_LOCKED_CHANNEL (1 << 1) +#define SMARTCONFIG_EVENT_COMPLETE (1 << 2) +#define SMARTCONFIG_EVENT_RESTART (1 << 3) +#define SMARTCONFIG_EVENT_STOP (1 << 4) + +typedef enum +{ + SMARTCONFIG_TYPE_AIRKISS = 0, + SMARTCONFIG_TYPE_JDSMART = 1, + SMARTCONFIG_TYPE_ESPTOUCH, + SMARTCONFIG_TYPE_REALTOUCH, + SMARTCONFIG_TYPE_ALL, + SMARTCONFIG_TYPE_MAX, +} rt_smartconfig_type; + +typedef enum +{ + SMARTCONFIG_ENCRYPT_NONE, + SMARTCONFIG_ENCRYPT_AES, +} rt_smartconfig_encrypt_type; + +typedef int (*rt_smartconfig_result_cb)(rt_smartconfig_type result_type, char *ssid, char *passwd, \ + void *userdata, rt_uint8_t userdata_len); +typedef void (*rt_smartconfig_event_handle)(rt_uint32_t event, void *userdata); + +int rt_smartconfig_start(rt_smartconfig_type config_type, rt_smartconfig_encrypt_type encrypt_type, char *encrypt, \ + rt_smartconfig_result_cb result_cb); + +int rt_smartconfig_stop(void); + +void rt_smartconfig_set_event_handle(rt_smartconfig_event_handle handle, void *userdata); + +char *rt_smartconfig_version(void); + +#endif diff --git a/bsp/amebaz/libraries/smartconfig/libs/libsmartconfig_armcm4_gcc.a b/bsp/amebaz/libraries/smartconfig/libs/libsmartconfig_armcm4_gcc.a new file mode 100644 index 0000000000000000000000000000000000000000..b7e261aa08ab236e3accd510c465be3bef4644f6 Binary files /dev/null and b/bsp/amebaz/libraries/smartconfig/libs/libsmartconfig_armcm4_gcc.a differ diff --git a/bsp/amebaz/libraries/smartconfig/libs/libsmartconfig_armcm4_iar.a b/bsp/amebaz/libraries/smartconfig/libs/libsmartconfig_armcm4_iar.a new file mode 100644 index 0000000000000000000000000000000000000000..f10f3ba8d07a1ec45bf36a3273edd3264d6c6c2a Binary files /dev/null and b/bsp/amebaz/libraries/smartconfig/libs/libsmartconfig_armcm4_iar.a differ diff --git a/bsp/amebaz/project.ewd b/bsp/amebaz/project.ewd new file mode 100644 index 0000000000000000000000000000000000000000..9d0f67c974f770757abaf4b9341fa099c8749c19 --- /dev/null +++ b/bsp/amebaz/project.ewd @@ -0,0 +1,2697 @@ + + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + + diff --git a/bsp/amebaz/project.ewp b/bsp/amebaz/project.ewp new file mode 100644 index 0000000000000000000000000000000000000000..aa4eec3342ea8ae5cc1954dcb5465d1524bccaf2 --- /dev/null +++ b/bsp/amebaz/project.ewp @@ -0,0 +1,2434 @@ + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + CSCRIPT "$PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\soc\realtek\8711b\misc\iar_utility\common\prebuild.vbs" "$PROJ_DIR$" "1" "0x08080000" + CSCRIPT "$PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\soc\realtek\8711b\misc\iar_utility\common\postbuild_img2.vbs" "$TARGET_DIR$" "$PROJ_DIR$" + + + + ILINK + 0 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 22 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + + Applications + + $PROJ_DIR$\applications\main.c + + + $PROJ_DIR$\applications\smartconfig_app.c + + + + Drivers + + $PROJ_DIR$\drivers\board.c + + + $PROJ_DIR$\drivers\drv_uart.c + + + $PROJ_DIR$\drivers\wlan\drv_wifi.c + + + $PROJ_DIR$\drivers\wlan\drv_wlan.c + + + + smartconfig + + + amebaz_sdk + + $PROJ_DIR$\packages\realtek_ameba-latest\rtthread_patch\os\rtthread_service.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\rtthread_patch\realtek\8711b\app_start.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\rtthread_patch\realtek\8711b\rtl8710b_startup.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\rtthread_patch\realtek\common\wifi\wifi_conf.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\api\wifi\rtw_wpa_supplicant\wpa_supplicant\wifi_eap_config.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\api\wifi\wifi_ind.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\api\wifi\wifi_promisc.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\api\wifi\wifi_util.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\analogin_api.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\dma_api.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\efuse_api.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\flash_api.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\gpio_api.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\gpio_irq_api.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\i2c_api.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\i2s_api.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\nfc_api.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\pinmap.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\pinmap_common.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\port_api.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\pwmout_api.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\rtc_api.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\serial_api.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\sleep.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\spi_api.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\sys_api.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\timer_api.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\us_ticker.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\us_ticker_api.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\wait_api.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\wdt_api.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\os\os_dep\osdep_service.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\soc\realtek\8711b\app\monitor\ram\monitor.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\soc\realtek\8711b\app\monitor\ram\rtl_consol.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\soc\realtek\8711b\cmsis\device\system_8195a.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\soc\realtek\8711b\fwlib\ram_lib\rtl8710b_intfcfg.c + + + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\soc\realtek\8711b\fwlib\ram_lib\rtl8710b_pinmapcfg.c + + + + Kernel + + $PROJ_DIR$\..\..\src\clock.c + + + $PROJ_DIR$\..\..\src\components.c + + + $PROJ_DIR$\..\..\src\device.c + + + $PROJ_DIR$\..\..\src\idle.c + + + $PROJ_DIR$\..\..\src\ipc.c + + + $PROJ_DIR$\..\..\src\irq.c + + + $PROJ_DIR$\..\..\src\kservice.c + + + $PROJ_DIR$\..\..\src\mem.c + + + $PROJ_DIR$\..\..\src\mempool.c + + + $PROJ_DIR$\..\..\src\object.c + + + $PROJ_DIR$\..\..\src\scheduler.c + + + $PROJ_DIR$\..\..\src\signal.c + + + $PROJ_DIR$\..\..\src\thread.c + + + $PROJ_DIR$\..\..\src\timer.c + + + + CORTEX-M4 + + $PROJ_DIR$\..\..\libcpu\arm\cortex-m4\cpuport.c + + + $PROJ_DIR$\..\..\libcpu\arm\cortex-m4\context_iar.S + + + $PROJ_DIR$\..\..\libcpu\arm\common\backtrace.c + + + $PROJ_DIR$\..\..\libcpu\arm\common\div0.c + + + $PROJ_DIR$\..\..\libcpu\arm\common\showmem.c + + + + DeviceDrivers + + $PROJ_DIR$\..\..\components\drivers\serial\serial.c + + + $PROJ_DIR$\..\..\components\drivers\src\completion.c + + + $PROJ_DIR$\..\..\components\drivers\src\dataqueue.c + + + $PROJ_DIR$\..\..\components\drivers\src\pipe.c + + + $PROJ_DIR$\..\..\components\drivers\src\ringblk_buf.c + + + $PROJ_DIR$\..\..\components\drivers\src\ringbuffer.c + + + $PROJ_DIR$\..\..\components\drivers\src\waitqueue.c + + + $PROJ_DIR$\..\..\components\drivers\src\workqueue.c + + + $PROJ_DIR$\..\..\components\drivers\wlan\wlan_cfg.c + + + $PROJ_DIR$\..\..\components\drivers\wlan\wlan_cmd.c + + + $PROJ_DIR$\..\..\components\drivers\wlan\wlan_dev.c + + + $PROJ_DIR$\..\..\components\drivers\wlan\wlan_lwip.c + + + $PROJ_DIR$\..\..\components\drivers\wlan\wlan_mgnt.c + + + $PROJ_DIR$\..\..\components\drivers\wlan\wlan_prot.c + + + $PROJ_DIR$\..\..\components\drivers\wlan\wlan_workqueue.c + + + + finsh + + $PROJ_DIR$\..\..\components\finsh\shell.c + + + $PROJ_DIR$\..\..\components\finsh\symbol.c + + + $PROJ_DIR$\..\..\components\finsh\cmd.c + + + $PROJ_DIR$\..\..\components\finsh\msh.c + + + $PROJ_DIR$\..\..\components\finsh\msh_cmd.c + + + $PROJ_DIR$\..\..\components\finsh\msh_file.c + + + + dlib + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\environ.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\libc.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\rmtx.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\stdio.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_close.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_lseek.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_mem.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_open.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_read.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_remove.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_write.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\time.c + + + + lwIP + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\arch\sys_arch.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\api_lib.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\api_msg.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\err.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\netbuf.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\netdb.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\netifapi.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\sockets.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\tcpip.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\def.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\dns.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\inet_chksum.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\init.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ip.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\memp.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\netif.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\pbuf.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\raw.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\stats.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\sys.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\tcp.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\tcp_in.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\tcp_out.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\timeouts.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\udp.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\netif\ethernet.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\netif\ethernetif.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\netif\lowpan6.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\autoip.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\dhcp.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\etharp.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\icmp.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\igmp.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_addr.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_frag.c + + + $PROJ_DIR$\..\..\components\net\lwip_dhcpd\dhcp_server_raw.c + + + diff --git a/bsp/amebaz/project.eww b/bsp/amebaz/project.eww new file mode 100644 index 0000000000000000000000000000000000000000..faa93f37cdf824efd53c15b77e75dc1f03727d9a --- /dev/null +++ b/bsp/amebaz/project.eww @@ -0,0 +1,10 @@ + + + + + $WS_DIR$\project.ewp + + + + + diff --git a/bsp/amebaz/rtconfig.h b/bsp/amebaz/rtconfig.h index c2517b4185598d01b5d6904d905a2c3cebc6f9b3..5d8ee1df02505d93c14baedcb7410870e24bcc41 100644 --- a/bsp/amebaz/rtconfig.h +++ b/bsp/amebaz/rtconfig.h @@ -17,7 +17,7 @@ #define IDLE_THREAD_STACK_SIZE 256 #define RT_USING_TIMER_SOFT #define RT_TIMER_THREAD_PRIO 4 -#define RT_TIMER_THREAD_STACK_SIZE 512 +#define RT_TIMER_THREAD_STACK_SIZE 1024 #define RT_DEBUG /* Inter-Thread communication */ @@ -151,6 +151,9 @@ /* AT commands */ +#define LWIP_USING_DHCPD +#define DHCPD_SERVER_IP "192.168.169.1" +#define DHCPD_USING_ROUTER /* VBUS(Virtual Software BUS) */ @@ -216,6 +219,10 @@ /* Env config */ + +/* External Libraries */ + +#define RT_USING_SMARTCONFIG_LIB #define BSP_USING_WIFI #endif diff --git a/bsp/amebaz/rtconfig.py b/bsp/amebaz/rtconfig.py index 2711ffa04f7876bb115fc33bf7252b032d170c61..86b5b955b495a2d301160a2c651f32e46bd1d005 100644 --- a/bsp/amebaz/rtconfig.py +++ b/bsp/amebaz/rtconfig.py @@ -66,32 +66,6 @@ if PLATFORM == 'gcc': M_CFLAGS = CFLAGS + ' -mlong-calls -Dsourcerygxx -O0 -fPIC ' M_LFLAGS = DEVICE + ' -Wl,-z,max-page-size=0x4 -shared -fPIC -e main -nostdlib' - -elif PLATFORM == 'armcc': - # toolchains - CC = 'armcc' - AS = 'armasm' - AR = 'armar' - LINK = 'armlink' - TARGET_EXT = 'axf' - - DEVICE = ' --cpu=cortex-m4.fp' - CFLAGS = DEVICE + ' --apcs=interwork -DSTM32F429_439xx' - AFLAGS = DEVICE - LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread-stm32.map --scatter stm32f429_flash.sct' - - CFLAGS += ' -I' + EXEC_PATH + '/ARM/RV31/INC' - LFLAGS += ' --libpath ' + EXEC_PATH + '/ARM/RV31/LIB' - - EXEC_PATH += '/arm/bin40/' - - if BUILD == 'debug': - CFLAGS += ' -g -O0' - AFLAGS += ' -g' - else: - CFLAGS += ' -O2' - - POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET' elif PLATFORM == 'iar': # toolchains @@ -101,7 +75,7 @@ elif PLATFORM == 'iar': LINK = 'ilinkarm' TARGET_EXT = 'out' - DEVICE = ' -D USE_STDPERIPH_DRIVER' + ' -D STM32F10X_HD' + DEVICE = '-Dewarm' CFLAGS = DEVICE CFLAGS += ' --diag_suppress Pa050' @@ -112,26 +86,31 @@ elif PLATFORM == 'iar': CFLAGS += ' --no_tbaa' CFLAGS += ' --no_clustering' CFLAGS += ' --no_scheduling' - CFLAGS += ' --debug' CFLAGS += ' --endian=little' CFLAGS += ' --cpu=Cortex-M4' CFLAGS += ' -e' CFLAGS += ' --fpu=None' CFLAGS += ' --dlib_config "' + EXEC_PATH + '/arm/INC/c/DLib_Config_Normal.h"' - CFLAGS += ' -Ol' - CFLAGS += ' --use_c++_inline' + CFLAGS += ' --silent' - AFLAGS = '' + AFLAGS = DEVICE AFLAGS += ' -s+' AFLAGS += ' -w+' AFLAGS += ' -r' AFLAGS += ' --cpu Cortex-M4' AFLAGS += ' --fpu None' + AFLAGS += ' -S' + + if BUILD == 'debug': + CFLAGS += ' --debug' + CFLAGS += ' -On' + else: + CFLAGS += ' -Oh' - LFLAGS = ' --config stm32f429_flash.icf' + LFLAGS = ' --config rom_symbol_v01_iar.icf' LFLAGS += ' --redirect _Printf=_PrintfTiny' LFLAGS += ' --redirect _Scanf=_ScanfSmall' LFLAGS += ' --entry __iar_program_start' EXEC_PATH = EXEC_PATH + '/arm/bin/' - POST_ACTION = '' + POST_ACTION = 'ielftool --bin $TARGET rt-thread.bin' diff --git a/bsp/amebaz/template.ewd b/bsp/amebaz/template.ewd new file mode 100644 index 0000000000000000000000000000000000000000..e2b2b0f6f97d260498f783b9919e36d78f71529b --- /dev/null +++ b/bsp/amebaz/template.ewd @@ -0,0 +1,2733 @@ + + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 5 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 5 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + + diff --git a/bsp/amebaz/template.ewp b/bsp/amebaz/template.ewp new file mode 100644 index 0000000000000000000000000000000000000000..328a1ea8ff83aaafb683d286f635f8d681d3265f --- /dev/null +++ b/bsp/amebaz/template.ewp @@ -0,0 +1,1898 @@ + + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + CSCRIPT "$PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\soc\realtek\8711b\misc\iar_utility\common\prebuild.vbs" "$PROJ_DIR$" "1" "0x08080000" + CSCRIPT "$PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\soc\realtek\8711b\misc\iar_utility\common\postbuild_img2.vbs" "$TARGET_DIR$" "$PROJ_DIR$" + + + + ILINK + 0 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 22 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + + + diff --git a/bsp/amebaz/template.ewt b/bsp/amebaz/template.ewt new file mode 100644 index 0000000000000000000000000000000000000000..86815bea09ac7e71619a0cd062e42399e13cee33 --- /dev/null +++ b/bsp/amebaz/template.ewt @@ -0,0 +1,2098 @@ + + + + 2 + + Debug + + ARM + + 1 + + RuntimeChecking + 0 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + C-STAT + 260 + + 1 + + 0 + + 600 + 0 + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Release + + ARM + + 0 + + RuntimeChecking + 0 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + C-STAT + 260 + + 1 + + 0 + + 600 + 0 + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bsp/amebaz/template.eww b/bsp/amebaz/template.eww new file mode 100644 index 0000000000000000000000000000000000000000..bd036bb4c98c1598f04b85f64b0dff37f6ec6028 --- /dev/null +++ b/bsp/amebaz/template.eww @@ -0,0 +1,10 @@ + + + + + $WS_DIR$\template.ewp + + + + + diff --git a/bsp/amebaz/tmp.board b/bsp/amebaz/tmp.board new file mode 100644 index 0000000000000000000000000000000000000000..1bf54bd90efffeddbe030299f11f3361ad067b62 --- /dev/null +++ b/bsp/amebaz/tmp.board @@ -0,0 +1,21 @@ + + + + + CODE 0x8000000 0x8004fff + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\soc\realtek\8711b\misc\iar_utility\common\flashloader\FlashRTL8195aMP.flash + 0x00000000 + + + CODE 0x800b020 0x807ffff + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\soc\realtek\8711b\misc\iar_utility\common\flashloader\FlashRTL8195aMP.flash + 0xb020 + + + CODE 0x10005000 0x10005A9B + $PROJ_DIR$\packages\realtek_ameba-latest\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\soc\realtek\8711b\misc\iar_utility\common\flashloader\FlashRTL8195aMP.flash + 0xb000 + --concat + + CODE 0x10005a9c 0x1003dfff +