From 4115bd621c3b618d3805c6219038b79006cbbb57 Mon Sep 17 00:00:00 2001 From: flyingcys <294102238@qq.com> Date: Thu, 14 Jun 2018 10:34:31 +0800 Subject: [PATCH] add amebaz bsp --- bsp/amebaz/.config | 314 ++ bsp/amebaz/Kconfig | 35 + bsp/amebaz/SConscript | 14 + bsp/amebaz/SConstruct | 39 + bsp/amebaz/applications/SConscript | 10 + bsp/amebaz/applications/main.c | 33 + bsp/amebaz/bootloader_symbol.icf | 13 + bsp/amebaz/drivers/SConscript | 26 + bsp/amebaz/drivers/board.c | 105 + bsp/amebaz/drivers/board.h | 26 + bsp/amebaz/drivers/drv_uart.c | 268 ++ bsp/amebaz/drivers/drv_uart.h | 47 + bsp/amebaz/drivers/drv_wifi.c | 450 +++ bsp/amebaz/drivers/drv_wifi.h | 31 + bsp/amebaz/drivers/wlan/SConscript | 15 + bsp/amebaz/drivers/wlan/amebaz_wlan.c | 642 ++++ bsp/amebaz/drivers/wlan/amebaz_wlan.h | 54 + bsp/amebaz/export-rom_symbol_v01.txt | 1427 +++++++++ bsp/amebaz/gen_bin.py | 92 + bsp/amebaz/image2.icf | 187 ++ bsp/amebaz/project.ewp | 2455 +++++++++++++++ bsp/amebaz/project.ewt | 2504 ++++++++++++++++ bsp/amebaz/project.eww | 10 + bsp/amebaz/rlx8711B-symbol-v02-img2_xip1.ld | 176 ++ bsp/amebaz/rlx8711B-symbol-v02-img2_xip2.ld | 175 ++ bsp/amebaz/rom_symbol_v01_iar.icf | 1424 +++++++++ bsp/amebaz/rtconfig.h | 184 ++ bsp/amebaz/rtconfig.py | 132 + bsp/amebaz/template.ewd | 2977 +++++++++++++++++++ bsp/amebaz/template.ewp | 1917 ++++++++++++ bsp/amebaz/template.ewt | 2099 +++++++++++++ bsp/amebaz/tmp.board | 21 + 32 files changed, 17902 insertions(+) create mode 100644 bsp/amebaz/.config create mode 100644 bsp/amebaz/Kconfig create mode 100644 bsp/amebaz/SConscript create mode 100644 bsp/amebaz/SConstruct create mode 100644 bsp/amebaz/applications/SConscript create mode 100644 bsp/amebaz/applications/main.c create mode 100644 bsp/amebaz/bootloader_symbol.icf create mode 100644 bsp/amebaz/drivers/SConscript create mode 100644 bsp/amebaz/drivers/board.c create mode 100644 bsp/amebaz/drivers/board.h create mode 100644 bsp/amebaz/drivers/drv_uart.c create mode 100644 bsp/amebaz/drivers/drv_uart.h create mode 100644 bsp/amebaz/drivers/drv_wifi.c create mode 100644 bsp/amebaz/drivers/drv_wifi.h create mode 100644 bsp/amebaz/drivers/wlan/SConscript create mode 100644 bsp/amebaz/drivers/wlan/amebaz_wlan.c create mode 100644 bsp/amebaz/drivers/wlan/amebaz_wlan.h create mode 100644 bsp/amebaz/export-rom_symbol_v01.txt create mode 100644 bsp/amebaz/gen_bin.py create mode 100644 bsp/amebaz/image2.icf create mode 100644 bsp/amebaz/project.ewp create mode 100644 bsp/amebaz/project.ewt create mode 100644 bsp/amebaz/project.eww create mode 100644 bsp/amebaz/rlx8711B-symbol-v02-img2_xip1.ld create mode 100644 bsp/amebaz/rlx8711B-symbol-v02-img2_xip2.ld create mode 100644 bsp/amebaz/rom_symbol_v01_iar.icf create mode 100644 bsp/amebaz/rtconfig.h create mode 100644 bsp/amebaz/rtconfig.py create mode 100644 bsp/amebaz/template.ewd create mode 100644 bsp/amebaz/template.ewp create mode 100644 bsp/amebaz/template.ewt create mode 100644 bsp/amebaz/tmp.board diff --git a/bsp/amebaz/.config b/bsp/amebaz/.config new file mode 100644 index 000000000..774539710 --- /dev/null +++ b/bsp/amebaz/.config @@ -0,0 +1,314 @@ +# +# Automatically generated file; DO NOT EDIT. +# RT-Thread Configuration +# + +# +# RT-Thread Kernel +# +CONFIG_RT_NAME_MAX=8 +CONFIG_RT_ALIGN_SIZE=4 +# CONFIG_RT_THREAD_PRIORITY_8 is not set +CONFIG_RT_THREAD_PRIORITY_32=y +# CONFIG_RT_THREAD_PRIORITY_256 is not set +CONFIG_RT_THREAD_PRIORITY_MAX=32 +CONFIG_RT_TICK_PER_SECOND=1000 +CONFIG_RT_DEBUG=y +CONFIG_RT_USING_OVERFLOW_CHECK=y +CONFIG_RT_DEBUG_INIT=0 +CONFIG_RT_DEBUG_THREAD=0 +CONFIG_RT_USING_HOOK=y +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 + +# +# Inter-Thread communication +# +CONFIG_RT_USING_SEMAPHORE=y +CONFIG_RT_USING_MUTEX=y +CONFIG_RT_USING_EVENT=y +CONFIG_RT_USING_MAILBOX=y +CONFIG_RT_USING_MESSAGEQUEUE=y +# CONFIG_RT_USING_SIGNALS is not set + +# +# Memory Management +# +CONFIG_RT_USING_MEMPOOL=y +# CONFIG_RT_USING_MEMHEAP is not set +# CONFIG_RT_USING_NOHEAP is not set +CONFIG_RT_USING_SMALL_MEM=y +# CONFIG_RT_USING_SLAB is not set +# CONFIG_RT_USING_MEMTRACE is not set +CONFIG_RT_USING_HEAP=y + +# +# Kernel Device Object +# +CONFIG_RT_USING_DEVICE=y +# CONFIG_RT_USING_DEVICE_OPS is not set +# CONFIG_RT_USING_INTERRUPT_INFO is not set +CONFIG_RT_USING_CONSOLE=y +CONFIG_RT_CONSOLEBUF_SIZE=128 +CONFIG_RT_CONSOLE_DEVICE_NAME="dbg" +# CONFIG_RT_USING_MODULE is not set + +# +# RT-Thread Components +# +CONFIG_RT_USING_COMPONENTS_INIT=y +# CONFIG_RT_USING_USER_MAIN is not set + +# +# C++ features +# +# CONFIG_RT_USING_CPLUSPLUS is not set + +# +# Command shell +# +CONFIG_RT_USING_FINSH=y +CONFIG_FINSH_THREAD_NAME="tshell" +CONFIG_FINSH_USING_HISTORY=y +CONFIG_FINSH_HISTORY_LINES=5 +CONFIG_FINSH_USING_SYMTAB=y +CONFIG_FINSH_USING_DESCRIPTION=y +# CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set +CONFIG_FINSH_THREAD_PRIORITY=20 +CONFIG_FINSH_THREAD_STACK_SIZE=4096 +CONFIG_FINSH_CMD_SIZE=80 +# CONFIG_FINSH_USING_AUTH is not set +CONFIG_FINSH_USING_MSH=y +CONFIG_FINSH_USING_MSH_DEFAULT=y +# CONFIG_FINSH_USING_MSH_ONLY is not set +CONFIG_FINSH_ARG_MAX=10 + +# +# Device virtual file system +# +# CONFIG_RT_USING_DFS is not set + +# +# Device Drivers +# +CONFIG_RT_USING_DEVICE_IPC=y +CONFIG_RT_USING_SERIAL=y +# CONFIG_RT_USING_CAN is not set +# CONFIG_RT_USING_HWTIMER is not set +# CONFIG_RT_USING_CPUTIME is not set +# CONFIG_RT_USING_I2C is not set +CONFIG_RT_USING_PIN=y +# CONFIG_RT_USING_PWM is not set +# CONFIG_RT_USING_MTD_NOR is not set +# CONFIG_RT_USING_MTD_NAND is not set +# CONFIG_RT_USING_RTC is not set +# CONFIG_RT_USING_SDIO is not set +# CONFIG_RT_USING_SPI is not set +# CONFIG_RT_USING_WDT is not set +CONFIG_RT_USING_WIFI=y +CONFIG_RT_USING_WLAN_STA=y +CONFIG_RT_USING_WLAN_AP=y +CONFIG_WIFI_DEVICE_STA_NAME="w0" +CONFIG_WIFI_DEVICE_AP_NAME="ap" +# CONFIG_RT_USING_AUDIO is not set + +# +# Using USB +# +# CONFIG_RT_USING_USB_HOST is not set +# CONFIG_RT_USING_USB_DEVICE is not set + +# +# POSIX layer and C standard library +# +CONFIG_RT_USING_LIBC=y +# CONFIG_RT_USING_PTHREADS is not set + +# +# Network stack +# + +# +# light weight TCP/IP stack +# +CONFIG_RT_USING_LWIP=y +CONFIG_RT_USING_LWIP141=y +# CONFIG_RT_USING_LWIP202 is not set +CONFIG_RT_LWIP_IGMP=y +CONFIG_RT_LWIP_ICMP=y +# CONFIG_RT_LWIP_SNMP is not set +CONFIG_RT_LWIP_DNS=y +CONFIG_RT_LWIP_DHCP=y +CONFIG_IP_SOF_BROADCAST=1 +CONFIG_IP_SOF_BROADCAST_RECV=1 + +# +# Static IPv4 Address +# +CONFIG_RT_LWIP_IPADDR="192.168.1.30" +CONFIG_RT_LWIP_GWADDR="192.168.1.1" +CONFIG_RT_LWIP_MSKADDR="255.255.255.0" +CONFIG_RT_LWIP_UDP=y +CONFIG_RT_LWIP_TCP=y +# CONFIG_RT_LWIP_RAW is not set +# CONFIG_RT_LWIP_PPP is not set +CONFIG_RT_MEMP_NUM_NETCONN=8 +CONFIG_RT_LWIP_PBUF_NUM=16 +CONFIG_RT_LWIP_RAW_PCB_NUM=4 +CONFIG_RT_LWIP_UDP_PCB_NUM=4 +CONFIG_RT_LWIP_TCP_PCB_NUM=4 +CONFIG_RT_LWIP_TCP_SEG_NUM=40 +CONFIG_RT_LWIP_TCP_SND_BUF=8196 +CONFIG_RT_LWIP_TCP_WND=8196 +CONFIG_RT_LWIP_TCPTHREAD_PRIORITY=10 +CONFIG_RT_LWIP_TCPTHREAD_MBOX_SIZE=8 +CONFIG_RT_LWIP_TCPTHREAD_STACKSIZE=1024 +# CONFIG_LWIP_NO_RX_THREAD is not set +# CONFIG_LWIP_NO_TX_THREAD is not set +CONFIG_RT_LWIP_ETHTHREAD_PRIORITY=12 +CONFIG_RT_LWIP_ETHTHREAD_STACKSIZE=1024 +CONFIG_RT_LWIP_ETHTHREAD_MBOX_SIZE=8 +# CONFIG_RT_LWIP_REASSEMBLY_FRAG is not set +CONFIG_LWIP_NETIF_STATUS_CALLBACK=1 +CONFIG_SO_REUSE=1 +CONFIG_LWIP_SO_RCVTIMEO=1 +CONFIG_LWIP_SO_SNDTIMEO=1 +CONFIG_LWIP_SO_RCVBUF=1 +# CONFIG_RT_LWIP_NETIF_LOOPBACK is not set +CONFIG_LWIP_NETIF_LOOPBACK=0 + +# +# Modbus master and slave stack +# +# CONFIG_RT_USING_MODBUS is not set +# CONFIG_LWIP_USING_DHCPD is not set + +# +# VBUS(Virtual Software BUS) +# +# CONFIG_RT_USING_VBUS is not set + +# +# Utilities +# +# CONFIG_RT_USING_LOGTRACE is not set +# CONFIG_RT_USING_RYM is not set + +# +# RT-Thread online packages +# + +# +# IoT - internet of things +# +# CONFIG_PKG_USING_PAHOMQTT is not set +# CONFIG_PKG_USING_WEBCLIENT is not set +# CONFIG_PKG_USING_MONGOOSE is not set +# CONFIG_PKG_USING_WEBTERMINAL is not set +# CONFIG_PKG_USING_CJSON is not set +# CONFIG_PKG_USING_JSMN is not set +# CONFIG_PKG_USING_LJSON is not set +# CONFIG_PKG_USING_EZXML is not set +# CONFIG_PKG_USING_NANOPB is not set +# CONFIG_PKG_USING_GAGENT_CLOUD is not set + +# +# Wi-Fi +# + +# +# Marvell WiFi +# +# CONFIG_PKG_USING_WLANMARVELL is not set + +# +# Wiced WiFi +# +# CONFIG_PKG_USING_WLAN_WICED is not set +# CONFIG_PKG_USING_COAP is not set +# CONFIG_PKG_USING_NOPOLL is not set +# CONFIG_PKG_USING_NETUTILS is not set +# CONFIG_PKG_USING_ONENET is not set + +# +# security packages +# +# CONFIG_PKG_USING_MBEDTLS is not set +# CONFIG_PKG_USING_libsodium is not set +# CONFIG_PKG_USING_TINYCRYPT is not set + +# +# language packages +# +# CONFIG_PKG_USING_JERRYSCRIPT is not set +# CONFIG_PKG_USING_MICROPYTHON is not set + +# +# multimedia packages +# +# CONFIG_PKG_USING_OPENMV is not set +# CONFIG_PKG_USING_MUPDF is not set + +# +# tools packages +# +# CONFIG_PKG_USING_CMBACKTRACE is not set +# CONFIG_PKG_USING_EASYFLASH is not set +# CONFIG_PKG_USING_EASYLOGGER is not set +# CONFIG_PKG_USING_SYSTEMVIEW is not set + +# +# system packages +# +# CONFIG_PKG_USING_GUIENGINE is not set +# CONFIG_PKG_USING_CAIRO is not set +# CONFIG_PKG_USING_PIXMAN is not set +# CONFIG_PKG_USING_LWEXT4 is not set +# CONFIG_PKG_USING_PARTITION is not set +# CONFIG_PKG_USING_FAL is not set +# CONFIG_PKG_USING_SQLITE is not set +# CONFIG_PKG_USING_RTI is not set +# CONFIG_PKG_USING_LITTLEVGL2RTT is not set + +# +# peripheral libraries and drivers +# +# CONFIG_PKG_USING_STM32F4_HAL is not set +# CONFIG_PKG_USING_STM32F4_DRIVERS is not set +CONFIG_PKG_USING_REALTEK_AMEBA=y +CONFIG_PKG_REALTEK_AMEBA_PATH="/packages/peripherals/realtek_ameba" +CONFIG_PKG_USING_REALTEK_AMEBA_LATEST_VERSION=y +# CONFIG_PKG_USING_REALTEK_AMEBA_V100 is not set +CONFIG_PKG_REALTEK_AMEBA_VER="latest" +# CONFIG_PKG_USING_CC3200_SDK is not set + +# +# miscellaneous packages +# +# CONFIG_PKG_USING_FASTLZ is not set +# CONFIG_PKG_USING_MINILZO is not set +# CONFIG_PKG_USING_QUICKLZ is not set +# CONFIG_PKG_USING_MULTIBUTTON is not set +# CONFIG_PKG_USING_CANFESTIVAL is not set +# CONFIG_PKG_USING_ZLIB is not set +# CONFIG_PKG_USING_DSTR is not set + +# +# sample package +# +# CONFIG_PKG_USING_SAMPLES is not set + +# +# example package: hello +# +# CONFIG_PKG_USING_HELLO is not set + +# +# Env config +# +# 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 +CONFIG_RT_USING_UART0=y diff --git a/bsp/amebaz/Kconfig b/bsp/amebaz/Kconfig new file mode 100644 index 000000000..7c35a1cc6 --- /dev/null +++ b/bsp/amebaz/Kconfig @@ -0,0 +1,35 @@ +mainmenu "RT-Thread Configuration" + +config $BSP_DIR + string + option env="BSP_ROOT" + default "." + +config $RTT_DIR + string + option env="RTT_ROOT" + default "../.." + +# you can change the RTT_ROOT default "../.." to your rtthread_root, +# example : default "F:/git_repositories/rt-thread" + +config $PKGS_DIR + string + option env="PKGS_ROOT" + default "packages" + +config $ENV_DIR + string + option env="ENV_ROOT" + default "/" + +source "$RTT_DIR/Kconfig" +source "$PKGS_DIR/Kconfig" +source "$ENV_DIR/tools/scripts/cmds/Kconfig" + +config RT_USING_UART0 + bool "Using RT_USING_UART0" + default y + +select PKG_USING_REALTEK_AMEBA + diff --git a/bsp/amebaz/SConscript b/bsp/amebaz/SConscript new file mode 100644 index 000000000..fe0ae941a --- /dev/null +++ b/bsp/amebaz/SConscript @@ -0,0 +1,14 @@ +# for module compiling +import os +Import('RTT_ROOT') + +cwd = str(Dir('#')) +objs = [] +list = os.listdir(cwd) + +for d in list: + path = os.path.join(cwd, d) + if os.path.isfile(os.path.join(path, 'SConscript')): + objs = objs + SConscript(os.path.join(d, 'SConscript')) + +Return('objs') diff --git a/bsp/amebaz/SConstruct b/bsp/amebaz/SConstruct new file mode 100644 index 000000000..19506eba0 --- /dev/null +++ b/bsp/amebaz/SConstruct @@ -0,0 +1,39 @@ +import os +import sys +import rtconfig + +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') + +sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] +try: + from building import * +except: + print('Cannot found RT-Thread root directory, please check RTT_ROOT') + print(RTT_ROOT) + exit(-1) + +TARGET = 'rtthread.' + rtconfig.TARGET_EXT + +env = Environment(tools = ['mingw'], + AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, + CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS, + AR = rtconfig.AR, ARFLAGS = '-rc', + LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) +env.PrependENVPath('PATH', rtconfig.EXEC_PATH) + +if rtconfig.PLATFORM == 'iar': + env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) + env.Replace(ARFLAGS = ['']) + env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map']) + +Export('RTT_ROOT') +Export('rtconfig') + +# prepare building environment +objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) + +# make a building +DoBuilding(TARGET, objs) diff --git a/bsp/amebaz/applications/SConscript b/bsp/amebaz/applications/SConscript new file mode 100644 index 000000000..1381e63e1 --- /dev/null +++ b/bsp/amebaz/applications/SConscript @@ -0,0 +1,10 @@ +import rtconfig +from building import * + +cwd = GetCurrentDir() +CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') + +group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) + +Return('group') diff --git a/bsp/amebaz/applications/main.c b/bsp/amebaz/applications/main.c new file mode 100644 index 000000000..2f304b950 --- /dev/null +++ b/bsp/amebaz/applications/main.c @@ -0,0 +1,33 @@ +/* + * File : startup.c + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2006, RT-Thread Develop Team + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://openlab.rt-thread.com/license/LICENSE + * + * Change Logs: + * Date Author Notes + * 2006-08-31 Bernard first implementation + * 2018-03-01 flyingcys add realtek ameba + */ + +#include +#include + +/** + * @addtogroup ameba + */ + +/*@{*/ + +int main(void) +{ + rt_kprintf("build time: %s %s\n", __DATE__, __TIME__); + rt_kprintf("Hello RT-Thread!\n"); + + return 0; +} + +/*@}*/ diff --git a/bsp/amebaz/bootloader_symbol.icf b/bsp/amebaz/bootloader_symbol.icf new file mode 100644 index 000000000..092379e62 --- /dev/null +++ b/bsp/amebaz/bootloader_symbol.icf @@ -0,0 +1,13 @@ +/* Bootloader symbol list */ +define exported symbol BOOT_FLASH_RDP_VALID = 0x08000123; +define exported symbol BOOT_FLASH_SetStatusReg = 0x080003f5; +define exported symbol BOOT_FLASH_Image1 = 0x0800043b; +define exported symbol IMAGE1$$Base = 0x10002001; +define exported symbol RamStartTable = 0x10002001; +define exported symbol RAM_IMG1_VALID_PATTEN = 0x10002019; +define exported symbol boot_export_symbol = 0x10002021; +define exported symbol BOOT_System_Init1 = 0x10002251; +define exported symbol BOOT_System_Init2 = 0x10002263; +define exported symbol BOOT_Swd_Off = 0x10002275; +define exported symbol boot_ram_end = 0x10002455; +define exported symbol IMAGE1$$Limit = 0x10002459; diff --git a/bsp/amebaz/drivers/SConscript b/bsp/amebaz/drivers/SConscript new file mode 100644 index 000000000..aec108b67 --- /dev/null +++ b/bsp/amebaz/drivers/SConscript @@ -0,0 +1,26 @@ +from building import * + +cwd = GetCurrentDir() +list = os.listdir(cwd) +objs = [] + +src = Split(''' + board.c + drv_uart.c + ''') + +if GetDepend(['RT_USING_LWIP']): + src += Split(''' + drv_wifi.c + ''') + +CPPPATH = [cwd] + +group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH) + +for d in list: + path = os.path.join(cwd, d) + if os.path.isfile(os.path.join(path, 'SConscript')): + objs = objs + SConscript(os.path.join(d, 'SConscript')) +objs = objs + group +Return('objs') diff --git a/bsp/amebaz/drivers/board.c b/bsp/amebaz/drivers/board.c new file mode 100644 index 000000000..f343c31d5 --- /dev/null +++ b/bsp/amebaz/drivers/board.c @@ -0,0 +1,105 @@ +/* + * File : board.c + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2009 RT-Thread Develop Team + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rt-thread.org/license/LICENSE + * + * Change Logs: + * Date Author Notes + * 2009-01-05 Bernard first implementation + * 2018-03-15 flyingcys add amebaz + */ +#include +#include +#include + +#include "board.h" +#include "drv_uart.h" + +#ifdef __ICCARM__ +#pragma section="HEAP" +#define HEAP_BEGIN (__segment_end("HEAP")) +#elif defined(__GNUC__) +extern int __rtt_heap_start; +#define HEAP_BEGIN (&__rtt_heap_start) +#else +#error "not support toolchain!!!" +#endif + +#define HEAP_END (0x1002FFFF) + +#ifdef __GNUC__ +void __wrap_rtl_printf(const char *fmt, ...) +{ + va_list args; + rt_size_t length; + static char rt_log_buf[RT_CONSOLEBUF_SIZE]; + + va_start(args, fmt); + /* the return value of vsnprintf is the number of bytes that would be + * written to buffer had if the size of the buffer been sufficiently + * large excluding the terminating null byte. If the output string + * would be larger than the rt_log_buf, we have to adjust the output + * length. */ + length = rt_vsnprintf(rt_log_buf, sizeof(rt_log_buf) - 1, fmt, args); + if (length > RT_CONSOLEBUF_SIZE - 1) + length = RT_CONSOLEBUF_SIZE - 1; + rt_kprintf("%s", rt_log_buf); + va_end(args); +} +#endif + +/** + * This is the timer interrupt service routine. + * + */ +void SysTick_Handler(void) +{ + /* enter interrupt */ + rt_interrupt_enter(); + + rt_tick_increase(); + + /* leave interrupt */ + rt_interrupt_leave(); +} + + uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1) > SysTick_LOAD_RELOAD_Msk) return (1); /* Reload value impossible */ + + SysTick->LOAD = ticks - 1; /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1<<__NVIC_PRIO_BITS) - 1); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0); /* Function successful */ +} + +/** + * This function will initial board. + */ +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 + +#ifdef RT_USING_COMPONENTS_INIT + rt_components_board_init(); +#endif + +#ifdef RT_USING_CONSOLE + rt_hw_uart_init(); + rt_console_set_device(RT_CONSOLE_DEVICE_NAME); +#endif +} + +/*@}*/ diff --git a/bsp/amebaz/drivers/board.h b/bsp/amebaz/drivers/board.h new file mode 100644 index 000000000..aa915a67c --- /dev/null +++ b/bsp/amebaz/drivers/board.h @@ -0,0 +1,26 @@ +/* + * File : board.h + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2009, RT-Thread Development Team + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rt-thread.org/license/LICENSE + * + * Change Logs: + * Date Author Notes + * 2009-09-22 Bernard add board.h to this bsp + * 2018-03-15 flyingcys add amebaz + */ + +// <<< Use Configuration Wizard in Context Menu >>> +#ifndef __BOARD_H__ +#define __BOARD_H__ + +#include "rtl8710b.h" + +void rt_hw_board_init(void); + +#endif + +//*** <<< end of configuration section >>> *** diff --git a/bsp/amebaz/drivers/drv_uart.c b/bsp/amebaz/drivers/drv_uart.c new file mode 100644 index 000000000..da89095d3 --- /dev/null +++ b/bsp/amebaz/drivers/drv_uart.c @@ -0,0 +1,268 @@ +/* + * File : drv_uart.c + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2017, 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 + * 2017-05-30 Bernard the first version + * 2018-03-15 flyingcys add amebaz + */ + +#include +#include +#include + +#include "board.h" +#include "drv_uart.h" + +struct device_uart +{ + serial_t serial; + + rt_uint32_t irqno; +}; + +#ifdef RT_USING_UART0 +static struct rt_serial_device serial0; +static struct device_uart uart0; +#endif + +static rt_err_t ameba_uart_configure (struct rt_serial_device *serial, struct serial_configure *cfg); +static rt_err_t ameba_uart_control (struct rt_serial_device *serial, int cmd, void *arg); +static int ameba_uart_putc (struct rt_serial_device *serial, char c); +static int ameba_uart_getc (struct rt_serial_device *serial); +static rt_size_t ameba_uart_dma_transmit (struct rt_serial_device *serial, rt_uint8_t *buf, rt_size_t size, int direction); + +static void ameba_uart_irq(uint32_t id, SerialIrq event); + +const struct rt_uart_ops _uart_ops = +{ + ameba_uart_configure, + ameba_uart_control, + ameba_uart_putc, + ameba_uart_getc, + ameba_uart_dma_transmit +}; + +/* + * UART interface + */ +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); + serial->config = *cfg; + + uart = serial->parent.user_data; + RT_ASSERT(uart != RT_NULL); + + /* Set databits, stopbits and parity. (8-bit data, 1 stopbit, no parity) */ + serial_format(&uart->serial, 8, ParityNone, 1); + + /* set baudrate */ + serial_baud(&uart->serial, 115200); + + return (RT_EOK); +} + +static rt_err_t ameba_uart_control (struct rt_serial_device *serial, int cmd, void *arg) +{ + struct device_uart * uart; + + uart = serial->parent.user_data; + + RT_ASSERT(uart != RT_NULL); + + switch (cmd) + { + case RT_DEVICE_CTRL_CLR_INT: + /* Disable the UART Interrupt */ + serial_irq_set(&uart->serial, RxIrq, 0); + serial_irq_handler(&uart->serial, RT_NULL, 0); + break; + + case RT_DEVICE_CTRL_SET_INT: + /* install interrupt */ + serial_irq_handler(&uart->serial, ameba_uart_irq, (uint32_t)serial); + + /* Enable the UART Interrupt */ + serial_irq_set(&uart->serial, RxIrq, 1); + break; + } + + return (RT_EOK); +} + +static int ameba_uart_putc (struct rt_serial_device *serial, char c) +{ + struct device_uart* uart; + + uart = serial->parent.user_data; + + /* FIFO status, contain valid data */ + /* write data */ + serial_putc(&uart->serial, c); + + return (1); +} + +static int ameba_uart_getc (struct rt_serial_device *serial) +{ + struct device_uart* uart = serial->parent.user_data; + + if(!serial_readable(&uart->serial)) + return -1; + + /* Receive Data Available */ + return serial_getc(&uart->serial); +} + +static rt_size_t ameba_uart_dma_transmit (struct rt_serial_device *serial, rt_uint8_t *buf, rt_size_t size, int direction) +{ + return (0); +} + +static void ameba_uart_irq(uint32_t id, SerialIrq event) +{ + struct rt_serial_device *serial = (struct rt_serial_device *)id; + if(event == RxIrq) + { + rt_hw_serial_isr(serial, RT_SERIAL_EVENT_RX_IND); + } + else if(event == TxIrq) + { + } +} + +static rt_err_t dbg_configure(struct rt_serial_device *serial, struct serial_configure *cfg); +static rt_err_t dbg_control(struct rt_serial_device *serial, int cmd, void *arg); +static int dbg_putc(struct rt_serial_device *serial, char c); +static int dbg_getc(struct rt_serial_device *serial); + +static struct rt_serial_device ameba_dbg_serial; +const struct rt_uart_ops _ambed_dbg_ops = +{ + dbg_configure, + dbg_control, + dbg_putc, + dbg_getc, + RT_NULL, +}; + +static rt_err_t dbg_configure(struct rt_serial_device *serial, struct serial_configure *cfg) +{ + LOGUART_SetBaud(115200); + return RT_EOK; +} + +void dbg_uart_irq_handler(void * data) +{ + u32 IrqEn = DiagGetIsrEnReg(); + + DiagSetIsrEnReg(0); + + rt_hw_serial_isr(&ameba_dbg_serial, RT_SERIAL_EVENT_RX_IND); + + DiagSetIsrEnReg(IrqEn); +} + +static rt_err_t dbg_control(struct rt_serial_device *serial, int cmd, void *arg) +{ + switch (cmd) + { + case RT_DEVICE_CTRL_CLR_INT: + /* Disable the UART Interrupt */ + NVIC_DisableIRQ(UART_LOG_IRQ); /* this is rom_code_patch */ + break; + + case RT_DEVICE_CTRL_SET_INT: + /* install interrupt */ + DIAG_UartReInit((IRQ_FUN) dbg_uart_irq_handler); + /* Enable the UART Interrupt */ + NVIC_SetPriority(UART_LOG_IRQ, 10); /* this is rom_code_patch */ + break; + } + + return (RT_EOK); +} + +static int dbg_putc(struct rt_serial_device *serial, char c) +{ + DiagPutChar(c); + + return 1; +}; + +static int dbg_getc(struct rt_serial_device *serial) +{ + int c = -1; + + if(!UART_Readable(UART2_DEV)) + return -1; + + c = DiagGetChar(_FALSE); + + return c; +} + +/* + * UART Initiation + */ +int rt_hw_uart_init(void) +{ + struct rt_serial_device *serial; + struct serial_configure config = RT_SERIAL_CONFIG_DEFAULT; + +#ifdef RT_USING_UART0 + { + struct device_uart *uart; + + serial = &serial0; + uart = &uart0; + + /* Init UART Hardware */ + serial_init(&uart->serial, UART_TX, UART_RX); + + serial->ops = &_uart_ops; + serial->config = config; + serial->config.baud_rate = 115200; + + uart->irqno = UART0_IRQ; + + rt_hw_serial_register(serial, + "uart0", + RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX, + uart); + } +#endif + + { + serial = &ameba_dbg_serial; + + serial->ops = &_ambed_dbg_ops; + serial->config = config; + + rt_hw_serial_register(serial, + RT_CONSOLE_DEVICE_NAME, + RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX, + RT_NULL); + } + return 0; +} diff --git a/bsp/amebaz/drivers/drv_uart.h b/bsp/amebaz/drivers/drv_uart.h new file mode 100644 index 000000000..8d2f1b6db --- /dev/null +++ b/bsp/amebaz/drivers/drv_uart.h @@ -0,0 +1,47 @@ +/* + * File : drv_uart.h + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2017, 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 + * 2017-05-30 Bernard the first version + * 2018-03-15 flyingcys add amebaz + */ + +#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 +#define UART_RX PA_18 +#else +// 8711AM +#define UART_TX PA_7 +#define UART_RX PA_6 +//8711AF +//#define UART_TX PA_4 +//#define UART_RX PA_0 +#endif + +int rt_hw_uart_init(void); + +#endif /* __DRV_UART_H__ */ diff --git a/bsp/amebaz/drivers/drv_wifi.c b/bsp/amebaz/drivers/drv_wifi.c new file mode 100644 index 000000000..1da1644d7 --- /dev/null +++ b/bsp/amebaz/drivers/drv_wifi.c @@ -0,0 +1,450 @@ +/* + * File : drv_wifi.c + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2017, 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 + * 2017-5-30 Bernard the first version + * 2018-5-30 flyingcys add amebaz wifi driver + */ + +#include +#include +#include + +#include "amebaz_wlan.h" + +//#define ETH_RX_DUMP +//#define ETH_TX_DUMP +//#define MINI_DUMP + +#define MAX_ADDR_LEN 6 + +struct ameba_wifi +{ + struct rt_wlan_device parent; + + rt_uint8_t dev_addr[MAX_ADDR_LEN]; + + int idx; + int connected; +}; + +#ifdef RT_USING_WLAN_STA +static struct ameba_wifi wifi_sta; +#endif + +#ifdef RT_USING_WLAN_AP +static struct ameba_wifi wifi_ap; +#endif + +#if defined(ETH_RX_DUMP) || defined(ETH_TX_DUMP) +static void packet_dump(const char *msg, const struct pbuf *p) +{ + const struct pbuf *q; + rt_uint32_t i, j; + rt_uint8_t *ptr; + + rt_kprintf("%s %d byte\n", msg, p->tot_len); + +#ifdef MINI_DUMP + return; +#endif + + i = 0; + for (q = p; q != RT_NULL; q = q->next) + { + ptr = q->payload; + + for (j = 0; j < q->len; j++) + { + if ((i % 8) == 0) + { + rt_kprintf(" "); + } + + if ((i % 16) == 0) + { + rt_kprintf("\r\n"); + } + rt_kprintf("%02x ", *ptr); + + i++; + ptr++; + } + } + + rt_kprintf("\n\n"); +} +#endif /* dump */ + +#define netifapi_netif_set_link_up(n) netifapi_netif_common(n, netif_set_link_up, NULL) +#define netifapi_netif_set_link_down(n) netifapi_netif_common(n, netif_set_link_down, NULL) + +void netif_set_connected(int connected) +{ + wifi_sta.connected = connected; + if (connected) + { + netifapi_netif_set_link_up(wifi_sta.parent.parent.netif); + } + else + { + netifapi_netif_set_link_down(wifi_sta.parent.parent.netif); + } +} + +void rltk_wlan_set_netif_info(int idx_wlan, void * dev, unsigned char * dev_addr) +{ + struct ameba_wifi *wifi; + + if(idx_wlan == 0) + wifi = &wifi_sta; + + rtw_memcpy(wifi->dev_addr, dev_addr, 6); + rt_hw_wifi_init(); +} + +void netif_rx(int idx, unsigned int len) +{ + struct ameba_wifi *wifi; + struct pbuf *p, *q; + int sg_len = 0; + struct sk_buff *skb = RT_NULL; + + if(idx == 0) + wifi = &wifi_sta; + +#if CONFIG_WLAN + if(!wifi->connected || !rltk_wlan_running(idx)) + return; +#endif + + skb = rltk_wlan_get_recv_skb(idx); + if(!skb) + { + rt_kprintf("netif_rx rltk_wlan_get_recv_skb NULL.\n"); + return; + } + + p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL); + if (p != RT_NULL) + { + pbuf_take(p, skb->data, len); + skb_pull(skb, len); + +#ifdef ETH_RX_DUMP + packet_dump("RX dump", p); +#endif /* ETH_RX_DUMP */ + + if(wifi->parent.parent.netif->input(p, wifi->parent.parent.netif) != ERR_OK) + { + pbuf_free(p); + } + } + else + { + rt_kprintf("pbuf_alloc NULL for wifi RX.\n"); + } +} + +int netif_is_valid_IP(int idx, unsigned char *ip_dest) +{ + + struct netif * pnetif; + struct ip_addr addr = { 0 }; + u32_t *ip_dest_addr = (u32_t*)ip_dest; + + if(idx == 0) + pnetif = wifi_sta.parent.parent.netif; + + addr.addr = *ip_dest_addr; + + if(pnetif == RT_NULL) + return 0; + + if(pnetif->ip_addr.addr == 0) + return 1; + + if(ip_addr_ismulticast(&addr) || ip_addr_isbroadcast(&addr,pnetif)) + { + return 1; + } + + if(ip_addr_cmp(&(pnetif->ip_addr), &addr)) + return 1; + + return 0; +} + +void netif_post_sleep_processing(void) +{ + +} + +void netif_pre_sleep_processing(void) +{ + +} + +unsigned char *rltk_wlan_get_ip(int idx) +{ + struct ameba_wifi *wifi; + + if(idx == 0) + wifi = &wifi_sta; + + return (unsigned char *)&(wifi->parent.parent.netif->ip_addr); +} + +struct netif *rltk_wlan_get_netif(int idx) +{ + struct netif *netif; + + if(idx == 0) + netif = &wifi_sta.parent.parent.netif; + else if(idx = 1) + netif = &wifi_ap.parent.parent.netif; + + return netif; +} + + +rt_err_t rt_ameba_wifi_init(rt_device_t dev) +{ + return RT_EOK; +} + +rt_err_t rt_ameba_wifi_open(rt_device_t dev, rt_uint16_t oflag) +{ + return RT_EOK; +} + +rt_err_t rt_ameba_wifi_close(rt_device_t dev) +{ + return RT_EOK; +} + +rt_size_t rt_ameba_wifi_read(rt_device_t dev, rt_off_t pos, void *buffer, rt_size_t size) +{ + rt_set_errno(-RT_ENOSYS); + return 0; +} + +rt_size_t rt_ameba_wifi_write(rt_device_t dev, rt_off_t pos, const void *buffer, rt_size_t size) +{ + rt_set_errno(-RT_ENOSYS); + return 0; +} + +rt_err_t rt_ameba_wifi_control(rt_device_t dev, int cmd, void *args) +{ + switch(cmd) + { + case NIOCTL_GADDR: + { + struct ameba_wifi *wifi = (struct ameba_wifi *)dev; + if(args) + memcpy(args, wifi->dev_addr, MAX_ADDR_LEN); + else + return -RT_ERROR; + } + break; + + case WIFI_INIT: + { + rt_wlan_mode_t mode = *(rt_wlan_mode_t *)args; + rt_kprintf("mode:%d\n", mode); + } + break; + + case WIFI_SCAN: + { + struct rt_wlan_scan_result *dst = RT_NULL; + dst = (struct rt_wlan_scan_result *)rt_malloc(sizeof(struct rt_wlan_scan_result)); + if(dst == RT_NULL) + { + rt_kprintf("rt_malloc for scan result failed!\n"); + return -RT_ENOMEM; + } + + memset(dst, 0, sizeof(struct rt_wlan_scan_result)); + if(amebaz_wifi_scan(dst) != RT_EOK) + { + rt_kprintf("amebaz_wifi_scan failed...\n"); + return -RT_ERROR; + } + + *(struct rt_wlan_scan_result **)args = dst; + } + break; + + case WIFI_JOIN: + + break; + + case WIFI_EASYJOIN: + { + struct rt_wlan_device *wlan = (struct rt_wlan_device *)dev; + if(amebaz_wifi_connect(wlan->info->ssid, (char *)args) != RT_EOK) + { + rt_kprintf("amebaz_wifi_connect failed...\n"); + return -RT_ERROR; + } + } + break; + + case WIFI_SOFTAP: + { + struct rt_wlan_device *wlan = (struct rt_wlan_device *)dev; + if(amebaz_wifi_ap_start(wlan->info->ssid, (char *)args, wlan->info->channel) != RT_EOK) + { + rt_kprintf("amebaz_wifi_ap_start failed...\n"); + return -RT_ERROR; + } + } + break; + + case WIFI_DISCONNECT: + if(amebaz_wifi_disconnect() != RT_EOK) + { + rt_kprintf("amebaz_wifi_disconnect failed...\n"); + return -RT_ERROR; + } + break; + + case WIFI_GET_RSSI: + { + int *rssi = (int *)args; + + *rssi = amebaz_wifi_get_rssi(); + } + break; + + case WIFI_ENTER_POWERSAVE: + + break; + + case WIFI_CFG_MONITOR: + + break; + + case WIFI_SET_CHANNEL: + { + int channel = *(int *)args; + + amebaz_wifi_set_channel(channel); + } + break; + + case WIFI_GET_CHANNEL: + { + int *channel = (int *)args; + + channel = amebaz_wifi_get_channel(); + } + break; + + case WIFI_SET_MONITOR_CALLBACK: + + break; + } + + return RT_EOK; +} + +rt_err_t rt_ameba_wifi_tx(rt_device_t dev, struct pbuf* p) +{ + rt_err_t result = RT_EOK; + struct ameba_wifi *wifi = (struct ameba_wifi *)dev; + int idx; + rt_base_t level; + struct sk_buff *skb = RT_NULL; + + idx = wifi->idx; + + level = rt_hw_interrupt_disable(); + if(wifi->connected && rltk_wlan_check_isup(idx)) + rltk_wlan_tx_inc(idx); + else + { + rt_hw_interrupt_enable(level); +// rt_kprintf("is not: connected && rltk_wlan_check_isup(idx)\n"); + + result = -RT_ERROR; + goto _exit; + } + + rt_hw_interrupt_enable(level); + +#ifdef ETH_TX_DUMP + packet_dump("TX dump", p); +#endif /* ETH_TX_DUMP */ + + skb = rltk_wlan_alloc_skb(p->tot_len); + if(skb != RT_NULL) + { + /* copy pbuf to a whole ETH frame */ + pbuf_copy_partial(p, skb->tail, p->tot_len, 0); + skb_put(skb, p->tot_len); + + rltk_wlan_send_skb(idx, skb); + } + else + { + rt_kprintf("rltk_wlan_alloc_skb NULL for WIFI TX.\n"); + result = -RT_ENOMEM; + } + +_exit: + level = rt_hw_interrupt_disable(); + rltk_wlan_tx_dec(idx); + rt_hw_interrupt_enable(level); + + return result; +} + +int rt_hw_wifi_init(void) +{ + rt_kprintf("%s %d\n", __FUNCTION__, __LINE__); + +#ifdef RT_USING_WLAN_STA + wifi_sta.parent.parent.parent.init = rt_ameba_wifi_init; + wifi_sta.parent.parent.parent.open = rt_ameba_wifi_open; + wifi_sta.parent.parent.parent.close = rt_ameba_wifi_close; + wifi_sta.parent.parent.parent.read = rt_ameba_wifi_read; + wifi_sta.parent.parent.parent.write = rt_ameba_wifi_write; + wifi_sta.parent.parent.parent.control = rt_ameba_wifi_control; + wifi_sta.parent.parent.parent.user_data = RT_NULL; + // + wifi_sta.idx = 0; + // + wifi_sta.parent.parent.eth_rx = RT_NULL; + wifi_sta.parent.parent.eth_tx = rt_ameba_wifi_tx; + + /* register wifi device */ + eth_device_init(&wifi_sta.parent.parent, WIFI_DEVICE_STA_NAME); +#endif + +#ifdef RT_USING_WLAN_AP + +#endif + + return RT_EOK; +} + diff --git a/bsp/amebaz/drivers/drv_wifi.h b/bsp/amebaz/drivers/drv_wifi.h new file mode 100644 index 000000000..e2ca03cd1 --- /dev/null +++ b/bsp/amebaz/drivers/drv_wifi.h @@ -0,0 +1,31 @@ +/* + * File : drv_wifi.h + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2017, 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 + * 2017-5-30 Bernard the first version + */ + +#ifndef __DRV_WIFI_H__ +#define __DRV_WIFI_H__ + +int rt_hw_wifi_init(void); + +#endif /* __DRV_WIFI_H__ */ + diff --git a/bsp/amebaz/drivers/wlan/SConscript b/bsp/amebaz/drivers/wlan/SConscript new file mode 100644 index 000000000..9b4e410f5 --- /dev/null +++ b/bsp/amebaz/drivers/wlan/SConscript @@ -0,0 +1,15 @@ +import rtconfig +from building import * + +cwd = GetCurrentDir() +CPPPATH = [cwd, str(Dir('#'))] + +src = [] +if GetDepend(['RT_USING_LWIP']): + src += Split(''' + amebaz_wlan.c + ''') + +group = DefineGroup('amebaz_wlan', src, depend = [''], CPPPATH = CPPPATH) + +Return('group') diff --git a/bsp/amebaz/drivers/wlan/amebaz_wlan.c b/bsp/amebaz/drivers/wlan/amebaz_wlan.c new file mode 100644 index 000000000..855be37fc --- /dev/null +++ b/bsp/amebaz/drivers/wlan/amebaz_wlan.c @@ -0,0 +1,642 @@ +/* + * File : amebaz_wlan.c + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2017, 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 + * 2017-5-30 Bernard the first version + * 2018-6-12 flyingcys add amebaz wlan interface + */ +#include +#include + +#include "wifi_structures.h" +#include "wifi_constants.h" +#include +#include + + +#define PASSWD_LEN 65 +#define SCAN_WAIT_TIME 10000 + +typedef enum +{ + WIFI_NONE, + WIFI_STATION, + WIFI_AP, +} rt_wlan_mode_t; + +struct rt_wlan_info +{ + rt_wlan_mode_t mode; /* wifi mode */ + rtw_security_t security; + + char *ssid; + uint8_t bssid[6]; + + /* maximal data rate */ + uint32_t datarate; + /* radio channel */ + uint16_t channel; + /* signal strength */ + int16_t rssi; +}; + +typedef struct rt_wlan_scan_result +{ + char ap_num; + struct rt_wlan_info *ap_table; +} rt_wlan_scan_result_t; + + +static rtw_network_info_t wifi_info = {0}; +static rtw_ap_info_t ap_info = {0}; +static unsigned char wifi_password[65] = {0}; +static unsigned char ap_password[PASSWD_LEN] = {0}; +static rt_sem_t scan_done_sem = RT_NULL; +static char *scan_buf = RT_NULL; +static int ApNum = 0; + +extern struct netif *rltk_wlan_get_netif(int idx); + +static void LwIP_ReleaseIP(uint8_t idx) +{ + struct ip_addr ipaddr; + struct ip_addr netmask; + struct ip_addr gw; + struct netif *pnetif = rltk_wlan_get_netif(idx); + + IP4_ADDR(&ipaddr, 0, 0, 0, 0); + IP4_ADDR(&netmask, 255, 255, 255, 0); + IP4_ADDR(&gw, 0, 0, 0, 0); + + netif_set_addr(pnetif, &ipaddr , &netmask, &gw); +} + +static rtw_result_t amebaz_scan_result_handler( rtw_scan_handler_result_t* malloced_scan_result ) +{ + if (malloced_scan_result->scan_complete != RTW_TRUE) { + rtw_scan_result_t* record = &malloced_scan_result->ap_details; + record->SSID.val[record->SSID.len] = 0; /* Ensure the SSID is null terminated */ + + ++ ApNum; + + if(malloced_scan_result->user_data) + memcpy((void *)((char *)malloced_scan_result->user_data+(ApNum-1)*sizeof(rtw_scan_result_t)), (char *)record, sizeof(rtw_scan_result_t)); + } + else + { + rt_kprintf("ap num:%d\n", ApNum); + + if(scan_done_sem) + { + rt_sem_release(scan_done_sem); + } + } + + return RTW_SUCCESS; +} + + +static int amebaz_wifi_do_scan(void) +{ + int ret = RTW_SUCCESS; + + rt_kprintf("wifi scan start...\n"); + + scan_buf = malloc(65*sizeof(rtw_scan_result_t)); + if(scan_buf == NULL){ + ret = RTW_BUFFER_UNAVAILABLE_TEMPORARY; + return -RT_ENOMEM; + } + + memset(scan_buf, 0, 65 * sizeof(rtw_scan_result_t)); + + if((ret = wifi_scan_networks(amebaz_scan_result_handler, scan_buf)) != RTW_SUCCESS){ + rt_kprintf("ERROR: wifi scan failed\n\r"); + + return -RT_ERROR; + } + + return RT_EOK; +} + +int amebaz_wifi_scan(struct rt_wlan_scan_result *dst) +{ + rt_uint32_t i; + rt_uint32_t j = 0; + + scan_done_sem = rt_sem_create("scandone", 0, RT_IPC_FLAG_FIFO); + if(scan_done_sem == RT_NULL) + return -RT_ENOMEM; + + if(amebaz_wifi_do_scan() != RT_EOK) + { + rt_kprintf("amebaz_wifi_do_scan failed...\n"); + return -RT_ERROR; + } + + if(rt_sem_take(scan_done_sem, rt_tick_from_millisecond(SCAN_WAIT_TIME)) != RT_EOK) + { + rt_kprintf("scan wait timeout...\n"); + return -RT_ETIMEOUT; + } + + if(scan_done_sem) + { + rt_sem_delete(scan_done_sem); + scan_done_sem = RT_NULL; + } + + rtw_scan_result_t *ptr = (rtw_scan_result_t *)scan_buf; + dst->ap_num = ApNum; + ApNum = 0; + + dst->ap_table = (struct rt_wlan_info *)rt_malloc(sizeof(struct rt_wlan_info) * dst->ap_num); + if(dst->ap_table == RT_NULL) + { + rt_kprintf("rt_malloc for ap table failed...\n"); + goto __exit; + } + + for(i = 0; i < dst->ap_num; i ++) + { + dst->ap_table[i].mode = 1; + dst->ap_table[i].security = ptr->security; + dst->ap_table[i].ssid = (char *)rt_malloc(33); + if(dst->ap_table[i].ssid == RT_NULL) + { + rt_kprintf("rt_malloc for ssid Failed! times:%d,total:%d\n",i,ApNum); + j = i; + goto __exit; + } + + memset(dst->ap_table[i].ssid, 0, 33); + memcpy(dst->ap_table[i].ssid, ptr->SSID.val, ptr->SSID.len); + memcpy(dst->ap_table[i].bssid, ptr->BSSID.octet, 6); + dst->ap_table[i].datarate = 0; + dst->ap_table[i].channel = ptr->channel; + dst->ap_table[i].rssi = ptr->signal_strength; + + ptr ++; + } + + if(scan_buf != RT_NULL) + { + rt_free(scan_buf); + scan_buf = RT_NULL; + } + + return RT_EOK; + +__exit: + + if(scan_buf != RT_NULL) + { + rt_free(scan_buf); + scan_buf = RT_NULL; + } + + if(dst->ap_table) + { + for(i = 0; i < j; i ++) + rt_free(dst->ap_table[i].ssid); + rt_free(dst->ap_table); + dst->ap_table = RT_NULL; + dst->ap_num = 0; + } + + return -RT_ERROR; +} + +void amebaz_wifi_info_init(void) +{ + memset(wifi_info.ssid.val, 0, sizeof(wifi_info.ssid.val)); + memset(wifi_info.bssid.octet, 0, 6); + memset(wifi_password, 0, sizeof(wifi_password)); + wifi_info.ssid.len = 0; + wifi_info.password = NULL; + wifi_info.password_len = 0; + wifi_info.key_id = -1; + + memset(ap_info.ssid.val, 0, sizeof(ap_info.ssid.val)); + ap_info.ssid.len = 0; + ap_info.security_type = RTW_SECURITY_UNKNOWN; + ap_info.password = NULL; + ap_info.password_len = 0; + ap_info.channel = 1; +} + +static int amebaz_wifi_set_sta_info(char *ssid, char *passwd) +{ + if(ssid == RT_NULL || strlen(ssid) > 32) + { + rt_kprintf("Invalid argument...\n"); + return -RT_EINVAL; + } + + strcpy(wifi_info.ssid.val, ssid); + wifi_info.ssid.len = strlen(ssid); + + if(passwd != NULL) + { + if(strlen(passwd) > 64) + { + rt_kprintf("Invalid argument...\n"); + return -RT_EINVAL; + } + strcpy(wifi_password, passwd); + wifi_info.password = wifi_password; + wifi_info.password_len = strlen(passwd); + } + else + wifi_info.password = RT_NULL; + + return RT_EOK; +} + +static int amebaz_wifi_set_ap_info(char *ssid, char *passwd, int channel) +{ + if(ssid == RT_NULL || strlen(ssid) > 32) + { + rt_kprintf("Invalid argument...\n"); + return -RT_EINVAL; + } + + strcpy(ap_info.ssid.val, ssid); + ap_info.ssid.len = strlen(ssid); + + if(passwd != NULL) + { + if(strlen(passwd) > 64) + { + rt_kprintf("Invalid argument...\n"); + return -RT_EINVAL; + } + strcpy(ap_password, passwd); + ap_info.password = ap_password; + ap_info.password_len = strlen(passwd); + } + else + ap_info.password = RT_NULL; + + ap_info.channel = channel; + return RT_EOK; +} + +static int amebaz_wifi_do_connect(void) +{ + int mode, ret; + char empty_bssid[6] = {0}; + char assoc_by_bssid = 0; + + rt_kprintf("amebaz wifi do connect start...\n"); + if(memcmp (wifi_info.bssid.octet, empty_bssid, 6)) + { + assoc_by_bssid = 1; + } + else if(wifi_info.ssid.val[0] == 0) + { + ret = RTW_BADARG; + return -RT_ERROR; + } + + if(wifi_info.password != RT_NULL) + { + if((wifi_info.key_id >= 0) && (wifi_info.key_id <= 3)) + { + wifi_info.security_type = RTW_SECURITY_WEP_PSK; + } + else + { + wifi_info.security_type = RTW_SECURITY_WPA2_AES_PSK; + } + } + else + { + wifi_info.security_type = RTW_SECURITY_OPEN; + } + + //Check if in AP mode + wext_get_mode(WLAN0_NAME, &mode); + if(mode == IW_MODE_MASTER) + { + #if 0 +#if CONFIG_LWIP_LAYER + dhcps_deinit(); +#endif + wifi_off(); + vTaskDelay(20); + if (wifi_on(RTW_MODE_STA) < 0){ + printf("\n\rERROR: Wifi on failed!"); + ret = RTW_ERROR; + goto EXIT; + } + #endif + } + + if(assoc_by_bssid) + { + rt_kprintf("Joining BSS by BSSID \"MAC_FMT\" ...\n", MAC_ARG(wifi_info.bssid.octet)); + ret = wifi_connect_bssid(wifi_info.bssid.octet, (char*)wifi_info.ssid.val, wifi_info.security_type, (char*)wifi_info.password, + ETH_ALEN, wifi_info.ssid.len, wifi_info.password_len, wifi_info.key_id, NULL); + } + else + { + rt_kprintf("\n\rJoining BSS by SSID %s...\n\r", (char*)wifi_info.ssid.val); + ret = wifi_connect((char*)wifi_info.ssid.val, wifi_info.security_type, + (char*)wifi_info.password, wifi_info.ssid.len, + wifi_info.password_len, wifi_info.key_id, NULL); + } + + if(ret!= RTW_SUCCESS) + { + if(ret == RTW_INVALID_KEY) + rt_kprintf("ERROR:Invalid Key\n"); + + rt_kprintf("ERROR: Can't connect to AP\n"); + return -RT_ERROR; + } + + rt_kprintf("now start dhcp...\n"); + netif_set_connected(1); + dhcp_start(netif_default); + rt_kprintf("dhcp success...\n"); + + return RT_EOK; +} + +int amebaz_wifi_connect(char *ssid, char *passwd) +{ + int ret; + + ret = amebaz_wifi_set_sta_info(ssid, passwd); + if(ret != RT_EOK) + { + amebaz_wifi_info_init(); + return ret; + } + + if(amebaz_wifi_do_connect() != RT_EOK) + { + amebaz_wifi_info_init(); + rt_kprintf("amebaz_wifi_do_connect failed...\n"); + return -RT_ERROR; + } + + amebaz_wifi_info_init(); + + return RT_EOK; +} + +static int amebaz_wifi_do_disconnect(void) +{ + int timeout = 20; + char essid[33]; + int ret = RTW_SUCCESS; + + if(wext_get_ssid(WLAN0_NAME, (unsigned char *) essid) < 0) + { + rt_kprintf("\nWIFI disconnected!\n"); + return -RT_ERROR; + } + + if((ret = wifi_disconnect()) < 0) + { + return -RT_ERROR; + } + + while(1) + { + if(wext_get_ssid(WLAN0_NAME, (unsigned char *) essid) < 0) + { + rt_kprintf("\nWIFI disconnected!\n"); + break; + } + + if(timeout == 0) + { + rt_kprintf("ERROR: Deassoc timeout!\n\r"); + ret = RTW_TIMEOUT; + break; + } + + vTaskDelay(10); + timeout --; + } + + LwIP_ReleaseIP(WLAN0_IDX); + + if(ret != RTW_SUCCESS) + return -RT_ERROR; + + rt_kprintf("amebaz wifi do disconnect success...\n"); + return RT_EOK; +} + +int amebaz_wifi_disconnect(void) +{ + int ret = RT_EOK; + + ret = amebaz_wifi_do_disconnect(); + if(ret != RT_EOK) + rt_kprintf("amebaz_wifi_do_disconnect failed...\n"); + + amebaz_wifi_info_init(); + + return ret; +} + +static int amebaz_wifi_do_ap_start(void) +{ + struct ip_addr ipaddr; + struct ip_addr netmask; + struct ip_addr gw; + struct netif *pnetif = rltk_wlan_get_netif(1); + + int timeout = 20; + int ret = RTW_SUCCESS; + + if(ap_info.ssid.val[0] == 0){ + rt_kprintf("ERROR: SSID can't be empty\n\r"); + return -RT_ERROR; + } + + if(ap_info.password == NULL) + { + ap_info.security_type = RTW_SECURITY_OPEN; + } + else + { + if(ap_info.password_len <= RTW_MAX_PSK_LEN && ap_info.password_len >= RTW_MIN_PSK_LEN) + { + ap_info.security_type = RTW_SECURITY_WPA2_AES_PSK; + } + else + { + rt_kprintf("ERROR: password length is between 8 to 64 \n"); + return -RT_ERROR; + } + } + +//#if CONFIG_LWIP_LAYER +// dhcps_deinit(); +// IP4_ADDR(&ipaddr, GW_ADDR0, GW_ADDR1, GW_ADDR2, GW_ADDR3); +// IP4_ADDR(&netmask, NETMASK_ADDR0, NETMASK_ADDR1 , NETMASK_ADDR2, NETMASK_ADDR3); +// IP4_ADDR(&gw, GW_ADDR0, GW_ADDR1, GW_ADDR2, GW_ADDR3); +// netif_set_addr(pnetif, &ipaddr, &netmask,&gw); +//#ifdef CONFIG_DONT_CARE_TP +// pnetif->flags |= NETIF_FLAG_IPSWITCH; +//#endif +//#endif + + wifi_off(); + vTaskDelay(20); + if (wifi_on(RTW_MODE_AP) < 0) + { + rt_kprintf("ERROR: Wifi on failed!\n"); + return -RT_ERROR; + } + rt_kprintf("Now start AP mode...\n"); + + if((ret = wifi_start_ap((char*)ap_info.ssid.val, ap_info.security_type, (char*)ap_info.password, ap_info.ssid.len, ap_info.password_len, ap_info.channel) ) < 0) + { + rt_kprintf("ERROR: Operation failed!"); + return -RT_ERROR; + } + + while(1) + { + char essid[33]; + + if(wext_get_ssid(WLAN0_NAME, (unsigned char *) essid) > 0) + { + if(strcmp((const char *) essid, (const char *)ap_info.ssid.val) == 0) + { + rt_kprintf("AP %s started...\n", ap_info.ssid.val); + ret = RTW_SUCCESS; + break; + } + } + + if(timeout == 0) + { + rt_kprintf("ERROR: Start AP timeout!"); + ret = RTW_TIMEOUT; + break; + } + + vTaskDelay(10); + timeout --; + } + + if(ret != RTW_SUCCESS) + return -RT_ERROR; + +//#if CONFIG_LWIP_LAYER + //LwIP_UseStaticIP(pnetif); +// dhcps_init(pnetif); +//#endif + + return RT_EOK; +} + +static int amebaz_wifi_do_ap_stop(void) +{ + return RT_EOK; +} + +int amebaz_wifi_ap_start(char *ssid, char *passwd, int channel) +{ + int ret; + + ret = amebaz_wifi_set_ap_info(ssid, passwd, channel); + if(ret != RT_EOK) + { + amebaz_wifi_info_init(); + return ret; + } + + if(amebaz_wifi_do_ap_start() != RT_EOK) + { + amebaz_wifi_info_init(); + rt_kprintf("amebaz_wifi_ap_start failed...\n"); + return -RT_ERROR; + } + + amebaz_wifi_info_init(); + return RT_EOK; +} + +int amebaz_wifi_ap_stop(void) +{ + int ret; + + if(amebaz_wifi_do_ap_stop() != RT_EOK) + { + amebaz_wifi_info_init(); + rt_kprintf("amebaz_wifi_ap_stop failed...\n"); + return -RT_ERROR; + } + + amebaz_wifi_info_init(); + return RT_EOK; +} + +int amebaz_wifi_get_rssi(void) +{ + int rssi = 0; + + wifi_get_rssi(&rssi); + + return rssi; +} + +void amebaz_wifi_set_channel(int channel) +{ + wifi_set_channel(channel); +} + +int amebaz_wifi_get_channel(void) +{ + int channel; + + wifi_get_channel(&channel); + + return channel; +} + +int amebaz_wifi_init(rt_wlan_mode_t mode) +{ + int ret; + rtw_mode_t rtw_mode; + + if(mode == WIFI_STATION) + rtw_mode = RTW_MODE_STA; + else if(mode == WIFI_AP) + rtw_mode = RTW_MODE_AP; + + if(wifi_on(mode) < 0) + return -RT_ERROR; + + if(wifi_set_autoreconnect(1) < 0) + return -RT_ERROR; + + return RT_EOK; +} + diff --git a/bsp/amebaz/drivers/wlan/amebaz_wlan.h b/bsp/amebaz/drivers/wlan/amebaz_wlan.h new file mode 100644 index 000000000..e06279729 --- /dev/null +++ b/bsp/amebaz/drivers/wlan/amebaz_wlan.h @@ -0,0 +1,54 @@ +/* + * File : amebaz_wlan.h + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2017, 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 + * 2017-5-30 Bernard the first version + * 2018-6-12 flyingcys add amebaz wlan interface + */ + +#ifndef __AMEBAZ_WLAN_H__ +#define __AMEBAZ_WLAN_H__ + +int amebaz_wifi_scan(); + +void amebaz_wifi_info_init(void); + +int amebaz_wifi_set_sta_info(char *ssid, char *passwd); + +int amebaz_wifi_set_ap_info(char *ssid, char *passwd); + +int amebaz_wifi_connect(char *ssid, char *passwd); + +int amebaz_wifi_disconnect(void); + +int amebaz_wifi_ap_start(char *ssid, char *passwd, int channel); + +int amebaz_wifi_ap_stop(void); + +int amebaz_wifi_get_rssi(void); + +void amebaz_wifi_set_channel(int channel); + +int amebaz_wifi_get_channel(void); + +int amebaz_wifi_init(rt_wlan_mode_t mode); + +#endif /* __AMEBAZ_WLAN_H__ */ + diff --git a/bsp/amebaz/export-rom_symbol_v01.txt b/bsp/amebaz/export-rom_symbol_v01.txt new file mode 100644 index 000000000..4908d78cd --- /dev/null +++ b/bsp/amebaz/export-rom_symbol_v01.txt @@ -0,0 +1,1427 @@ +SECTIONS +{ + __vectors_table = 0x0; + Reset_Handler = 0x101; + NMI_Handler = 0x115; + /*HardFault_Handler = 0x119;*/ + MemManage_Handler = 0x12d; + BusFault_Handler = 0x131; + UsageFault_Handler = 0x135; + VSprintf = 0x201; + DiagPrintf = 0x4dd; + DiagSPrintf = 0x509; + DiagSnPrintf = 0x535; + prvDiagPrintf = 0x7ed; + prvDiagSPrintf = 0x821; + UARTIMG_Write = 0x855; + UARTIMG_Download = 0x901; + _memcmp = 0x991; + _memcpy = 0x9c5; + _memset = 0xa7d; + DumpForOneBytes = 0xae9; + CmdRomHelp = 0xc69; + CmdDumpWord = 0xccd; + CmdWriteWord = 0xd7d; + CmdFlash = 0xdd1; + CmdEfuse = 0x12c1; + CmdDumpByte = 0x1775; + CmdDumpHalfWord = 0x17c9; + CmdWriteByte = 0x1881; + SramReadWriteCpy = 0x18c1; + SramReadWriteTest = 0x19f9; + CmdSRamTest = 0x1ac9; + GetRomCmdNum = 0x1b59; + Rand = 0x1b5d; + Rand_Arc4 = 0x1bdd; + RandBytes_Get = 0x1c0d; + Isspace = 0x1c59; + Strtoul = 0x1c6d; + ArrayInitialize = 0x1d15; + GetArgc = 0x1d29; + GetArgv = 0x1d55; + UartLogCmdExecute = 0x1db1; + UartLogShowBackSpace = 0x1e49; + UartLogRecallOldCmd = 0x1e7d; + UartLogHistoryCmd = 0x1eb1; + UartLogCmdChk = 0x1f2d; + UartLogIrqHandle = 0x2035; + RtlConsolInit = 0x2101; + RtlConsolTaskRom = 0x218d; + RtlExitConsol = 0x21b9; + RtlConsolRom = 0x2205; + BKUP_Write = 0x2249; + BKUP_Read = 0x226d; + BKUP_Set = 0x228d; + BKUP_Clear = 0x22b9; + NCO32K_Init = 0x22e9; + EXT32K_Cmd = 0x2349; + NCO8M_Init = 0x2365; + NCO8M_Cmd = 0x23bd; + ISO_Set = 0x23d9; + PLL0_Set = 0x23f1; + PLL1_Set = 0x2409; + PLL2_Set = 0x2421; + PLL3_Set = 0x2439; + XTAL0_Set = 0x2451; + XTAL1_Set = 0x2469; + XTAL2_Set = 0x2481; + XTAL_ClkGet = 0x2499; + CPU_ClkSet = 0x24b1; + CPU_ClkGet = 0x24c5; + OSC32K_Calibration = 0x24e5; + OSC32K_Cmd = 0x25f9; + OSC8M_Get = 0x2631; + rtl_cryptoEngine_SrcDesc_Show = 0x2641; + rtl_cryptoEngine_info = 0x27f1; + rtl_cryptoEngine_init = 0x2949; + rtl_crypto_md5_init = 0x2975; + rtl_crypto_md5_process = 0x29b1; + rtl_crypto_md5 = 0x2a09; + rtl_crypto_sha1_init = 0x2a2d; + rtl_crypto_sha1_process = 0x2a69; + rtl_crypto_sha1 = 0x2a9d; + rtl_crypto_sha2_init = 0x2ac1; + rtl_crypto_sha2_process = 0x2b15; + rtl_crypto_sha2 = 0x2b4d; + rtl_crypto_hmac_md5_init = 0x2b71; + rtl_crypto_hmac_md5_process = 0x2bd1; + rtl_crypto_hmac_md5 = 0x2c0d; + rtl_crypto_hmac_sha1_init = 0x2c31; + rtl_crypto_hmac_sha1_process = 0x2c91; + rtl_crypto_hmac_sha1 = 0x2cc9; + rtl_crypto_hmac_sha2_init = 0x2ced; + rtl_crypto_hmac_sha2_process = 0x2d65; + rtl_crypto_hmac_sha2 = 0x2da1; + rtl_crypto_aes_cbc_init = 0x2dc5; + rtl_crypto_aes_cbc_encrypt = 0x2dfd; + rtl_crypto_aes_cbc_decrypt = 0x2e45; + rtl_crypto_aes_ecb_init = 0x2e8d; + rtl_crypto_aes_ecb_encrypt = 0x2ec5; + rtl_crypto_aes_ecb_decrypt = 0x2ef5; + rtl_crypto_aes_ctr_init = 0x2f25; + rtl_crypto_aes_ctr_encrypt = 0x2f5d; + rtl_crypto_aes_ctr_decrypt = 0x2f99; + rtl_crypto_3des_cbc_init = 0x2fd5; + rtl_crypto_3des_cbc_encrypt = 0x300d; + rtl_crypto_3des_cbc_decrypt = 0x3055; + rtl_crypto_3des_ecb_init = 0x309d; + rtl_crypto_3des_ecb_encrypt = 0x30d5; + rtl_crypto_3des_ecb_decrypt = 0x311d; + rtl_crypto_des_cbc_init = 0x3165; + rtl_crypto_des_cbc_encrypt = 0x319d; + rtl_crypto_des_cbc_decrypt = 0x31f5; + rtl_crypto_des_ecb_init = 0x324d; + rtl_crypto_des_ecb_encrypt = 0x3285; + rtl_crypto_des_ecb_decrypt = 0x32dd; + SYSTIMER_Init = 0x3335; + SYSTIMER_TickGet = 0x33a1; + SYSTIMER_GetPassTime = 0x33c1; + DelayNop = 0x3401; + DelayUs = 0x3411; + DelayMs = 0x346d; + USOC_DongleSpecialCmd = 0x3481; + USOC_DongleCmd = 0x35d9; + USOC_DongleIsr = 0x35f9; + USOC_SIE_INTConfig = 0x3621; + USOC_SIE_INTClear = 0x3639; + USOC_PHY_Write = 0x3645; + USOC_PHY_Read = 0x3679; + USOC_PHY_Autoload = 0x36c1; + USOC_DongleInit = 0x37a5; + EFUSE_USER_Read = 0x386d; + EFUSE_USER1_Read = 0x3971; + EFUSE_USER2_Read = 0x397d; + EFUSE_USER3_Read = 0x3989; + EFUSE_RemainLength = 0x3995; + EFUSE_USER_Write = 0x3a21; + EFUSE_USER1_Write = 0x3bb1; + EFUSE_USER2_Write = 0x3bc1; + EFUSE_USER3_Write = 0x3bd1; + EFUSE_OTP_Read1B = 0x3be1; + EFUSE_OTP_Write1B = 0x3c01; + EFUSE_OTP_Read32B = 0x3c21; + EFUSE_OTP_Write32B = 0x3c4d; + EFUSE_RDP_EN = 0x3cad; + EFUSE_RDP_KEY = 0x3ccd; + EFUSE_OTF_KEY = 0x3cf9; + EFUSE_JTAG_OFF = 0x3d25; + PAD_DrvStrength = 0x3d45; + PAD_PullCtrl = 0x3d75; + Pinmux_Config = 0x3dc5; + Pinmux_ConfigGet = 0x3dfd; + Pinmux_Deinit = 0x3e19; + PINMUX_UART0_Ctrl = 0x3e39; + PINMUX_UART1_Ctrl = 0x3e81; + PINMUX_UARTLOG_Ctrl = 0x3ea9; + PINMUX_SPI0_Ctrl = 0x3ef9; + PINMUX_SPI1_Ctrl = 0x3f8d; + PINMUX_SPIF_Ctrl = 0x400d; + PINMUX_I2C0_Ctrl = 0x406d; + PINMUX_I2C1_Ctrl = 0x40e1; + PINMUX_SDIOD_Ctrl = 0x4151; + PINMUX_I2S0_Ctrl = 0x41e5; + PINMUX_SWD_Ctrl = 0x4265; + PINMUX_SWD_OFF = 0x42b5; + PINMUX_SWD_REG = 0x42d9; + PINMUX_Ctrl = 0x42fd; + SOCPS_BackupCPUClk = 0x4391; + SOCPS_RestoreCPUClk = 0x43b1; + SOCPS_BootFromPS = 0x43d1; + SOCPS_TrapPin = 0x43f1; + SOCPS_ANACKSel = 0x4411; + SOCPS_CLKCal = 0x442d; + SOCPS_SetWakeEvent = 0x4485; + SOCPS_ClearWakeEvent = 0x449d; + SOCPS_WakePinsCtrl = 0x44a9; + SOCPS_WakePinCtrl = 0x44d9; + SOCPS_WakePinClear = 0x4529; + SOCPS_GetANATimerParam = 0x4539; + SOCPS_SetANATimer = 0x4575; + SOCPS_SetReguWakepin = 0x45dd; + SOCPS_SetReguTimer = 0x4605; + SOCPS_PWROption = 0x46d9; + SOCPS_PWROptionExt = 0x46e5; + SOCPS_PWRMode = 0x46f9; + SOCPS_SNZMode = 0x4721; + SOCPS_DeepStandby = 0x473d; + SOCPS_DeepSleep = 0x4791; + SDIO_StructInit = 0x47d5; + SDIO_Init = 0x47f1; + SDIO_INTClear = 0x486d; + SDIO_INTConfig = 0x487d; + SDIO_RPWM1_Get = 0x4895; + SDIO_RPWM2_Get = 0x48a1; + SDIO_CPWM1_Set = 0x48ad; + SDIO_CPWM2_Set = 0x48c1; + SDIO_RXBD_RPTR_Get = 0x48dd; + SDIO_RXBD_WPTR_Set = 0x48e9; + SDIO_TXBD_WPTR_Get = 0x48f5; + SDIO_TXBD_RPTR_Set = 0x4901; + SDIO_DMA_Reset = 0x490d; + BOOT_ROM_Simulation = 0x4919; + USOC_BOOT_TXBD_Proc = 0x491d; + USOC_BOOT_Init = 0x4a3d; + USB_Boot_ROM = 0x4aa9; + USOC_CH_Cmd = 0x4b59; + USOC_Cmd = 0x4bb1; + USOC_PHY_Cmd = 0x4bf5; + USOC_MODE_Cfg = 0x4c09; + USOC_TXBD_SWIDX_Cfg = 0x4c25; + USOC_TXBD_SWIDX_Get = 0x4c2d; + USOC_TXBD_HWIDX_Get = 0x4c35; + USOC_RXBD_HWIDX_Get = 0x4c3d; + USOC_RXBD_SWIDX_Cfg = 0x4c45; + USOC_RXBD_SWIDX_Get = 0x4c4d; + USOC_StructInit = 0x4c55; + USOC_Init = 0x4c85; + USOC_SW_RST = 0x4d7d; + USOC_INTCfg = 0x4d91; + USOC_INTClr = 0x4d95; + USOC_INTGet = 0x4d9d; + USOC_MIT_Cfg = 0x4da1; + USOC_TXSTUCK_Cfg = 0x4dc5; + USOC_RXSTUCK_Cfg = 0x4de9; + USOC_POWER_On = 0x4e0d; + ADC_RXGDMA_Init = 0x4e9d; + ADC_SetAudio = 0x4f45; + ADC_SetAnalog = 0x4f61; + ADC_Cmd = 0x4fbd; + ADC_INTConfig = 0x5031; + ADC_SetOneShot = 0x5049; + ADC_SetComp = 0x50fd; + ADC_INTClear = 0x517d; + ADC_INTClearPendingBits = 0x5189; + ADC_GetISR = 0x5195; + ADC_Read = 0x51a1; + ADC_ReceiveBuf = 0x51ad; + ADC_InitStruct = 0x5205; + ADC_Init = 0x524d; + BOOT_ROM_ShowBuildInfo = 0x52ed; + BOOT_ROM_OTFCheck = 0x5335; + BOOT_ROM_InitFlash = 0x5345; + BOOT_ROM_FromFlash = 0x5405; + BOOT_ROM_InitUsb = 0x5511; + BOOT_ROM_Process = 0x553d; + BOOT_ROM_InitDebugFlg = 0x5605; + HalResetVsr = 0x5639; + Cache_Enable = 0x5811; + Cache_Flush = 0x5831; + Cache_Debug = 0x5851; + CRYPTO_AlignToBe32 = 0x58bd; + CRYPTO_MemDump = 0x58d5; + CRYPTO_GetAESKey = 0x599d; + CRYPTO_SetAESKey = 0x5cb5; + CRYPTO_SetSecurityMode = 0x5d29; + CRYPTO_Init = 0x5f5d; + CRYPTO_DeInit = 0x60b9; + CRYPTO_Reset = 0x6101; + CRYPTO_Process = 0x6129; + CRYPTO_CipherInit = 0x6a11; + CRYPTO_CipherEncrypt = 0x6a35; + CRYPTO_CipherDecrypt = 0x6a61; + CRYPTO_SetCheckSumEn = 0x6a95; + CRYPTO_GetCheckSumData = 0x6ab1; + LOGUART_StructInit = 0x6abd; + LOGUART_Init = 0x6ad5; + LOGUART_PutChar = 0x6b15; + LOGUART_GetChar = 0x6b49; + LOGUART_GetIMR = 0x6b65; + LOGUART_SetIMR = 0x6b71; + LOGUART_WaitBusy = 0x6b7d; + DIAG_UartInit = 0x6b9d; + DIAG_UartReInit = 0x6c25; + EFUSE_PowerSwitchROM = 0x6c49; + EFUSE_OneByteReadROM = 0x6d65; + EFUSE_OneByteWriteROM = 0x6e0d; + EFUSE_PG_Packet = 0x6e29; + EFUSE_LogicalMap_Read = 0x7091; + EFUSE_LogicalMap_Write = 0x71f5; + FLASH_SetSpiMode = 0x73dd; + FLASH_RxCmd = 0x7465; + FLASH_WaitBusy = 0x74cd; + FLASH_RxData = 0x754d; + FLASH_TxCmd = 0x75cd; + FLASH_WriteEn = 0x763d; + FLASH_TxData12B = 0x7661; + FLASH_SetStatus = 0x7735; + FLASH_Erase = 0x7755; + FLASH_DeepPowerDown = 0x77f5; + FLASH_SetStatusBits = 0x784d; + FLASH_Calibration = 0x791d; + FLASH_StructInit_Micron = 0x7a65; + FLASH_StructInit_MXIC = 0x7af5; + FLASH_StructInit_GD = 0x7b81; + FLASH_StructInit = 0x7c11; + FLASH_Init = 0x7ca1; + FLASH_ClockDiv = 0x7d15; + FLASH_CalibrationInit = 0x7d99; + FLASH_Calibration500MPSCmd = 0x7db1; + FLASH_CalibrationPhase = 0x7dcd; + FLASH_CalibrationPhaseIdx = 0x7e59; + FLASH_CalibrationNewCmd = 0x7e6d; + FLASH_CalibrationNew = 0x7ea9; + GDMA_StructInit = 0x80dd; + GDMA_SetLLP = 0x80f9; + GDMA_ClearINTPendingBit = 0x8191; + GDMA_ClearINT = 0x81d5; + GDMA_INTConfig = 0x8211; + GDMA_Cmd = 0x8259; + GDMA_Init = 0x828d; + GDMA_ChCleanAutoReload = 0x83c1; + GDMA_SetSrcAddr = 0x83f9; + GDMA_GetSrcAddr = 0x8411; + GDMA_GetDstAddr = 0x8429; + GDMA_SetDstAddr = 0x843d; + GDMA_SetBlkSize = 0x8459; + GDMA_GetBlkSize = 0x8489; + GDMA_ChnlRegister = 0x84a1; + GDMA_ChnlUnRegister = 0x8529; + GDMA_ChnlAlloc = 0x8591; + GDMA_ChnlFree = 0x8615; + GPIO_INTMode = 0x864d; + GPIO_INTConfig = 0x86e5; + GPIO_INTHandler = 0x8725; + GPIO_Direction = 0x8771; + GPIO_Init = 0x87a1; + GPIO_DeInit = 0x886d; + GPIO_ReadDataBit = 0x88c9; + GPIO_WriteBit = 0x88ed; + GPIO_PortDirection = 0x891d; + GPIO_PortRead = 0x893d; + GPIO_PortWrite = 0x894d; + GPIO_UserRegIrq = 0x8969; + I2C_StructInit = 0x899d; + I2C_SetSpeed = 0x89e5; + I2C_SetSlaveAddress = 0x8b3d; + I2C_CheckFlagState = 0x8b79; + I2C_INTConfig = 0x8bad; + I2C_ClearINT = 0x8be5; + I2C_ClearAllINT = 0x8c85; + I2C_Init = 0x8cad; + I2C_GetRawINT = 0x8dc9; + I2C_GetINT = 0x8df1; + I2C_MasterSendNullData = 0x8e19; + I2C_MasterSend = 0x8e65; + I2C_SlaveSend = 0x8ead; + I2C_ReceiveData = 0x8ed9; + I2C_MasterWrite = 0x8f05; + I2C_MasterReadDW = 0x8f89; + I2C_MasterRead = 0x9019; + I2C_SlaveWrite = 0x9089; + I2C_SlaveRead = 0x90f1; + I2C_MasterRepeatRead = 0x9141; + I2C_Cmd = 0x91c1; + I2C_PinMuxInit = 0x91fd; + I2C_PinMuxDeInit = 0x9255; + I2C_DMAControl = 0x92ad; + I2C_DmaMode1Config = 0x92e9; + I2C_DmaMode2Config = 0x9331; + I2C_TXGDMA_Init = 0x9375; + I2C_RXGDMA_Init = 0x9459; + I2C_Sleep_Cmd = 0x9521; + I2C_WakeUp = 0x95a1; + I2S_StructInit = 0x95e9; + I2S_Cmd = 0x9611; + I2S_TxDmaCmd = 0x962d; + I2S_RxDmaCmd = 0x9641; + I2S_INTConfig = 0x9655; + I2S_INTClear = 0x965d; + I2S_INTClearAll = 0x9665; + I2S_Init = 0x9671; + I2S_ISRGet = 0x97a9; + I2S_SetRate = 0x97b5; + I2S_SetWordLen = 0x9811; + I2S_SetChNum = 0x9839; + I2S_SetPageNum = 0x9861; + I2S_SetPageSize = 0x9895; + I2S_GetPageSize = 0x98a9; + I2S_SetDirection = 0x98b5; + I2S_SetDMABuf = 0x98dd; + I2S_TxPageBusy = 0x9905; + I2S_GetTxPage = 0x9911; + I2S_GetRxPage = 0x991d; + I2S_SetTxPageAddr = 0x9929; + I2S_GetTxPageAddr = 0x9939; + I2S_SetRxPageAddr = 0x9949; + I2S_GetRxPageAddr = 0x9959; + I2S_TxPageDMA_EN = 0x9969; + I2S_RxPageDMA_EN = 0x998d; + io_assert_failed = 0x99d9; + OTF_init = 0x99fd; + OTF_Cmd = 0x9a79; + OTF_Mask = 0x9a8d; + KEY_Request = 0x9add; + RDP_EN_Request = 0x9b21; + RCC_PeriphClockCmd = 0x9b65; + FUNC_HCI_COM = 0x9c95; + RTC_ByteToBcd2 = 0x9cad; + RTC_Bcd2ToByte = 0x9cc9; + RTC_ClokSource = 0x9cdd; + RTC_EnterInitMode = 0x9d19; + RTC_ExitInitMode = 0x9d51; + RTC_WaitForSynchro = 0x9d61; + RTC_BypassShadowCmd = 0x9da9; + RTC_StructInit = 0x9dd9; + RTC_Init = 0x9de5; + RTC_TimeStructInit = 0x9e7d; + RTC_SetTime = 0x9e8d; + RTC_GetTime = 0x9ff9; + RTC_SetAlarm = 0xa051; + RTC_AlarmStructInit = 0xa211; + RTC_GetAlarm = 0xa231; + RTC_AlarmCmd = 0xa2a1; + RTC_AlarmClear = 0xa2f5; + RTC_DayLightSavingConfig = 0xa305; + RTC_GetStoreOperation = 0xa355; + RTC_OutputConfig = 0xa365; + RTC_SmoothCalibConfig = 0xa39d; + SDIO_IsTimeout = 0xa459; + SDIOB_Init = 0xa481; + SDIOB_INTConfig = 0xa575; + SDIOB_DeInit = 0xa591; + SDIOB_H2C_WriteMem = 0xa5d9; + SDIOB_H2C_SetMem = 0xa605; + SDIOB_H2C_DataHandle = 0xa631; + SDIOB_H2C_DataReady = 0xa73d; + SDIOB_IRQ_Handler_BH = 0xa80d; + SDIOB_H2C_Task = 0xa8c9; + SDIO_Boot_Up = 0xa8e5; + SPI_DmaInit = 0xa91d; + SPI_DataHandle = 0xa9d1; + SPI_Boot_DmaRxIrqHandle = 0xaa01; + SPI_Boot_ROM = 0xaa5d; + SSI_StructInit = 0xabbd; + SSI_Cmd = 0xabf5; + SSI_INTConfig = 0xac09; + SSI_SetSclkPolarity = 0xac19; + SSI_SetSclkPhase = 0xac3d; + SSI_SetDataFrameSize = 0xac61; + SSI_SetReadLen = 0xac81; + SSI_SetBaudDiv = 0xacb1; + SSI_SetBaud = 0xaccd; + SSI_SetDmaEnable = 0xad2d; + SSI_SetDmaLevel = 0xad41; + SSI_SetIsrClean = 0xad49; + SSI_WriteData = 0xad65; + SSI_SetRxFifoLevel = 0xad6d; + SSI_SetTxFifoLevel = 0xad71; + SSI_ReadData = 0xad75; + SSI_GetRxCount = 0xad79; + SSI_GetTxCount = 0xad81; + SSI_GetStatus = 0xad89; + SSI_Writeable = 0xad8d; + SSI_Readable = 0xad9d; + SSI_GetDataFrameSize = 0xadad; + SSI_TXGDMA_Init = 0xadb9; + SSI_RXGDMA_Init = 0xaef9; + SSI_ReceiveData = 0xb021; + SSI_SendData = 0xb0b9; + SSI_Busy = 0xb165; + SSI_SetSlaveEnable = 0xb175; + SSI_Init = 0xb1ad; + SSI_GetIsr = 0xb235; + SSI_GetRawIsr = 0xb239; + SSI_GetSlaveEnable = 0xb23d; + SSI_PinmuxInit = 0xb241; + SSI_PinmuxDeInit = 0xb2a9; + SYSCFG0_Get = 0xb311; + SYSCFG0_CUTVersion = 0xb31d; + SYSCFG0_BDOption = 0xb32d; + SYSCFG1_Get = 0xb33d; + SYSCFG1_AutoLoadDone = 0xb349; + SYSCFG1_TRP_LDOMode = 0xb359; + SYSCFG1_TRP_UARTImage = 0xb369; + SYSCFG1_TRP_ICFG = 0xb37d; + SYSCFG2_Get = 0xb389; + SYSCFG2_ROMINFO_Get = 0xb395; + SYSCFG2_ROMINFO_Set = 0xb3a1; + RTIM_TimeBaseStructInit = 0xb3b5; + RTIM_Cmd = 0xb3cd; + RTIM_GetCount = 0xb42d; + RTIM_UpdateDisableConfig = 0xb475; + RTIM_ARRPreloadConfig = 0xb4c5; + RTIM_UpdateRequestConfig = 0xb515; + RTIM_PrescalerConfig = 0xb575; + RTIM_GenerateEvent = 0xb5a1; + RTIM_ChangePeriod = 0xb5f9; + RTIM_Reset = 0xb64d; + RTIM_CCStructInit = 0xb68d; + RTIM_CCxInit = 0xb6a1; + RTIM_CCRxMode = 0xb749; + RTIM_CCRxSet = 0xb785; + RTIM_CCRxGet = 0xb7dd; + RTIM_OCxPreloadConfig = 0xb80d; + RTIM_CCxPolarityConfig = 0xb85d; + RTIM_CCxCmd = 0xb8ad; + RTIM_SetOnePulseOutputMode = 0xb901; + RTIM_DMACmd = 0xb959; + RTIM_TXGDMA_Init = 0xb9a9; + RTIM_RXGDMA_Init = 0xba5d; + RTIM_INTConfig = 0xbb3d; + RTIM_INTClear = 0xbba9; + RTIM_TimeBaseInit = 0xbbed; + RTIM_DeInit = 0xbced; + RTIM_INTClearPendingBit = 0xbd41; + RTIM_GetFlagStatus = 0xbd81; + RTIM_GetINTStatus = 0xbded; + UART_DeInit = 0xbe61; + UART_StructInit = 0xbe69; + UART_BaudParaGet = 0xbe81; + UART_BaudParaGetFull = 0xbec9; + UART_SetBaud = 0xbf01; + UART_SetBaudExt = 0xbf71; + UART_SetRxLevel = 0xbfc1; + UART_RxCmd = 0xbfe9; + UART_Writable = 0xbffd; + UART_Readable = 0xc005; + UART_CharPut = 0xc00d; + UART_CharGet = 0xc011; + UART_ReceiveData = 0xc019; + UART_SendData = 0xc041; + UART_ReceiveDataTO = 0xc069; + UART_SendDataTO = 0xc0a9; + UART_RxByteCntClear = 0xc0e9; + UART_RxByteCntGet = 0xc0f5; + UART_BreakCtl = 0xc0fd; + UART_ClearRxFifo = 0xc111; + UART_Init = 0xc135; + UART_ClearTxFifo = 0xc1d1; + UART_INTConfig = 0xc1dd; + UART_IntStatus = 0xc1ed; + UART_ModemStatusGet = 0xc1f1; + UART_LineStatusGet = 0xc1f5; + UART_WaitBusy = 0xc1f9; + UART_PinMuxInit = 0xc221; + UART_PinMuxDeinit = 0xc289; + UART_TXDMAConfig = 0xc2f1; + UART_RXDMAConfig = 0xc301; + UART_TXDMACmd = 0xc315; + UART_RXDMACmd = 0xc329; + UART_TXGDMA_Init = 0xc33d; + UART_RXGDMA_Init = 0xc425; + UART_LPRxStructInit = 0xc501; + UART_LPRxInit = 0xc50d; + UART_LPRxBaudSet = 0xc575; + UART_LPRxMonitorCmd = 0xc5f1; + UART_LPRxpathSet = 0xc62d; + UART_LPRxIPClockSet = 0xc641; + UART_LPRxCmd = 0xc6b1; + UART_LPRxMonBaudCtrlRegGet = 0xc6c5; + UART_LPRxMonitorSatusGet = 0xc6c9; + UART_IrDAStructInit = 0xc6cd; + UART_IrDAInit = 0xc6e5; + UART_IrDACmd = 0xc7bd; + INT_SysOn = 0xc7d1; + INT_Wdg = 0xc811; + INT_Timer0 = 0xc855; + INT_Timer1 = 0xc899; + INT_Timer2 = 0xc8dd; + INT_Timer3 = 0xc921; + INT_SPI0 = 0xc965; + INT_GPIO = 0xc9a9; + INT_Uart0 = 0xc9ed; + INT_SPIFlash = 0xca31; + INT_Uart1 = 0xca75; + INT_Timer4 = 0xcab9; + INT_I2S0 = 0xcafd; + INT_Timer5 = 0xcb41; + INT_WlDma = 0xcb85; + INT_WlProtocol = 0xcbc9; + INT_IPSEC = 0xcc0d; + INT_SPI1 = 0xcc51; + INT_Peripheral = 0xcc95; + INT_Gdma0Ch0 = 0xccd9; + INT_Gdma0Ch1 = 0xcd1d; + INT_Gdma0Ch2 = 0xcd61; + INT_Gdma0Ch3 = 0xcda5; + INT_Gdma0Ch4 = 0xcde9; + INT_Gdma0Ch5 = 0xce2d; + INT_I2C0 = 0xce71; + INT_I2C1 = 0xceb5; + INT_Uartlog = 0xcef9; + INT_ADC = 0xcf3d; + INT_RDP = 0xcf81; + INT_RTC = 0xcfc5; + INT_Gdma1Ch0 = 0xd009; + INT_Gdma1Ch1 = 0xd051; + INT_Gdma1Ch2 = 0xd099; + INT_Gdma1Ch3 = 0xd0e1; + INT_Gdma1Ch4 = 0xd129; + INT_Gdma1Ch5 = 0xd171; + INT_USB = 0xd1b9; + INT_RXI300 = 0xd201; + INT_USB_SIE = 0xd249; + INT_SdioD = 0xd291; + INT_NMI = 0xd2d1; + INT_HardFault = 0xd305; + INT_MemManage = 0xd4b5; + INT_BusFault = 0xd4d5; + INT_UsageFault = 0xd4f5; + VECTOR_TableInit = 0xd515; + VECTOR_TableInitForOS = 0xd6c5; + VECTOR_IrqRegister = 0xd6d5; + VECTOR_IrqUnRegister = 0xd6f9; + VECTOR_IrqEn = 0xd715; + VECTOR_IrqDis = 0xd765; + WDG_Scalar = 0xd7a1; + WDG_Init = 0xd7e1; + WDG_IrqClear = 0xd7fd; + WDG_IrqInit = 0xd80d; + WDG_Cmd = 0xd83d; + WDG_Refresh = 0xd85d; + _strncpy = 0xd86d; + _strcpy = 0xd889; + prvStrCpy = 0xd899; + _strlen = 0xd8b1; + _strnlen = 0xd8c9; + prvStrLen = 0xd8fd; + _strcmp = 0xd919; + _strncmp = 0xd939; + prvStrCmp = 0xd985; + StrUpr = 0xd9b5; + prvAtoi = 0xd9d1; + prvStrtok = 0xda29; + prvStrStr = 0xda81; + _strsep = 0xdab9; + skip_spaces = 0xdaf5; + skip_atoi = 0xdb11; + _parse_integer_fixup_radix = 0xdb49; + _parse_integer = 0xdb9d; + simple_strtoull = 0xdc01; + simple_strtoll = 0xdc21; + simple_strtoul = 0xdc41; + simple_strtol = 0xdc49; + _vsscanf = 0xdc61; + _sscanf = 0xe1c9; + div_u64 = 0xe1e5; + div_s64 = 0xe1ed; + div_u64_rem = 0xe1f5; + div_s64_rem = 0xe205; + _strpbrk = 0xe215; + _strchr = 0xe241; + COMMPORT_GET_T = 0xe259; + COMMPORT_CLEAN_RX = 0xe289; + xModemDebugInit = 0xe2a5; + xModemDebug = 0xe2dd; + xModemInquiry = 0xe315; + xModemGetFirst = 0xe339; + xModemGetOthers = 0xe45d; + xModemRxFrame = 0xe691; + xModemHandshake = 0xe6d5; + xModemRxBuffer = 0xe945; + xmodem_log_close = 0xe9f5; + xmodem_log_open = 0xea01; + xmodem_uart_init = 0xea39; + xmodem_uart_deinit = 0xeb25; + xmodem_uart_port_init = 0xeb35; + xmodem_uart_port_deinit = 0xeb99; + xmodem_uart_readable = 0xebdd; + xmodem_uart_writable = 0xebf5; + xmodem_uart_getc = 0xec0d; + xmodem_uart_putc = 0xec35; + xmodem_uart_putdata = 0xec49; + aes_set_key = 0xec65; + aes_encrypt = 0xf021; + aes_decrypt = 0x10171; + AES_WRAP = 0x112b1; + AES_UnWRAP = 0x113fd; + crc32_get = 0x11549; + arc4_byte = 0x1157d; + rt_arc4_init = 0x115a5; + rt_arc4_crypt = 0x115e9; + rt_md5_init = 0x11df5; + rt_md5_append = 0x11e25; + rt_md5_final = 0x11ec9; + rt_md5_hmac = 0x11f21; + RC4 = 0x12061; + RC4_set_key = 0x1238d; + ROM_WIFI_ReadPowerValue = 0x1246d; + ROM_WIFI_EfuseParseTxPowerInfo = 0x1251d; + ROM_WIFI_8051Reset = 0x125c5; + ROM_WIFI_FWDownloadEnable = 0x125dd; + ROM_WIFI_BlockWrite = 0x12619; + ROM_WIFI_PageWrite = 0x12661; + ROM_WIFI_FillDummy = 0x12685; + ROM_WIFI_WriteFW = 0x126b1; + ROM_WIFI_FWFreeToGo = 0x1275d; + ROM_WIFI_InitLLTTable = 0x127f9; + ROM_WIFI_GetChnlGroup = 0x12879; + ROM_WIFI_BWMapping = 0x129f1; + ROM_WIFI_SCMapping = 0x12a19; + ROM_WIFI_FillTxdescSectype = 0x12a99; + ROM_WIFI_FillFakeTxdesc = 0x12ab9; + ROM_WIFI_32K_Cmd = 0x12b91; + ROM_WIFI_DISCONNECT = 0x12bc1; + ROM_WIFI_SET_TSF = 0x12bfd; + ROM_WIFI_BCN_FUNC = 0x12ca5; + ROM_WIFI_BSSID_SET = 0x12ccd; + ROM_WIFI_MACADDR_SET = 0x12d09; + ROM_WIFI_EnableInterrupt = 0x12d39; + ROM_WIFI_DisableInterrupt = 0x12d4d; + ROM_WIFI_RESUME_TxBeacon = 0x12d61; + ROM_WIFI_STOP_TXBeacon = 0x12d91; + ROM_WIFI_BCN_Interval = 0x12dc1; + ROM_WIFI_BCN_FUNC_Enable = 0x12dcd; + ROM_WIFI_INIT_BeaconParameters = 0x12de5; + ROM_WIFI_MEDIA_STATUS1 = 0x12e35; + ROM_WIFI_MEDIA_STATUS = 0x12e4d; + ROM_WIFI_SetBrateCfg = 0x12e61; + ROM_WIFI_BASIC_RATE = 0x12f69; + ROM_WIFI_CHECK_BSSID = 0x12fc9; + ROM_WIFI_RESP_SIFS = 0x12fe9; + ROM_WIFI_CAM_WRITE = 0x13001; + ROM_WIFI_ACM_CTRL = 0x13021; + ROM_WIFI_FIFO_CLEARN_UP = 0x13051; + ROM_WIFI_CHECK_TXBUF = 0x130b9; + ROM_WIFI_BCN_VALID = 0x130fd; + ROM_WIFI_PROMISC_Cmd = 0x13119; + ROM_WIFI_SetOpmodeAP = 0x13189; + ROM_WIFI_ReadChipVersion = 0x132a9; + ROM_WIFI_DumpChipInfo = 0x1330d; + ROM_WIFI_InitLxDma = 0x135b1; + ROM_WIFI_InitQueueReservedPage = 0x13671; + ROM_WIFI_InitTxBufferBoundary = 0x136f1; + ROM_WIFI_InitNormalChipRegPriority = 0x1373d; + ROM_WIFI_InitPageBoundary = 0x13789; + ROM_WIFI_InitTransferPageSize = 0x13795; + ROM_WIFI_InitDriverInfoSize = 0x137a1; + ROM_WIFI_InitNetworkType = 0x137ad; + ROM_WIFI_InitRCR = 0x137c5; + ROM_WIFI_InitAdaptiveCtrl = 0x13805; + ROM_WIFI_InitSIFS = 0x1383d; + ROM_WIFI_InitEDCA = 0x13865; + ROM_WIFI_InitRateFallback = 0x138a1; + ROM_WIFI_InitRetryFunction = 0x138c9; + ROM_WIFI_InitOperationMode = 0x138e5; + ROM_WIFI_InitBurstPktLen = 0x138f9; + phy_CalculateBitShift = 0x13905; + PHY_SetBBReg_8711B = 0x1391d; + PHY_QueryBBReg_8711B = 0x13921; + ROM_odm_QueryRxPwrPercentage = 0x13925; + ROM_odm_EVMdbToPercentage = 0x13931; + ROM_odm_SignalScaleMapping_8711B = 0x13935; + ROM_odm_FalseAlarmCounterStatistics = 0x13a11; + ROM_odm_SetEDCCAThreshold = 0x13d39; + ROM_odm_SetTRxMux = 0x13d61; + ROM_odm_SetCrystalCap = 0x13d89; + ROM_odm_GetDefaultCrytaltalCap = 0x13ded; + ROM_ODM_CfoTrackingReset = 0x13dfd; + ROM_odm_CfoTrackingFlow = 0x13e21; + rtw_get_bit_value_from_ieee_value = 0x14045; + rtw_is_cckrates_included = 0x14071; + rtw_is_cckratesonly_included = 0x140a5; + rtw_check_network_type = 0x140cd; + rtw_set_fixed_ie = 0x14155; + rtw_set_ie = 0x14175; + rtw_get_ie = 0x141a1; + rtw_set_supported_rate = 0x141b5; + rtw_get_rateset_len = 0x14229; + rtw_get_wpa_ie = 0x14245; + rtw_get_wpa2_ie = 0x142d1; + rtw_get_wpa_cipher_suite = 0x142e5; + rtw_get_wpa2_cipher_suite = 0x1434d; + rtw_parse_wpa_ie = 0x143b5; + rtw_parse_wpa2_ie = 0x14481; + rtw_get_sec_ie = 0x14535; + rtw_get_wps_ie = 0x145e5; + rtw_get_wps_attr = 0x14659; + rtw_get_wps_attr_content = 0x146f1; + rtw_ieee802_11_parse_elems = 0x14739; + str_2char2num = 0x14909; + key_2char2num = 0x14925; + convert_ip_addr = 0x1493d; + rom_psk_PasswordHash = 0x14a21; + rom_psk_CalcGTK = 0x14a59; + rom_psk_CalcPTK = 0x14ae9; + _htons_rom = 0x14bdd; + _ntohs_rom = 0x14be5; + _htonl_rom = 0x14bed; + _ntohl_rom = 0x14bf1; + Message_ReplayCounter_OC2LI = 0x14bf5; + Message_EqualReplayCounter = 0x14c35; + Message_SmallerEqualReplayCounter = 0x14c6d; + Message_LargerReplayCounter = 0x14cad; + Message_setReplayCounter = 0x14ce5; + INCLargeInteger = 0x14d15; + INCOctet16_INTEGER = 0x14d25; + INCOctet32_INTEGER = 0x14d8d; + SetEAPOL_KEYIV = 0x14df5; + CheckMIC = 0x14e89; + CalcMIC = 0x14f29; + DecWPA2KeyData_rom = 0x14f9d; + DecGTK = 0x15055; + GetRandomBuffer = 0x15119; + GenNonce = 0x15181; + ClientConstructEAPOL_2Of4Way = 0x151c5; + ClientConstructEAPOL_4Of4Way = 0x152cd; + ClientConstructEAPOL_2Of2Way = 0x1537d; + ClientConstructEAPOL_MICOf2Way = 0x15459; + psk_strip_rsn_pairwise = 0x1552d; + psk_strip_wpa_pairwise = 0x155c1; + wep_80211_encrypt = 0x1587d; + wep_80211_decrypt = 0x158e1; + tkip_micappendbyte = 0x15975; + rtw_secmicsetkey = 0x159b9; + rtw_secmicappend = 0x159f9; + rtw_secgetmic = 0x15a15; + rtw_seccalctkipmic = 0x15a89; + tkip_phase1 = 0x15b7d; + tkip_phase2 = 0x15ce5; + tkip_80211_encrypt = 0x15f01; + tkip_80211_decrypt = 0x15f91; + aes1_encrypt = 0x16055; + aesccmp_construct_mic_iv = 0x1625d; + aesccmp_construct_mic_header1 = 0x162b1; + aesccmp_construct_mic_header2 = 0x16321; + aesccmp_construct_ctr_preload = 0x163a5; + aes_80211_encrypt = 0x16429; + aes_80211_decrypt = 0x167f9; + cckrates_included = 0x16c39; + cckratesonly_included = 0x16c7d; + networktype_to_raid_ex_rom = 0x16ca9; + judge_network_type_rom = 0x16cf5; + ratetbl_val_2wifirate = 0x16d89; + is_basicrate_rom = 0x16d9d; + ratetbl2rateset_rom = 0x16dd5; + get_rate_set_rom = 0x16e3d; + UpdateBrateTbl_rom = 0x16e71; + UpdateBrateTblForSoftAP = 0x16ec9; + write_cam_rom = 0x16f0d; + HT_caps_handler_rom = 0x16fc1; + wifirate2_ratetbl_inx = 0x17015; + update_basic_rate = 0x170bd; + update_supported_rate = 0x170f5; + update_MCS_rate = 0x17125; + get_highest_rate_idx = 0x17131; + _sha1_process_message_block = 0x1714d; + _sha1_pad_message = 0x172d1; + rt_sha1_init = 0x1736d; + rt_sha1_update = 0x173b1; + rt_sha1_finish = 0x17429; + rt_hmac_sha1 = 0x17489; + rom_aes_128_cbc_encrypt = 0x175e5; + rom_aes_128_cbc_decrypt = 0x17669; + rom_rijndaelKeySetupEnc = 0x176ed; + rom_aes_decrypt_init = 0x177c1; + rom_aes_internal_decrypt = 0x17899; + rom_aes_decrypt_deinit = 0x17bdd; + rom_aes_encrypt_init = 0x17be9; + rom_aes_internal_encrypt = 0x17c01; + rom_aes_encrypt_deinit = 0x17f81; + bignum_init = 0x1963d; + bignum_deinit = 0x19665; + bignum_get_unsigned_bin_len = 0x19685; + bignum_get_unsigned_bin = 0x19689; + bignum_set_unsigned_bin = 0x19741; + bignum_cmp = 0x197f9; + bignum_cmp_d = 0x197fd; + bignum_add = 0x19825; + bignum_sub = 0x19835; + bignum_mul = 0x19845; + bignum_exptmod = 0x19855; + WPS_realloc = 0x19879; + os_zalloc = 0x198bd; + rom_hmac_sha256_vector = 0x198e1; + rom_hmac_sha256 = 0x199e1; + rom_sha256_vector = 0x19b3d; + CRYPTO_chacha_20 = 0x19d45; + rom_ed25519_gen_keypair = 0x1a1bd; + rom_ed25519_gen_signature = 0x1a1c1; + rom_ed25519_verify_signature = 0x1a1d9; + rom_ed25519_ge_double_scalarmult_vartime = 0x1c4c9; + rom_ed25519_ge_frombytes_negate_vartime = 0x1c8c1; + rom_ed25519_ge_p3_tobytes = 0x1d43d; + rom_ed25519_ge_scalarmult_base = 0x1d489; + rom_ed25519_ge_tobytes = 0x1d64d; + rom_ed25519_crypto_sign_seed_keypair = 0x1d699; + rom_ed25519_crypto_sign_verify_detached = 0x1d6f1; + rom_ed25519_sc_muladd = 0x1d9e5; + rom_ed25519_sc_reduce = 0x24175; + rom_ed25519_crypto_sign_detached = 0x26c25; + CRYPTO_poly1305_init = 0x270dd; + CRYPTO_poly1305_update = 0x271b5; + CRYPTO_poly1305_finish = 0x27245; + rom_sha512_starts = 0x28511; + rom_sha512_update = 0x28659; + rom_sha512_finish = 0x28661; + rom_sha512 = 0x288a9; + rom_sha512_hmac_starts = 0x288e1; + rom_sha512_hmac_update = 0x289a5; + rom_sha512_hmac_finish = 0x289ad; + rom_sha512_hmac_reset = 0x289fd; + rom_sha512_hmac = 0x28a19; + rom_sha512_hkdf = 0x28a51; + aes_test_alignment_detection = 0x28b59; + aes_mode_reset = 0x28bbd; + aes_ecb_encrypt = 0x28bc9; + aes_ecb_decrypt = 0x28c05; + aes_cbc_encrypt = 0x28c41; + aes_cbc_decrypt = 0x28dad; + aes_cfb_encrypt = 0x28f49; + aes_cfb_decrypt = 0x2920d; + aes_ofb_crypt = 0x294d5; + aes_ctr_crypt = 0x29769; + aes_encrypt_key128 = 0x29a79; + aes_encrypt_key192 = 0x29a95; + aes_encrypt_key256 = 0x29ab1; + aes_encrypt_key = 0x29ad1; + aes_decrypt_key128 = 0x29b41; + aes_decrypt_key192 = 0x29b5d; + aes_decrypt_key256 = 0x29b79; + aes_decrypt_key = 0x29b99; + aes_init = 0x29c09; + curve25519_donna = 0x2a939; + __rtl_dtoa_r_v1_00 = 0x2b7f1; + __rtl_ltoa_v1_00 = 0x2c7f9; + __rtl_ultoa_v1_00 = 0x2c885; + __rtl_dtoi_v1_00 = 0x2c8ed; + __rtl_dtoi64_v1_00 = 0x2c96d; + __rtl_dtoui_v1_00 = 0x2ca09; + __rtl_ftol_v1_00 = 0x2ca11; + __rtl_itof_v1_00 = 0x2ca75; + __rtl_itod_v1_00 = 0x2cb05; + __rtl_i64tod_v1_00 = 0x2cb71; + __rtl_uitod_v1_00 = 0x2cc4d; + __rtl_ftod_v1_00 = 0x2cd29; + __rtl_dtof_v1_00 = 0x2cde1; + __rtl_uitof_v1_00 = 0x2ce75; + __rtl_fadd_v1_00 = 0x2cf59; + __rtl_fsub_v1_00 = 0x2d259; + __rtl_fmul_v1_00 = 0x2d565; + __rtl_fdiv_v1_00 = 0x2d695; + __rtl_dadd_v1_00 = 0x2d809; + __rtl_dsub_v1_00 = 0x2de49; + __rtl_dmul_v1_00 = 0x2e4a1; + __rtl_ddiv_v1_00 = 0x2e7dd; + __rtl_dcmpeq_v1_00 = 0x2ed71; + __rtl_dcmplt_v1_00 = 0x2eded; + __rtl_dcmpgt_v1_00 = 0x2ee85; + __rtl_dcmple_v1_00 = 0x2ef95; + __rtl_fcmplt_v1_00 = 0x2f0a9; + __rtl_fcmpgt_v1_00 = 0x2f105; + __rtl_fpclassifyd = 0x2f1ad; + __rtl_close_v1_00 = 0x2f205; + __rtl_fstat_v1_00 = 0x2f219; + __rtl_isatty_v1_00 = 0x2f22d; + __rtl_lseek_v1_00 = 0x2f23d; + __rtl_open_v1_00 = 0x2f251; + __rtl_read_v1_00 = 0x2f265; + __rtl_write_v1_00 = 0x2f279; + __rtl_sbrk_v1_00 = 0x2f28d; + __rom_mallocr_init_v1_00 = 0x2f29d; + __rtl_free_r_v1_00 = 0x2f309; + __rtl_malloc_r_v1_00 = 0x2f521; + __rtl_realloc_r_v1_00 = 0x2f9f5; + __rtl_memalign_r_v1_00 = 0x2fdb5; + __rtl_valloc_r_v1_00 = 0x2fe81; + __rtl_pvalloc_r_v1_00 = 0x2fe8d; + __rtl_calloc_r_v1_00 = 0x2fea1; + __rtl_cfree_r_v1_00 = 0x2ff05; + __rtl_cos_f32_v1_00 = 0x2ff15; + __rtl_sin_f32_v1_00 = 0x300e9; + __rtl_fabs_v1_00 = 0x302ad; + __rtl_fabsf_v1_00 = 0x302b5; + __rtl_memchr_v1_00 = 0x302bd; + __rtl_memcmp_v1_00 = 0x30351; + __rtl_memcpy_v1_00 = 0x303b5; + __rtl_memmove_v1_00 = 0x3045d; + __rtl_memset_v1_00 = 0x30525; + __rtl_Balloc_v1_00 = 0x3061d; + __rtl_Bfree_v1_00 = 0x3066d; + __rtl_i2b_v1_00 = 0x30681; + __rtl_multadd_v1_00 = 0x30695; + __rtl_mult_v1_00 = 0x30721; + __rtl_pow5mult_v1_00 = 0x30855; + __rtl_hi0bits_v1_00 = 0x308f5; + __rtl_d2b_v1_00 = 0x30935; + __rtl_lshift_v1_00 = 0x309ed; + __rtl_cmp_v1_00 = 0x30a99; + __rtl_diff_v1_00 = 0x30ae1; + __rtl_sread_v1_00 = 0x30bb5; + __rtl_seofread_v1_00 = 0x30c01; + __rtl_swrite_v1_00 = 0x30c05; + __rtl_sseek_v1_00 = 0x30c75; + __rtl_sclose_v1_00 = 0x30cc1; + __rtl_sbrk_r_v1_00 = 0x30ced; + __rtl_strcat_v1_00 = 0x30d15; + __rtl_strchr_v1_00 = 0x30d59; + __rtl_strcmp_v1_00 = 0x30e25; + __rtl_strcpy_v1_00 = 0x30e99; + __rtl_strlen_v1_00 = 0x30ee5; + __rtl_strncat_v1_00 = 0x30f39; + __rtl_strncmp_v1_00 = 0x30f95; + __rtl_strncpy_v1_00 = 0x3102d; + __rtl_strsep_v1_00 = 0x31095; + __rtl_strstr_v1_00 = 0x3136d; + __rtl_strtok_v1_00 = 0x315a5; + __rtl__strtok_r_v1_00 = 0x315b5; + __rtl_strtok_r_v1_00 = 0x31619; + __rtl_fflush_r_v1_00 = 0x31ae9; + __rtl_vfprintf_r_v1_00 = 0x31f99; + polarssl_aes_init = 0x335b9; + aes_free = 0x335c9; + aes_setkey_enc = 0x335dd; + aes_setkey_dec = 0x33829; + aes_crypt_ecb = 0x339a1; + aes_crypt_cbc = 0x343d1; + aes_crypt_cfb128 = 0x34649; + aes_crypt_cfb8 = 0x346c9; + aes_crypt_ctr = 0x3474d; + arc4_init = 0x347b1; + arc4_free = 0x347bd; + arc4_setup = 0x347d1; + arc4_crypt = 0x3481d; + asn1_get_len = 0x34861; + asn1_get_tag = 0x34901; + asn1_get_bool = 0x34929; + asn1_get_int = 0x3495d; + asn1_get_mpi = 0x349a9; + asn1_get_bitstring = 0x349d1; + asn1_get_bitstring_null = 0x34a19; + asn1_get_sequence_of = 0x34a4d; + asn1_get_alg = 0x34ad1; + asn1_get_alg_null = 0x34b65; + asn1_free_named_data = 0x34ba5; + asn1_free_named_data_list = 0x34bcd; + asn1_find_named_data = 0x34bf5; + asn1_write_len = 0x34c25; + asn1_write_tag = 0x34c8d; + asn1_write_raw_buffer = 0x34ca9; + asn1_write_mpi = 0x34ccd; + asn1_write_null = 0x34d41; + asn1_write_oid = 0x34d6d; + asn1_write_algorithm_identifier = 0x34dc5; + asn1_write_bool = 0x34e21; + asn1_write_int = 0x34e65; + asn1_write_printable_string = 0x34ecd; + asn1_write_ia5_string = 0x34f25; + asn1_write_bitstring = 0x34f7d; + asn1_write_octet_string = 0x34fe5; + asn1_store_named_data = 0x3503d; + base64_encode = 0x35111; + base64_decode = 0x3523d; + mpi_init = 0x35e09; + mpi_free = 0x35e19; + mpi_grow = 0x35e55; + mpi_shrink = 0x35e79; + mpi_copy = 0x35f21; + mpi_swap = 0x35fa1; + mpi_safe_cond_assign = 0x35fcd; + mpi_safe_cond_swap = 0x36069; + mpi_lset = 0x3610d; + mpi_get_bit = 0x3614d; + mpi_set_bit = 0x3616d; + mpi_lsb = 0x361d5; + mpi_msb = 0x36215; + mpi_size = 0x36261; + mpi_read_binary = 0x3626d; + mpi_write_binary = 0x362f9; + mpi_shift_l = 0x36341; + mpi_shift_r = 0x363f1; + mpi_cmp_abs = 0x36475; + mpi_cmp_mpi = 0x36619; + mpi_cmp_int = 0x366f1; + mpi_add_abs = 0x3671d; + mpi_sub_abs = 0x3680d; + mpi_add_mpi = 0x3689d; + mpi_sub_mpi = 0x368ed; + mpi_add_int = 0x3693d; + mpi_sub_int = 0x36969; + mpi_mul_mpi = 0x36995; + mpi_read_string = 0x36ac5; + mpi_mul_int = 0x36c45; + mpi_div_mpi = 0x36c61; + mpi_div_int = 0x370ed; + mpi_mod_mpi = 0x37119; + mpi_mod_int = 0x3717d; + mpi_write_string = 0x3722d; + mpi_exp_mod = 0x37395; + mpi_gcd = 0x37915; + mpi_fill_random = 0x37a39; + mpi_inv_mod = 0x37c4d; + mpi_is_prime = 0x37f15; + mpi_gen_prime = 0x37f71; + ctr_drbg_free = 0x38285; + ctr_drbg_set_prediction_resistance = 0x382a1; + ctr_drbg_set_entropy_len = 0x382a5; + ctr_drbg_set_reseed_interval = 0x382a9; + ctr_drbg_update = 0x382ad; + ctr_drbg_reseed = 0x382c9; + ctr_drbg_init_entropy_len = 0x38341; + ctr_drbg_init = 0x38399; + ctr_drbg_random_with_add = 0x383ad; + ctr_drbg_random = 0x38469; + des_init = 0x388a5; + des_free = 0x388b1; + des3_init = 0x388c5; + des3_free = 0x388d5; + des_key_set_parity = 0x388e9; + des_key_check_key_parity = 0x38909; + des_key_check_weak = 0x38939; + des_setkey_enc = 0x38965; + des_setkey_dec = 0x3898d; + des3_set2key_enc = 0x389d9; + des3_set2key_dec = 0x38a25; + des3_set3key_enc = 0x38a71; + des3_set3key_dec = 0x38ab1; + des_crypt_ecb = 0x38af1; + des_crypt_cbc = 0x38d09; + des3_crypt_ecb = 0x38f99; + des3_crypt_cbc = 0x39401; + dhm_init = 0x39729; + dhm_read_params = 0x39731; + dhm_make_params = 0x3978d; + dhm_read_public = 0x398c1; + dhm_make_public = 0x398e9; + dhm_calc_secret = 0x399ad; + dhm_free = 0x39ba1; + dhm_parse_dhm = 0x39c01; + ecdh_gen_public = 0x39cc5; + ecdh_compute_shared = 0x39cc9; + ecdh_init = 0x39d2d; + ecdh_free = 0x39d39; + ecdh_make_params = 0x39d81; + ecdh_read_params = 0x39e05; + ecdh_get_params = 0x39e2d; + ecdh_make_public = 0x39e79; + ecdh_read_public = 0x39ed1; + ecdh_calc_secret = 0x39f01; + ecdsa_sign = 0x3a041; + ecdsa_sign_det = 0x3a1c5; + ecdsa_verify = 0x3a2a9; + ecdsa_write_signature = 0x3a431; + ecdsa_write_signature_det = 0x3a46d; + ecdsa_read_signature = 0x3a4a5; + ecdsa_genkey = 0x3a531; + ecdsa_init = 0x3a565; + ecdsa_free = 0x3a591; + ecdsa_from_keypair = 0x3a5bd; + ecp_curve_list = 0x3aee5; + ecp_curve_info_from_grp_id = 0x3aeed; + ecp_curve_info_from_tls_id = 0x3af0d; + ecp_curve_info_from_name = 0x3af31; + ecp_point_init = 0x3af61; + ecp_group_init = 0x3af81; + ecp_keypair_init = 0x3af8d; + ecp_point_free = 0x3afb1; + ecp_group_free = 0x3afd1; + ecp_keypair_free = 0x3b03d; + ecp_copy = 0x3b05d; + ecp_group_copy = 0x3b08d; + ecp_set_zero = 0x3b095; + ecp_is_zero = 0x3ba61; + ecp_point_read_string = 0x3ba75; + ecp_point_write_binary = 0x3baa5; + ecp_point_read_binary = 0x3bb4d; + ecp_tls_read_point = 0x3bbc1; + ecp_tls_write_point = 0x3bbf5; + ecp_group_read_string = 0x3bc25; + ecp_tls_read_group = 0x3bc95; + ecp_tls_write_group = 0x3bcf1; + ecp_add = 0x3bd39; + ecp_sub = 0x3bd65; + ecp_check_pubkey = 0x3bddd; + ecp_check_privkey = 0x3bf8d; + ecp_mul = 0x3bff5; + ecp_gen_keypair = 0x3c565; + ecp_gen_key = 0x3c669; + ecp_use_known_dp = 0x3d741; + hmac_drbg_update = 0x3daa9; + hmac_drbg_init_buf = 0x3db41; + hmac_drbg_reseed = 0x3db91; + hmac_drbg_init = 0x3dc09; + hmac_drbg_set_prediction_resistance = 0x3dc81; + hmac_drbg_set_entropy_len = 0x3dc85; + hmac_drbg_set_reseed_interval = 0x3dc89; + hmac_drbg_random_with_add = 0x3dc8d; + hmac_drbg_random = 0x3dd4d; + hmac_drbg_free = 0x3dd61; + md_list = 0x3dd7d; + md_info_from_string = 0x3dd85; + md_info_from_type = 0x3de59; + md_init = 0x3de9d; + md_free = 0x3dea5; + md_init_ctx = 0x3dec5; + md_free_ctx = 0x3defd; + md_starts = 0x3df09; + md_update = 0x3df29; + md_finish = 0x3df49; + md = 0x3df69; + md_file = 0x3df89; + md_hmac_starts = 0x3dfa1; + md_hmac_update = 0x3dfc1; + md_hmac_finish = 0x3dfe1; + md_hmac_reset = 0x3e001; + md_hmac = 0x3e021; + md_process = 0x3e049; + md5_init = 0x3e301; + md5_free = 0x3e309; + md5_starts = 0x3e31d; + md5_process = 0x3e34d; + md5_update = 0x3ed51; + md5_finish = 0x3ed59; + md5 = 0x3ee11; + md5_hmac_starts = 0x3ee75; + md5_hmac_update = 0x3ef51; + md5_hmac_finish = 0x3ef59; + md5_hmac_reset = 0x3efbd; + md5_hmac = 0x3eff1; + oid_get_attr_short_name = 0x3f071; + oid_get_x509_ext_type = 0x3f0b1; + oid_get_extended_key_usage = 0x3f0f1; + oid_get_sig_alg_desc = 0x3f131; + oid_get_sig_alg = 0x3f149; + oid_get_oid_by_sig_alg = 0x3f169; + oid_get_pk_alg = 0x3f1a1; + oid_get_oid_by_pk_alg = 0x3f1e1; + oid_get_ec_grp = 0x3f219; + oid_get_oid_by_ec_grp = 0x3f259; + oid_get_cipher_alg = 0x3f291; + oid_get_md_alg = 0x3f2d1; + oid_get_oid_by_md = 0x3f311; + oid_get_pkcs12_pbe_alg = 0x3f349; + oid_get_numeric_string = 0x3f391; + pem_init = 0x3f649; + pem_read_buffer = 0x3f651; + pem_free = 0x3f955; + pem_write_buffer = 0x3f97d; + pk_init = 0x3fa81; + pk_free = 0x3fa8d; + pk_info_from_type = 0x3faad; + pk_init_ctx = 0x3fae1; + pk_init_ctx_rsa_alt = 0x3fb11; + pk_can_do = 0x3fb69; + pk_verify = 0x3fb79; + pk_verify_ext = 0x3fbc9; + pk_sign = 0x3fc8d; + pk_decrypt = 0x3fce9; + pk_encrypt = 0x3fd15; + pk_get_size = 0x3fd41; + pk_debug = 0x3fd51; + pk_get_name = 0x3fd79; + pk_get_type = 0x3fd8d; + pk_write_pubkey = 0x40181; + pk_write_pubkey_der = 0x40201; + pk_write_key_der = 0x402dd; + pk_write_pubkey_pem = 0x404f5; + pk_write_key_pem = 0x40545; + rsa_init = 0x4065d; + rsa_set_padding = 0x40679; + rsa_check_pubkey = 0x40685; + rsa_check_privkey = 0x406e1; + rsa_public = 0x409a5; + rsa_private = 0x40a25; + rsa_rsaes_oaep_encrypt = 0x40c29; + rsa_rsaes_pkcs1_v15_encrypt = 0x40d31; + rsa_pkcs1_encrypt = 0x40e19; + rsa_rsaes_oaep_decrypt = 0x40e59; + rsa_rsaes_pkcs1_v15_decrypt = 0x40fbd; + rsa_pkcs1_decrypt = 0x410c1; + rsa_rsassa_pss_sign = 0x4110d; + rsa_rsassa_pkcs1_v15_sign = 0x41271; + rsa_pkcs1_sign = 0x41389; + rsa_rsassa_pss_verify_ext = 0x413c9; + rsa_rsassa_pss_verify = 0x41575; + rsa_rsassa_pkcs1_v15_verify = 0x415a5; + rsa_pkcs1_verify = 0x41709; + rsa_free = 0x41765; + rsa_gen_key = 0x417d5; + rsa_copy = 0x4198d; + sha1_init = 0x41a9d; + sha1_free = 0x41aa5; + sha1_starts = 0x41ab9; + sha1_process = 0x41aed; + sha1_update = 0x42e15; + sha1_finish = 0x42e1d; + sha1 = 0x42ee5; + sha1_hmac_starts = 0x42f51; + sha1_hmac_update = 0x43039; + sha1_hmac_finish = 0x43041; + sha1_hmac_reset = 0x430b5; + sha1_hmac = 0x430f1; + sha256_init = 0x43139; + sha256_free = 0x43141; + sha256_starts = 0x43155; + sha256_process = 0x431e5; + sha256_update = 0x4513d; + sha256_finish = 0x45145; + sha256 = 0x4524d; + sha256_hmac_starts = 0x45325; + sha256_hmac_update = 0x45475; + sha256_hmac_finish = 0x4547d; + sha256_hmac_reset = 0x45569; + sha256_hmac = 0x45601; + sha512_init = 0x45651; + sha512_free = 0x4565d; + sha512_starts = 0x45671; + sha512_process = 0x457b9; + sha512_update = 0x46879; + sha512_finish = 0x46881; + sha512 = 0x46ac9; + sha512_hmac_starts = 0x46b11; + sha512_hmac_update = 0x46bd9; + sha512_hmac_finish = 0x46be1; + sha512_hmac_reset = 0x46c35; + sha512_hmac = 0x46c51; + UartLogRomCmdTable = 0x46ca0; + XTAL_CLK = 0x46e10; + CpkClkTbl_FPAG = 0x46e50; + CpkClkTbl_ASIC = 0x46e68; + ROM_IMG1_VALID_PATTEN = 0x46e90; + __AES_rcon = 0x46e98; + __AES_Te4 = 0x46ec0; + SpicCalibrationPattern = 0x472c0; + NEW_CALIBREATION_DIV = 0x472c8; + NEW_CALIBREATION_DATA = 0x472e4; + GDMA_IrqNum = 0x47344; + I2C_DEV_TABLE = 0x47350; + spi_clk_pin = 0x47370; + SPI_DEV_TABLE = 0x47374; + PWM_GDMA_HSx = 0x47394; + TIM_DMA_CCx = 0x473ac; + TIM_IT_CCx = 0x473c4; + TIMx = 0x473dc; + TIMx_irq = 0x473f4; + BAUDRATE_TABLE_40M = 0x4740c; + UART_DEV_TABLE = 0x475bc; + RTW_WPA_OUI_TYPE = 0x4b270; + WPA_CIPHER_SUITE_NONE = 0x4b274; + WPA_CIPHER_SUITE_WEP40 = 0x4b278; + WPA_CIPHER_SUITE_TKIP = 0x4b27c; + WPA_CIPHER_SUITE_CCMP = 0x4b280; + WPA_CIPHER_SUITE_WEP104 = 0x4b284; + RSN_CIPHER_SUITE_NONE = 0x4b288; + RSN_CIPHER_SUITE_WEP40 = 0x4b28c; + RSN_CIPHER_SUITE_TKIP = 0x4b290; + RSN_CIPHER_SUITE_CCMP = 0x4b294; + RSN_CIPHER_SUITE_WEP104 = 0x4b298; + RSN_AUTH_KEY_MGMT_PSK_OVER_802_1X = 0x4b2a8; + RSN_AUTH_KEY_MGMT_UNSPEC_802_1X = 0x4b2ac; + RSN_VERSION_BSD = 0x4b2b0; + rom_e_rtw_msgp_str_ = 0x4b2b4; + rtw_basic_rate_mix = 0x4b9a8; + rtw_basic_rate_ofdm = 0x4b9b0; + rtw_basic_rate_cck = 0x4b9b4; + REALTEK_96B_IE = 0x4b9b8; + AIRGOCAP_OUI = 0x4b9c0; + REALTEK_OUI = 0x4b9c4; + RALINK_OUI = 0x4b9c8; + MARVELL_OUI = 0x4b9cc; + CISCO_OUI = 0x4b9d0; + BROADCOM_OUI3 = 0x4b9d4; + BROADCOM_OUI2 = 0x4b9d8; + BROADCOM_OUI1 = 0x4b9dc; + ARTHEROS_OUI2 = 0x4b9e0; + ARTHEROS_OUI1 = 0x4b9e4; + rom_wps_rcons = 0x4b9e8; + rom_wps_Te0 = 0x4b9f4; + rom_wps_Td4s = 0x4bdf4; + rom_wps_Td0 = 0x4bef4; + sha512_info = 0x5850c; + sha384_info = 0x5854c; + sha256_info = 0x5858c; + sha224_info = 0x585cc; + sha1_info = 0x5860c; + md5_info = 0x5864c; + rsa_alt_info = 0x58d28; + ecdsa_info = 0x58d54; + eckeydh_info = 0x58d80; + eckey_info = 0x58dac; + rsa_info = 0x58dd8; + __rom_bss_start__ = 0x10000000; + NewVectorTable = 0x10000000; + UserIrqFunTable = 0x10000100; + UserIrqDataTable = 0x10000200; + ConfigDebugClose = 0x10000300; + CfgSysDebugWarn = 0x10000304; + CfgSysDebugInfo = 0x10000308; + CfgSysDebugErr = 0x1000030c; + ConfigDebugWarn = 0x10000310; + ConfigDebugInfo = 0x10000314; + ConfigDebugErr = 0x10000318; + sector_addr = 0x1000031c; + _rtl_impure_ptr = 0x10000338; + ArgvArray = 0x1000033c; + pUartLogCtl = 0x10000364; + UartLogBuf = 0x10000368; + UartLogCtl = 0x100003e8; + UartLogHistoryBuf = 0x10000408; + NCO32K_Enable = 0x10000684; + g_rtl_cipherEngine = 0x100006a0; + DONGLE_InitStruct = 0x10000ba0; + EFUSE_MAP = 0x10000ba4; + USOC_BOOT_TXBD = 0x10000da4; + USOC_BOOT_RXBD = 0x10000db4; + USB_RXBuff = 0x10000dc4; + USB_TXBuff = 0x10000dcc; + ADC_AnaparAd = 0x10000dd4; + flash_init_para = 0x10000dec; + NEW_CALIBREATION_END = 0x10000e44; + GDMA_Reg = 0x10000e4c; + PortA_IrqHandler = 0x10000e50; + PortA_IrqData = 0x10000ed0; + IC_FS_SCL_HCNT_TRIM = 0x10000f50; + IC_FS_SCL_LCNT_TRIM = 0x10000f54; + I2C_SLAVEWRITE_PATCH = 0x10000f58; + i2s_cur_tx_page = 0x10000f5c; + i2s_cur_rx_page = 0x10000f60; + i2s_page_num = 0x10000f64; + i2s_txpage_entry = 0x10000f68; + i2s_rxpage_entry = 0x10000f78; + TXBDAddrAligned = 0x10000f88; + H2C_Buff = 0x10000f90; + SPI_RECV_Buff = 0x10000f94; + spi_boot_recv_done = 0x10000f98; + UART_StateRx = 0x10000f9c; + UART_StateTx = 0x10000fa8; + xMCtrl = 0x10000fb8; + XComUARTx = 0x10000fc4; + FalseAlmCnt = 0x10000fc8; + ROMInfo = 0x10001008; + DM_CfoTrack = 0x10001020; + rom_wlan_ram_map = 0x10001048; + rom_libgloss_ram_map = 0x10001050; + __rtl_errno = 0x100014b4; + rom_ssl_ram_map = 0x100014b8; + __rom_bss_end__ = 0x100014f8; +} \ No newline at end of file diff --git a/bsp/amebaz/gen_bin.py b/bsp/amebaz/gen_bin.py new file mode 100644 index 000000000..4537534f5 --- /dev/null +++ b/bsp/amebaz/gen_bin.py @@ -0,0 +1,92 @@ +import re +import subprocess +import os +import platform + +tool_pwd=os.path.normpath(os.getcwd()+r'/packages/realtek_ameba/sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0/component/soc/realtek/8711b/misc/iar_utility/common/tools') + +def grep_func(file,str): + fd=open(file,'r') + strtmp=r'^[0-9]{8}\s[a-zA-Z]{1}\s%s$' % str + for line in fd.readlines(): + if re.match(strtmp,line): + #print(line) + value=re.split(r'[\s+]+',line) + fd.close() + return value[0] + fd.close() + +#=====================start======================= + +os.system(r'arm-none-eabi-objdump -d rtthread.axf > application.asm') +os.system(r'arm-none-eabi-size rtthread.axf') +os.system(r'arm-none-eabi-nm rtthread.axf | sort > application.nmap') + +#====================process===================== + +addr1=grep_func(r'application.nmap','__ram_image2_text_start__') +addr2=grep_func(r'application.nmap','__ram_image2_text_end__') +addr3=grep_func(r'application.nmap','__ram_image2_text_start__') +addr4=grep_func(r'application.nmap','__ram_image2_text_end__') +addr5=grep_func(r'application.nmap','__xip_image2_start__') +addr6=grep_func(r'application.nmap','__xip_image2_start__') + +sysstr = platform.system() +print(sysstr) +if(sysstr == "Linux"): + exec_pick = tool_pwd + r'/pick' + exec_checksum = tool_pwd + r'/checksum' + os.system('chmod +x ' + exec_pick) + os.system('chmod +x ' + exec_checksum) + #print(exec_pick) +elif(sysstr == "Windows"): + exec_pick=tool_pwd+r'/pick.exe' + exec_checksum = tool_pwd + r'/checksum.exe' + #print(exec_pick) +else: + print("not support!!!") + +exec_pick_param1=r' 0x%s 0x%s ram_2.r.bin ram_2.bin raw' % (addr1,addr2) +exec_pick_param2=r' 0x%s 0x%s ram_2.bin ram_2.p.bin' % (addr3,addr4) +exec_pick_param3=r' 0x%s 0x%s xip_image2.bin xip_image2.p.bin' % (addr5,addr6) +#print(exec_pick_param1) +#print(exec_pick_param2) +#print(exec_pick_param3) + +exec_cmd1=exec_pick+exec_pick_param1 +exec_cmd2=exec_pick+exec_pick_param2 +exec_cmd3=exec_pick+exec_pick_param3 +#print(exec_cmd1) +#print(exec_cmd2) +#print(exec_cmd3) + +os.system(exec_cmd1) +os.system(exec_cmd2) +os.system(exec_cmd3) + +#================create bin file================ + +if os.path.exists('image2_all_ota1.bin'): + os.remove('image2_all_ota1.bin') + +with open('xip_image2.p.bin','rb') as src: + with open('image2_all_ota1.bin', 'wb') as dst: + dst.write(src.read()) + +with open('ram_2.p.bin','rb') as src: + with open('image2_all_ota1.bin', 'ab') as dst: + dst.write(src.read()) + +exec_cmd4 = exec_checksum + ' image2_all_ota1.bin || true' +os.system(exec_cmd4) + +os.remove("ram_2.bin") +os.remove("ram_2.p.bin") +os.remove("ram_2.r.bin") +os.remove("xip_image2.bin") +os.remove("xip_image2.p.bin") +os.remove("rdp.bin") + +print("Done...") + +#=====================end======================= \ No newline at end of file diff --git a/bsp/amebaz/image2.icf b/bsp/amebaz/image2.icf new file mode 100644 index 000000000..3c5deadf7 --- /dev/null +++ b/bsp/amebaz/image2.icf @@ -0,0 +1,187 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +//define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/**/ +/**/ +include "rom_symbol_v01_iar.icf"; +/**************************************** + * Memory Regions * + ****************************************/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0007FFFF; +define symbol __ICFEDIT_region_ROMBSS_RAM_start__ = 0x10000000; +define symbol __ICFEDIT_region_ROMBSS_RAM_end__ = 0x10001FFF; +define symbol __ICFEDIT_region_BOOTLOADER_RAM_start__ = 0x10002000; +define symbol __ICFEDIT_region_BOOTLOADER_RAM_end__ = 0x10004FFF; +define symbol __ICFEDIT_region_BD_RAM_start__ = 0x10005000; +define symbol __ICFEDIT_region_BD_RAM_end__ = 0x1002FFFF; +define symbol __ICFEDIT_region_MSP_RAM_start__ = 0x1003E000; +define symbol __ICFEDIT_region_MSP_RAM_end__ = 0x1003EFFF; +define symbol __ICFEDIT_region_RDP_RAM_start__ = 0x1003F000; +define symbol __ICFEDIT_region_RDP_RAM_end__ = 0x1003FFEF; +define symbol __ICFEDIT_region_IMG2_TEMP_start__ = 0x10006000; +define symbol __ICFEDIT_region_IMG2_TEMP_end__ = 0x1000BFFF; +define symbol __ICFEDIT_region_XIP_BOOT_start__ = 0x08000000+0x20; +define symbol __ICFEDIT_region_XIP_BOOT_end__ = 0x08003FFF; +define symbol __ICFEDIT_region_XIP_OTA1_start__ = 0x0800B000+0x20; +define symbol __ICFEDIT_region_XIP_OTA1_end__ = 0x080FFFFF; +/**************************************** + * Sizes * + ****************************************/ +/*define symbol __ICFEDIT_size_cstack__ = 0x400;*/ +define symbol __ICFEDIT_size_heap__ = 0x000; +/**** End of ICF editor section. ###ICF###*/ +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region ROM_BSS_region = mem:[from __ICFEDIT_region_ROMBSS_RAM_start__ to __ICFEDIT_region_ROMBSS_RAM_end__]; +define region BOOT_RAM_region = mem:[from __ICFEDIT_region_BOOTLOADER_RAM_start__ to __ICFEDIT_region_BOOTLOADER_RAM_end__]; +define region BD_RAM_region = mem:[from __ICFEDIT_region_BD_RAM_start__ to __ICFEDIT_region_BD_RAM_end__]; +define region IMG2_TEMP_region = mem:[from __ICFEDIT_region_IMG2_TEMP_start__ to __ICFEDIT_region_IMG2_TEMP_end__]; +define region XIP_BOOT_region = mem:[from __ICFEDIT_region_XIP_BOOT_start__ to __ICFEDIT_region_XIP_BOOT_end__]; +define region XIP_OTA1_region = mem:[from __ICFEDIT_region_XIP_OTA1_start__ to __ICFEDIT_region_XIP_OTA1_end__]; +define region RDP_RAM_region = mem:[from __ICFEDIT_region_RDP_RAM_start__ to __ICFEDIT_region_RDP_RAM_end__]; +/*define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };*/ +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; +//initialize by copy { readwrite }; +//initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application +//do not initialize { section * }; +//place at address mem:__ICFEDIT_intvec_start__ { readonly section .vectors_table }; +// +/**************************************** + * ROM Section config * + ****************************************/ +keep { section FSymTab }; +keep { section VSymTab }; +keep { section .rti_fn* }; +keep { section .rom.text }; +keep { section .rom.rodata }; +place at start of ROM_region { readonly, section .rom.text, section .rom.rodata}; +/**************************************** + * ROM BSS Section config * + ****************************************/ +keep { section .ram_vector_table1 }; +keep { section .ram_vector_table2 }; +keep { section .ram_vector_table3 }; +keep { section .hal.rom.bss* }; +keep { section .wlan_ram_map* }; +keep { section .libc.ram.bss* }; +keep { section .ssl_ram_map* }; +define block .hal.rom.bss with fixed order{ section .ram_vector_table1, + section .ram_vector_table2, + section .ram_vector_table3, + section .hal.rom.bss*, + section .wlan_ram_map*, + section .libc.ram.bss*, + section .ssl_ram_map*, + }; +define block ROM_BSS with fixed order { block .hal.rom.bss}; +place at start of ROM_BSS_region { readwrite, + block ROM_BSS, + }; +/**************************************** + * BOOT RAM Section config * + ****************************************/ +keep { section .image1.entry.data* }; +keep { section .image1.validate.rodata* }; +define block .ram_image1.entry with fixed order{section .image1.entry.data*, + section .image1.validate.rodata*, + }; +keep { section .boot.ram.text* }; +keep { section .boot.rodata* }; +define block .ram_image1.text with fixed order{section .boot.ram.text*, + section .boot.rodata*, + }; +keep { section .boot.ram.data* }; +define block .ram_image1.data with fixed order{section .boot.ram.data*, + }; +keep { section .boot.ram.bss* }; +define block .ram_image1.bss with fixed order{section .boot.ram.bss*, + }; +define block IMAGE1 with fixed order { block .ram_image1.entry, block .ram_image1.text, block .ram_image1.data, block .ram_image1.bss}; +place at start of BOOT_RAM_region { readwrite, + block IMAGE1, + }; +/**************************************** + * BD RAM Section config * + ****************************************/ +keep { section .image2.entry.data* }; +keep { section .image2.validate.rodata* }; +define block .ram_image2.entry with fixed order{ section .image2.entry.data*, + section .image2.validate.rodata*, + }; +define block SHT$$PREINIT_ARRAY { preinit_array }; +define block SHT$$INIT_ARRAY { init_array }; +define block CPP_INIT with fixed order { block SHT$$PREINIT_ARRAY, + block SHT$$INIT_ARRAY }; +define block .ram.data with fixed order{ section .data*, + section DATA, + section .iar.init_table, + section __DLIB_PERTHREAD, + block CPP_INIT, + section .mdns.data, + section .mdns.text + }; +define block .ram.text with fixed order{ section .image2.ram.text*, + }; +define block IMAGE2 with fixed order { block .ram_image2.entry, + block .ram.data, + block .ram.text, + }; +define block .ram_image2.bss with fixed order{ section .bss*, + section COMMON, + }; +define block .ram_image2.skb.bss with fixed order{ section .bdsram.data* }; +define block .ram_heap.data with fixed order{ section .bfsram.data* }; +place in BD_RAM_region { readwrite, + block IMAGE2, + block .ram_image2.bss, + block .ram_image2.skb.bss, + block .ram_heap.data, + section .heap.stdlib, + last block HEAP, + }; +/**************************************** + * XIP BOOT Section config * + ****************************************/ +keep { section .flashboot.text* }; +define block .xip_image1.text with fixed order{ section .flashboot.text* }; +define block Bootloader with fixed order { section LOADER }; +place at start of XIP_BOOT_region { block Bootloader, + readwrite, + block .xip_image1.text }; +/**************************************** + * XIP OTA1 Section config * + ****************************************/ +keep { section FSymTab }; +keep { section VSymTab }; +keep { section .rti_fn* }; +define block .xip_image2.text with fixed order{ section .img2_custom_signature*, + section .text*, + section .rodata*, + section .debug_trace, + section CODE, + section Veneer, // object startup.o, + section FSymTab, + section VSymTab, + section .rti_fn*, + }; +place at start of XIP_OTA1_region { readwrite, + block .xip_image2.text }; +/**************************************** + * RDP Section config * + ****************************************/ +keep { section .rdp.ram.text* }; +keep { section .rdp.ram.data* }; +define block .RDP_RAM with fixed order { + section .rdp.ram.text*, + section .rdp.ram.data* }; +place at start of RDP_RAM_region{ + readwrite, + block .RDP_RAM }; +define exported symbol __ram_start_table_start__= 0x10002000; // use in rom +define exported symbol __image1_validate_code__= 0x10002018; // needed by ram code +define exported symbol __rom_top_4k_start_= 0x1003F000; // needed by ram code +define exported symbol __flash_text_start__= 0x0800b020; // needed by ram code +define exported symbol boot_export_symbol = 0x10002020; diff --git a/bsp/amebaz/project.ewp b/bsp/amebaz/project.ewp new file mode 100644 index 000000000..2228f6ced --- /dev/null +++ b/bsp/amebaz/project.ewp @@ -0,0 +1,2455 @@ + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 24 + 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\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\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 + + 24 + 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 + + + + app_wifi + + $PROJ_DIR$\app_wifi\wifi_test.c + + + + Drivers + + $PROJ_DIR$\drivers\board.c + + + $PROJ_DIR$\drivers\drv_uart.c + + + $PROJ_DIR$\drivers\drv_wifi.c + + + + RT-Thread + + $PROJ_DIR$\packages\realtek_ameba\RT-Thread\os\rtthread_service.c + + + $PROJ_DIR$\packages\realtek_ameba\RT-Thread\realtek\8711b\rtl8710b_startup.c + + + $PROJ_DIR$\packages\realtek_ameba\RT-Thread\realtek\8711b\app_start.c + + + $PROJ_DIR$\packages\realtek_ameba\RT-Thread\realtek\common\wifi\wifi_conf.c + + + + ameba_wifi + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\api\wifi\wifi_ind.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\api\wifi\wifi_util.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\api\wifi\wifi_promisc.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\api\wifi\rtw_wpa_supplicant\wpa_supplicant\wifi_eap_config.c + + + + mbed + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\analogin_api.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\dma_api.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\efuse_api.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\flash_api.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\gpio_api.c + + + $PROJ_DIR$\packages\realtek_ameba\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\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\i2c_api.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\i2s_api.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\nfc_api.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\pinmap.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\pinmap_common.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\port_api.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\pwmout_api.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\rtc_api.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\serial_api.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\sleep.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\spi_api.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\sys_api.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\timer_api.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\us_ticker.c + + + $PROJ_DIR$\packages\realtek_ameba\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\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\wait_api.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\common\mbed\targets\hal\rtl8711b\wdt_api.c + + + + os_dep + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\os\os_dep\osdep_service.c + + + + soc_8711b + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\soc\realtek\8711b\cmsis\device\system_8195a.c + + + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\soc\realtek\8711b\fwlib\ram_lib\rtl8710b_pinmapcfg.c + + + $PROJ_DIR$\packages\realtek_ameba\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\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\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\soc\realtek\8711b\app\monitor\ram\monitor.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\misc\pin.c + + + $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\ringbuffer.c + + + $PROJ_DIR$\..\..\components\drivers\src\waitqueue.c + + + $PROJ_DIR$\..\..\components\drivers\src\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 + + + $PROJ_DIR$\..\..\components\finsh\finsh_compiler.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_error.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_heap.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_init.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_node.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_ops.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_parser.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_var.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_vm.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_token.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-1.4.1\src\api\api_lib.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\api\api_msg.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\api\err.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\api\netbuf.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\api\netdb.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\api\netifapi.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\api\sockets.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\api\tcpip.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\arch\sys_arch.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\def.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\dhcp.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\dns.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\init.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\memp.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\netif.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\pbuf.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\raw.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\stats.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\sys.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\tcp.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\tcp_in.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\tcp_out.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\timers.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\udp.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\ipv4\autoip.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\ipv4\icmp.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\ipv4\igmp.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\ipv4\inet.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\ipv4\inet_chksum.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\ipv4\ip.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\ipv4\ip_addr.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\ipv4\ip_frag.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\netif\etharp.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\netif\ethernetif.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\netif\slipif.c + + + diff --git a/bsp/amebaz/project.ewt b/bsp/amebaz/project.ewt new file mode 100644 index 000000000..b259f47f0 --- /dev/null +++ b/bsp/amebaz/project.ewt @@ -0,0 +1,2504 @@ + + + + 2 + + Debug + + ARM + + 1 + + C-STAT + 1 + + 1 + + 0 + + 600 + 0 + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RuntimeChecking + 0 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + Release + + ARM + + 0 + + C-STAT + 1 + + 1 + + 0 + + 600 + 0 + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RuntimeChecking + 0 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + ameba_drivers + + + ameba_wifi + + $PROJ_DIR$\packages\realtek_ameba\common\api\wifi\wifi_conf.c + + + $PROJ_DIR$\packages\realtek_ameba\common\api\wifi\rtw_wpa_supplicant\wpa_supplicant\wifi_eap_config.c + + + $PROJ_DIR$\packages\realtek_ameba\common\api\wifi\wifi_ind.c + + + $PROJ_DIR$\packages\realtek_ameba\common\api\wifi\wifi_promisc.c + + + $PROJ_DIR$\packages\realtek_ameba\common\api\wifi\wifi_util.c + + + + Applications + + $PROJ_DIR$\applications\application.c + + + $PROJ_DIR$\applications\startup.c + + + + CORTEX-M4 + + $PROJ_DIR$\..\..\libcpu\arm\common\backtrace.c + + + $PROJ_DIR$\..\..\libcpu\arm\cortex-m4\context_iar.S + + + $PROJ_DIR$\..\..\libcpu\arm\cortex-m4\cpuport.c + + + $PROJ_DIR$\..\..\libcpu\arm\common\div0.c + + + $PROJ_DIR$\..\..\libcpu\arm\common\showmem.c + + + + DeviceDrivers + + $PROJ_DIR$\..\..\components\drivers\src\completion.c + + + $PROJ_DIR$\..\..\components\drivers\src\dataqueue.c + + + $PROJ_DIR$\..\..\components\drivers\misc\pin.c + + + $PROJ_DIR$\..\..\components\drivers\src\pipe.c + + + $PROJ_DIR$\..\..\components\drivers\src\ringbuffer.c + + + $PROJ_DIR$\..\..\components\drivers\serial\serial.c + + + $PROJ_DIR$\..\..\components\drivers\src\waitqueue.c + + + $PROJ_DIR$\..\..\components\drivers\src\workqueue.c + + + + Drivers + + $PROJ_DIR$\drivers\board.c + + + $PROJ_DIR$\drivers\drv_uart.c + + + $PROJ_DIR$\drivers\drv_wifi.c + + + + finsh + + $PROJ_DIR$\..\..\components\finsh\cmd.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_compiler.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_error.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_heap.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_init.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_node.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_ops.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_parser.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_token.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_var.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_vm.c + + + $PROJ_DIR$\..\..\components\finsh\msh.c + + + $PROJ_DIR$\..\..\components\finsh\msh_cmd.c + + + $PROJ_DIR$\..\..\components\finsh\msh_file.c + + + $PROJ_DIR$\..\..\components\finsh\shell.c + + + $PROJ_DIR$\..\..\components\finsh\symbol.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 + + + + LwIP + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\api\api_lib.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\api\api_msg.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\ipv4\autoip.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\def.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\dhcp.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\dns.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\api\err.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\netif\etharp.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\netif\ethernetif.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\ipv4\icmp.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\ipv4\igmp.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\ipv4\inet.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\ipv4\inet_chksum.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\init.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\ipv4\ip.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\ipv4\ip_addr.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\ipv4\ip_frag.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\memp.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\api\netbuf.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\api\netdb.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\netif.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\api\netifapi.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\pbuf.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\raw.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\netif\slipif.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\api\sockets.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\stats.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\sys.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\arch\sys_arch.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\tcp.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\tcp_in.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\tcp_out.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\api\tcpip.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\timers.c + + + $PROJ_DIR$\..\..\components\net\lwip-1.4.1\src\core\udp.c + + + + mbed + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\analogin_api.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\dma_api.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\efuse_api.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\flash_api.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\gpio_api.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\gpio_irq_api.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\i2c_api.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\i2s_api.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\nfc_api.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\pinmap.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\pinmap_common.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\port_api.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\pwmout_api.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\rtc_api.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\serial_api.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\sleep.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\spi_api.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\sys_api.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\timer_api.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\us_ticker.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\us_ticker_api.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\wait_api.c + + + $PROJ_DIR$\packages\realtek_ameba\common\mbed\targets\hal\rtl8711b\wdt_api.c + + + + os_dep + + $PROJ_DIR$\packages\realtek_ameba\os\os_dep\osdep_service.c + + + $PROJ_DIR$\packages\realtek_ameba\os\rt-thread\rtthread_service.c + + + + polarssl + + $PROJ_DIR$\packages\realtek_ameba\common\network\ssl\ssl_ram_map\ssl_ram_map.c + + + + soc_8711b + + $PROJ_DIR$\packages\realtek_ameba\soc\realtek\8711b\cmsis\device\app_start.c + + + $PROJ_DIR$\packages\realtek_ameba\soc\realtek\8711b\app\monitor\ram\low_level_io.c + + + $PROJ_DIR$\packages\realtek_ameba\soc\realtek\8711b\app\monitor\ram\monitor.c + + + $PROJ_DIR$\packages\realtek_ameba\soc\realtek\8711b\fwlib\ram_lib\rt8710b_startup.c + + + $PROJ_DIR$\packages\realtek_ameba\soc\realtek\8711b\fwlib\ram_lib\rtl8710b_intfcfg.c + + + $PROJ_DIR$\packages\realtek_ameba\soc\realtek\8711b\fwlib\ram_lib\rtl8710b_pinmapcfg.c + + + $PROJ_DIR$\packages\realtek_ameba\soc\realtek\8711b\app\monitor\ram\rtl_consol.c + + + $PROJ_DIR$\packages\realtek_ameba\soc\realtek\8711b\cmsis\device\system_8195a.c + + + + + diff --git a/bsp/amebaz/project.eww b/bsp/amebaz/project.eww new file mode 100644 index 000000000..faa93f37c --- /dev/null +++ b/bsp/amebaz/project.eww @@ -0,0 +1,10 @@ + + + + + $WS_DIR$\project.ewp + + + + + diff --git a/bsp/amebaz/rlx8711B-symbol-v02-img2_xip1.ld b/bsp/amebaz/rlx8711B-symbol-v02-img2_xip1.ld new file mode 100644 index 000000000..f771a15b6 --- /dev/null +++ b/bsp/amebaz/rlx8711B-symbol-v02-img2_xip1.ld @@ -0,0 +1,176 @@ + + +ENTRY(Reset_Handler) + +INCLUDE "export-rom_symbol_v01.txt" + +MEMORY +{ + ROM (rx) : ORIGIN = 0x00000000, LENGTH = 0x80000 /* ROM: 512k */ + ROMBSS_RAM (rw) : ORIGIN = 0x10000000, LENGTH = 0x2000 /* ROM BSS RAM: 8K */ + BOOTLOADER_RAM (rwx) : ORIGIN = 0x10002000, LENGTH = 0x3000 /* BOOT Loader RAM: 12K */ + BD_RAM (rwx) : ORIGIN = 0x10005000, LENGTH = 0x2B000 /* MAIN RAM: 228 */ + MSP_RAM (wx) : ORIGIN = 0x1003E000, LENGTH = 0x1000 /* MSP RAM: 4k */ + RDP_RAM (wx) : ORIGIN = 0x1003F000, LENGTH = 0xFF0 /* RDP RAM: 4k-0x10 */ + + XIPBOOT (rx) : ORIGIN = 0x08000000+0x20, LENGTH = 0x04000-0x20 /* XIPBOOT: 32k, 32 Bytes resvd for header*/ + XIPSYS (r) : ORIGIN = 0x08009000, LENGTH = 0x1000 /* XIPSYS: 4K system data in flash */ + XIPCAL (r) : ORIGIN = 0x0800A000, LENGTH = 0x1000 /* XIPCAL: 4K calibration data in flash */ + XIP1 (rx) : ORIGIN = 0x0800B000+0x20, LENGTH = 0x75000-0x20 /* XIP1: 468k, 32 Bytes resvd for header */ + XIP2 (rx) : ORIGIN = 0x08080000+0x20, LENGTH = 0x75000-0x20 /* XIP2: 468k, 32 Bytes resvd for header */ +} + + + +SECTIONS +{ + .rom.text : { } > ROM + .rom.rodata : { } > ROM + .hal.rom.bss : { } > ROMBSS_RAM + + /* image1 entry, this section should in RAM and fixed address for ROM */ + .ram_image1.entry : + { + __ram_image1_text_start__ = .; + __ram_start_table_start__ = .; + KEEP(*(SORT(.image1.entry.data*))) + __ram_start_table_end__ = .; + + __image1_validate_code__ = .; + KEEP(*(.image1.validate.rodata*)) + KEEP(*(.image1.export.symb*)) + } > BOOTLOADER_RAM + + /* Add . to assign the start address of the section */ + /* to prevent the change of the start address by ld doing section alignment */ + .ram_image1.text . : + { + /* image1 text */ + *(.boot.ram.text*) + *(.boot.rodata*) + } > BOOTLOADER_RAM + + .ram_image1.data . : + { + __ram_image1_data_start__ = .; + KEEP(*(.boot.ram.data*)) + __ram_image1_data_end__ = .; + + __ram_image1_text_end__ = .; + } > BOOTLOADER_RAM + + .ram_image1.bss . : + { + __image1_bss_start__ = .; + KEEP(*(.boot.ram.bss*)) + KEEP(*(.boot.ram.end.bss*)) + __image1_bss_end__ = .; + } > BOOTLOADER_RAM + + .ram_image2.entry : + { + __ram_image2_text_start__ = .; + __image2_entry_func__ = .; + KEEP(*(SORT(.image2.entry.data*))) + + __image2_validate_code__ = .; + KEEP(*(.image2.validate.rodata*)) + + } > BD_RAM + + .ram_image2.text : + { + KEEP(*(.image2.ram.text*)) + } > BD_RAM + + .ram_image2.data : + { + __data_start__ = .; + *(.data*) + __data_end__ = .; + __ram_image2_text_end__ = .; + . = ALIGN(16); + } > BD_RAM + + .ram_image2.bss : + { + __bss_start__ = .; + *(.bss*) + *(COMMON) + } > BD_RAM + + .ram_image2.skb.bss : + { + *(.bdsram.data*) + __bss_end__ = .; + } > BD_RAM + + .ram_heap.data : + { + *(.bfsram.data*) + *(.heap.stdlib*) + . = ALIGN(4); + __rtt_heap_start = .; + } > BD_RAM + + .ram_rdp.text : + { + __rom_top_4k_start_ = .; + __rdp_text_start__ = .; + KEEP(*(.rdp.ram.text*)) + KEEP(*(.rdp.ram.data*)) + __rdp_text_end__ = .; + . = ALIGN(16); + + } > RDP_RAM + + .xip_image1.text : + { + __flash_boot_text_start__ = .; + + *(.flashboot.text*) + + __flash_boot_text_end__ = .; + + . = ALIGN(16); + } > XIPBOOT + + .xip_image2.text : + { + __flash_text_start__ = .; + + *(.img2_custom_signature*) + + *(.text*) + *(.rodata*) + *(.debug_trace*) + + __flash_text_end__ = .; + + /* section information for finsh shell */ + . = ALIGN(4); + __fsymtab_start = .; + KEEP(*(FSymTab)) + __fsymtab_end = .; + . = ALIGN(4); + __vsymtab_start = .; + KEEP(*(VSymTab)) + __vsymtab_end = .; + . = ALIGN(4); + + /* section information for initial. */ + . = ALIGN(4); + __rt_init_start = .; + KEEP(*(SORT(.rti_fn*))) + __rt_init_end = .; + . = ALIGN(4); + + . = ALIGN (16); + } > XIP1 +} + +SECTIONS +{ + /* Bootloader symbol list */ + boot_export_symbol = 0x10002020; +} diff --git a/bsp/amebaz/rlx8711B-symbol-v02-img2_xip2.ld b/bsp/amebaz/rlx8711B-symbol-v02-img2_xip2.ld new file mode 100644 index 000000000..b502fdb7d --- /dev/null +++ b/bsp/amebaz/rlx8711B-symbol-v02-img2_xip2.ld @@ -0,0 +1,175 @@ + + +ENTRY(Reset_Handler) + +INCLUDE "export-rom_symbol_v01.txt" + +MEMORY +{ + ROM (rx) : ORIGIN = 0x00000000, LENGTH = 0x80000 /* ROM: 512k */ + ROMBSS_RAM (rw) : ORIGIN = 0x10000000, LENGTH = 0x2000 /* ROM BSS RAM: 8K */ + BOOTLOADER_RAM (rwx) : ORIGIN = 0x10002000, LENGTH = 0x3000 /* BOOT Loader RAM: 12K */ + BD_RAM (rwx) : ORIGIN = 0x10005000, LENGTH = 0x2B000 /* MAIN RAM: 228 */ + MSP_RAM (wx) : ORIGIN = 0x1003E000, LENGTH = 0x1000 /* MSP RAM: 4k */ + RDP_RAM (wx) : ORIGIN = 0x1003F000, LENGTH = 0xFF0 /* RDP RAM: 4k-0x10 */ + + XIPBOOT (rx) : ORIGIN = 0x08000000+0x20, LENGTH = 0x04000-0x20 /* XIPBOOT: 32k, 32 Bytes resvd for header*/ + XIPSYS (r) : ORIGIN = 0x08009000, LENGTH = 0x1000 /* XIPSYS: 4K system data in flash */ + XIPCAL (r) : ORIGIN = 0x0800A000, LENGTH = 0x1000 /* XIPCAL: 4K calibration data in flash */ + XIP1 (rx) : ORIGIN = 0x0800B000+0x20, LENGTH = 0x75000-0x20 /* XIP1: 468k, 32 Bytes resvd for header */ + XIP2 (rx) : ORIGIN = 0x08080000+0x20, LENGTH = 0x75000-0x20 /* XIP2: 468k, 32 Bytes resvd for header */ +} + + + +SECTIONS +{ + .rom.text : { } > ROM + .rom.rodata : { } > ROM + .hal.rom.bss : { } > ROMBSS_RAM + + /* image1 entry, this section should in RAM and fixed address for ROM */ + .ram_image1.entry : + { + __ram_image1_text_start__ = .; + __ram_start_table_start__ = .; + KEEP(*(SORT(.image1.entry.data*))) + __ram_start_table_end__ = .; + + __image1_validate_code__ = .; + KEEP(*(.image1.validate.rodata*)) + KEEP(*(.image1.export.symb*)) + } > BOOTLOADER_RAM + + /* Add . to assign the start address of the section */ + /* to prevent the change of the start address by ld doing section alignment */ + .ram_image1.text . : + { + /* image1 text */ + *(.boot.ram.text*) + *(.boot.rodata*) + } > BOOTLOADER_RAM + + .ram_image1.data . : + { + __ram_image1_data_start__ = .; + KEEP(*(.boot.ram.data*)) + __ram_image1_data_end__ = .; + + __ram_image1_text_end__ = .; + } > BOOTLOADER_RAM + + .ram_image1.bss . : + { + __image1_bss_start__ = .; + KEEP(*(.boot.ram.bss*)) + KEEP(*(.boot.ram.end.bss*)) + __image1_bss_end__ = .; + } > BOOTLOADER_RAM + + .ram_image2.entry : + { + __ram_image2_text_start__ = .; + __image2_entry_func__ = .; + KEEP(*(SORT(.image2.entry.data*))) + + __image2_validate_code__ = .; + KEEP(*(.image2.validate.rodata*)) + + } > BD_RAM + + .ram_image2.text : + { + KEEP(*(.image2.ram.text*)) + } > BD_RAM + + .ram_image2.data : + { + __data_start__ = .; + *(.data*) + __data_end__ = .; + __ram_image2_text_end__ = .; + . = ALIGN(16); + } > BD_RAM + + .ram_image2.bss : + { + __bss_start__ = .; + *(.bss*) + *(COMMON) + } > BD_RAM + + .ram_image2.skb.bss : + { + *(.bdsram.data*) + __bss_end__ = .; + } > BD_RAM + + .ram_heap.data : + { + *(.bfsram.data*) + *(.heap.stdlib*) + . = ALIGN(4); + __rtt_heap_start = .; + } > BD_RAM + + .ram_rdp.text : + { + __rom_top_4k_start_ = .; + __rdp_text_start__ = .; + KEEP(*(.rdp.ram.text*)) + KEEP(*(.rdp.ram.data*)) + __rdp_text_end__ = .; + . = ALIGN(16); + + } > RDP_RAM + + .xip_image1.text : + { + __flash_boot_text_start__ = .; + + *(.flashboot.text*) + + __flash_boot_text_end__ = .; + + . = ALIGN(16); + } > XIPBOOT + + .xip_image2.text : + { + __flash_text_start__ = .; + + *(.img2_custom_signature*) + + *(.text*) + *(.rodata*) + *(.debug_trace*) + + __flash_text_end__ = .; + + /* section information for finsh shell */ + . = ALIGN(4); + __fsymtab_start = .; + KEEP(*(FSymTab)) + __fsymtab_end = .; + . = ALIGN(4); + __vsymtab_start = .; + KEEP(*(VSymTab)) + __vsymtab_end = .; + . = ALIGN(4); + + /* section information for initial. */ + . = ALIGN(4); + __rt_init_start = .; + KEEP(*(SORT(.rti_fn*))) + __rt_init_end = .; + . = ALIGN(4); + . = ALIGN (16); + } > XIP2 +} + +SECTIONS +{ + /* Bootloader symbol list */ + boot_export_symbol = 0x10002020; +} diff --git a/bsp/amebaz/rom_symbol_v01_iar.icf b/bsp/amebaz/rom_symbol_v01_iar.icf new file mode 100644 index 000000000..f4b2a14b6 --- /dev/null +++ b/bsp/amebaz/rom_symbol_v01_iar.icf @@ -0,0 +1,1424 @@ +define exported symbol __vectors_table = 0x0; +define exported symbol Reset_Handler = 0x101; +define exported symbol NMI_Handler = 0x115; +/*define exported symbol HardFault_Handler = 0x119;*/ +define exported symbol MemManage_Handler = 0x12d; +define exported symbol BusFault_Handler = 0x131; +define exported symbol UsageFault_Handler = 0x135; +define exported symbol VSprintf = 0x201; +define exported symbol DiagPrintf = 0x4dd; +define exported symbol DiagSPrintf = 0x509; +define exported symbol DiagSnPrintf = 0x535; +define exported symbol prvDiagPrintf = 0x7ed; +define exported symbol prvDiagSPrintf = 0x821; +define exported symbol UARTIMG_Write = 0x855; +define exported symbol UARTIMG_Download = 0x901; +define exported symbol _memcmp = 0x991; +define exported symbol _memcpy = 0x9c5; +define exported symbol _memset = 0xa7d; +define exported symbol DumpForOneBytes = 0xae9; +define exported symbol CmdRomHelp = 0xc69; +define exported symbol CmdDumpWord = 0xccd; +define exported symbol CmdWriteWord = 0xd7d; +define exported symbol CmdFlash = 0xdd1; +define exported symbol CmdEfuse = 0x12c1; +define exported symbol CmdDumpByte = 0x1775; +define exported symbol CmdDumpHalfWord = 0x17c9; +define exported symbol CmdWriteByte = 0x1881; +define exported symbol SramReadWriteCpy = 0x18c1; +define exported symbol SramReadWriteTest = 0x19f9; +define exported symbol CmdSRamTest = 0x1ac9; +define exported symbol GetRomCmdNum = 0x1b59; +define exported symbol Rand = 0x1b5d; +define exported symbol Rand_Arc4 = 0x1bdd; +define exported symbol RandBytes_Get = 0x1c0d; +define exported symbol Isspace = 0x1c59; +define exported symbol Strtoul = 0x1c6d; +define exported symbol ArrayInitialize = 0x1d15; +define exported symbol GetArgc = 0x1d29; +define exported symbol GetArgv = 0x1d55; +define exported symbol UartLogCmdExecute = 0x1db1; +define exported symbol UartLogShowBackSpace = 0x1e49; +define exported symbol UartLogRecallOldCmd = 0x1e7d; +define exported symbol UartLogHistoryCmd = 0x1eb1; +define exported symbol UartLogCmdChk = 0x1f2d; +define exported symbol UartLogIrqHandle = 0x2035; +define exported symbol RtlConsolInit = 0x2101; +define exported symbol RtlConsolTaskRom = 0x218d; +define exported symbol RtlExitConsol = 0x21b9; +define exported symbol RtlConsolRom = 0x2205; +define exported symbol BKUP_Write = 0x2249; +define exported symbol BKUP_Read = 0x226d; +define exported symbol BKUP_Set = 0x228d; +define exported symbol BKUP_Clear = 0x22b9; +define exported symbol NCO32K_Init = 0x22e9; +define exported symbol EXT32K_Cmd = 0x2349; +define exported symbol NCO8M_Init = 0x2365; +define exported symbol NCO8M_Cmd = 0x23bd; +define exported symbol ISO_Set = 0x23d9; +define exported symbol PLL0_Set = 0x23f1; +define exported symbol PLL1_Set = 0x2409; +define exported symbol PLL2_Set = 0x2421; +define exported symbol PLL3_Set = 0x2439; +define exported symbol XTAL0_Set = 0x2451; +define exported symbol XTAL1_Set = 0x2469; +define exported symbol XTAL2_Set = 0x2481; +define exported symbol XTAL_ClkGet = 0x2499; +define exported symbol CPU_ClkSet = 0x24b1; +define exported symbol CPU_ClkGet = 0x24c5; +define exported symbol OSC32K_Calibration = 0x24e5; +define exported symbol OSC32K_Cmd = 0x25f9; +define exported symbol OSC8M_Get = 0x2631; +define exported symbol rtl_cryptoEngine_SrcDesc_Show = 0x2641; +define exported symbol rtl_cryptoEngine_info = 0x27f1; +define exported symbol rtl_cryptoEngine_init = 0x2949; +define exported symbol rtl_crypto_md5_init = 0x2975; +define exported symbol rtl_crypto_md5_process = 0x29b1; +define exported symbol rtl_crypto_md5 = 0x2a09; +define exported symbol rtl_crypto_sha1_init = 0x2a2d; +define exported symbol rtl_crypto_sha1_process = 0x2a69; +define exported symbol rtl_crypto_sha1 = 0x2a9d; +define exported symbol rtl_crypto_sha2_init = 0x2ac1; +define exported symbol rtl_crypto_sha2_process = 0x2b15; +define exported symbol rtl_crypto_sha2 = 0x2b4d; +define exported symbol rtl_crypto_hmac_md5_init = 0x2b71; +define exported symbol rtl_crypto_hmac_md5_process = 0x2bd1; +define exported symbol rtl_crypto_hmac_md5 = 0x2c0d; +define exported symbol rtl_crypto_hmac_sha1_init = 0x2c31; +define exported symbol rtl_crypto_hmac_sha1_process = 0x2c91; +define exported symbol rtl_crypto_hmac_sha1 = 0x2cc9; +define exported symbol rtl_crypto_hmac_sha2_init = 0x2ced; +define exported symbol rtl_crypto_hmac_sha2_process = 0x2d65; +define exported symbol rtl_crypto_hmac_sha2 = 0x2da1; +define exported symbol rtl_crypto_aes_cbc_init = 0x2dc5; +define exported symbol rtl_crypto_aes_cbc_encrypt = 0x2dfd; +define exported symbol rtl_crypto_aes_cbc_decrypt = 0x2e45; +define exported symbol rtl_crypto_aes_ecb_init = 0x2e8d; +define exported symbol rtl_crypto_aes_ecb_encrypt = 0x2ec5; +define exported symbol rtl_crypto_aes_ecb_decrypt = 0x2ef5; +define exported symbol rtl_crypto_aes_ctr_init = 0x2f25; +define exported symbol rtl_crypto_aes_ctr_encrypt = 0x2f5d; +define exported symbol rtl_crypto_aes_ctr_decrypt = 0x2f99; +define exported symbol rtl_crypto_3des_cbc_init = 0x2fd5; +define exported symbol rtl_crypto_3des_cbc_encrypt = 0x300d; +define exported symbol rtl_crypto_3des_cbc_decrypt = 0x3055; +define exported symbol rtl_crypto_3des_ecb_init = 0x309d; +define exported symbol rtl_crypto_3des_ecb_encrypt = 0x30d5; +define exported symbol rtl_crypto_3des_ecb_decrypt = 0x311d; +define exported symbol rtl_crypto_des_cbc_init = 0x3165; +define exported symbol rtl_crypto_des_cbc_encrypt = 0x319d; +define exported symbol rtl_crypto_des_cbc_decrypt = 0x31f5; +define exported symbol rtl_crypto_des_ecb_init = 0x324d; +define exported symbol rtl_crypto_des_ecb_encrypt = 0x3285; +define exported symbol rtl_crypto_des_ecb_decrypt = 0x32dd; +define exported symbol SYSTIMER_Init = 0x3335; +define exported symbol SYSTIMER_TickGet = 0x33a1; +define exported symbol SYSTIMER_GetPassTime = 0x33c1; +define exported symbol DelayNop = 0x3401; +define exported symbol DelayUs = 0x3411; +define exported symbol DelayMs = 0x346d; +define exported symbol USOC_DongleSpecialCmd = 0x3481; +define exported symbol USOC_DongleCmd = 0x35d9; +define exported symbol USOC_DongleIsr = 0x35f9; +define exported symbol USOC_SIE_INTConfig = 0x3621; +define exported symbol USOC_SIE_INTClear = 0x3639; +define exported symbol USOC_PHY_Write = 0x3645; +define exported symbol USOC_PHY_Read = 0x3679; +define exported symbol USOC_PHY_Autoload = 0x36c1; +define exported symbol USOC_DongleInit = 0x37a5; +define exported symbol EFUSE_USER_Read = 0x386d; +define exported symbol EFUSE_USER1_Read = 0x3971; +define exported symbol EFUSE_USER2_Read = 0x397d; +define exported symbol EFUSE_USER3_Read = 0x3989; +define exported symbol EFUSE_RemainLength = 0x3995; +define exported symbol EFUSE_USER_Write = 0x3a21; +define exported symbol EFUSE_USER1_Write = 0x3bb1; +define exported symbol EFUSE_USER2_Write = 0x3bc1; +define exported symbol EFUSE_USER3_Write = 0x3bd1; +define exported symbol EFUSE_OTP_Read1B = 0x3be1; +define exported symbol EFUSE_OTP_Write1B = 0x3c01; +define exported symbol EFUSE_OTP_Read32B = 0x3c21; +define exported symbol EFUSE_OTP_Write32B = 0x3c4d; +define exported symbol EFUSE_RDP_EN = 0x3cad; +define exported symbol EFUSE_RDP_KEY = 0x3ccd; +define exported symbol EFUSE_OTF_KEY = 0x3cf9; +define exported symbol EFUSE_JTAG_OFF = 0x3d25; +define exported symbol PAD_DrvStrength = 0x3d45; +define exported symbol PAD_PullCtrl = 0x3d75; +define exported symbol Pinmux_Config = 0x3dc5; +define exported symbol Pinmux_ConfigGet = 0x3dfd; +define exported symbol Pinmux_Deinit = 0x3e19; +define exported symbol PINMUX_UART0_Ctrl = 0x3e39; +define exported symbol PINMUX_UART1_Ctrl = 0x3e81; +define exported symbol PINMUX_UARTLOG_Ctrl = 0x3ea9; +define exported symbol PINMUX_SPI0_Ctrl = 0x3ef9; +define exported symbol PINMUX_SPI1_Ctrl = 0x3f8d; +define exported symbol PINMUX_SPIF_Ctrl = 0x400d; +define exported symbol PINMUX_I2C0_Ctrl = 0x406d; +define exported symbol PINMUX_I2C1_Ctrl = 0x40e1; +define exported symbol PINMUX_SDIOD_Ctrl = 0x4151; +define exported symbol PINMUX_I2S0_Ctrl = 0x41e5; +define exported symbol PINMUX_SWD_Ctrl = 0x4265; +define exported symbol PINMUX_SWD_OFF = 0x42b5; +define exported symbol PINMUX_SWD_REG = 0x42d9; +define exported symbol PINMUX_Ctrl = 0x42fd; +define exported symbol SOCPS_BackupCPUClk = 0x4391; +define exported symbol SOCPS_RestoreCPUClk = 0x43b1; +define exported symbol SOCPS_BootFromPS = 0x43d1; +define exported symbol SOCPS_TrapPin = 0x43f1; +define exported symbol SOCPS_ANACKSel = 0x4411; +define exported symbol SOCPS_CLKCal = 0x442d; +define exported symbol SOCPS_SetWakeEvent = 0x4485; +define exported symbol SOCPS_ClearWakeEvent = 0x449d; +define exported symbol SOCPS_WakePinsCtrl = 0x44a9; +define exported symbol SOCPS_WakePinCtrl = 0x44d9; +define exported symbol SOCPS_WakePinClear = 0x4529; +define exported symbol SOCPS_GetANATimerParam = 0x4539; +define exported symbol SOCPS_SetANATimer = 0x4575; +define exported symbol SOCPS_SetReguWakepin = 0x45dd; +define exported symbol SOCPS_SetReguTimer = 0x4605; +define exported symbol SOCPS_PWROption = 0x46d9; +define exported symbol SOCPS_PWROptionExt = 0x46e5; +define exported symbol SOCPS_PWRMode = 0x46f9; +define exported symbol SOCPS_SNZMode = 0x4721; +define exported symbol SOCPS_DeepStandby = 0x473d; +define exported symbol SOCPS_DeepSleep = 0x4791; +define exported symbol SDIO_StructInit = 0x47d5; +define exported symbol SDIO_Init = 0x47f1; +define exported symbol SDIO_INTClear = 0x486d; +define exported symbol SDIO_INTConfig = 0x487d; +define exported symbol SDIO_RPWM1_Get = 0x4895; +define exported symbol SDIO_RPWM2_Get = 0x48a1; +define exported symbol SDIO_CPWM1_Set = 0x48ad; +define exported symbol SDIO_CPWM2_Set = 0x48c1; +define exported symbol SDIO_RXBD_RPTR_Get = 0x48dd; +define exported symbol SDIO_RXBD_WPTR_Set = 0x48e9; +define exported symbol SDIO_TXBD_WPTR_Get = 0x48f5; +define exported symbol SDIO_TXBD_RPTR_Set = 0x4901; +define exported symbol SDIO_DMA_Reset = 0x490d; +define exported symbol BOOT_ROM_Simulation = 0x4919; +define exported symbol USOC_BOOT_TXBD_Proc = 0x491d; +define exported symbol USOC_BOOT_Init = 0x4a3d; +define exported symbol USB_Boot_ROM = 0x4aa9; +define exported symbol USOC_CH_Cmd = 0x4b59; +define exported symbol USOC_Cmd = 0x4bb1; +define exported symbol USOC_PHY_Cmd = 0x4bf5; +define exported symbol USOC_MODE_Cfg = 0x4c09; +define exported symbol USOC_TXBD_SWIDX_Cfg = 0x4c25; +define exported symbol USOC_TXBD_SWIDX_Get = 0x4c2d; +define exported symbol USOC_TXBD_HWIDX_Get = 0x4c35; +define exported symbol USOC_RXBD_HWIDX_Get = 0x4c3d; +define exported symbol USOC_RXBD_SWIDX_Cfg = 0x4c45; +define exported symbol USOC_RXBD_SWIDX_Get = 0x4c4d; +define exported symbol USOC_StructInit = 0x4c55; +define exported symbol USOC_Init = 0x4c85; +define exported symbol USOC_SW_RST = 0x4d7d; +define exported symbol USOC_INTCfg = 0x4d91; +define exported symbol USOC_INTClr = 0x4d95; +define exported symbol USOC_INTGet = 0x4d9d; +define exported symbol USOC_MIT_Cfg = 0x4da1; +define exported symbol USOC_TXSTUCK_Cfg = 0x4dc5; +define exported symbol USOC_RXSTUCK_Cfg = 0x4de9; +define exported symbol USOC_POWER_On = 0x4e0d; +define exported symbol ADC_RXGDMA_Init = 0x4e9d; +define exported symbol ADC_SetAudio = 0x4f45; +define exported symbol ADC_SetAnalog = 0x4f61; +define exported symbol ADC_Cmd = 0x4fbd; +define exported symbol ADC_INTConfig = 0x5031; +define exported symbol ADC_SetOneShot = 0x5049; +define exported symbol ADC_SetComp = 0x50fd; +define exported symbol ADC_INTClear = 0x517d; +define exported symbol ADC_INTClearPendingBits = 0x5189; +define exported symbol ADC_GetISR = 0x5195; +define exported symbol ADC_Read = 0x51a1; +define exported symbol ADC_ReceiveBuf = 0x51ad; +define exported symbol ADC_InitStruct = 0x5205; +define exported symbol ADC_Init = 0x524d; +define exported symbol BOOT_ROM_ShowBuildInfo = 0x52ed; +define exported symbol BOOT_ROM_OTFCheck = 0x5335; +define exported symbol BOOT_ROM_InitFlash = 0x5345; +define exported symbol BOOT_ROM_FromFlash = 0x5405; +define exported symbol BOOT_ROM_InitUsb = 0x5511; +define exported symbol BOOT_ROM_Process = 0x553d; +define exported symbol BOOT_ROM_InitDebugFlg = 0x5605; +define exported symbol HalResetVsr = 0x5639; +define exported symbol Cache_Enable = 0x5811; +define exported symbol Cache_Flush = 0x5831; +define exported symbol Cache_Debug = 0x5851; +define exported symbol CRYPTO_AlignToBe32 = 0x58bd; +define exported symbol CRYPTO_MemDump = 0x58d5; +define exported symbol CRYPTO_GetAESKey = 0x599d; +define exported symbol CRYPTO_SetAESKey = 0x5cb5; +define exported symbol CRYPTO_SetSecurityMode = 0x5d29; +define exported symbol CRYPTO_Init = 0x5f5d; +define exported symbol CRYPTO_DeInit = 0x60b9; +define exported symbol CRYPTO_Reset = 0x6101; +define exported symbol CRYPTO_Process = 0x6129; +define exported symbol CRYPTO_CipherInit = 0x6a11; +define exported symbol CRYPTO_CipherEncrypt = 0x6a35; +define exported symbol CRYPTO_CipherDecrypt = 0x6a61; +define exported symbol CRYPTO_SetCheckSumEn = 0x6a95; +define exported symbol CRYPTO_GetCheckSumData = 0x6ab1; +define exported symbol LOGUART_StructInit = 0x6abd; +define exported symbol LOGUART_Init = 0x6ad5; +define exported symbol LOGUART_PutChar = 0x6b15; +define exported symbol LOGUART_GetChar = 0x6b49; +define exported symbol LOGUART_GetIMR = 0x6b65; +define exported symbol LOGUART_SetIMR = 0x6b71; +define exported symbol LOGUART_WaitBusy = 0x6b7d; +define exported symbol DIAG_UartInit = 0x6b9d; +define exported symbol DIAG_UartReInit = 0x6c25; +define exported symbol EFUSE_PowerSwitchROM = 0x6c49; +define exported symbol EFUSE_OneByteReadROM = 0x6d65; +define exported symbol EFUSE_OneByteWriteROM = 0x6e0d; +define exported symbol EFUSE_PG_Packet = 0x6e29; +define exported symbol EFUSE_LogicalMap_Read = 0x7091; +define exported symbol EFUSE_LogicalMap_Write = 0x71f5; +define exported symbol FLASH_SetSpiMode = 0x73dd; +define exported symbol FLASH_RxCmd = 0x7465; +define exported symbol FLASH_WaitBusy = 0x74cd; +define exported symbol FLASH_RxData = 0x754d; +define exported symbol FLASH_TxCmd = 0x75cd; +define exported symbol FLASH_WriteEn = 0x763d; +define exported symbol FLASH_TxData12B = 0x7661; +define exported symbol FLASH_SetStatus = 0x7735; +define exported symbol FLASH_Erase = 0x7755; +define exported symbol FLASH_DeepPowerDown = 0x77f5; +define exported symbol FLASH_SetStatusBits = 0x784d; +define exported symbol FLASH_Calibration = 0x791d; +define exported symbol FLASH_StructInit_Micron = 0x7a65; +define exported symbol FLASH_StructInit_MXIC = 0x7af5; +define exported symbol FLASH_StructInit_GD = 0x7b81; +define exported symbol FLASH_StructInit = 0x7c11; +define exported symbol FLASH_Init = 0x7ca1; +define exported symbol FLASH_ClockDiv = 0x7d15; +define exported symbol FLASH_CalibrationInit = 0x7d99; +define exported symbol FLASH_Calibration500MPSCmd = 0x7db1; +define exported symbol FLASH_CalibrationPhase = 0x7dcd; +define exported symbol FLASH_CalibrationPhaseIdx = 0x7e59; +define exported symbol FLASH_CalibrationNewCmd = 0x7e6d; +define exported symbol FLASH_CalibrationNew = 0x7ea9; +define exported symbol GDMA_StructInit = 0x80dd; +define exported symbol GDMA_SetLLP = 0x80f9; +define exported symbol GDMA_ClearINTPendingBit = 0x8191; +define exported symbol GDMA_ClearINT = 0x81d5; +define exported symbol GDMA_INTConfig = 0x8211; +define exported symbol GDMA_Cmd = 0x8259; +define exported symbol GDMA_Init = 0x828d; +define exported symbol GDMA_ChCleanAutoReload = 0x83c1; +define exported symbol GDMA_SetSrcAddr = 0x83f9; +define exported symbol GDMA_GetSrcAddr = 0x8411; +define exported symbol GDMA_GetDstAddr = 0x8429; +define exported symbol GDMA_SetDstAddr = 0x843d; +define exported symbol GDMA_SetBlkSize = 0x8459; +define exported symbol GDMA_GetBlkSize = 0x8489; +define exported symbol GDMA_ChnlRegister = 0x84a1; +define exported symbol GDMA_ChnlUnRegister = 0x8529; +define exported symbol GDMA_ChnlAlloc = 0x8591; +define exported symbol GDMA_ChnlFree = 0x8615; +define exported symbol GPIO_INTMode = 0x864d; +define exported symbol GPIO_INTConfig = 0x86e5; +define exported symbol GPIO_INTHandler = 0x8725; +define exported symbol GPIO_Direction = 0x8771; +define exported symbol GPIO_Init = 0x87a1; +define exported symbol GPIO_DeInit = 0x886d; +define exported symbol GPIO_ReadDataBit = 0x88c9; +define exported symbol GPIO_WriteBit = 0x88ed; +define exported symbol GPIO_PortDirection = 0x891d; +define exported symbol GPIO_PortRead = 0x893d; +define exported symbol GPIO_PortWrite = 0x894d; +define exported symbol GPIO_UserRegIrq = 0x8969; +define exported symbol I2C_StructInit = 0x899d; +define exported symbol I2C_SetSpeed = 0x89e5; +define exported symbol I2C_SetSlaveAddress = 0x8b3d; +define exported symbol I2C_CheckFlagState = 0x8b79; +define exported symbol I2C_INTConfig = 0x8bad; +define exported symbol I2C_ClearINT = 0x8be5; +define exported symbol I2C_ClearAllINT = 0x8c85; +define exported symbol I2C_Init = 0x8cad; +define exported symbol I2C_GetRawINT = 0x8dc9; +define exported symbol I2C_GetINT = 0x8df1; +define exported symbol I2C_MasterSendNullData = 0x8e19; +define exported symbol I2C_MasterSend = 0x8e65; +define exported symbol I2C_SlaveSend = 0x8ead; +define exported symbol I2C_ReceiveData = 0x8ed9; +define exported symbol I2C_MasterWrite = 0x8f05; +define exported symbol I2C_MasterReadDW = 0x8f89; +define exported symbol I2C_MasterRead = 0x9019; +define exported symbol I2C_SlaveWrite = 0x9089; +define exported symbol I2C_SlaveRead = 0x90f1; +define exported symbol I2C_MasterRepeatRead = 0x9141; +define exported symbol I2C_Cmd = 0x91c1; +define exported symbol I2C_PinMuxInit = 0x91fd; +define exported symbol I2C_PinMuxDeInit = 0x9255; +define exported symbol I2C_DMAControl = 0x92ad; +define exported symbol I2C_DmaMode1Config = 0x92e9; +define exported symbol I2C_DmaMode2Config = 0x9331; +define exported symbol I2C_TXGDMA_Init = 0x9375; +define exported symbol I2C_RXGDMA_Init = 0x9459; +define exported symbol I2C_Sleep_Cmd = 0x9521; +define exported symbol I2C_WakeUp = 0x95a1; +define exported symbol I2S_StructInit = 0x95e9; +define exported symbol I2S_Cmd = 0x9611; +define exported symbol I2S_TxDmaCmd = 0x962d; +define exported symbol I2S_RxDmaCmd = 0x9641; +define exported symbol I2S_INTConfig = 0x9655; +define exported symbol I2S_INTClear = 0x965d; +define exported symbol I2S_INTClearAll = 0x9665; +define exported symbol I2S_Init = 0x9671; +define exported symbol I2S_ISRGet = 0x97a9; +define exported symbol I2S_SetRate = 0x97b5; +define exported symbol I2S_SetWordLen = 0x9811; +define exported symbol I2S_SetChNum = 0x9839; +define exported symbol I2S_SetPageNum = 0x9861; +define exported symbol I2S_SetPageSize = 0x9895; +define exported symbol I2S_GetPageSize = 0x98a9; +define exported symbol I2S_SetDirection = 0x98b5; +define exported symbol I2S_SetDMABuf = 0x98dd; +define exported symbol I2S_TxPageBusy = 0x9905; +define exported symbol I2S_GetTxPage = 0x9911; +define exported symbol I2S_GetRxPage = 0x991d; +define exported symbol I2S_SetTxPageAddr = 0x9929; +define exported symbol I2S_GetTxPageAddr = 0x9939; +define exported symbol I2S_SetRxPageAddr = 0x9949; +define exported symbol I2S_GetRxPageAddr = 0x9959; +define exported symbol I2S_TxPageDMA_EN = 0x9969; +define exported symbol I2S_RxPageDMA_EN = 0x998d; +define exported symbol io_assert_failed = 0x99d9; +define exported symbol OTF_init = 0x99fd; +define exported symbol OTF_Cmd = 0x9a79; +define exported symbol OTF_Mask = 0x9a8d; +define exported symbol KEY_Request = 0x9add; +define exported symbol RDP_EN_Request = 0x9b21; +define exported symbol RCC_PeriphClockCmd = 0x9b65; +define exported symbol FUNC_HCI_COM = 0x9c95; +define exported symbol RTC_ByteToBcd2 = 0x9cad; +define exported symbol RTC_Bcd2ToByte = 0x9cc9; +define exported symbol RTC_ClokSource = 0x9cdd; +define exported symbol RTC_EnterInitMode = 0x9d19; +define exported symbol RTC_ExitInitMode = 0x9d51; +define exported symbol RTC_WaitForSynchro = 0x9d61; +define exported symbol RTC_BypassShadowCmd = 0x9da9; +define exported symbol RTC_StructInit = 0x9dd9; +define exported symbol RTC_Init = 0x9de5; +define exported symbol RTC_TimeStructInit = 0x9e7d; +define exported symbol RTC_SetTime = 0x9e8d; +define exported symbol RTC_GetTime = 0x9ff9; +define exported symbol RTC_SetAlarm = 0xa051; +define exported symbol RTC_AlarmStructInit = 0xa211; +define exported symbol RTC_GetAlarm = 0xa231; +define exported symbol RTC_AlarmCmd = 0xa2a1; +define exported symbol RTC_AlarmClear = 0xa2f5; +define exported symbol RTC_DayLightSavingConfig = 0xa305; +define exported symbol RTC_GetStoreOperation = 0xa355; +define exported symbol RTC_OutputConfig = 0xa365; +define exported symbol RTC_SmoothCalibConfig = 0xa39d; +define exported symbol SDIO_IsTimeout = 0xa459; +define exported symbol SDIOB_Init = 0xa481; +define exported symbol SDIOB_INTConfig = 0xa575; +define exported symbol SDIOB_DeInit = 0xa591; +define exported symbol SDIOB_H2C_WriteMem = 0xa5d9; +define exported symbol SDIOB_H2C_SetMem = 0xa605; +define exported symbol SDIOB_H2C_DataHandle = 0xa631; +define exported symbol SDIOB_H2C_DataReady = 0xa73d; +define exported symbol SDIOB_IRQ_Handler_BH = 0xa80d; +define exported symbol SDIOB_H2C_Task = 0xa8c9; +define exported symbol SDIO_Boot_Up = 0xa8e5; +define exported symbol SPI_DmaInit = 0xa91d; +define exported symbol SPI_DataHandle = 0xa9d1; +define exported symbol SPI_Boot_DmaRxIrqHandle = 0xaa01; +define exported symbol SPI_Boot_ROM = 0xaa5d; +define exported symbol SSI_StructInit = 0xabbd; +define exported symbol SSI_Cmd = 0xabf5; +define exported symbol SSI_INTConfig = 0xac09; +define exported symbol SSI_SetSclkPolarity = 0xac19; +define exported symbol SSI_SetSclkPhase = 0xac3d; +define exported symbol SSI_SetDataFrameSize = 0xac61; +define exported symbol SSI_SetReadLen = 0xac81; +define exported symbol SSI_SetBaudDiv = 0xacb1; +define exported symbol SSI_SetBaud = 0xaccd; +define exported symbol SSI_SetDmaEnable = 0xad2d; +define exported symbol SSI_SetDmaLevel = 0xad41; +define exported symbol SSI_SetIsrClean = 0xad49; +define exported symbol SSI_WriteData = 0xad65; +define exported symbol SSI_SetRxFifoLevel = 0xad6d; +define exported symbol SSI_SetTxFifoLevel = 0xad71; +define exported symbol SSI_ReadData = 0xad75; +define exported symbol SSI_GetRxCount = 0xad79; +define exported symbol SSI_GetTxCount = 0xad81; +define exported symbol SSI_GetStatus = 0xad89; +define exported symbol SSI_Writeable = 0xad8d; +define exported symbol SSI_Readable = 0xad9d; +define exported symbol SSI_GetDataFrameSize = 0xadad; +define exported symbol SSI_TXGDMA_Init = 0xadb9; +define exported symbol SSI_RXGDMA_Init = 0xaef9; +define exported symbol SSI_ReceiveData = 0xb021; +define exported symbol SSI_SendData = 0xb0b9; +define exported symbol SSI_Busy = 0xb165; +define exported symbol SSI_SetSlaveEnable = 0xb175; +define exported symbol SSI_Init = 0xb1ad; +define exported symbol SSI_GetIsr = 0xb235; +define exported symbol SSI_GetRawIsr = 0xb239; +define exported symbol SSI_GetSlaveEnable = 0xb23d; +define exported symbol SSI_PinmuxInit = 0xb241; +define exported symbol SSI_PinmuxDeInit = 0xb2a9; +define exported symbol SYSCFG0_Get = 0xb311; +define exported symbol SYSCFG0_CUTVersion = 0xb31d; +define exported symbol SYSCFG0_BDOption = 0xb32d; +define exported symbol SYSCFG1_Get = 0xb33d; +define exported symbol SYSCFG1_AutoLoadDone = 0xb349; +define exported symbol SYSCFG1_TRP_LDOMode = 0xb359; +define exported symbol SYSCFG1_TRP_UARTImage = 0xb369; +define exported symbol SYSCFG1_TRP_ICFG = 0xb37d; +define exported symbol SYSCFG2_Get = 0xb389; +define exported symbol SYSCFG2_ROMINFO_Get = 0xb395; +define exported symbol SYSCFG2_ROMINFO_Set = 0xb3a1; +define exported symbol RTIM_TimeBaseStructInit = 0xb3b5; +define exported symbol RTIM_Cmd = 0xb3cd; +define exported symbol RTIM_GetCount = 0xb42d; +define exported symbol RTIM_UpdateDisableConfig = 0xb475; +define exported symbol RTIM_ARRPreloadConfig = 0xb4c5; +define exported symbol RTIM_UpdateRequestConfig = 0xb515; +define exported symbol RTIM_PrescalerConfig = 0xb575; +define exported symbol RTIM_GenerateEvent = 0xb5a1; +define exported symbol RTIM_ChangePeriod = 0xb5f9; +define exported symbol RTIM_Reset = 0xb64d; +define exported symbol RTIM_CCStructInit = 0xb68d; +define exported symbol RTIM_CCxInit = 0xb6a1; +define exported symbol RTIM_CCRxMode = 0xb749; +define exported symbol RTIM_CCRxSet = 0xb785; +define exported symbol RTIM_CCRxGet = 0xb7dd; +define exported symbol RTIM_OCxPreloadConfig = 0xb80d; +define exported symbol RTIM_CCxPolarityConfig = 0xb85d; +define exported symbol RTIM_CCxCmd = 0xb8ad; +define exported symbol RTIM_SetOnePulseOutputMode = 0xb901; +define exported symbol RTIM_DMACmd = 0xb959; +define exported symbol RTIM_TXGDMA_Init = 0xb9a9; +define exported symbol RTIM_RXGDMA_Init = 0xba5d; +define exported symbol RTIM_INTConfig = 0xbb3d; +define exported symbol RTIM_INTClear = 0xbba9; +define exported symbol RTIM_TimeBaseInit = 0xbbed; +define exported symbol RTIM_DeInit = 0xbced; +define exported symbol RTIM_INTClearPendingBit = 0xbd41; +define exported symbol RTIM_GetFlagStatus = 0xbd81; +define exported symbol RTIM_GetINTStatus = 0xbded; +define exported symbol UART_DeInit = 0xbe61; +define exported symbol UART_StructInit = 0xbe69; +define exported symbol UART_BaudParaGet = 0xbe81; +define exported symbol UART_BaudParaGetFull = 0xbec9; +define exported symbol UART_SetBaud = 0xbf01; +define exported symbol UART_SetBaudExt = 0xbf71; +define exported symbol UART_SetRxLevel = 0xbfc1; +define exported symbol UART_RxCmd = 0xbfe9; +define exported symbol UART_Writable = 0xbffd; +define exported symbol UART_Readable = 0xc005; +define exported symbol UART_CharPut = 0xc00d; +define exported symbol UART_CharGet = 0xc011; +define exported symbol UART_ReceiveData = 0xc019; +define exported symbol UART_SendData = 0xc041; +define exported symbol UART_ReceiveDataTO = 0xc069; +define exported symbol UART_SendDataTO = 0xc0a9; +define exported symbol UART_RxByteCntClear = 0xc0e9; +define exported symbol UART_RxByteCntGet = 0xc0f5; +define exported symbol UART_BreakCtl = 0xc0fd; +define exported symbol UART_ClearRxFifo = 0xc111; +define exported symbol UART_Init = 0xc135; +define exported symbol UART_ClearTxFifo = 0xc1d1; +define exported symbol UART_INTConfig = 0xc1dd; +define exported symbol UART_IntStatus = 0xc1ed; +define exported symbol UART_ModemStatusGet = 0xc1f1; +define exported symbol UART_LineStatusGet = 0xc1f5; +define exported symbol UART_WaitBusy = 0xc1f9; +define exported symbol UART_PinMuxInit = 0xc221; +define exported symbol UART_PinMuxDeinit = 0xc289; +define exported symbol UART_TXDMAConfig = 0xc2f1; +define exported symbol UART_RXDMAConfig = 0xc301; +define exported symbol UART_TXDMACmd = 0xc315; +define exported symbol UART_RXDMACmd = 0xc329; +define exported symbol UART_TXGDMA_Init = 0xc33d; +define exported symbol UART_RXGDMA_Init = 0xc425; +define exported symbol UART_LPRxStructInit = 0xc501; +define exported symbol UART_LPRxInit = 0xc50d; +define exported symbol UART_LPRxBaudSet = 0xc575; +define exported symbol UART_LPRxMonitorCmd = 0xc5f1; +define exported symbol UART_LPRxpathSet = 0xc62d; +define exported symbol UART_LPRxIPClockSet = 0xc641; +define exported symbol UART_LPRxCmd = 0xc6b1; +define exported symbol UART_LPRxMonBaudCtrlRegGet = 0xc6c5; +define exported symbol UART_LPRxMonitorSatusGet = 0xc6c9; +define exported symbol UART_IrDAStructInit = 0xc6cd; +define exported symbol UART_IrDAInit = 0xc6e5; +define exported symbol UART_IrDACmd = 0xc7bd; +define exported symbol INT_SysOn = 0xc7d1; +define exported symbol INT_Wdg = 0xc811; +define exported symbol INT_Timer0 = 0xc855; +define exported symbol INT_Timer1 = 0xc899; +define exported symbol INT_Timer2 = 0xc8dd; +define exported symbol INT_Timer3 = 0xc921; +define exported symbol INT_SPI0 = 0xc965; +define exported symbol INT_GPIO = 0xc9a9; +define exported symbol INT_Uart0 = 0xc9ed; +define exported symbol INT_SPIFlash = 0xca31; +define exported symbol INT_Uart1 = 0xca75; +define exported symbol INT_Timer4 = 0xcab9; +define exported symbol INT_I2S0 = 0xcafd; +define exported symbol INT_Timer5 = 0xcb41; +define exported symbol INT_WlDma = 0xcb85; +define exported symbol INT_WlProtocol = 0xcbc9; +define exported symbol INT_IPSEC = 0xcc0d; +define exported symbol INT_SPI1 = 0xcc51; +define exported symbol INT_Peripheral = 0xcc95; +define exported symbol INT_Gdma0Ch0 = 0xccd9; +define exported symbol INT_Gdma0Ch1 = 0xcd1d; +define exported symbol INT_Gdma0Ch2 = 0xcd61; +define exported symbol INT_Gdma0Ch3 = 0xcda5; +define exported symbol INT_Gdma0Ch4 = 0xcde9; +define exported symbol INT_Gdma0Ch5 = 0xce2d; +define exported symbol INT_I2C0 = 0xce71; +define exported symbol INT_I2C1 = 0xceb5; +define exported symbol INT_Uartlog = 0xcef9; +define exported symbol INT_ADC = 0xcf3d; +define exported symbol INT_RDP = 0xcf81; +define exported symbol INT_RTC = 0xcfc5; +define exported symbol INT_Gdma1Ch0 = 0xd009; +define exported symbol INT_Gdma1Ch1 = 0xd051; +define exported symbol INT_Gdma1Ch2 = 0xd099; +define exported symbol INT_Gdma1Ch3 = 0xd0e1; +define exported symbol INT_Gdma1Ch4 = 0xd129; +define exported symbol INT_Gdma1Ch5 = 0xd171; +define exported symbol INT_USB = 0xd1b9; +define exported symbol INT_RXI300 = 0xd201; +define exported symbol INT_USB_SIE = 0xd249; +define exported symbol INT_SdioD = 0xd291; +define exported symbol INT_NMI = 0xd2d1; +define exported symbol INT_HardFault = 0xd305; +define exported symbol INT_MemManage = 0xd4b5; +define exported symbol INT_BusFault = 0xd4d5; +define exported symbol INT_UsageFault = 0xd4f5; +define exported symbol VECTOR_TableInit = 0xd515; +define exported symbol VECTOR_TableInitForOS = 0xd6c5; +define exported symbol VECTOR_IrqRegister = 0xd6d5; +define exported symbol VECTOR_IrqUnRegister = 0xd6f9; +define exported symbol VECTOR_IrqEn = 0xd715; +define exported symbol VECTOR_IrqDis = 0xd765; +define exported symbol WDG_Scalar = 0xd7a1; +define exported symbol WDG_Init = 0xd7e1; +define exported symbol WDG_IrqClear = 0xd7fd; +define exported symbol WDG_IrqInit = 0xd80d; +define exported symbol WDG_Cmd = 0xd83d; +define exported symbol WDG_Refresh = 0xd85d; +define exported symbol _strncpy = 0xd86d; +define exported symbol _strcpy = 0xd889; +define exported symbol prvStrCpy = 0xd899; +define exported symbol _strlen = 0xd8b1; +define exported symbol _strnlen = 0xd8c9; +define exported symbol prvStrLen = 0xd8fd; +define exported symbol _strcmp = 0xd919; +define exported symbol _strncmp = 0xd939; +define exported symbol prvStrCmp = 0xd985; +define exported symbol StrUpr = 0xd9b5; +define exported symbol prvAtoi = 0xd9d1; +define exported symbol prvStrtok = 0xda29; +define exported symbol prvStrStr = 0xda81; +define exported symbol _strsep = 0xdab9; +define exported symbol skip_spaces = 0xdaf5; +define exported symbol skip_atoi = 0xdb11; +define exported symbol _parse_integer_fixup_radix = 0xdb49; +define exported symbol _parse_integer = 0xdb9d; +define exported symbol simple_strtoull = 0xdc01; +define exported symbol simple_strtoll = 0xdc21; +define exported symbol simple_strtoul = 0xdc41; +define exported symbol simple_strtol = 0xdc49; +define exported symbol _vsscanf = 0xdc61; +define exported symbol _sscanf = 0xe1c9; +define exported symbol div_u64 = 0xe1e5; +define exported symbol div_s64 = 0xe1ed; +define exported symbol div_u64_rem = 0xe1f5; +define exported symbol div_s64_rem = 0xe205; +define exported symbol _strpbrk = 0xe215; +define exported symbol _strchr = 0xe241; +define exported symbol COMMPORT_GET_T = 0xe259; +define exported symbol COMMPORT_CLEAN_RX = 0xe289; +define exported symbol xModemDebugInit = 0xe2a5; +define exported symbol xModemDebug = 0xe2dd; +define exported symbol xModemInquiry = 0xe315; +define exported symbol xModemGetFirst = 0xe339; +define exported symbol xModemGetOthers = 0xe45d; +define exported symbol xModemRxFrame = 0xe691; +define exported symbol xModemHandshake = 0xe6d5; +define exported symbol xModemRxBuffer = 0xe945; +define exported symbol xmodem_log_close = 0xe9f5; +define exported symbol xmodem_log_open = 0xea01; +define exported symbol xmodem_uart_init = 0xea39; +define exported symbol xmodem_uart_deinit = 0xeb25; +define exported symbol xmodem_uart_port_init = 0xeb35; +define exported symbol xmodem_uart_port_deinit = 0xeb99; +define exported symbol xmodem_uart_readable = 0xebdd; +define exported symbol xmodem_uart_writable = 0xebf5; +define exported symbol xmodem_uart_getc = 0xec0d; +define exported symbol xmodem_uart_putc = 0xec35; +define exported symbol xmodem_uart_putdata = 0xec49; +define exported symbol aes_set_key = 0xec65; +define exported symbol aes_encrypt = 0xf021; +define exported symbol aes_decrypt = 0x10171; +define exported symbol AES_WRAP = 0x112b1; +define exported symbol AES_UnWRAP = 0x113fd; +define exported symbol crc32_get = 0x11549; +define exported symbol arc4_byte = 0x1157d; +define exported symbol rt_arc4_init = 0x115a5; +define exported symbol rt_arc4_crypt = 0x115e9; +define exported symbol rt_md5_init = 0x11df5; +define exported symbol rt_md5_append = 0x11e25; +define exported symbol rt_md5_final = 0x11ec9; +define exported symbol rt_md5_hmac = 0x11f21; +define exported symbol RC4 = 0x12061; +define exported symbol RC4_set_key = 0x1238d; +define exported symbol ROM_WIFI_ReadPowerValue = 0x1246d; +define exported symbol ROM_WIFI_EfuseParseTxPowerInfo = 0x1251d; +define exported symbol ROM_WIFI_8051Reset = 0x125c5; +define exported symbol ROM_WIFI_FWDownloadEnable = 0x125dd; +define exported symbol ROM_WIFI_BlockWrite = 0x12619; +define exported symbol ROM_WIFI_PageWrite = 0x12661; +define exported symbol ROM_WIFI_FillDummy = 0x12685; +define exported symbol ROM_WIFI_WriteFW = 0x126b1; +define exported symbol ROM_WIFI_FWFreeToGo = 0x1275d; +define exported symbol ROM_WIFI_InitLLTTable = 0x127f9; +define exported symbol ROM_WIFI_GetChnlGroup = 0x12879; +define exported symbol ROM_WIFI_BWMapping = 0x129f1; +define exported symbol ROM_WIFI_SCMapping = 0x12a19; +define exported symbol ROM_WIFI_FillTxdescSectype = 0x12a99; +define exported symbol ROM_WIFI_FillFakeTxdesc = 0x12ab9; +define exported symbol ROM_WIFI_32K_Cmd = 0x12b91; +define exported symbol ROM_WIFI_DISCONNECT = 0x12bc1; +define exported symbol ROM_WIFI_SET_TSF = 0x12bfd; +define exported symbol ROM_WIFI_BCN_FUNC = 0x12ca5; +define exported symbol ROM_WIFI_BSSID_SET = 0x12ccd; +define exported symbol ROM_WIFI_MACADDR_SET = 0x12d09; +define exported symbol ROM_WIFI_EnableInterrupt = 0x12d39; +define exported symbol ROM_WIFI_DisableInterrupt = 0x12d4d; +define exported symbol ROM_WIFI_RESUME_TxBeacon = 0x12d61; +define exported symbol ROM_WIFI_STOP_TXBeacon = 0x12d91; +define exported symbol ROM_WIFI_BCN_Interval = 0x12dc1; +define exported symbol ROM_WIFI_BCN_FUNC_Enable = 0x12dcd; +define exported symbol ROM_WIFI_INIT_BeaconParameters = 0x12de5; +define exported symbol ROM_WIFI_MEDIA_STATUS1 = 0x12e35; +define exported symbol ROM_WIFI_MEDIA_STATUS = 0x12e4d; +define exported symbol ROM_WIFI_SetBrateCfg = 0x12e61; +define exported symbol ROM_WIFI_BASIC_RATE = 0x12f69; +define exported symbol ROM_WIFI_CHECK_BSSID = 0x12fc9; +define exported symbol ROM_WIFI_RESP_SIFS = 0x12fe9; +define exported symbol ROM_WIFI_CAM_WRITE = 0x13001; +define exported symbol ROM_WIFI_ACM_CTRL = 0x13021; +define exported symbol ROM_WIFI_FIFO_CLEARN_UP = 0x13051; +define exported symbol ROM_WIFI_CHECK_TXBUF = 0x130b9; +define exported symbol ROM_WIFI_BCN_VALID = 0x130fd; +define exported symbol ROM_WIFI_PROMISC_Cmd = 0x13119; +define exported symbol ROM_WIFI_SetOpmodeAP = 0x13189; +define exported symbol ROM_WIFI_ReadChipVersion = 0x132a9; +define exported symbol ROM_WIFI_DumpChipInfo = 0x1330d; +define exported symbol ROM_WIFI_InitLxDma = 0x135b1; +define exported symbol ROM_WIFI_InitQueueReservedPage = 0x13671; +define exported symbol ROM_WIFI_InitTxBufferBoundary = 0x136f1; +define exported symbol ROM_WIFI_InitNormalChipRegPriority = 0x1373d; +define exported symbol ROM_WIFI_InitPageBoundary = 0x13789; +define exported symbol ROM_WIFI_InitTransferPageSize = 0x13795; +define exported symbol ROM_WIFI_InitDriverInfoSize = 0x137a1; +define exported symbol ROM_WIFI_InitNetworkType = 0x137ad; +define exported symbol ROM_WIFI_InitRCR = 0x137c5; +define exported symbol ROM_WIFI_InitAdaptiveCtrl = 0x13805; +define exported symbol ROM_WIFI_InitSIFS = 0x1383d; +define exported symbol ROM_WIFI_InitEDCA = 0x13865; +define exported symbol ROM_WIFI_InitRateFallback = 0x138a1; +define exported symbol ROM_WIFI_InitRetryFunction = 0x138c9; +define exported symbol ROM_WIFI_InitOperationMode = 0x138e5; +define exported symbol ROM_WIFI_InitBurstPktLen = 0x138f9; +define exported symbol phy_CalculateBitShift = 0x13905; +define exported symbol PHY_SetBBReg_8711B = 0x1391d; +define exported symbol PHY_QueryBBReg_8711B = 0x13921; +define exported symbol ROM_odm_QueryRxPwrPercentage = 0x13925; +define exported symbol ROM_odm_EVMdbToPercentage = 0x13931; +define exported symbol ROM_odm_SignalScaleMapping_8711B = 0x13935; +define exported symbol ROM_odm_FalseAlarmCounterStatistics = 0x13a11; +define exported symbol ROM_odm_SetEDCCAThreshold = 0x13d39; +define exported symbol ROM_odm_SetTRxMux = 0x13d61; +define exported symbol ROM_odm_SetCrystalCap = 0x13d89; +define exported symbol ROM_odm_GetDefaultCrytaltalCap = 0x13ded; +define exported symbol ROM_ODM_CfoTrackingReset = 0x13dfd; +define exported symbol ROM_odm_CfoTrackingFlow = 0x13e21; +define exported symbol rtw_get_bit_value_from_ieee_value = 0x14045; +define exported symbol rtw_is_cckrates_included = 0x14071; +define exported symbol rtw_is_cckratesonly_included = 0x140a5; +define exported symbol rtw_check_network_type = 0x140cd; +define exported symbol rtw_set_fixed_ie = 0x14155; +define exported symbol rtw_set_ie = 0x14175; +define exported symbol rtw_get_ie = 0x141a1; +define exported symbol rtw_set_supported_rate = 0x141b5; +define exported symbol rtw_get_rateset_len = 0x14229; +define exported symbol rtw_get_wpa_ie = 0x14245; +define exported symbol rtw_get_wpa2_ie = 0x142d1; +define exported symbol rtw_get_wpa_cipher_suite = 0x142e5; +define exported symbol rtw_get_wpa2_cipher_suite = 0x1434d; +define exported symbol rtw_parse_wpa_ie = 0x143b5; +define exported symbol rtw_parse_wpa2_ie = 0x14481; +define exported symbol rtw_get_sec_ie = 0x14535; +define exported symbol rtw_get_wps_ie = 0x145e5; +define exported symbol rtw_get_wps_attr = 0x14659; +define exported symbol rtw_get_wps_attr_content = 0x146f1; +define exported symbol rtw_ieee802_11_parse_elems = 0x14739; +define exported symbol str_2char2num = 0x14909; +define exported symbol key_2char2num = 0x14925; +define exported symbol convert_ip_addr = 0x1493d; +define exported symbol rom_psk_PasswordHash = 0x14a21; +define exported symbol rom_psk_CalcGTK = 0x14a59; +define exported symbol rom_psk_CalcPTK = 0x14ae9; +define exported symbol _htons_rom = 0x14bdd; +define exported symbol _ntohs_rom = 0x14be5; +define exported symbol _htonl_rom = 0x14bed; +define exported symbol _ntohl_rom = 0x14bf1; +define exported symbol Message_ReplayCounter_OC2LI = 0x14bf5; +define exported symbol Message_EqualReplayCounter = 0x14c35; +define exported symbol Message_SmallerEqualReplayCounter = 0x14c6d; +define exported symbol Message_LargerReplayCounter = 0x14cad; +define exported symbol Message_setReplayCounter = 0x14ce5; +define exported symbol INCLargeInteger = 0x14d15; +define exported symbol INCOctet16_INTEGER = 0x14d25; +define exported symbol INCOctet32_INTEGER = 0x14d8d; +define exported symbol SetEAPOL_KEYIV = 0x14df5; +define exported symbol CheckMIC = 0x14e89; +define exported symbol CalcMIC = 0x14f29; +define exported symbol DecWPA2KeyData_rom = 0x14f9d; +define exported symbol DecGTK = 0x15055; +define exported symbol GetRandomBuffer = 0x15119; +define exported symbol GenNonce = 0x15181; +define exported symbol ClientConstructEAPOL_2Of4Way = 0x151c5; +define exported symbol ClientConstructEAPOL_4Of4Way = 0x152cd; +define exported symbol ClientConstructEAPOL_2Of2Way = 0x1537d; +define exported symbol ClientConstructEAPOL_MICOf2Way = 0x15459; +define exported symbol psk_strip_rsn_pairwise = 0x1552d; +define exported symbol psk_strip_wpa_pairwise = 0x155c1; +define exported symbol wep_80211_encrypt = 0x1587d; +define exported symbol wep_80211_decrypt = 0x158e1; +define exported symbol tkip_micappendbyte = 0x15975; +define exported symbol rtw_secmicsetkey = 0x159b9; +define exported symbol rtw_secmicappend = 0x159f9; +define exported symbol rtw_secgetmic = 0x15a15; +define exported symbol rtw_seccalctkipmic = 0x15a89; +define exported symbol tkip_phase1 = 0x15b7d; +define exported symbol tkip_phase2 = 0x15ce5; +define exported symbol tkip_80211_encrypt = 0x15f01; +define exported symbol tkip_80211_decrypt = 0x15f91; +define exported symbol aes1_encrypt = 0x16055; +define exported symbol aesccmp_construct_mic_iv = 0x1625d; +define exported symbol aesccmp_construct_mic_header1 = 0x162b1; +define exported symbol aesccmp_construct_mic_header2 = 0x16321; +define exported symbol aesccmp_construct_ctr_preload = 0x163a5; +define exported symbol aes_80211_encrypt = 0x16429; +define exported symbol aes_80211_decrypt = 0x167f9; +define exported symbol cckrates_included = 0x16c39; +define exported symbol cckratesonly_included = 0x16c7d; +define exported symbol networktype_to_raid_ex_rom = 0x16ca9; +define exported symbol judge_network_type_rom = 0x16cf5; +define exported symbol ratetbl_val_2wifirate = 0x16d89; +define exported symbol is_basicrate_rom = 0x16d9d; +define exported symbol ratetbl2rateset_rom = 0x16dd5; +define exported symbol get_rate_set_rom = 0x16e3d; +define exported symbol UpdateBrateTbl_rom = 0x16e71; +define exported symbol UpdateBrateTblForSoftAP = 0x16ec9; +define exported symbol write_cam_rom = 0x16f0d; +define exported symbol HT_caps_handler_rom = 0x16fc1; +define exported symbol wifirate2_ratetbl_inx = 0x17015; +define exported symbol update_basic_rate = 0x170bd; +define exported symbol update_supported_rate = 0x170f5; +define exported symbol update_MCS_rate = 0x17125; +define exported symbol get_highest_rate_idx = 0x17131; +define exported symbol _sha1_process_message_block = 0x1714d; +define exported symbol _sha1_pad_message = 0x172d1; +define exported symbol rt_sha1_init = 0x1736d; +define exported symbol rt_sha1_update = 0x173b1; +define exported symbol rt_sha1_finish = 0x17429; +define exported symbol rt_hmac_sha1 = 0x17489; +define exported symbol rom_aes_128_cbc_encrypt = 0x175e5; +define exported symbol rom_aes_128_cbc_decrypt = 0x17669; +define exported symbol rom_rijndaelKeySetupEnc = 0x176ed; +define exported symbol rom_aes_decrypt_init = 0x177c1; +define exported symbol rom_aes_internal_decrypt = 0x17899; +define exported symbol rom_aes_decrypt_deinit = 0x17bdd; +define exported symbol rom_aes_encrypt_init = 0x17be9; +define exported symbol rom_aes_internal_encrypt = 0x17c01; +define exported symbol rom_aes_encrypt_deinit = 0x17f81; +define exported symbol bignum_init = 0x1963d; +define exported symbol bignum_deinit = 0x19665; +define exported symbol bignum_get_unsigned_bin_len = 0x19685; +define exported symbol bignum_get_unsigned_bin = 0x19689; +define exported symbol bignum_set_unsigned_bin = 0x19741; +define exported symbol bignum_cmp = 0x197f9; +define exported symbol bignum_cmp_d = 0x197fd; +define exported symbol bignum_add = 0x19825; +define exported symbol bignum_sub = 0x19835; +define exported symbol bignum_mul = 0x19845; +define exported symbol bignum_exptmod = 0x19855; +define exported symbol WPS_realloc = 0x19879; +define exported symbol os_zalloc = 0x198bd; +define exported symbol rom_hmac_sha256_vector = 0x198e1; +define exported symbol rom_hmac_sha256 = 0x199e1; +define exported symbol rom_sha256_vector = 0x19b3d; +define exported symbol CRYPTO_chacha_20 = 0x19d45; +define exported symbol rom_ed25519_gen_keypair = 0x1a1bd; +define exported symbol rom_ed25519_gen_signature = 0x1a1c1; +define exported symbol rom_ed25519_verify_signature = 0x1a1d9; +define exported symbol rom_ed25519_ge_double_scalarmult_vartime = 0x1c4c9; +define exported symbol rom_ed25519_ge_frombytes_negate_vartime = 0x1c8c1; +define exported symbol rom_ed25519_ge_p3_tobytes = 0x1d43d; +define exported symbol rom_ed25519_ge_scalarmult_base = 0x1d489; +define exported symbol rom_ed25519_ge_tobytes = 0x1d64d; +define exported symbol rom_ed25519_crypto_sign_seed_keypair = 0x1d699; +define exported symbol rom_ed25519_crypto_sign_verify_detached = 0x1d6f1; +define exported symbol rom_ed25519_sc_muladd = 0x1d9e5; +define exported symbol rom_ed25519_sc_reduce = 0x24175; +define exported symbol rom_ed25519_crypto_sign_detached = 0x26c25; +define exported symbol CRYPTO_poly1305_init = 0x270dd; +define exported symbol CRYPTO_poly1305_update = 0x271b5; +define exported symbol CRYPTO_poly1305_finish = 0x27245; +define exported symbol rom_sha512_starts = 0x28511; +define exported symbol rom_sha512_update = 0x28659; +define exported symbol rom_sha512_finish = 0x28661; +define exported symbol rom_sha512 = 0x288a9; +define exported symbol rom_sha512_hmac_starts = 0x288e1; +define exported symbol rom_sha512_hmac_update = 0x289a5; +define exported symbol rom_sha512_hmac_finish = 0x289ad; +define exported symbol rom_sha512_hmac_reset = 0x289fd; +define exported symbol rom_sha512_hmac = 0x28a19; +define exported symbol rom_sha512_hkdf = 0x28a51; +define exported symbol aes_test_alignment_detection = 0x28b59; +define exported symbol aes_mode_reset = 0x28bbd; +define exported symbol aes_ecb_encrypt = 0x28bc9; +define exported symbol aes_ecb_decrypt = 0x28c05; +define exported symbol aes_cbc_encrypt = 0x28c41; +define exported symbol aes_cbc_decrypt = 0x28dad; +define exported symbol aes_cfb_encrypt = 0x28f49; +define exported symbol aes_cfb_decrypt = 0x2920d; +define exported symbol aes_ofb_crypt = 0x294d5; +define exported symbol aes_ctr_crypt = 0x29769; +define exported symbol aes_encrypt_key128 = 0x29a79; +define exported symbol aes_encrypt_key192 = 0x29a95; +define exported symbol aes_encrypt_key256 = 0x29ab1; +define exported symbol aes_encrypt_key = 0x29ad1; +define exported symbol aes_decrypt_key128 = 0x29b41; +define exported symbol aes_decrypt_key192 = 0x29b5d; +define exported symbol aes_decrypt_key256 = 0x29b79; +define exported symbol aes_decrypt_key = 0x29b99; +define exported symbol aes_init = 0x29c09; +define exported symbol curve25519_donna = 0x2a939; +define exported symbol __rtl_dtoa_r_v1_00 = 0x2b7f1; +define exported symbol __rtl_ltoa_v1_00 = 0x2c7f9; +define exported symbol __rtl_ultoa_v1_00 = 0x2c885; +define exported symbol __rtl_dtoi_v1_00 = 0x2c8ed; +define exported symbol __rtl_dtoi64_v1_00 = 0x2c96d; +define exported symbol __rtl_dtoui_v1_00 = 0x2ca09; +define exported symbol __rtl_ftol_v1_00 = 0x2ca11; +define exported symbol __rtl_itof_v1_00 = 0x2ca75; +define exported symbol __rtl_itod_v1_00 = 0x2cb05; +define exported symbol __rtl_i64tod_v1_00 = 0x2cb71; +define exported symbol __rtl_uitod_v1_00 = 0x2cc4d; +define exported symbol __rtl_ftod_v1_00 = 0x2cd29; +define exported symbol __rtl_dtof_v1_00 = 0x2cde1; +define exported symbol __rtl_uitof_v1_00 = 0x2ce75; +define exported symbol __rtl_fadd_v1_00 = 0x2cf59; +define exported symbol __rtl_fsub_v1_00 = 0x2d259; +define exported symbol __rtl_fmul_v1_00 = 0x2d565; +define exported symbol __rtl_fdiv_v1_00 = 0x2d695; +define exported symbol __rtl_dadd_v1_00 = 0x2d809; +define exported symbol __rtl_dsub_v1_00 = 0x2de49; +define exported symbol __rtl_dmul_v1_00 = 0x2e4a1; +define exported symbol __rtl_ddiv_v1_00 = 0x2e7dd; +define exported symbol __rtl_dcmpeq_v1_00 = 0x2ed71; +define exported symbol __rtl_dcmplt_v1_00 = 0x2eded; +define exported symbol __rtl_dcmpgt_v1_00 = 0x2ee85; +define exported symbol __rtl_dcmple_v1_00 = 0x2ef95; +define exported symbol __rtl_fcmplt_v1_00 = 0x2f0a9; +define exported symbol __rtl_fcmpgt_v1_00 = 0x2f105; +define exported symbol __rtl_fpclassifyd = 0x2f1ad; +define exported symbol __rtl_close_v1_00 = 0x2f205; +define exported symbol __rtl_fstat_v1_00 = 0x2f219; +define exported symbol __rtl_isatty_v1_00 = 0x2f22d; +define exported symbol __rtl_lseek_v1_00 = 0x2f23d; +define exported symbol __rtl_open_v1_00 = 0x2f251; +define exported symbol __rtl_read_v1_00 = 0x2f265; +define exported symbol __rtl_write_v1_00 = 0x2f279; +define exported symbol __rtl_sbrk_v1_00 = 0x2f28d; +define exported symbol __rom_mallocr_init_v1_00 = 0x2f29d; +define exported symbol __rtl_free_r_v1_00 = 0x2f309; +define exported symbol __rtl_malloc_r_v1_00 = 0x2f521; +define exported symbol __rtl_realloc_r_v1_00 = 0x2f9f5; +define exported symbol __rtl_memalign_r_v1_00 = 0x2fdb5; +define exported symbol __rtl_valloc_r_v1_00 = 0x2fe81; +define exported symbol __rtl_pvalloc_r_v1_00 = 0x2fe8d; +define exported symbol __rtl_calloc_r_v1_00 = 0x2fea1; +define exported symbol __rtl_cfree_r_v1_00 = 0x2ff05; +define exported symbol __rtl_cos_f32_v1_00 = 0x2ff15; +define exported symbol __rtl_sin_f32_v1_00 = 0x300e9; +define exported symbol __rtl_fabs_v1_00 = 0x302ad; +define exported symbol __rtl_fabsf_v1_00 = 0x302b5; +define exported symbol __rtl_memchr_v1_00 = 0x302bd; +define exported symbol __rtl_memcmp_v1_00 = 0x30351; +define exported symbol __rtl_memcpy_v1_00 = 0x303b5; +define exported symbol __rtl_memmove_v1_00 = 0x3045d; +define exported symbol __rtl_memset_v1_00 = 0x30525; +define exported symbol __rtl_Balloc_v1_00 = 0x3061d; +define exported symbol __rtl_Bfree_v1_00 = 0x3066d; +define exported symbol __rtl_i2b_v1_00 = 0x30681; +define exported symbol __rtl_multadd_v1_00 = 0x30695; +define exported symbol __rtl_mult_v1_00 = 0x30721; +define exported symbol __rtl_pow5mult_v1_00 = 0x30855; +define exported symbol __rtl_hi0bits_v1_00 = 0x308f5; +define exported symbol __rtl_d2b_v1_00 = 0x30935; +define exported symbol __rtl_lshift_v1_00 = 0x309ed; +define exported symbol __rtl_cmp_v1_00 = 0x30a99; +define exported symbol __rtl_diff_v1_00 = 0x30ae1; +define exported symbol __rtl_sread_v1_00 = 0x30bb5; +define exported symbol __rtl_seofread_v1_00 = 0x30c01; +define exported symbol __rtl_swrite_v1_00 = 0x30c05; +define exported symbol __rtl_sseek_v1_00 = 0x30c75; +define exported symbol __rtl_sclose_v1_00 = 0x30cc1; +define exported symbol __rtl_sbrk_r_v1_00 = 0x30ced; +define exported symbol __rtl_strcat_v1_00 = 0x30d15; +define exported symbol __rtl_strchr_v1_00 = 0x30d59; +define exported symbol __rtl_strcmp_v1_00 = 0x30e25; +define exported symbol __rtl_strcpy_v1_00 = 0x30e99; +define exported symbol __rtl_strlen_v1_00 = 0x30ee5; +define exported symbol __rtl_strncat_v1_00 = 0x30f39; +define exported symbol __rtl_strncmp_v1_00 = 0x30f95; +define exported symbol __rtl_strncpy_v1_00 = 0x3102d; +define exported symbol __rtl_strsep_v1_00 = 0x31095; +define exported symbol __rtl_strstr_v1_00 = 0x3136d; +define exported symbol __rtl_strtok_v1_00 = 0x315a5; +define exported symbol __rtl__strtok_r_v1_00 = 0x315b5; +define exported symbol __rtl_strtok_r_v1_00 = 0x31619; +define exported symbol __rtl_fflush_r_v1_00 = 0x31ae9; +define exported symbol __rtl_vfprintf_r_v1_00 = 0x31f99; +define exported symbol polarssl_aes_init = 0x335b9; +define exported symbol aes_free = 0x335c9; +define exported symbol aes_setkey_enc = 0x335dd; +define exported symbol aes_setkey_dec = 0x33829; +define exported symbol aes_crypt_ecb = 0x339a1; +define exported symbol aes_crypt_cbc = 0x343d1; +define exported symbol aes_crypt_cfb128 = 0x34649; +define exported symbol aes_crypt_cfb8 = 0x346c9; +define exported symbol aes_crypt_ctr = 0x3474d; +define exported symbol arc4_init = 0x347b1; +define exported symbol arc4_free = 0x347bd; +define exported symbol arc4_setup = 0x347d1; +define exported symbol arc4_crypt = 0x3481d; +define exported symbol asn1_get_len = 0x34861; +define exported symbol asn1_get_tag = 0x34901; +define exported symbol asn1_get_bool = 0x34929; +define exported symbol asn1_get_int = 0x3495d; +define exported symbol asn1_get_mpi = 0x349a9; +define exported symbol asn1_get_bitstring = 0x349d1; +define exported symbol asn1_get_bitstring_null = 0x34a19; +define exported symbol asn1_get_sequence_of = 0x34a4d; +define exported symbol asn1_get_alg = 0x34ad1; +define exported symbol asn1_get_alg_null = 0x34b65; +define exported symbol asn1_free_named_data = 0x34ba5; +define exported symbol asn1_free_named_data_list = 0x34bcd; +define exported symbol asn1_find_named_data = 0x34bf5; +define exported symbol asn1_write_len = 0x34c25; +define exported symbol asn1_write_tag = 0x34c8d; +define exported symbol asn1_write_raw_buffer = 0x34ca9; +define exported symbol asn1_write_mpi = 0x34ccd; +define exported symbol asn1_write_null = 0x34d41; +define exported symbol asn1_write_oid = 0x34d6d; +define exported symbol asn1_write_algorithm_identifier = 0x34dc5; +define exported symbol asn1_write_bool = 0x34e21; +define exported symbol asn1_write_int = 0x34e65; +define exported symbol asn1_write_printable_string = 0x34ecd; +define exported symbol asn1_write_ia5_string = 0x34f25; +define exported symbol asn1_write_bitstring = 0x34f7d; +define exported symbol asn1_write_octet_string = 0x34fe5; +define exported symbol asn1_store_named_data = 0x3503d; +define exported symbol base64_encode = 0x35111; +define exported symbol base64_decode = 0x3523d; +define exported symbol mpi_init = 0x35e09; +define exported symbol mpi_free = 0x35e19; +define exported symbol mpi_grow = 0x35e55; +define exported symbol mpi_shrink = 0x35e79; +define exported symbol mpi_copy = 0x35f21; +define exported symbol mpi_swap = 0x35fa1; +define exported symbol mpi_safe_cond_assign = 0x35fcd; +define exported symbol mpi_safe_cond_swap = 0x36069; +define exported symbol mpi_lset = 0x3610d; +define exported symbol mpi_get_bit = 0x3614d; +define exported symbol mpi_set_bit = 0x3616d; +define exported symbol mpi_lsb = 0x361d5; +define exported symbol mpi_msb = 0x36215; +define exported symbol mpi_size = 0x36261; +define exported symbol mpi_read_binary = 0x3626d; +define exported symbol mpi_write_binary = 0x362f9; +define exported symbol mpi_shift_l = 0x36341; +define exported symbol mpi_shift_r = 0x363f1; +define exported symbol mpi_cmp_abs = 0x36475; +define exported symbol mpi_cmp_mpi = 0x36619; +define exported symbol mpi_cmp_int = 0x366f1; +define exported symbol mpi_add_abs = 0x3671d; +define exported symbol mpi_sub_abs = 0x3680d; +define exported symbol mpi_add_mpi = 0x3689d; +define exported symbol mpi_sub_mpi = 0x368ed; +define exported symbol mpi_add_int = 0x3693d; +define exported symbol mpi_sub_int = 0x36969; +define exported symbol mpi_mul_mpi = 0x36995; +define exported symbol mpi_read_string = 0x36ac5; +define exported symbol mpi_mul_int = 0x36c45; +define exported symbol mpi_div_mpi = 0x36c61; +define exported symbol mpi_div_int = 0x370ed; +define exported symbol mpi_mod_mpi = 0x37119; +define exported symbol mpi_mod_int = 0x3717d; +define exported symbol mpi_write_string = 0x3722d; +define exported symbol mpi_exp_mod = 0x37395; +define exported symbol mpi_gcd = 0x37915; +define exported symbol mpi_fill_random = 0x37a39; +define exported symbol mpi_inv_mod = 0x37c4d; +define exported symbol mpi_is_prime = 0x37f15; +define exported symbol mpi_gen_prime = 0x37f71; +define exported symbol ctr_drbg_free = 0x38285; +define exported symbol ctr_drbg_set_prediction_resistance = 0x382a1; +define exported symbol ctr_drbg_set_entropy_len = 0x382a5; +define exported symbol ctr_drbg_set_reseed_interval = 0x382a9; +define exported symbol ctr_drbg_update = 0x382ad; +define exported symbol ctr_drbg_reseed = 0x382c9; +define exported symbol ctr_drbg_init_entropy_len = 0x38341; +define exported symbol ctr_drbg_init = 0x38399; +define exported symbol ctr_drbg_random_with_add = 0x383ad; +define exported symbol ctr_drbg_random = 0x38469; +define exported symbol des_init = 0x388a5; +define exported symbol des_free = 0x388b1; +define exported symbol des3_init = 0x388c5; +define exported symbol des3_free = 0x388d5; +define exported symbol des_key_set_parity = 0x388e9; +define exported symbol des_key_check_key_parity = 0x38909; +define exported symbol des_key_check_weak = 0x38939; +define exported symbol des_setkey_enc = 0x38965; +define exported symbol des_setkey_dec = 0x3898d; +define exported symbol des3_set2key_enc = 0x389d9; +define exported symbol des3_set2key_dec = 0x38a25; +define exported symbol des3_set3key_enc = 0x38a71; +define exported symbol des3_set3key_dec = 0x38ab1; +define exported symbol des_crypt_ecb = 0x38af1; +define exported symbol des_crypt_cbc = 0x38d09; +define exported symbol des3_crypt_ecb = 0x38f99; +define exported symbol des3_crypt_cbc = 0x39401; +define exported symbol dhm_init = 0x39729; +define exported symbol dhm_read_params = 0x39731; +define exported symbol dhm_make_params = 0x3978d; +define exported symbol dhm_read_public = 0x398c1; +define exported symbol dhm_make_public = 0x398e9; +define exported symbol dhm_calc_secret = 0x399ad; +define exported symbol dhm_free = 0x39ba1; +define exported symbol dhm_parse_dhm = 0x39c01; +define exported symbol ecdh_gen_public = 0x39cc5; +define exported symbol ecdh_compute_shared = 0x39cc9; +define exported symbol ecdh_init = 0x39d2d; +define exported symbol ecdh_free = 0x39d39; +define exported symbol ecdh_make_params = 0x39d81; +define exported symbol ecdh_read_params = 0x39e05; +define exported symbol ecdh_get_params = 0x39e2d; +define exported symbol ecdh_make_public = 0x39e79; +define exported symbol ecdh_read_public = 0x39ed1; +define exported symbol ecdh_calc_secret = 0x39f01; +define exported symbol ecdsa_sign = 0x3a041; +define exported symbol ecdsa_sign_det = 0x3a1c5; +define exported symbol ecdsa_verify = 0x3a2a9; +define exported symbol ecdsa_write_signature = 0x3a431; +define exported symbol ecdsa_write_signature_det = 0x3a46d; +define exported symbol ecdsa_read_signature = 0x3a4a5; +define exported symbol ecdsa_genkey = 0x3a531; +define exported symbol ecdsa_init = 0x3a565; +define exported symbol ecdsa_free = 0x3a591; +define exported symbol ecdsa_from_keypair = 0x3a5bd; +define exported symbol ecp_curve_list = 0x3aee5; +define exported symbol ecp_curve_info_from_grp_id = 0x3aeed; +define exported symbol ecp_curve_info_from_tls_id = 0x3af0d; +define exported symbol ecp_curve_info_from_name = 0x3af31; +define exported symbol ecp_point_init = 0x3af61; +define exported symbol ecp_group_init = 0x3af81; +define exported symbol ecp_keypair_init = 0x3af8d; +define exported symbol ecp_point_free = 0x3afb1; +define exported symbol ecp_group_free = 0x3afd1; +define exported symbol ecp_keypair_free = 0x3b03d; +define exported symbol ecp_copy = 0x3b05d; +define exported symbol ecp_group_copy = 0x3b08d; +define exported symbol ecp_set_zero = 0x3b095; +define exported symbol ecp_is_zero = 0x3ba61; +define exported symbol ecp_point_read_string = 0x3ba75; +define exported symbol ecp_point_write_binary = 0x3baa5; +define exported symbol ecp_point_read_binary = 0x3bb4d; +define exported symbol ecp_tls_read_point = 0x3bbc1; +define exported symbol ecp_tls_write_point = 0x3bbf5; +define exported symbol ecp_group_read_string = 0x3bc25; +define exported symbol ecp_tls_read_group = 0x3bc95; +define exported symbol ecp_tls_write_group = 0x3bcf1; +define exported symbol ecp_add = 0x3bd39; +define exported symbol ecp_sub = 0x3bd65; +define exported symbol ecp_check_pubkey = 0x3bddd; +define exported symbol ecp_check_privkey = 0x3bf8d; +define exported symbol ecp_mul = 0x3bff5; +define exported symbol ecp_gen_keypair = 0x3c565; +define exported symbol ecp_gen_key = 0x3c669; +define exported symbol ecp_use_known_dp = 0x3d741; +define exported symbol hmac_drbg_update = 0x3daa9; +define exported symbol hmac_drbg_init_buf = 0x3db41; +define exported symbol hmac_drbg_reseed = 0x3db91; +define exported symbol hmac_drbg_init = 0x3dc09; +define exported symbol hmac_drbg_set_prediction_resistance = 0x3dc81; +define exported symbol hmac_drbg_set_entropy_len = 0x3dc85; +define exported symbol hmac_drbg_set_reseed_interval = 0x3dc89; +define exported symbol hmac_drbg_random_with_add = 0x3dc8d; +define exported symbol hmac_drbg_random = 0x3dd4d; +define exported symbol hmac_drbg_free = 0x3dd61; +define exported symbol md_list = 0x3dd7d; +define exported symbol md_info_from_string = 0x3dd85; +define exported symbol md_info_from_type = 0x3de59; +define exported symbol md_init = 0x3de9d; +define exported symbol md_free = 0x3dea5; +define exported symbol md_init_ctx = 0x3dec5; +define exported symbol md_free_ctx = 0x3defd; +define exported symbol md_starts = 0x3df09; +define exported symbol md_update = 0x3df29; +define exported symbol md_finish = 0x3df49; +define exported symbol md = 0x3df69; +define exported symbol md_file = 0x3df89; +define exported symbol md_hmac_starts = 0x3dfa1; +define exported symbol md_hmac_update = 0x3dfc1; +define exported symbol md_hmac_finish = 0x3dfe1; +define exported symbol md_hmac_reset = 0x3e001; +define exported symbol md_hmac = 0x3e021; +define exported symbol md_process = 0x3e049; +define exported symbol md5_init = 0x3e301; +define exported symbol md5_free = 0x3e309; +define exported symbol md5_starts = 0x3e31d; +define exported symbol md5_process = 0x3e34d; +define exported symbol md5_update = 0x3ed51; +define exported symbol md5_finish = 0x3ed59; +define exported symbol md5 = 0x3ee11; +define exported symbol md5_hmac_starts = 0x3ee75; +define exported symbol md5_hmac_update = 0x3ef51; +define exported symbol md5_hmac_finish = 0x3ef59; +define exported symbol md5_hmac_reset = 0x3efbd; +define exported symbol md5_hmac = 0x3eff1; +define exported symbol oid_get_attr_short_name = 0x3f071; +define exported symbol oid_get_x509_ext_type = 0x3f0b1; +define exported symbol oid_get_extended_key_usage = 0x3f0f1; +define exported symbol oid_get_sig_alg_desc = 0x3f131; +define exported symbol oid_get_sig_alg = 0x3f149; +define exported symbol oid_get_oid_by_sig_alg = 0x3f169; +define exported symbol oid_get_pk_alg = 0x3f1a1; +define exported symbol oid_get_oid_by_pk_alg = 0x3f1e1; +define exported symbol oid_get_ec_grp = 0x3f219; +define exported symbol oid_get_oid_by_ec_grp = 0x3f259; +define exported symbol oid_get_cipher_alg = 0x3f291; +define exported symbol oid_get_md_alg = 0x3f2d1; +define exported symbol oid_get_oid_by_md = 0x3f311; +define exported symbol oid_get_pkcs12_pbe_alg = 0x3f349; +define exported symbol oid_get_numeric_string = 0x3f391; +define exported symbol pem_init = 0x3f649; +define exported symbol pem_read_buffer = 0x3f651; +define exported symbol pem_free = 0x3f955; +define exported symbol pem_write_buffer = 0x3f97d; +define exported symbol pk_init = 0x3fa81; +define exported symbol pk_free = 0x3fa8d; +define exported symbol pk_info_from_type = 0x3faad; +define exported symbol pk_init_ctx = 0x3fae1; +define exported symbol pk_init_ctx_rsa_alt = 0x3fb11; +define exported symbol pk_can_do = 0x3fb69; +define exported symbol pk_verify = 0x3fb79; +define exported symbol pk_verify_ext = 0x3fbc9; +define exported symbol pk_sign = 0x3fc8d; +define exported symbol pk_decrypt = 0x3fce9; +define exported symbol pk_encrypt = 0x3fd15; +define exported symbol pk_get_size = 0x3fd41; +define exported symbol pk_debug = 0x3fd51; +define exported symbol pk_get_name = 0x3fd79; +define exported symbol pk_get_type = 0x3fd8d; +define exported symbol pk_write_pubkey = 0x40181; +define exported symbol pk_write_pubkey_der = 0x40201; +define exported symbol pk_write_key_der = 0x402dd; +define exported symbol pk_write_pubkey_pem = 0x404f5; +define exported symbol pk_write_key_pem = 0x40545; +define exported symbol rsa_init = 0x4065d; +define exported symbol rsa_set_padding = 0x40679; +define exported symbol rsa_check_pubkey = 0x40685; +define exported symbol rsa_check_privkey = 0x406e1; +define exported symbol rsa_public = 0x409a5; +define exported symbol rsa_private = 0x40a25; +define exported symbol rsa_rsaes_oaep_encrypt = 0x40c29; +define exported symbol rsa_rsaes_pkcs1_v15_encrypt = 0x40d31; +define exported symbol rsa_pkcs1_encrypt = 0x40e19; +define exported symbol rsa_rsaes_oaep_decrypt = 0x40e59; +define exported symbol rsa_rsaes_pkcs1_v15_decrypt = 0x40fbd; +define exported symbol rsa_pkcs1_decrypt = 0x410c1; +define exported symbol rsa_rsassa_pss_sign = 0x4110d; +define exported symbol rsa_rsassa_pkcs1_v15_sign = 0x41271; +define exported symbol rsa_pkcs1_sign = 0x41389; +define exported symbol rsa_rsassa_pss_verify_ext = 0x413c9; +define exported symbol rsa_rsassa_pss_verify = 0x41575; +define exported symbol rsa_rsassa_pkcs1_v15_verify = 0x415a5; +define exported symbol rsa_pkcs1_verify = 0x41709; +define exported symbol rsa_free = 0x41765; +define exported symbol rsa_gen_key = 0x417d5; +define exported symbol rsa_copy = 0x4198d; +define exported symbol sha1_init = 0x41a9d; +define exported symbol sha1_free = 0x41aa5; +define exported symbol sha1_starts = 0x41ab9; +define exported symbol sha1_process = 0x41aed; +define exported symbol sha1_update = 0x42e15; +define exported symbol sha1_finish = 0x42e1d; +define exported symbol sha1 = 0x42ee5; +define exported symbol sha1_hmac_starts = 0x42f51; +define exported symbol sha1_hmac_update = 0x43039; +define exported symbol sha1_hmac_finish = 0x43041; +define exported symbol sha1_hmac_reset = 0x430b5; +define exported symbol sha1_hmac = 0x430f1; +define exported symbol sha256_init = 0x43139; +define exported symbol sha256_free = 0x43141; +define exported symbol sha256_starts = 0x43155; +define exported symbol sha256_process = 0x431e5; +define exported symbol sha256_update = 0x4513d; +define exported symbol sha256_finish = 0x45145; +define exported symbol sha256 = 0x4524d; +define exported symbol sha256_hmac_starts = 0x45325; +define exported symbol sha256_hmac_update = 0x45475; +define exported symbol sha256_hmac_finish = 0x4547d; +define exported symbol sha256_hmac_reset = 0x45569; +define exported symbol sha256_hmac = 0x45601; +define exported symbol sha512_init = 0x45651; +define exported symbol sha512_free = 0x4565d; +define exported symbol sha512_starts = 0x45671; +define exported symbol sha512_process = 0x457b9; +define exported symbol sha512_update = 0x46879; +define exported symbol sha512_finish = 0x46881; +define exported symbol sha512 = 0x46ac9; +define exported symbol sha512_hmac_starts = 0x46b11; +define exported symbol sha512_hmac_update = 0x46bd9; +define exported symbol sha512_hmac_finish = 0x46be1; +define exported symbol sha512_hmac_reset = 0x46c35; +define exported symbol sha512_hmac = 0x46c51; +define exported symbol UartLogRomCmdTable = 0x46ca0; +define exported symbol XTAL_CLK = 0x46e10; +define exported symbol CpkClkTbl_FPAG = 0x46e50; +define exported symbol CpkClkTbl_ASIC = 0x46e68; +define exported symbol ROM_IMG1_VALID_PATTEN = 0x46e90; +define exported symbol __AES_rcon = 0x46e98; +define exported symbol __AES_Te4 = 0x46ec0; +define exported symbol SpicCalibrationPattern = 0x472c0; +define exported symbol NEW_CALIBREATION_DIV = 0x472c8; +define exported symbol NEW_CALIBREATION_DATA = 0x472e4; +define exported symbol GDMA_IrqNum = 0x47344; +define exported symbol I2C_DEV_TABLE = 0x47350; +define exported symbol spi_clk_pin = 0x47370; +define exported symbol SPI_DEV_TABLE = 0x47374; +define exported symbol PWM_GDMA_HSx = 0x47394; +define exported symbol TIM_DMA_CCx = 0x473ac; +define exported symbol TIM_IT_CCx = 0x473c4; +define exported symbol TIMx = 0x473dc; +define exported symbol TIMx_irq = 0x473f4; +define exported symbol BAUDRATE_TABLE_40M = 0x4740c; +define exported symbol UART_DEV_TABLE = 0x475bc; +define exported symbol RTW_WPA_OUI_TYPE = 0x4b270; +define exported symbol WPA_CIPHER_SUITE_NONE = 0x4b274; +define exported symbol WPA_CIPHER_SUITE_WEP40 = 0x4b278; +define exported symbol WPA_CIPHER_SUITE_TKIP = 0x4b27c; +define exported symbol WPA_CIPHER_SUITE_CCMP = 0x4b280; +define exported symbol WPA_CIPHER_SUITE_WEP104 = 0x4b284; +define exported symbol RSN_CIPHER_SUITE_NONE = 0x4b288; +define exported symbol RSN_CIPHER_SUITE_WEP40 = 0x4b28c; +define exported symbol RSN_CIPHER_SUITE_TKIP = 0x4b290; +define exported symbol RSN_CIPHER_SUITE_CCMP = 0x4b294; +define exported symbol RSN_CIPHER_SUITE_WEP104 = 0x4b298; +define exported symbol RSN_AUTH_KEY_MGMT_PSK_OVER_802_1X = 0x4b2a8; +define exported symbol RSN_AUTH_KEY_MGMT_UNSPEC_802_1X = 0x4b2ac; +define exported symbol RSN_VERSION_BSD = 0x4b2b0; +define exported symbol rom_e_rtw_msgp_str_ = 0x4b2b4; +define exported symbol rtw_basic_rate_mix = 0x4b9a8; +define exported symbol rtw_basic_rate_ofdm = 0x4b9b0; +define exported symbol rtw_basic_rate_cck = 0x4b9b4; +define exported symbol REALTEK_96B_IE = 0x4b9b8; +define exported symbol AIRGOCAP_OUI = 0x4b9c0; +define exported symbol REALTEK_OUI = 0x4b9c4; +define exported symbol RALINK_OUI = 0x4b9c8; +define exported symbol MARVELL_OUI = 0x4b9cc; +define exported symbol CISCO_OUI = 0x4b9d0; +define exported symbol BROADCOM_OUI3 = 0x4b9d4; +define exported symbol BROADCOM_OUI2 = 0x4b9d8; +define exported symbol BROADCOM_OUI1 = 0x4b9dc; +define exported symbol ARTHEROS_OUI2 = 0x4b9e0; +define exported symbol ARTHEROS_OUI1 = 0x4b9e4; +define exported symbol rom_wps_rcons = 0x4b9e8; +define exported symbol rom_wps_Te0 = 0x4b9f4; +define exported symbol rom_wps_Td4s = 0x4bdf4; +define exported symbol rom_wps_Td0 = 0x4bef4; +define exported symbol sha512_info = 0x5850c; +define exported symbol sha384_info = 0x5854c; +define exported symbol sha256_info = 0x5858c; +define exported symbol sha224_info = 0x585cc; +define exported symbol sha1_info = 0x5860c; +define exported symbol md5_info = 0x5864c; +define exported symbol rsa_alt_info = 0x58d28; +define exported symbol ecdsa_info = 0x58d54; +define exported symbol eckeydh_info = 0x58d80; +define exported symbol eckey_info = 0x58dac; +define exported symbol rsa_info = 0x58dd8; +define exported symbol __rom_bss_start__ = 0x10000000; +define exported symbol NewVectorTable = 0x10000000; +define exported symbol UserIrqFunTable = 0x10000100; +define exported symbol UserIrqDataTable = 0x10000200; +define exported symbol ConfigDebugClose = 0x10000300; +define exported symbol CfgSysDebugWarn = 0x10000304; +define exported symbol CfgSysDebugInfo = 0x10000308; +define exported symbol CfgSysDebugErr = 0x1000030c; +define exported symbol ConfigDebugWarn = 0x10000310; +define exported symbol ConfigDebugInfo = 0x10000314; +define exported symbol ConfigDebugErr = 0x10000318; +define exported symbol sector_addr = 0x1000031c; +define exported symbol _rtl_impure_ptr = 0x10000338; +define exported symbol ArgvArray = 0x1000033c; +define exported symbol pUartLogCtl = 0x10000364; +define exported symbol UartLogBuf = 0x10000368; +define exported symbol UartLogCtl = 0x100003e8; +define exported symbol UartLogHistoryBuf = 0x10000408; +define exported symbol NCO32K_Enable = 0x10000684; +define exported symbol g_rtl_cipherEngine = 0x100006a0; +define exported symbol DONGLE_InitStruct = 0x10000ba0; +define exported symbol EFUSE_MAP = 0x10000ba4; +define exported symbol USOC_BOOT_TXBD = 0x10000da4; +define exported symbol USOC_BOOT_RXBD = 0x10000db4; +define exported symbol USB_RXBuff = 0x10000dc4; +define exported symbol USB_TXBuff = 0x10000dcc; +define exported symbol ADC_AnaparAd = 0x10000dd4; +define exported symbol flash_init_para = 0x10000dec; +define exported symbol NEW_CALIBREATION_END = 0x10000e44; +define exported symbol GDMA_Reg = 0x10000e4c; +define exported symbol PortA_IrqHandler = 0x10000e50; +define exported symbol PortA_IrqData = 0x10000ed0; +define exported symbol IC_FS_SCL_HCNT_TRIM = 0x10000f50; +define exported symbol IC_FS_SCL_LCNT_TRIM = 0x10000f54; +define exported symbol I2C_SLAVEWRITE_PATCH = 0x10000f58; +define exported symbol i2s_cur_tx_page = 0x10000f5c; +define exported symbol i2s_cur_rx_page = 0x10000f60; +define exported symbol i2s_page_num = 0x10000f64; +define exported symbol i2s_txpage_entry = 0x10000f68; +define exported symbol i2s_rxpage_entry = 0x10000f78; +define exported symbol TXBDAddrAligned = 0x10000f88; +define exported symbol H2C_Buff = 0x10000f90; +define exported symbol SPI_RECV_Buff = 0x10000f94; +define exported symbol spi_boot_recv_done = 0x10000f98; +define exported symbol UART_StateRx = 0x10000f9c; +define exported symbol UART_StateTx = 0x10000fa8; +define exported symbol xMCtrl = 0x10000fb8; +define exported symbol XComUARTx = 0x10000fc4; +define exported symbol FalseAlmCnt = 0x10000fc8; +define exported symbol ROMInfo = 0x10001008; +define exported symbol DM_CfoTrack = 0x10001020; +define exported symbol rom_wlan_ram_map = 0x10001048; +define exported symbol rom_libgloss_ram_map = 0x10001050; +define exported symbol __rtl_errno = 0x100014b4; +define exported symbol rom_ssl_ram_map = 0x100014b8; +define exported symbol __rom_bss_end__ = 0x100014f8; diff --git a/bsp/amebaz/rtconfig.h b/bsp/amebaz/rtconfig.h new file mode 100644 index 000000000..2e6b043f5 --- /dev/null +++ b/bsp/amebaz/rtconfig.h @@ -0,0 +1,184 @@ +#ifndef RT_CONFIG_H__ +#define RT_CONFIG_H__ + +/* Automatically generated file; DO NOT EDIT. */ +/* RT-Thread Configuration */ + +/* RT-Thread Kernel */ + +#define RT_NAME_MAX 8 +#define RT_ALIGN_SIZE 4 +#define RT_THREAD_PRIORITY_32 +#define RT_THREAD_PRIORITY_MAX 32 +#define RT_TICK_PER_SECOND 1000 +#define RT_DEBUG +#define RT_USING_OVERFLOW_CHECK +#define RT_DEBUG_INIT 0 +#define RT_DEBUG_THREAD 0 +#define RT_USING_HOOK +#define IDLE_THREAD_STACK_SIZE 256 +#define RT_USING_TIMER_SOFT +#define RT_TIMER_THREAD_PRIO 4 +#define RT_TIMER_THREAD_STACK_SIZE 512 + +/* Inter-Thread communication */ + +#define RT_USING_SEMAPHORE +#define RT_USING_MUTEX +#define RT_USING_EVENT +#define RT_USING_MAILBOX +#define RT_USING_MESSAGEQUEUE + +/* Memory Management */ + +#define RT_USING_MEMPOOL +#define RT_USING_SMALL_MEM +#define RT_USING_HEAP + +/* Kernel Device Object */ + +#define RT_USING_DEVICE +#define RT_USING_CONSOLE +#define RT_CONSOLEBUF_SIZE 128 +#define RT_CONSOLE_DEVICE_NAME "dbg" + +/* RT-Thread Components */ + +#define RT_USING_COMPONENTS_INIT + +/* C++ features */ + + +/* Command shell */ + +#define RT_USING_FINSH +#define FINSH_THREAD_NAME "tshell" +#define FINSH_USING_HISTORY +#define FINSH_HISTORY_LINES 5 +#define FINSH_USING_SYMTAB +#define FINSH_USING_DESCRIPTION +#define FINSH_THREAD_PRIORITY 20 +#define FINSH_THREAD_STACK_SIZE 4096 +#define FINSH_CMD_SIZE 80 +#define FINSH_USING_MSH +#define FINSH_USING_MSH_DEFAULT +#define FINSH_ARG_MAX 10 + +/* Device virtual file system */ + + +/* Device Drivers */ + +#define RT_USING_DEVICE_IPC +#define RT_USING_SERIAL +#define RT_USING_PIN +#define RT_USING_WIFI +#define RT_USING_WLAN_STA +#define RT_USING_WLAN_AP +#define WIFI_DEVICE_STA_NAME "w0" +#define WIFI_DEVICE_AP_NAME "ap" + +/* Using USB */ + + +/* POSIX layer and C standard library */ + +#define RT_USING_LIBC + +/* Network stack */ + +/* light weight TCP/IP stack */ + +#define RT_USING_LWIP +#define RT_USING_LWIP141 +#define RT_LWIP_IGMP +#define RT_LWIP_ICMP +#define RT_LWIP_DNS +#define RT_LWIP_DHCP +#define IP_SOF_BROADCAST 1 +#define IP_SOF_BROADCAST_RECV 1 + +/* Static IPv4 Address */ + +#define RT_LWIP_IPADDR "192.168.1.30" +#define RT_LWIP_GWADDR "192.168.1.1" +#define RT_LWIP_MSKADDR "255.255.255.0" +#define RT_LWIP_UDP +#define RT_LWIP_TCP +#define RT_MEMP_NUM_NETCONN 8 +#define RT_LWIP_PBUF_NUM 16 +#define RT_LWIP_RAW_PCB_NUM 4 +#define RT_LWIP_UDP_PCB_NUM 4 +#define RT_LWIP_TCP_PCB_NUM 4 +#define RT_LWIP_TCP_SEG_NUM 40 +#define RT_LWIP_TCP_SND_BUF 8196 +#define RT_LWIP_TCP_WND 8196 +#define RT_LWIP_TCPTHREAD_PRIORITY 10 +#define RT_LWIP_TCPTHREAD_MBOX_SIZE 8 +#define RT_LWIP_TCPTHREAD_STACKSIZE 1024 +#define RT_LWIP_ETHTHREAD_PRIORITY 12 +#define RT_LWIP_ETHTHREAD_STACKSIZE 1024 +#define RT_LWIP_ETHTHREAD_MBOX_SIZE 8 +#define LWIP_NETIF_STATUS_CALLBACK 1 +#define SO_REUSE 1 +#define LWIP_SO_RCVTIMEO 1 +#define LWIP_SO_SNDTIMEO 1 +#define LWIP_SO_RCVBUF 1 +#define LWIP_NETIF_LOOPBACK 0 + +/* Modbus master and slave stack */ + + +/* VBUS(Virtual Software BUS) */ + + +/* Utilities */ + + +/* RT-Thread online packages */ + +/* IoT - internet of things */ + + +/* Wi-Fi */ + +/* Marvell WiFi */ + + +/* Wiced WiFi */ + + +/* security packages */ + + +/* language packages */ + + +/* multimedia packages */ + + +/* tools packages */ + + +/* system packages */ + + +/* peripheral libraries and drivers */ + +#define PKG_USING_REALTEK_AMEBA +#define PKG_USING_REALTEK_AMEBA_LATEST_VERSION + +/* miscellaneous packages */ + + +/* sample package */ + + +/* example package: hello */ + + +/* Env config */ + +#define RT_USING_UART0 + +#endif diff --git a/bsp/amebaz/rtconfig.py b/bsp/amebaz/rtconfig.py new file mode 100644 index 000000000..97137df90 --- /dev/null +++ b/bsp/amebaz/rtconfig.py @@ -0,0 +1,132 @@ +import os + +# toolchains options +ARCH='arm' +CPU='cortex-m4' +CROSS_TOOL='gcc' + +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') + +# cross_tool provides the cross compiler +# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR +if CROSS_TOOL == 'gcc': + PLATFORM = 'gcc' + EXEC_PATH = r'/opt/gcc-arm-none-eabi-5_4-2016q3/bin' +else: + print 'Please make sure your toolchains is GNU GCC!' + exit(0) + +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') + +BUILD = 'debug' + +if PLATFORM == 'gcc': + # toolchains + PREFIX = 'arm-none-eabi-' + CC = PREFIX + 'gcc' + AS = PREFIX + 'gcc' + AR = PREFIX + 'ar' + CXX = PREFIX + 'g++' + LINK = PREFIX + 'gcc' + TARGET_EXT = 'axf' + SIZE = PREFIX + 'size' + OBJDUMP = PREFIX + 'objdump' + OBJCPY = PREFIX + 'objcopy' + NM = PREFIX + 'nm' + + DEVICE = ' -DM3 -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections' + CFLAGS = DEVICE + ' -g2 -w -O2 -Wno-pointer-sign -fno-common -fmessage-length=0 -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-short-enums -DF_CPU=166000000L -std=gnu99 -fsigned-char' + AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb ' + LFLAGS = DEVICE + ' -lm -lgcc -lc' + ' -g --specs=nano.specs -nostartfiles -Wl,-Map=rtthread.map -Os -Wl,--gc-sections -Wl,--cref -Wl,--entry=Reset_Handler -Wl,--no-enum-size-warning -Wl,--no-wchar-size-warning -T./rlx8711B-symbol-v02-img2_xip1.ld' + LFLAGS += ' -Wl,-wrap,rtl_printf' + + CPATH = '' + LPATH = '' + + if BUILD == 'debug': + CFLAGS += ' -O0 -gdwarf-2' + AFLAGS += ' -gdwarf-2' + else: + CFLAGS += ' -O2' + + POST_ACTION = OBJCPY + ' -j .ram_image2.entry -j .ram_image2.data -j .ram_image2.bss -j .ram_image2.skb.bss -j .ram_heap.data -Obinary rtthread.axf ram_2.r.bin \n' \ + + OBJCPY + ' -j .xip_image2.text -Obinary rtthread.axf xip_image2.bin \n' \ + + OBJCPY + ' -j .ram_rdp.text -Obinary rtthread.axf rdp.bin \n' + + POST_ACTION += 'python gen_bin.py' + + 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 + CC = 'iccarm' + AS = 'iasmarm' + AR = 'iarchive' + LINK = 'ilinkarm' + TARGET_EXT = 'out' + + DEVICE = ' -D USE_STDPERIPH_DRIVER' + ' -D STM32F10X_HD' + + CFLAGS = DEVICE + CFLAGS += ' --diag_suppress Pa050' + CFLAGS += ' --no_cse' + CFLAGS += ' --no_unroll' + CFLAGS += ' --no_inline' + CFLAGS += ' --no_code_motion' + 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' + + AFLAGS = '' + AFLAGS += ' -s+' + AFLAGS += ' -w+' + AFLAGS += ' -r' + AFLAGS += ' --cpu Cortex-M4' + AFLAGS += ' --fpu None' + + LFLAGS = ' --config stm32f429_flash.icf' + LFLAGS += ' --redirect _Printf=_PrintfTiny' + LFLAGS += ' --redirect _Scanf=_ScanfSmall' + LFLAGS += ' --entry __iar_program_start' + + EXEC_PATH = EXEC_PATH + '/arm/bin/' + POST_ACTION = '' diff --git a/bsp/amebaz/template.ewd b/bsp/amebaz/template.ewd new file mode 100644 index 000000000..131af6339 --- /dev/null +++ b/bsp/amebaz/template.ewd @@ -0,0 +1,2977 @@ + + + + 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 + + 6 + 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 + + 4 + 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 + + 6 + 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 + + 4 + 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 000000000..569549fd5 --- /dev/null +++ b/bsp/amebaz/template.ewp @@ -0,0 +1,1917 @@ + + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 24 + 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\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\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 + + 24 + 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 000000000..929624732 --- /dev/null +++ b/bsp/amebaz/template.ewt @@ -0,0 +1,2099 @@ + + + + 2 + + Debug + + ARM + + 1 + + C-STAT + 1 + + 1 + + 0 + + 600 + 0 + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RuntimeChecking + 0 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + Release + + ARM + + 0 + + C-STAT + 1 + + 1 + + 0 + + 600 + 0 + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RuntimeChecking + 0 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bsp/amebaz/tmp.board b/bsp/amebaz/tmp.board new file mode 100644 index 000000000..5f92137f3 --- /dev/null +++ b/bsp/amebaz/tmp.board @@ -0,0 +1,21 @@ + + + + + CODE 0x8000000 0x8004fff + $PROJ_DIR$\packages\realtek_ameba\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\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\soc\realtek\8711b\misc\iar_utility\common\flashloader\FlashRTL8195aMP.flash + 0xb020 + + + CODE 0x10005000 0x10005A43 + $PROJ_DIR$\packages\realtek_ameba\sdk-ameba-v4.0b_without_NDA_GCC_V1.0.0\component\soc\realtek\8711b\misc\iar_utility\common\flashloader\FlashRTL8195aMP.flash + 0xb000 + --concat + + CODE 0x10005a44 0x1003dfff + -- GitLab