diff --git a/bsp/swm320-lq100/.config b/bsp/swm320-lq100/.config index 4a9cc31e92..4eb8c0a38e 100644 --- a/bsp/swm320-lq100/.config +++ b/bsp/swm320-lq100/.config @@ -101,34 +101,7 @@ CONFIG_FINSH_ARG_MAX=10 # # Device virtual file system # -CONFIG_RT_USING_DFS=y -CONFIG_DFS_USING_WORKDIR=y -CONFIG_DFS_FILESYSTEMS_MAX=8 -CONFIG_DFS_FILESYSTEM_TYPES_MAX=8 -CONFIG_DFS_FD_MAX=8 -# CONFIG_RT_USING_DFS_MNTTABLE is not set -CONFIG_RT_USING_DFS_ELMFAT=y - -# -# elm-chan's FatFs, Generic FAT Filesystem Module -# -CONFIG_RT_DFS_ELM_CODE_PAGE=437 -CONFIG_RT_DFS_ELM_WORD_ACCESS=y -# CONFIG_RT_DFS_ELM_USE_LFN_0 is not set -# CONFIG_RT_DFS_ELM_USE_LFN_1 is not set -# CONFIG_RT_DFS_ELM_USE_LFN_2 is not set -CONFIG_RT_DFS_ELM_USE_LFN_3=y -CONFIG_RT_DFS_ELM_USE_LFN=3 -CONFIG_RT_DFS_ELM_MAX_LFN=255 -CONFIG_RT_DFS_ELM_DRIVES=2 -CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=4096 -# CONFIG_RT_DFS_ELM_USE_ERASE is not set -CONFIG_RT_DFS_ELM_REENTRANT=y -CONFIG_RT_USING_DFS_DEVFS=y -# CONFIG_RT_USING_DFS_ROMFS is not set -# CONFIG_RT_USING_DFS_RAMFS is not set -# CONFIG_RT_USING_DFS_UFFS is not set -# CONFIG_RT_USING_DFS_JFFS2 is not set +# CONFIG_RT_USING_DFS is not set # # Device Drivers @@ -136,31 +109,22 @@ CONFIG_RT_USING_DFS_DEVFS=y CONFIG_RT_USING_DEVICE_IPC=y CONFIG_RT_PIPE_BUFSZ=512 CONFIG_RT_USING_SERIAL=y -CONFIG_RT_SERIAL_USING_DMA=y +# CONFIG_RT_SERIAL_USING_DMA is not set # CONFIG_RT_USING_CAN is not set CONFIG_RT_USING_HWTIMER=y # CONFIG_RT_USING_CPUTIME is not set -CONFIG_RT_USING_I2C=y -CONFIG_RT_USING_I2C_BITOPS=y +# CONFIG_RT_USING_I2C is not set CONFIG_RT_USING_PIN=y # CONFIG_RT_USING_ADC is not set CONFIG_RT_USING_PWM=y -CONFIG_RT_USING_MTD_NOR=y +# CONFIG_RT_USING_MTD_NOR is not set # CONFIG_RT_USING_MTD_NAND is not set # CONFIG_RT_USING_MTD is not set # CONFIG_RT_USING_PM is not set -CONFIG_RT_USING_RTC=y -# CONFIG_RT_USING_SOFT_RTC is not set +# CONFIG_RT_USING_RTC is not set # CONFIG_RT_USING_SDIO is not set -CONFIG_RT_USING_SPI=y -# CONFIG_RT_USING_QSPI is not set -# CONFIG_RT_USING_SPI_MSD is not set -# CONFIG_RT_USING_SFUD is not set -# CONFIG_RT_USING_W25QXX is not set -# CONFIG_RT_USING_GD is not set -# CONFIG_RT_USING_ENC28J60 is not set -# CONFIG_RT_USING_SPI_WIFI is not set -CONFIG_RT_USING_WDT=y +# CONFIG_RT_USING_SPI is not set +# CONFIG_RT_USING_WDT is not set # CONFIG_RT_USING_AUDIO is not set # @@ -177,10 +141,8 @@ CONFIG_RT_USING_WDT=y # # POSIX layer and C standard library # -CONFIG_RT_USING_LIBC=y +# CONFIG_RT_USING_LIBC is not set # CONFIG_RT_USING_PTHREADS is not set -# CONFIG_RT_USING_POSIX is not set -# CONFIG_RT_USING_MODULE is not set # # Network @@ -310,6 +272,7 @@ CONFIG_RT_USING_LIBC=y # CONFIG_PKG_USING_LITTLEVGL2RTT is not set # CONFIG_PKG_USING_CMSIS is not set # CONFIG_PKG_USING_DFS_YAFFS is not set +# CONFIG_PKG_USING_LITTLEFS is not set # # peripheral libraries and drivers @@ -323,6 +286,8 @@ CONFIG_RT_USING_LIBC=y # CONFIG_PKG_USING_U8G2 is not set # CONFIG_PKG_USING_BUTTON is not set # CONFIG_PKG_USING_MPU6XXX is not set +# CONFIG_PKG_USING_PCF8574 is not set +# CONFIG_PKG_USING_KENDRYTE_SDK is not set # # miscellaneous packages @@ -338,10 +303,6 @@ CONFIG_RT_USING_LIBC=y # CONFIG_PKG_USING_DSTR is not set # CONFIG_PKG_USING_TINYFRAME is not set -# -# sample package -# - # # samples: kernel and components samples # @@ -349,10 +310,6 @@ CONFIG_RT_USING_LIBC=y # CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set # CONFIG_PKG_USING_NETWORK_SAMPLES is not set # CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set - -# -# example package: hello -# # CONFIG_PKG_USING_HELLO is not set CONFIG_SOC_SWM320VET7=y @@ -364,6 +321,7 @@ CONFIG_SOC_SWM320VET7=y # On-chip Peripheral Drivers # CONFIG_BSP_USING_GPIO=y +# CONFIG_BSP_USING_WDT is not set # # UART Drivers @@ -385,7 +343,7 @@ CONFIG_BSP_USING_UART0=y # CONFIG_BSP_USING_I2C is not set # -# PWM module +# PWM Drivers # # CONFIG_BSP_USING_PWM0 is not set # CONFIG_BSP_USING_PWM1 is not set @@ -393,14 +351,19 @@ CONFIG_BSP_USING_UART0=y # CONFIG_BSP_USING_PWM3 is not set # -# RTC module -# - -# -# RTC SET +# RTC Drivers # # CONFIG_BSP_USING_RTC is not set -# CONFIG_BSP_USING_WDT is not set + +# +# HWtimer Drivers +# +# CONFIG_BSP_USING_HWTIMER0 is not set +# CONFIG_BSP_USING_HWTIMER1 is not set +# CONFIG_BSP_USING_HWTIMER2 is not set +# CONFIG_BSP_USING_HWTIMER3 is not set +# CONFIG_BSP_USING_HWTIMER4 is not set +# CONFIG_BSP_USING_HWTIMER5 is not set # # Onboard Peripheral Drivers diff --git a/bsp/swm320-lq100/Libraries/SConscript b/bsp/swm320-lq100/Libraries/SConscript index d00266489b..92c6725dce 100644 --- a/bsp/swm320-lq100/Libraries/SConscript +++ b/bsp/swm320-lq100/Libraries/SConscript @@ -11,8 +11,7 @@ if rtconfig.CROSS_TOOL == 'gcc': elif rtconfig.CROSS_TOOL == 'keil': src += ['CMSIS/DeviceSupport/startup/arm/startup_SWM320.s'] elif rtconfig.CROSS_TOOL == 'iar': - print('Not Support iar now\n') - exit(0) + src += ['CMSIS/DeviceSupport/startup/iar/startup_SWM320.s'] group = DefineGroup('Libraries', src, depend = [''], CPPPATH = CPPPATH) Return('group') diff --git a/bsp/swm320-lq100/README.md b/bsp/swm320-lq100/README.md index 12214a835e..119b9e7b4b 100644 --- a/bsp/swm320-lq100/README.md +++ b/bsp/swm320-lq100/README.md @@ -31,7 +31,7 @@ SWXT-LQ100-32102 V1.1 开发板板载资源如下: - 常用接口:USB打印接口,TFT LCD接口,SD卡接口 - 调试接口:SWD -更多详细信息请咨询[华芯微特技术支持][5] +更多详细信息请咨询[华芯微特技术支持][http://www.synwit.cn/support.html] ### 1.2 MCU 简介 @@ -53,25 +53,25 @@ SWM320VET7 是 SYNWIT 公司的一款面向工业控制、白色家电、电机 > 工程默认配置使用 Jlink 仿真器下载程序,在通过 Jlink 连接开发板到 PC 的基础上,点击下载按钮即可下载程序到开发板 -推荐熟悉 RT_Thread 的用户使用[env工具][1],可以在console下进入到 `bsp/swm320-lq100` 目录中,运行以下命令: +推荐熟悉 RT_Thread 的用户使用[env工具](https://www.rt-thread.org/page/download.html),可以在console下进入到 `bsp/swm320-lq100` 目录中,运行以下命令: -`scons --target=mdk5` +`scons` -来编译这个板级支持包。如果编译正确无误,会产生rtthread.elf、rtthread.bin文件。其中 rtthread.bin 可以烧写到设备中进行运行。 +来编译这个板级支持包。如果编译正确无误,会产生rtthread.elf、rtthread.bin文件。其中 rtthread.bin 可以烧写到设备中运行。 ## 3. 烧写及执行 ### 3.1 硬件连接 -- 使用 USB B-Type 数据线连接开发板到 PC(注意:需要下载安装串口驱动支持CH340芯片,使用 MDK5 需要安装 SWM320 相关的 pack)。 +- 使用 USB B-Type 数据线连接开发板到 PC(注意:需要下载安装串口驱动支持 CH340 芯片,使用 MDK5 需要安装 SWM320 相关的 pack)。 > USB B-Type 数据线用于串口通讯,同时供电 - 使用 Jlink 连接开发板到 PC (需要 Jlink 驱动) -连接好串口,使用115200-N-8-1的配置方式连接到设备上。串口引脚是:`[PA2/PA3]` +将串口 0 引脚为:`[PA2/PA3]`和 USB 转串口模块 P2 相连,串口配置方式为115200-N-8-1。 -当使用 [env工具][1] 正确编译产生出rtthread.bin映像文件后,可以使用 ISP 的方式来烧写到设备中。 +当使用 [env工具](https://www.rt-thread.org/page/download.html) 正确编译产生出rtthread.bin映像文件后,可以使用 ISP 的方式来烧写到设备中。 **建议使用 keil 软件直接下载**。ISP 下载较复杂。 @@ -97,17 +97,15 @@ msh /> | TFT-LCD | 暂不支持 | 即将支持 | |**片上外设** |**支持情况** |**备注** | | GPIO | 支持 | PIN:1...100 | -| UART | 支持 | UART0 / UART1 / UART2 / UART3 | +| UART | 支持 | UART0 / UART1 / UART2 / UART3 | | SPI | 支持 | SPI0 / SPI1 | | I2C | 支持 | I2C0 IO模拟 | | ADC | 暂不支持 | 即将支持 | -| PWM | 支持 | PWM0 / PWM1 /PWM2 /PWM3 其余两个后续补充 | +| PWM | 支持 | PWM0 / PWM1 /PWM2 /PWM3 其余两个后续补充| | IWG | 支持 | | -| TIMER | 暂不支持 | | +| TIMER | 支持 | | | RTC | 支持 | | | CAN | 暂不支持 | | -|**板外外设** |**支持情况**|**备注** | -| Arduino 扩展接口 | 暂不支持 | | ## 5. 联系人信息 @@ -117,10 +115,10 @@ msh /> ## 6. 参考 -- 芯片[SWM320系列 数据手册][4] +- 芯片[SWM320系列数据手册][http://www.synwit.cn/Public/Uploads/2018-11-05/5bdff49b396d1.pdf] - [1]: https://www.rt-thread.org/page/download.html - [2]: http://www.synwit.cn/Public/Uploads/2018-11-05/5bdfea74d5712.pdf - [3]: http://www.synwit.cn/Public/Uploads/2018-11-01/5bdab8ad2e5b9.pdf - [4]: http://www.synwit.cn/Public/Uploads/2018-11-05/5bdff49b396d1.pdf - [5]: http://www.synwit.cn/support.html +- [ SWM320_LQFP100原理图](http://www.synwit.cn/Public/Uploads/2018-11-01/5bdab8ad2e5b9.pdf) + +- [ SWM320_LQFP64原理图](http://www.synwit.cn/Public/Uploads/2018-11-05/5bdfea74d5712.pdf) + +- [ keil pack及其他资料](http://www.synwit.cn/support-1/2.html) diff --git a/bsp/swm320-lq100/SConstruct b/bsp/swm320-lq100/SConstruct index c848dd104e..331f1056f5 100644 --- a/bsp/swm320-lq100/SConstruct +++ b/bsp/swm320-lq100/SConstruct @@ -27,7 +27,7 @@ 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']) + env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rtthread.map']) Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/swm320-lq100/applications/main.c b/bsp/swm320-lq100/applications/main.c index 61d90bd901..004867b45c 100644 --- a/bsp/swm320-lq100/applications/main.c +++ b/bsp/swm320-lq100/applications/main.c @@ -10,18 +10,22 @@ #include #include - -#define LED4_PIN 100 +/* defined the LED pin: PA12 */ +#define LED_PIN 100 int main(void) { - /* user app entry */ - rt_pin_mode(LED4_PIN, PIN_MODE_OUTPUT); - while (1) + int count = 1; + /* set LED4 pin mode to output */ + rt_pin_mode(LED_PIN, PIN_MODE_OUTPUT); + + while (count++) { - rt_pin_write(LED4_PIN, !rt_pin_read(LED4_PIN)); - rt_thread_mdelay(1000); + rt_pin_write(LED_PIN, PIN_HIGH); + rt_thread_mdelay(500); + rt_pin_write(LED_PIN, PIN_LOW); + rt_thread_mdelay(500); } - return 0; + return RT_EOK; } diff --git a/bsp/swm320-lq100/drivers/Kconfig b/bsp/swm320-lq100/drivers/Kconfig index 4d0d68d8eb..64d5c99241 100644 --- a/bsp/swm320-lq100/drivers/Kconfig +++ b/bsp/swm320-lq100/drivers/Kconfig @@ -1,14 +1,17 @@ menu "Hardware Drivers Config" menu "On-chip Peripheral Drivers" - config BSP_USING_GPIO bool "Enable GPIO" select RT_USING_PIN default y + + config BSP_USING_WDT + bool "Enable Watch Dog" + select RT_USING_WDT + default n menu "UART Drivers" - config BSP_USING_UART0 bool "Enable UART0 PA2/3(R/T)" select RT_USING_SERIAL @@ -28,11 +31,9 @@ menu "Hardware Drivers Config" bool "Enable UART3 PC6/7(R/T)" select RT_USING_SERIAL default n - endmenu menu "SPI Drivers" - config BSP_USING_SPI0 bool "Enable SPI0 BUS PC4/5/6(C/O/I)" select RT_USING_SPI @@ -44,12 +45,10 @@ menu "Hardware Drivers Config" select RT_USING_SPI select RT_USING_PIN default n - endmenu menu "I2C Drivers" - - menuconfig BSP_USING_I2C + config BSP_USING_I2C bool "Enable I2C BUS" select RT_USING_I2C select RT_USING_PIN @@ -69,13 +68,10 @@ menu "Hardware Drivers Config" config BSP_I2C_BUS_NAME string "i2c bus name" default "i2c0" - endif - endmenu - menu "PWM module" - + menu "PWM Drivers" config BSP_USING_PWM0 bool "Using PWM0 PA4/10(A/B)" select RT_USING_PWM @@ -95,29 +91,49 @@ menu "Hardware Drivers Config" bool "Using PWM3 PP1/3(A/B)" select RT_USING_PWM default n - endmenu - menu "RTC module" - comment "RTC SET" - + menu "RTC Drivers" config BSP_USING_RTC bool "Using RTC" select RT_USING_RTC default n - endmenu - config BSP_USING_WDT + menu "HWtimer Drivers" + config BSP_USING_HWTIMER0 + bool "Using timer0" + select RT_USING_HWTIMER + default n - bool "Enable Watch Dog" - select RT_USING_WDT - default n + config BSP_USING_HWTIMER1 + bool "Using timer1" + select RT_USING_HWTIMER + default n + config BSP_USING_HWTIMER2 + bool "Using timer2" + select RT_USING_HWTIMER + default n + + config BSP_USING_HWTIMER3 + bool "Using timer3" + select RT_USING_HWTIMER + default n + + config BSP_USING_HWTIMER4 + bool "Using timer4" + select RT_USING_HWTIMER + default n + + config BSP_USING_HWTIMER5 + bool "Using timer5" + select RT_USING_HWTIMER + default n + endmenu endmenu menu "Onboard Peripheral Drivers" - menuconfig BSP_USING_EXT_SRAM bool "Enable external sram" select RT_USING_MEMHEAP @@ -144,7 +160,6 @@ menu "Hardware Drivers Config" hex "mtd nor flsah sector" default 0x10000 endif - endmenu menu "Offboard Peripheral Drivers" diff --git a/bsp/swm320-lq100/drivers/SConscript b/bsp/swm320-lq100/drivers/SConscript index cb44d26f74..0d9187d78a 100644 --- a/bsp/swm320-lq100/drivers/SConscript +++ b/bsp/swm320-lq100/drivers/SConscript @@ -45,6 +45,10 @@ if GetDepend(['BSP_USING_RTC']): if GetDepend(['BSP_USING_WDT']): src += ['drv_iwg.c'] +# add hwtimer driver code +if GetDepend('BSP_USING_HWTIMER0') or GetDepend('BSP_USING_HWTIMER1') or GetDepend('BSP_USING_HWTIMER2') or GetDepend('BSP_USING_HWTIMER3') or GetDepend('BSP_USING_HWTIMER4') or GetDepend('BSP_USING_HWTIMER5'): + src += ['drv_hwtimer.c'] + CPPPATH = [cwd] group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH) diff --git a/bsp/swm320-lq100/drivers/board.h b/bsp/swm320-lq100/drivers/board.h index 0a525be35b..702ef43e75 100644 --- a/bsp/swm320-lq100/drivers/board.h +++ b/bsp/swm320-lq100/drivers/board.h @@ -23,7 +23,7 @@ #define EXT_SRAM_END (EXT_SRAM_BASE + EXT_SRAM_SIZE) #endif -#define SRAM_END (SRAM_BASE + SRAM_SIZE * 1024UL) +#define SRAM_END (SRAM_BASE + SRAM_SIZE) #ifdef __CC_ARM extern int Image$$RW_IRAM1$$ZI$$Limit; #define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit) diff --git a/bsp/swm320-lq100/drivers/drv_gpio.c b/bsp/swm320-lq100/drivers/drv_gpio.c index b6f7244a94..b9d3d42583 100644 --- a/bsp/swm320-lq100/drivers/drv_gpio.c +++ b/bsp/swm320-lq100/drivers/drv_gpio.c @@ -283,7 +283,6 @@ static rt_err_t swm320_pin_irq_enable(struct rt_device *device, } if (enabled == PIN_IRQ_ENABLE) { - switch (index->irq_mode) { case PIN_IRQ_MODE_RISING: diff --git a/bsp/swm320-lq100/drivers/drv_hwtimer.c b/bsp/swm320-lq100/drivers/drv_hwtimer.c new file mode 100644 index 0000000000..b5f76660d5 --- /dev/null +++ b/bsp/swm320-lq100/drivers/drv_hwtimer.c @@ -0,0 +1,262 @@ +/* + * Copyright (c) 2006-2018, Synwit Technology Co.,Ltd. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2018-12-10 Zohar_Lee first version + */ + +#include +#include +#include +#include + +#define SWM320_HWTIMER_DEVICE(hwtimer) (struct swm320_hwtimer_dev *)(hwtimer) + +struct swm320_hwtimer_dev +{ + rt_hwtimer_t parent; + TIMR_TypeDef *hwtimer_periph; +}; + +#ifdef BSP_USING_HWTIMER0 +static struct swm320_hwtimer_dev hwtimer0; + +void TIMR0_Handler(void) +{ + TIMR_INTClr(TIMR0); + rt_device_hwtimer_isr(&hwtimer0.parent); + + if (HWTIMER_MODE_ONESHOT == hwtimer0.parent.mode) + { + TIMR_Stop(hwtimer0.hwtimer_periph); + } +} +#endif //BSP_USING_HWTIMER0 + +#ifdef BSP_USING_HWTIMER1 +static struct swm320_hwtimer_dev hwtimer1; + +void TIMR1_Handler(void) +{ + TIMR_INTClr(TIMR1); + rt_device_hwtimer_isr(&hwtimer1.parent); + + if (HWTIMER_MODE_ONESHOT == hwtimer1.parent.mode) + { + TIMR_Stop(hwtimer1.hwtimer_periph); + } +} +#endif //BSP_USING_HWTIMER1 + +#ifdef BSP_USING_HWTIMER2 +static struct swm320_hwtimer_dev hwtimer2; + +void TIMR2_Handler(void) +{ + TIMR_INTClr(TIMR2); + rt_device_hwtimer_isr(&hwtimer2.parent); + + if (HWTIMER_MODE_ONESHOT == hwtimer2.parent.mode) + { + TIMR_Stop(hwtimer2.hwtimer_periph); + } +} +#endif //BSP_USING_HWTIMER2 + +#ifdef BSP_USING_HWTIMER3 +static struct swm320_hwtimer_dev hwtimer3; + +void TIMR3_Handler(void) +{ + TIMR_INTClr(TIMR3); + rt_device_hwtimer_isr(&hwtimer3.parent); + + if (HWTIMER_MODE_ONESHOT == hwtimer3.parent.mode) + { + TIMR_Stop(hwtimer3.hwtimer_periph); + } +} +#endif //BSP_USING_HWTIMER3 + +#ifdef BSP_USING_HWTIMER4 +static struct swm320_hwtimer_dev hwtimer4; + +void TIMR4_Handler(void) +{ + TIMR_INTClr(TIMR4); + rt_device_hwtimer_isr(&hwtimer4.parent); + + if (HWTIMER_MODE_ONESHOT == hwtimer4.parent.mode) + { + TIMR_Stop(hwtimer4.hwtimer_periph); + } +} +#endif //BSP_USING_HWTIMER4 + +#ifdef BSP_USING_HWTIMER5 +static struct swm320_hwtimer_dev hwtimer5; + +void TIMR5_Handler(void) +{ + TIMR_INTClr(TIMR5); + rt_device_hwtimer_isr(&hwtimer5.parent); + + if (HWTIMER_MODE_ONESHOT == hwtimer5.parent.mode) + { + TIMR_Stop(hwtimer5.hwtimer_periph); + } +} +#endif //BSP_USING_HWTIMER5 + +static struct rt_hwtimer_info swm320_hwtimer_info = +{ + 120000000, /*时钟源为系统时钟*/ + 120000000, + 4294967295, /*32位计数器,2的32次方*/ + HWTIMER_CNTMODE_DW +}; + +static void swm320_hwtimer_init(rt_hwtimer_t *timer, rt_uint32_t state) +{ + struct swm320_hwtimer_dev *hwtimer = SWM320_HWTIMER_DEVICE(timer->parent.user_data); + + RT_ASSERT(hwtimer != RT_NULL); + + if (1 == state) + { + TIMR_Init(hwtimer->hwtimer_periph, + TIMR_MODE_TIMER, + SystemCoreClock, + 1); + } + hwtimer->parent.freq = SystemCoreClock; + swm320_hwtimer_info.maxfreq = SystemCoreClock; + swm320_hwtimer_info.minfreq = SystemCoreClock; +} + +static rt_err_t swm320_hwtimer_start(rt_hwtimer_t *timer, + rt_uint32_t cnt, + rt_hwtimer_mode_t mode) +{ + struct swm320_hwtimer_dev *hwtimer = SWM320_HWTIMER_DEVICE(timer->parent.user_data); + + RT_ASSERT(hwtimer != RT_NULL); + + TIMR_SetPeriod(hwtimer->hwtimer_periph, cnt); + TIMR_Start(hwtimer->hwtimer_periph); + + return RT_EOK; +} + +static void swm320_hwtimer_stop(rt_hwtimer_t *timer) +{ + struct swm320_hwtimer_dev *hwtimer = SWM320_HWTIMER_DEVICE(timer->parent.user_data); + + RT_ASSERT(hwtimer != RT_NULL); + + TIMR_Stop(hwtimer->hwtimer_periph); +} + +static rt_uint32_t swm320_hwtimer_count_get(rt_hwtimer_t *timer) +{ + struct swm320_hwtimer_dev *hwtimer = SWM320_HWTIMER_DEVICE(timer->parent.user_data); + uint32_t hwtimer_count = 0; + + RT_ASSERT(hwtimer != RT_NULL); + + hwtimer_count = TIMR_GetCurValue(hwtimer->hwtimer_periph); + + return hwtimer_count; +} + +static rt_err_t swm320_hwtimer_control(rt_hwtimer_t *timer, + rt_uint32_t cmd, + void *args) +{ + rt_err_t ret = RT_EOK; + rt_uint32_t freq = 0; + struct swm320_hwtimer_dev *hwtimer = SWM320_HWTIMER_DEVICE(timer->parent.user_data); + + RT_ASSERT(hwtimer != RT_NULL); + + switch (cmd) + { + case HWTIMER_CTRL_FREQ_SET: + freq = *(rt_uint32_t*)args; + if (freq != SystemCoreClock) + { + ret = RT_EINVAL; + } + break; + case HWTIMER_CTRL_STOP: + TIMR_Stop(hwtimer->hwtimer_periph); + break; + default: + ret = RT_EINVAL; + break; + } + + return ret; +} + +static struct rt_hwtimer_ops swm320_hwtimer_ops = +{ + swm320_hwtimer_init, + swm320_hwtimer_start, + swm320_hwtimer_stop, + swm320_hwtimer_count_get, + swm320_hwtimer_control +}; + +int rt_hw_hwtimer_init(void) +{ + rt_err_t ret = RT_EOK; + +#ifdef BSP_USING_HWTIMER0 + hwtimer0.hwtimer_periph = TIMR0; + hwtimer0.parent.info = &swm320_hwtimer_info; + hwtimer0.parent.ops = &swm320_hwtimer_ops; + ret = rt_device_hwtimer_register(&hwtimer0.parent, "timer0", &hwtimer0); +#endif //BSP_USING_HWTIMER0 + +#ifdef BSP_USING_HWTIMER1 + hwtimer1.hwtimer_periph = TIMR1; + hwtimer1.parent.info = &swm320_hwtimer_info; + hwtimer1.parent.ops = &swm320_hwtimer_ops; + ret = rt_device_hwtimer_register(&hwtimer1.parent, "timer1", &hwtimer1); +#endif //BSP_USING_HWTIMER1 + +#ifdef BSP_USING_HWTIMER2 + hwtimer2.hwtimer_periph = TIMR2; + hwtimer2.parent.info = &swm320_hwtimer_info; + hwtimer2.parent.ops = &swm320_hwtimer_ops; + ret = rt_device_hwtimer_register(&hwtimer2.parent, "timer2", &hwtimer2); +#endif //BSP_USING_HWTIMER2 + +#ifdef BSP_USING_HWTIMER3 + hwtimer3.hwtimer_periph = TIMR3; + hwtimer3.parent.info = &swm320_hwtimer_info; + hwtimer3.parent.ops = &swm320_hwtimer_ops; + ret = rt_device_hwtimer_register(&hwtimer3.parent, "timer3", &hwtimer3); +#endif //BSP_USING_HWTIMER3 + +#ifdef BSP_USING_HWTIMER4 + hwtimer4.hwtimer_periph = TIMR4; + hwtimer4.parent.info = &swm320_hwtimer_info; + hwtimer4.parent.ops = &swm320_hwtimer_ops; + ret = rt_device_hwtimer_register(&hwtimer4.parent, "timer4", &hwtimer4); +#endif //BSP_USING_HWTIMER4 + +#ifdef BSP_USING_HWTIMER5 + hwtimer5.hwtimer_periph = TIMR5; + hwtimer5.parent.info = &swm320_hwtimer_info; + hwtimer5.parent.ops = &swm320_hwtimer_ops; + ret = rt_device_hwtimer_register(&hwtimer5.parent, "timer5", &hwtimer5); +#endif //BSP_USING_HWTIMER5 + + return ret; +} +INIT_BOARD_EXPORT(rt_hw_hwtimer_init); diff --git a/bsp/swm320-lq100/drivers/drv_hwtimer.h b/bsp/swm320-lq100/drivers/drv_hwtimer.h new file mode 100644 index 0000000000..6ec07dedde --- /dev/null +++ b/bsp/swm320-lq100/drivers/drv_hwtimer.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2006-2018, Synwit Technology Co.,Ltd. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2018-12-10 Zohar_Lee first version + */ + +#ifndef DRV_HWTIMER_H__ +#define DRV_HWTIMER_H__ + +int rt_hw_hwtimer_init(void); + +#endif diff --git a/bsp/swm320-lq100/drivers/drv_sram.c b/bsp/swm320-lq100/drivers/drv_sram.c index 8b9be8f0d4..b23c76beac 100644 --- a/bsp/swm320-lq100/drivers/drv_sram.c +++ b/bsp/swm320-lq100/drivers/drv_sram.c @@ -28,8 +28,7 @@ int rt_hw_sram_init(void) SYS->CLKEN |= (1 << SYS_CLKEN_SDRAM_Pos); - while (SDRAMC->REFDONE == 0) - ; + while (SDRAMC->REFDONE == 0); SDRAMC->REFRESH &= ~(1 << SDRAMC_REFRESH_EN_Pos); for (i = 0; i < 1000; i++) diff --git a/bsp/swm320-lq100/project.ewd b/bsp/swm320-lq100/project.ewd new file mode 100644 index 0000000000..52cc221b07 --- /dev/null +++ b/bsp/swm320-lq100/project.ewd @@ -0,0 +1,2834 @@ + + + 3 + + rt-thread + + ARM + + 1 + + C-SPY + 2 + + 29 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $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\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 29 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 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\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/bsp/swm320-lq100/project.ewp b/bsp/swm320-lq100/project.ewp new file mode 100644 index 0000000000..1b1a032c94 --- /dev/null +++ b/bsp/swm320-lq100/project.ewp @@ -0,0 +1,2293 @@ + + 3 + + rt-thread + + ARM + + 1 + + General + 3 + + 29 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 29 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 20 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + + Applications + + $PROJ_DIR$\applications\main.c + + + + Drivers + + $PROJ_DIR$\drivers\board.c + + + $PROJ_DIR$\drivers\drv_gpio.c + + + $PROJ_DIR$\drivers\drv_uart.c + + + + Libraries + + $PROJ_DIR$\Libraries\CMSIS\DeviceSupport\system_SWM320.c + + + $PROJ_DIR$\Libraries\SWM320_StdPeriph_Driver\SWM320_adc.c + + + $PROJ_DIR$\Libraries\SWM320_StdPeriph_Driver\SWM320_can.c + + + $PROJ_DIR$\Libraries\SWM320_StdPeriph_Driver\SWM320_crc.c + + + $PROJ_DIR$\Libraries\SWM320_StdPeriph_Driver\SWM320_dma.c + + + $PROJ_DIR$\Libraries\SWM320_StdPeriph_Driver\SWM320_exti.c + + + $PROJ_DIR$\Libraries\SWM320_StdPeriph_Driver\SWM320_flash.c + + + $PROJ_DIR$\Libraries\SWM320_StdPeriph_Driver\SWM320_gpio.c + + + $PROJ_DIR$\Libraries\SWM320_StdPeriph_Driver\SWM320_i2c.c + + + $PROJ_DIR$\Libraries\SWM320_StdPeriph_Driver\SWM320_lcd.c + + + $PROJ_DIR$\Libraries\SWM320_StdPeriph_Driver\SWM320_norflash.c + + + $PROJ_DIR$\Libraries\SWM320_StdPeriph_Driver\SWM320_port.c + + + $PROJ_DIR$\Libraries\SWM320_StdPeriph_Driver\SWM320_pwm.c + + + $PROJ_DIR$\Libraries\SWM320_StdPeriph_Driver\SWM320_rtc.c + + + $PROJ_DIR$\Libraries\SWM320_StdPeriph_Driver\SWM320_sdio.c + + + $PROJ_DIR$\Libraries\SWM320_StdPeriph_Driver\SWM320_sdram.c + + + $PROJ_DIR$\Libraries\SWM320_StdPeriph_Driver\SWM320_spi.c + + + $PROJ_DIR$\Libraries\SWM320_StdPeriph_Driver\SWM320_timr.c + + + $PROJ_DIR$\Libraries\SWM320_StdPeriph_Driver\SWM320_uart.c + + + $PROJ_DIR$\Libraries\SWM320_StdPeriph_Driver\SWM320_wdt.c + + + $PROJ_DIR$\Libraries\CMSIS\DeviceSupport\startup\iar\startup_SWM320.s + + + + Kernel + + $PROJ_DIR$\..\..\src\clock.c + + + $PROJ_DIR$\..\..\src\components.c + + + $PROJ_DIR$\..\..\src\cpu.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\memheap.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\hwtimer\hwtimer.c + + + $PROJ_DIR$\..\..\components\drivers\misc\pin.c + + + $PROJ_DIR$\..\..\components\drivers\misc\rt_drv_pwm.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\ringblk_buf.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 + + + diff --git a/bsp/swm320-lq100/project.eww b/bsp/swm320-lq100/project.eww new file mode 100644 index 0000000000..c2cb02eb1e --- /dev/null +++ b/bsp/swm320-lq100/project.eww @@ -0,0 +1,10 @@ + + + + + $WS_DIR$\project.ewp + + + + + diff --git a/bsp/swm320-lq100/project.uvoptx b/bsp/swm320-lq100/project.uvoptx index 4796eb8073..8cd93653a8 100644 --- a/bsp/swm320-lq100/project.uvoptx +++ b/bsp/swm320-lq100/project.uvoptx @@ -125,7 +125,7 @@ 0 JL2CM3 - -U801000899 -O78 -S2 -ZTIFSpeedSel5000 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8002 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC4000 -FN1 -FF0SWM320xE -FS00 -FL080000 + -U30000299 -O78 -S2 -ZTIFSpeedSel5000 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8002 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC4000 -FN1 -FF0SWM320xE -FS00 -FL080000 -FP0($$Device:SWM320xE$Flash\SWM320xE.FLM) @@ -187,6 +187,18 @@ 0 0 0 + applications\hwtimer_sample.c + hwtimer_sample.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 applications\main.c main.c 0 @@ -196,13 +208,13 @@ Drivers - 1 + 0 0 0 0 2 - 2 + 3 1 0 0 @@ -214,7 +226,7 @@ 2 - 3 + 4 1 0 0 @@ -226,7 +238,7 @@ 2 - 4 + 5 1 0 0 @@ -246,7 +258,7 @@ 0 3 - 5 + 6 1 0 0 @@ -258,7 +270,7 @@ 3 - 6 + 7 1 0 0 @@ -270,7 +282,7 @@ 3 - 7 + 8 1 0 0 @@ -282,7 +294,7 @@ 3 - 8 + 9 1 0 0 @@ -294,7 +306,7 @@ 3 - 9 + 10 1 0 0 @@ -306,7 +318,7 @@ 3 - 10 + 11 1 0 0 @@ -318,7 +330,7 @@ 3 - 11 + 12 1 0 0 @@ -330,7 +342,7 @@ 3 - 12 + 13 1 0 0 @@ -342,7 +354,7 @@ 3 - 13 + 14 1 0 0 @@ -354,7 +366,7 @@ 3 - 14 + 15 1 0 0 @@ -366,7 +378,7 @@ 3 - 15 + 16 1 0 0 @@ -378,7 +390,7 @@ 3 - 16 + 17 1 0 0 @@ -390,7 +402,7 @@ 3 - 17 + 18 1 0 0 @@ -402,7 +414,7 @@ 3 - 18 + 19 1 0 0 @@ -414,7 +426,7 @@ 3 - 19 + 20 1 0 0 @@ -426,7 +438,7 @@ 3 - 20 + 21 1 0 0 @@ -438,7 +450,7 @@ 3 - 21 + 22 1 0 0 @@ -450,7 +462,7 @@ 3 - 22 + 23 1 0 0 @@ -462,7 +474,7 @@ 3 - 23 + 24 1 0 0 @@ -474,7 +486,7 @@ 3 - 24 + 25 1 0 0 @@ -486,7 +498,7 @@ 3 - 25 + 26 2 0 0 @@ -506,7 +518,7 @@ 0 4 - 26 + 27 1 0 0 @@ -518,7 +530,7 @@ 4 - 27 + 28 1 0 0 @@ -530,7 +542,7 @@ 4 - 28 + 29 1 0 0 @@ -542,7 +554,7 @@ 4 - 29 + 30 1 0 0 @@ -554,7 +566,7 @@ 4 - 30 + 31 1 0 0 @@ -566,7 +578,7 @@ 4 - 31 + 32 1 0 0 @@ -578,7 +590,7 @@ 4 - 32 + 33 1 0 0 @@ -590,7 +602,7 @@ 4 - 33 + 34 1 0 0 @@ -602,7 +614,7 @@ 4 - 34 + 35 1 0 0 @@ -614,7 +626,7 @@ 4 - 35 + 36 1 0 0 @@ -626,7 +638,7 @@ 4 - 36 + 37 1 0 0 @@ -638,7 +650,7 @@ 4 - 37 + 38 1 0 0 @@ -650,7 +662,7 @@ 4 - 38 + 39 1 0 0 @@ -662,7 +674,7 @@ 4 - 39 + 40 1 0 0 @@ -674,7 +686,7 @@ 4 - 40 + 41 1 0 0 @@ -686,7 +698,7 @@ 4 - 41 + 42 1 0 0 @@ -706,7 +718,7 @@ 0 5 - 42 + 43 1 0 0 @@ -718,7 +730,7 @@ 5 - 43 + 44 2 0 0 @@ -730,7 +742,7 @@ 5 - 44 + 45 1 0 0 @@ -742,7 +754,7 @@ 5 - 45 + 46 1 0 0 @@ -754,7 +766,7 @@ 5 - 46 + 47 1 0 0 @@ -766,110 +778,6 @@ - - Filesystem - 0 - 0 - 0 - 0 - - 6 - 47 - 1 - 0 - 0 - 0 - ..\..\components\dfs\src\dfs.c - dfs.c - 0 - 0 - - - 6 - 48 - 1 - 0 - 0 - 0 - ..\..\components\dfs\src\dfs_file.c - dfs_file.c - 0 - 0 - - - 6 - 49 - 1 - 0 - 0 - 0 - ..\..\components\dfs\src\dfs_fs.c - dfs_fs.c - 0 - 0 - - - 6 - 50 - 1 - 0 - 0 - 0 - ..\..\components\dfs\src\dfs_posix.c - dfs_posix.c - 0 - 0 - - - 6 - 51 - 1 - 0 - 0 - 0 - ..\..\components\dfs\filesystems\devfs\devfs.c - devfs.c - 0 - 0 - - - 6 - 52 - 1 - 0 - 0 - 0 - ..\..\components\dfs\filesystems\elmfat\dfs_elm.c - dfs_elm.c - 0 - 0 - - - 6 - 53 - 1 - 0 - 0 - 0 - ..\..\components\dfs\filesystems\elmfat\ff.c - ff.c - 0 - 0 - - - 6 - 54 - 1 - 0 - 0 - 0 - ..\..\components\dfs\filesystems\elmfat\option\ccsbcs.c - ccsbcs.c - 0 - 0 - - - DeviceDrivers 0 @@ -877,8 +785,8 @@ 0 0 - 7 - 55 + 6 + 48 1 0 0 @@ -889,44 +797,8 @@ 0 - 7 - 56 - 1 - 0 - 0 - 0 - ..\..\components\drivers\i2c\i2c_core.c - i2c_core.c - 0 - 0 - - - 7 - 57 - 1 - 0 - 0 - 0 - ..\..\components\drivers\i2c\i2c_dev.c - i2c_dev.c - 0 - 0 - - - 7 - 58 - 1 - 0 - 0 - 0 - ..\..\components\drivers\i2c\i2c-bit-ops.c - i2c-bit-ops.c - 0 - 0 - - - 7 - 59 + 6 + 49 1 0 0 @@ -937,8 +809,8 @@ 0 - 7 - 60 + 6 + 50 1 0 0 @@ -949,32 +821,8 @@ 0 - 7 - 61 - 1 - 0 - 0 - 0 - ..\..\components\drivers\mtd\mtd_nor.c - mtd_nor.c - 0 - 0 - - - 7 - 62 - 1 - 0 - 0 - 0 - ..\..\components\drivers\rtc\rtc.c - rtc.c - 0 - 0 - - - 7 - 63 + 6 + 51 1 0 0 @@ -985,32 +833,8 @@ 0 - 7 - 64 - 1 - 0 - 0 - 0 - ..\..\components\drivers\spi\spi_core.c - spi_core.c - 0 - 0 - - - 7 - 65 - 1 - 0 - 0 - 0 - ..\..\components\drivers\spi\spi_dev.c - spi_dev.c - 0 - 0 - - - 7 - 66 + 6 + 52 1 0 0 @@ -1021,8 +845,8 @@ 0 - 7 - 67 + 6 + 53 1 0 0 @@ -1033,8 +857,8 @@ 0 - 7 - 68 + 6 + 54 1 0 0 @@ -1045,8 +869,8 @@ 0 - 7 - 69 + 6 + 55 1 0 0 @@ -1057,8 +881,8 @@ 0 - 7 - 70 + 6 + 56 1 0 0 @@ -1069,8 +893,8 @@ 0 - 7 - 71 + 6 + 57 1 0 0 @@ -1081,8 +905,8 @@ 0 - 7 - 72 + 6 + 58 1 0 0 @@ -1092,18 +916,6 @@ 0 0 - - 7 - 73 - 1 - 0 - 0 - 0 - ..\..\components\drivers\watchdog\watchdog.c - watchdog.c - 0 - 0 - @@ -1113,8 +925,8 @@ 0 0 - 8 - 74 + 7 + 59 1 0 0 @@ -1125,8 +937,8 @@ 0 - 8 - 75 + 7 + 60 1 0 0 @@ -1137,8 +949,8 @@ 0 - 8 - 76 + 7 + 61 1 0 0 @@ -1149,8 +961,8 @@ 0 - 8 - 77 + 7 + 62 1 0 0 @@ -1161,8 +973,8 @@ 0 - 8 - 78 + 7 + 63 1 0 0 @@ -1173,8 +985,8 @@ 0 - 8 - 79 + 7 + 64 1 0 0 @@ -1185,8 +997,8 @@ 0 - 8 - 80 + 7 + 65 1 0 0 @@ -1197,8 +1009,8 @@ 0 - 8 - 81 + 7 + 66 1 0 0 @@ -1209,8 +1021,8 @@ 0 - 8 - 82 + 7 + 67 1 0 0 @@ -1221,8 +1033,8 @@ 0 - 8 - 83 + 7 + 68 1 0 0 @@ -1233,8 +1045,8 @@ 0 - 8 - 84 + 7 + 69 1 0 0 @@ -1245,8 +1057,8 @@ 0 - 8 - 85 + 7 + 70 1 0 0 @@ -1257,8 +1069,8 @@ 0 - 8 - 86 + 7 + 71 1 0 0 @@ -1269,8 +1081,8 @@ 0 - 8 - 87 + 7 + 72 1 0 0 @@ -1281,8 +1093,8 @@ 0 - 8 - 88 + 7 + 73 1 0 0 @@ -1293,8 +1105,8 @@ 0 - 8 - 89 + 7 + 74 1 0 0 @@ -1306,84 +1118,4 @@ - - libc - 0 - 0 - 0 - 0 - - 9 - 90 - 1 - 0 - 0 - 0 - ..\..\components\libc\compilers\armlibc\libc.c - libc.c - 0 - 0 - - - 9 - 91 - 1 - 0 - 0 - 0 - ..\..\components\libc\compilers\armlibc\mem_std.c - mem_std.c - 0 - 0 - - - 9 - 92 - 1 - 0 - 0 - 0 - ..\..\components\libc\compilers\armlibc\stdio.c - stdio.c - 0 - 0 - - - 9 - 93 - 1 - 0 - 0 - 0 - ..\..\components\libc\compilers\armlibc\stubs.c - stubs.c - 0 - 0 - - - 9 - 94 - 1 - 0 - 0 - 0 - ..\..\components\libc\compilers\armlibc\time.c - time.c - 0 - 0 - - - 9 - 95 - 1 - 0 - 0 - 0 - ..\..\components\libc\compilers\common\gmtime_r.c - gmtime_r.c - 0 - 0 - - - diff --git a/bsp/swm320-lq100/project.uvprojx b/bsp/swm320-lq100/project.uvprojx index a7f37e5187..21a3d56d78 100644 --- a/bsp/swm320-lq100/project.uvprojx +++ b/bsp/swm320-lq100/project.uvprojx @@ -10,13 +10,13 @@ rt-thread 0x4 ARM-ADS - 5060750::V5.06 update 6 (build 750)::ARMCC + 5060528::V5.06 update 5 (build 528)::ARMCC 0 SWM320xE Synwit - Synwit.SWM32_DFP.1.6.8 + Synwit.SWM32_DFP.1.6.2 http://www.synwit.com/pack IRAM(0x20000000,0x20000) IROM(0x00000000,0x80000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE @@ -48,13 +48,13 @@ 0 1 - .\build\ + .\build\keil\Obj\ rtthread 1 0 0 1 - 1 + 0 .\build\ 1 0 @@ -82,7 +82,7 @@ 1 0 - fromelf --bin !L --output @H.bin + fromelf --bin !L --output rtthread.bin 0 0 @@ -324,7 +324,6 @@ 0 0 1 - 0 0 0 0 @@ -335,9 +334,9 @@ 0 - RT_USING_ARM_LIBC + - applications;.;drivers;Libraries\CMSIS\CoreSupport;Libraries\CMSIS\DeviceSupport;Libraries\SWM320_StdPeriph_Driver;..\..\include;..\..\libcpu\arm\cortex-m4;..\..\libcpu\arm\common;..\..\components\dfs\include;..\..\components\dfs\filesystems\devfs;..\..\components\dfs\filesystems\elmfat;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\spi;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\finsh;..\..\components\libc\compilers\armlibc;..\..\components\libc\compilers\common + applications;.;drivers;Libraries\CMSIS\CoreSupport;Libraries\CMSIS\DeviceSupport;Libraries\SWM320_StdPeriph_Driver;..\..\include;..\..\libcpu\arm\cortex-m4;..\..\libcpu\arm\common;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\finsh @@ -381,6 +380,11 @@ Applications + + hwtimer_sample.c + 1 + applications\hwtimer_sample.c + main.c 1 @@ -633,143 +637,14 @@ - - Filesystem - - - dfs.c - 1 - ..\..\components\dfs\src\dfs.c - - - dfs_file.c - 1 - ..\..\components\dfs\src\dfs_file.c - - - dfs_fs.c - 1 - ..\..\components\dfs\src\dfs_fs.c - - - dfs_posix.c - 1 - ..\..\components\dfs\src\dfs_posix.c - - - devfs.c - 1 - ..\..\components\dfs\filesystems\devfs\devfs.c - - - dfs_elm.c - 1 - ..\..\components\dfs\filesystems\elmfat\dfs_elm.c - - - ff.c - 1 - ..\..\components\dfs\filesystems\elmfat\ff.c - - - ccsbcs.c - 1 - ..\..\components\dfs\filesystems\elmfat\option\ccsbcs.c - - - DeviceDrivers - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 0 - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 0 - 0 - 2 - 2 - 2 - 2 - 2 - - - - - - - - - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - - - - - - - - - hwtimer.c 1 ..\..\components\drivers\hwtimer\hwtimer.c - - i2c_core.c - 1 - ..\..\components\drivers\i2c\i2c_core.c - - - i2c_dev.c - 1 - ..\..\components\drivers\i2c\i2c_dev.c - - - i2c-bit-ops.c - 1 - ..\..\components\drivers\i2c\i2c-bit-ops.c - pin.c 1 @@ -780,31 +655,11 @@ 1 ..\..\components\drivers\misc\rt_drv_pwm.c - - mtd_nor.c - 1 - ..\..\components\drivers\mtd\mtd_nor.c - - - rtc.c - 1 - ..\..\components\drivers\rtc\rtc.c - serial.c 1 ..\..\components\drivers\serial\serial.c - - spi_core.c - 1 - ..\..\components\drivers\spi\spi_core.c - - - spi_dev.c - 1 - ..\..\components\drivers\spi\spi_dev.c - completion.c 1 @@ -840,11 +695,6 @@ 1 ..\..\components\drivers\src\workqueue.c - - watchdog.c - 1 - ..\..\components\drivers\watchdog\watchdog.c - @@ -932,41 +782,6 @@ - - libc - - - libc.c - 1 - ..\..\components\libc\compilers\armlibc\libc.c - - - mem_std.c - 1 - ..\..\components\libc\compilers\armlibc\mem_std.c - - - stdio.c - 1 - ..\..\components\libc\compilers\armlibc\stdio.c - - - stubs.c - 1 - ..\..\components\libc\compilers\armlibc\stubs.c - - - time.c - 1 - ..\..\components\libc\compilers\armlibc\time.c - - - gmtime_r.c - 1 - ..\..\components\libc\compilers\common\gmtime_r.c - - - diff --git a/bsp/swm320-lq100/rtconfig.h b/bsp/swm320-lq100/rtconfig.h index cd9c43e33e..13645d862c 100644 --- a/bsp/swm320-lq100/rtconfig.h +++ b/bsp/swm320-lq100/rtconfig.h @@ -68,40 +68,15 @@ /* Device virtual file system */ -#define RT_USING_DFS -#define DFS_USING_WORKDIR -#define DFS_FILESYSTEMS_MAX 8 -#define DFS_FILESYSTEM_TYPES_MAX 8 -#define DFS_FD_MAX 8 -#define RT_USING_DFS_ELMFAT - -/* elm-chan's FatFs, Generic FAT Filesystem Module */ - -#define RT_DFS_ELM_CODE_PAGE 437 -#define RT_DFS_ELM_WORD_ACCESS -#define RT_DFS_ELM_USE_LFN_3 -#define RT_DFS_ELM_USE_LFN 3 -#define RT_DFS_ELM_MAX_LFN 255 -#define RT_DFS_ELM_DRIVES 2 -#define RT_DFS_ELM_MAX_SECTOR_SIZE 4096 -#define RT_DFS_ELM_REENTRANT -#define RT_USING_DFS_DEVFS /* Device Drivers */ #define RT_USING_DEVICE_IPC #define RT_PIPE_BUFSZ 512 #define RT_USING_SERIAL -#define RT_SERIAL_USING_DMA #define RT_USING_HWTIMER -#define RT_USING_I2C -#define RT_USING_I2C_BITOPS #define RT_USING_PIN #define RT_USING_PWM -#define RT_USING_MTD_NOR -#define RT_USING_RTC -#define RT_USING_SPI -#define RT_USING_WDT /* Using WiFi */ @@ -111,7 +86,6 @@ /* POSIX layer and C standard library */ -#define RT_USING_LIBC /* Network */ @@ -170,13 +144,8 @@ /* miscellaneous packages */ -/* sample package */ - /* samples: kernel and components samples */ - -/* example package: hello */ - #define SOC_SWM320VET7 /* Hardware Drivers Config */ @@ -195,12 +164,13 @@ /* I2C Drivers */ -/* PWM module */ +/* PWM Drivers */ -/* RTC module */ +/* RTC Drivers */ -/* RTC SET */ + +/* HWtimer Drivers */ /* Onboard Peripheral Drivers */ diff --git a/bsp/swm320-lq100/rtconfig.py b/bsp/swm320-lq100/rtconfig.py index d60feb85dc..c8f9102c76 100644 --- a/bsp/swm320-lq100/rtconfig.py +++ b/bsp/swm320-lq100/rtconfig.py @@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:/Keil_v5' elif CROSS_TOOL == 'iar': - print("Not support gcc now\n") - exit(0) + PLATFORM = 'iar' + EXEC_PATH = 'C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.2' if os.getenv('RTT_EXEC_PATH'): EXEC_PATH = os.getenv('RTT_EXEC_PATH') @@ -34,6 +34,7 @@ BUILD = 'debug' if PLATFORM == 'gcc': PREFIX = 'arm-none-eabi-' CC = PREFIX + 'gcc' + CXX = PREFIX + 'g++' AS = PREFIX + 'gcc' AR = PREFIX + 'ar' LINK = PREFIX + 'gcc' @@ -46,7 +47,7 @@ if PLATFORM == 'gcc': FLOAT_ABI + ' -ffunction-sections -fdata-sections' CFLAGS = DEVICE + ' -std=c99' AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb ' - LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T link.lds' + LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T drivers/linker_scripts/link.lds' CPATH = '' LPATH = '' @@ -69,7 +70,7 @@ elif PLATFORM == 'armcc': DEVICE = ' --cpu ' + CPU + '.fp ' CFLAGS = '-c ' + DEVICE + ' --apcs=interwork --c99' AFLAGS = DEVICE + ' --apcs=interwork ' - LFLAGS = DEVICE + ' --scatter "link.sct" --info sizes --info totals --info unused --info veneers --list rtthread.map --strict' + LFLAGS = DEVICE + ' --scatter "drivers/linker_scripts/link.sct" --info sizes --info totals --info unused --info veneers --list rtthread.map --strict' CFLAGS += ' -I' + EXEC_PATH + '/ARM/ARMCC/INC' LFLAGS += ' --libpath ' + EXEC_PATH + '/ARM/ARMCC/LIB' @@ -88,5 +89,49 @@ elif PLATFORM == 'armcc': POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET' elif PLATFORM == 'iar': - print('Not Support iar now\n') - exit(0) + # toolchains + CC = 'iccarm' + AS = 'iasmarm' + AR = 'iarchive' + LINK = 'ilinkarm' + TARGET_EXT = 'out' + + DEVICE = '-Dewarm' # + ' -D' + PART_TYPE + + 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 += ' --endian=little' + CFLAGS += ' --cpu=Cortex-M4' + CFLAGS += ' -e' + CFLAGS += ' --fpu=VFPv4_sp' + CFLAGS += ' --dlib_config "' + EXEC_PATH + '/arm/INC/c/DLib_Config_Normal.h"' + CFLAGS += ' --silent' + + AFLAGS = DEVICE + AFLAGS += ' -s+' + AFLAGS += ' -w+' + AFLAGS += ' -r' + AFLAGS += ' --cpu Cortex-M4' + AFLAGS += ' --fpu VFPv4_sp' + AFLAGS += ' -S' + + if BUILD == 'debug': + CFLAGS += ' --debug' + CFLAGS += ' -On' + else: + CFLAGS += ' -Oh' + + LFLAGS = ' --config "drivers/linker_scripts/link.icf"' + LFLAGS += ' --entry __iar_program_start' + #LFLAGS += ' --silent' + + EXEC_PATH = EXEC_PATH + '/arm/bin/' + POST_ACTION = '' diff --git a/bsp/swm320-lq100/template.ewp b/bsp/swm320-lq100/template.ewp new file mode 100644 index 0000000000..2ff75d9abc --- /dev/null +++ b/bsp/swm320-lq100/template.ewp @@ -0,0 +1,2032 @@ + + + 3 + + rt-thread + + ARM + + 1 + + General + 3 + + 29 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 29 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 20 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + diff --git a/bsp/swm320-lq100/template.eww b/bsp/swm320-lq100/template.eww new file mode 100644 index 0000000000..bd036bb4c9 --- /dev/null +++ b/bsp/swm320-lq100/template.eww @@ -0,0 +1,10 @@ + + + + + $WS_DIR$\template.ewp + + + + + diff --git a/bsp/swm320-lq100/template.uvopt b/bsp/swm320-lq100/template.uvopt new file mode 100644 index 0000000000..0e93bee143 --- /dev/null +++ b/bsp/swm320-lq100/template.uvopt @@ -0,0 +1,184 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + + + + 0 + 0 + + + + rt-thread + 0x4 + ARM-ADS + + 25000000 + + 1 + 1 + 1 + 0 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\build\keil\List\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 0 + 0 + 1 + + 255 + + + 0 + Datasheet + DATASHTS\ST\STM32F4xx\DM00053488.pdf + + + 1 + Reference Manual + DATASHTS\ST\STM32F4xx\DM00031020.pdf + + + 2 + Technical Reference Manual + datashts\arm\cortex_m4\r0p1\DDI0439C_CORTEX_M4_R0P1_TRM.PDF + + + 3 + Generic User Guide + datashts\arm\cortex_m4\r0p1\DUI0553A_CORTEX_M4_DGUG.PDF + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 0 + 1 + 1 + 0 + 0 + 0 + 6 + + + + + + + + + + + Segger\JL2CM3.dll + + + + 0 + JL2CM3 + -U20090928 -O207 -S0 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -TO18 -TC10000000 -TP21 -TDS8001 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC800 -FN1 -FF0STM32F4xx_1024 -FS08000000 -FL0100000 + + + 0 + UL2CM3 + UL2CM3(-O207 -S0 -C0 -FO7 -FN1 -FC800 -FD20000000 -FF0STM32F4xx_1024 -FL0100000 -FS08000000 + + + + + 0 + + + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + +
diff --git a/bsp/swm320-lq100/template.uvoptx b/bsp/swm320-lq100/template.uvoptx index f15d96c406..bc15f1d325 100644 --- a/bsp/swm320-lq100/template.uvoptx +++ b/bsp/swm320-lq100/template.uvoptx @@ -125,7 +125,7 @@ 0 JL2CM3 - -U801000899 -O78 -S2 -ZTIFSpeedSel5000 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8002 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC4000 -FN1 -FF0SWM320xE -FS00 -FL080000 + -U30000299 -O78 -S2 -ZTIFSpeedSel5000 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8002 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC4000 -FN1 -FF0SWM320xE -FS00 -FL080000 -FP0($$Device:SWM320xE$Flash\SWM320xE.FLM) diff --git a/bsp/swm320-lq100/template.uvprojx b/bsp/swm320-lq100/template.uvprojx index 2a630de8b0..a8cdab71fc 100644 --- a/bsp/swm320-lq100/template.uvprojx +++ b/bsp/swm320-lq100/template.uvprojx @@ -16,7 +16,7 @@ SWM320xE Synwit - Synwit.SWM32_DFP.1.6.8 + Synwit.SWM32_DFP.1.6.2 http://www.synwit.com/pack IRAM(0x20000000,0x20000) IROM(0x00000000,0x80000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE @@ -48,14 +48,14 @@ 0 1 - .\build\ + .\build\keil\Obj\ rtthread 1 0 0 1 - 1 - .\build\ + 0 + .\build\keil\List\ 1 0 0 @@ -82,7 +82,7 @@ 1 0 - fromelf --bin !L --output @H.bin + fromelf --bin !L --output rtthread.bin 0 0 @@ -324,7 +324,6 @@ 0 0 1 - 0 0 0 0