[bsp] remove unused bsp

This commit is contained in:
liang yongxiang committed 2018-05-29 10:43:06 +08:00
1 parent 43aab3c0a0
commit 03a05abdef
20 files changed
-3570

No files matched your search

File diff suppressed because it is too large. Load diff
-17
View File
@@ -1,17 +0,0 @@
/*----------------------------------------------------------------------------
* Name: Dbg_MPS2.ini
* Purpose: MPS2 Debug Initialization File
* Note(s):
*----------------------------------------------------------------------------
* This file is part of the uVision/ARM development tools.
* This software may only be used under the terms of a valid, current,
* end user licence from KEIL for a compatible version of KEIL software
* development tools. Nothing else gives you the right to use this software.
*
* This software is supplied "AS IS" without warranties of any kind.
*
* Copyright (c) 2013 Keil - An ARM Company. All rights reserved.
*----------------------------------------------------------------------------*/
_WDWORD(0x4001F000, 0x00000001); // Remap on
-35
View File
@@ -1,35 +0,0 @@
mainmenu "RT-Thread Configuration"
config $BSP_DIR
string
option env="BSP_ROOT"
default "."
config $RTT_DIR
string
option env="RTT_ROOT"
default "../.."
config $PKGS_DIR
string
option env="PKGS_ROOT"
default "packages"
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
config SOC_V2M_MPS2
bool
select ARCH_ARM_CORTEX_M7
default y
config RT_USING_UART
bool "Using RT_USING_UART"
default y
if RT_USING_UART
config RT_USING_UART0
bool "Using RT_USING_UART0"
default y
endif
-80
View File
@@ -1,80 +0,0 @@
# V2M-MPS2
## 1. 简介
[V2M-MPS2](https://www.keil.com/boards2/arm/v2m_mps2/)是MDK提供的开发板,配合**Fast Models Debugger**,就可以不依赖任何硬件,在Cortexm-M平台调试代码。板载主要资源如下:
| 硬件 | 描述 |
| -- | -- |
|CPU| 可选Cortex-M0/M0 plus/M3/M4/M7/M23/M33 |
|主频| 50MHz |
|SRAM| 4MB |
|Flash| 4MB |
## 2. 编译说明
V2M-MPS2板级包支持MDK5(已测试MDK5.23~MDK5.25)
## 3. 烧写及执行
### 3.1 配置和仿真
因为Fast Models Debugger的串口功能是通过telnet实现的,所以需要打开Windows的telnet功能:
- [Windows 7: Enabling Telnet Client](https://social.technet.microsoft.com/wiki/contents/articles/910.windows-7-enabling-telnet-client.aspx)
- [Windows 10: Enabling Telnet Client](https://social.technet.microsoft.com/wiki/contents/articles/38433.windows-10-enabling-telnet-client.aspx)
打开project.uvprojx,编译,点击Debug->Start/Stop Session就可以进入仿真了。
### 3.2 如何选择其他内核
Fast Models Debugger支持Cortex M全系列内核。如果想切换成其他内核,需要完成一些配置,下面以Cortex-M4为例:
- 修改bsp\v2m-mps2\rtconfig.py里的 CPU="cortex-m7"为CPU="cortex-m4"(全小写)
- 点击Project->Option for Target 'RT-Thread V2M-MPS2':
- 在Device里选择ARM选项下需要的内核CMSDK_CM4
- 在Debug里选择Models Cortex-M Debugger,点击Settings:
- 在Command里选择Cortex-M4的exe:FVP_MPS2_Cortex-M4_MDK.exe
- 在Target里选择armcortexm4ct
### 3.2 运行结果
进入仿真后全速运行,将会在telnet窗口上看到RT-Thread的启动logo信息:
```bash
\ | /
- RT - Thread Operating System
/ | \ 3.0.3 build Feb 28 2018
2006 - 2018 Copyright by rt-thread team
finsh />
```
## 4. 驱动支持情况及计划
| 驱动 | 支持情况 | 备注 |
| ------ | ---- | :------: |
| UART | 支持 | UART0/1/2 |
| GPIO | 未支持 | |
| LED | 未支持 | |
| BUTTOM | 未支持 | |
| LCD | 未支持 | 需要完成LCD驱动和TOUCH驱动 |
### 4.1 IO在板级支持包中的映射情况(需补充)
| IO号 | 板级包中的定义 |
| -- | -- |
| | LED0 |
## 5. 联系人信息
维护人:
- [tanek](https://github.com/TanekLiang)
## 6. 参考
* [V2M-MPS2](https://www.keil.com/boards2/arm/v2m_mps2/)
* [Fast Models Debugger](http://www.keil.com/support/man/docs/fstmdls/default.htm)
-14
View File
@@ -1,14 +0,0 @@
# 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')
-47
View File
@@ -1,47 +0,0 @@
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')]
from building import *
TARGET = 'rtthread-v2m-mps2.' + rtconfig.TARGET_EXT
if rtconfig.PLATFORM == 'armcc':
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
# overwrite cflags, because cflags has '--C99'
CXXCOM = '$CXX -o $TARGET --cpp -c $CXXFLAGS $_CCCOMCOM $SOURCES')
else:
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
CXXCOM = '$CXX -o $TARGET -c $CXXFLAGS $_CCCOMCOM $SOURCES')
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)
-17
View File
@@ -1,17 +0,0 @@
Import('RTT_ROOT')
Import('rtconfig')
from building import *
cwd = os.path.join(str(Dir('#')), 'applications')
src = Glob('*.c')
CPPPATH = [cwd, str(Dir('#'))]
# add for startup script
if rtconfig.CROSS_TOOL == 'gcc':
CPPDEFINES = ['__START=entry']
else:
CPPDEFINES = []
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES=CPPDEFINES)
Return('group')
-32
View File
@@ -1,32 +0,0 @@
/*
* File : main.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2012, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
* 2018-03-01 Tanek the first version
*/
#include <stdio.h>
#include <rtthread.h>
int main(void)
{
return 0;
}
-19
View File
@@ -1,19 +0,0 @@
from building import *
cwd = GetCurrentDir()
# add the general drivers.
src = Split("""
board.c
drv_uart.c
""")
CPPPATH = [cwd]
CPPDEFINES = []
if GetDepend('RT_USING_PIN'):
src += ['drv_pin.c']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES=CPPDEFINES)
Return('group')
-71
View File
@@ -1,71 +0,0 @@
/*
* File : board.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2012, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
* 2018-03-01 Tanek the first version
*/
#include <rthw.h>
#include <rtthread.h>
#include "Device.h" // Keil::Board Support:V2M-MPS2:Common
static void *rt_heap_begin_get(void)
{
extern int Image$$RTT_HEAP$$Base;
return &Image$$RTT_HEAP$$Base;
}
static void *rt_heap_end_get(void)
{
extern int Image$$RTT_HEAP$$ZI$$Limit;
return &Image$$RTT_HEAP$$ZI$$Limit;
}
/**
* This function will initial STM32 board.
*/
void rt_hw_board_init()
{
SystemCoreClockUpdate();
SysTick_Config(SystemCoreClock / RT_TICK_PER_SECOND); /* Generate interrupt each 10 ms */
/* Call components board initial (use INIT_BOARD_EXPORT()) */
#ifdef RT_USING_COMPONENTS_INIT
rt_components_board_init();
#endif
#if defined(RT_USING_CONSOLE) && defined(RT_USING_DEVICE)
rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
#endif
#if defined(RT_USING_USER_MAIN) && defined(RT_USING_HEAP)
rt_system_heap_init(rt_heap_begin_get(), rt_heap_end_get());
#endif
}
void SysTick_Handler (void)
{
rt_interrupt_enter();
rt_tick_increase();
rt_interrupt_leave();
}
-33
View File
@@ -1,33 +0,0 @@
/*
* File : board.h
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2012, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
* 2018-03-01 Tanek the first version
*/
// <<< Use Configuration Wizard in Context Menu >>>
#ifndef __BOARD_H__
#define __BOARD_H__
void rt_hw_board_init(void);
#endif
//*** <<< end of configuration section >>> ***
-89
View File
@@ -1,89 +0,0 @@
/*
* File : drv_pin.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006-2013, 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
* 2018-03-25 Tanek the first version.
*/
#include <rtthread.h>
#include <rthw.h>
#include <drivers/pin.h>
#include <SMM_MPS2.h>
#ifdef RT_USING_PIN
// pin 0 ~ 7 : switch 0 ~ 7
// pin 8 ~ 15 : user led 0 ~ 7
static void v2m_pin_mode(rt_device_t dev, rt_base_t pin, rt_base_t mode)
{
return ;
}
static int v2m_pin_read(rt_device_t dev, rt_base_t pin)
{
RT_ASSERT(dev != RT_NULL);
if (0 <= pin && pin <= 7)
{
return !!(MPS2_SCC->CFG_REG3 & (0x01 << pin)); // switchs
}
else if (8 <= pin && pin <= 15)
{
return !!(MPS2_SCC->CFG_REG1 & (0x01 << (pin - 8))); // leds
}
else
{
RT_ASSERT(RT_NULL);
return 0;
}
}
static void v2m_pin_write(rt_device_t dev, rt_base_t pin, rt_base_t value)
{
RT_ASSERT(dev != RT_NULL);
if (8 <= pin && pin <= 15)
{
rt_uint32_t reg = MPS2_SCC->CFG_REG1;
if (value)
reg |= 1 << (pin - 8);
else
reg &= ~(1 << (pin - 8));
MPS2_SCC->CFG_REG1 = reg;
}
else
{
RT_ASSERT(RT_NULL);
}
}
int rt_hw_pin_init(void)
{
int ret = RT_EOK;
static const struct rt_pin_ops v2m_pin_ops =
{
v2m_pin_mode,
v2m_pin_write,
v2m_pin_read,
RT_NULL,
RT_NULL,
RT_NULL
};
ret = rt_device_pin_register("pin", &v2m_pin_ops, RT_NULL);
return ret;
}
INIT_BOARD_EXPORT(rt_hw_pin_init);
#endif /*RT_USING_PIN */
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
-163
View File
@@ -1,163 +0,0 @@
#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 100
#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
/* 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_MEMHEAP
#define RT_USING_MEMHEAP_AS_HEAP
#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 "uart0"
#define ARCH_ARM
#define ARCH_ARM_CORTEX_M
#define ARCH_ARM_CORTEX_M7
/* RT-Thread Components */
#define RT_USING_COMPONENTS_INIT
#define RT_USING_USER_MAIN
#define RT_MAIN_THREAD_STACK_SIZE 2048
/* 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
/* Device virtual file system */
/* Device Drivers */
#define RT_USING_DEVICE_IPC
#define RT_USING_SERIAL
#define RT_USING_PIN
/* Using USB */
/* POSIX layer and C standard library */
#define RT_USING_LIBC
/* Network stack */
/* light weight TCP/IP stack */
/* Modbus master and slave stack */
/* VBUS(Virtual Software BUS) */
/* Utilities */
/* ARM CMSIS */
/* RT-Thread online packages */
/* system packages */
/* RT-Thread GUI Engine */
/* IoT - internet of things */
/* Wi-Fi */
/* Marvell WiFi */
/* Wiced WiFi */
/* security packages */
/* language packages */
#define PKG_USING_MICROPYTHON
/* System Module */
/* Tools Module */
/* Network Module */
/* Hardware Module */
#define PKG_MICROPYTHON_HEAP_SIZE 8192
#define PKG_USING_MICROPYTHON_LATEST_VERSION
/* multimedia packages */
/* tools packages */
/* miscellaneous packages */
/* example package: hello */
/* Privated Packages of RealThread */
/* Network Utilities */
/* Webnet: A web server package for rt-thread */
#define SOC_V2M_MPS2
#define RT_USING_UART
#define RT_USING_UART0
#endif
-50
View File
@@ -1,50 +0,0 @@
import os
# toolchains options
ARCH='arm'
CPU='cortex-m7'
CROSS_TOOL='keil'
if CROSS_TOOL == 'keil':
PLATFORM = 'armcc'
EXEC_PATH = 'C:/Keil_v5'
if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH')
#BUILD = 'debug'
BUILD = 'release'
if PLATFORM == 'armcc':
# toolchains
CC = 'armcc'
CXX = 'armcc'
AS = 'armasm'
AR = 'armar'
LINK = 'armlink'
TARGET_EXT = 'axf'
DEVICE = ' --cpu Cortex-M7.fp.sp'
CFLAGS = DEVICE + ' --apcs=interwork'
AFLAGS = DEVICE
LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread-v2m-mps2.map '
CFLAGS += ' --diag_suppress=66,1296,186'
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'
CXXFLAGS = CFLAGS
CFLAGS += ' --c99'
POST_ACTION = 'fromelf -z $TARGET'
else:
print("only support armcc in this bsp")
exit(-1)
-26
View File
@@ -1,26 +0,0 @@
#! armcc -E
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
#define ROM_START 0x00000000
#define ROM_SIZE 0x00400000
#define RAM1_START 0x20000000
#define RAM1_SIZE 0x00400000
#define RTT_HEAP_SIZE \
(RAM1_SIZE - ImageLength(RW_IRAM1))
LR_IROM1 ROM_START ROM_SIZE { ; load region size_region
ER_IROM1 ROM_START ROM_SIZE { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
RW_IRAM1 RAM1_START RAM1_SIZE { ; RW data
.ANY (+RW +ZI)
}
RTT_HEAP +0 EMPTY RTT_HEAP_SIZE {
}
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff