summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2017-12-13 21:08:54 +0800
committerGitHub <[email protected]>2017-12-13 21:08:54 +0800
commitb0f4ae246a7a0d958777e11ad2392f22f20a99e6 (patch)
tree48c9298e79df107ebbbf532091853c929a3944fd
parentd6aa42285a9cb9ee17ff70fe39c3022f2bea7160 (diff)
parenteb1daff7d4922c1c54842d1512ed8a9228227b65 (diff)
Merge pull request #1103 from BernardXiong/master
[BSP] fix the compiling issue for Win32 MSVC.
-rw-r--r--bsp/simulator/.config252
-rw-r--r--bsp/simulator/Kconfig25
-rwxr-xr-xbsp/simulator/applications/application.c7
-rw-r--r--bsp/simulator/applications/platform.c10
-rw-r--r--bsp/simulator/drivers/SConscript2
-rwxr-xr-xbsp/simulator/drivers/board.c1
-rwxr-xr-xbsp/simulator/drivers/sdl_fb.c10
-rwxr-xr-xbsp/simulator/rtconfig.h386
-rw-r--r--bsp/simulator/rtconfig_project.h25
-rw-r--r--components/gui/include/rtgui/color.h6
-rw-r--r--components/gui/src/rtgui_app.c5
-rw-r--r--tools/codeblocks.py15
-rw-r--r--tools/utils.py21
-rw-r--r--tools/vs.py13
-rw-r--r--tools/vs2012.py12
15 files changed, 564 insertions, 226 deletions
diff --git a/bsp/simulator/.config b/bsp/simulator/.config
new file mode 100644
index 0000000000..3a1c2b0908
--- /dev/null
+++ b/bsp/simulator/.config
@@ -0,0 +1,252 @@
+#
+# 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=100
+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 is not set
+
+#
+# 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_HEAP=y
+
+#
+# Kernel Device Object
+#
+CONFIG_RT_USING_DEVICE=y
+# CONFIG_RT_USING_INTERRUPT_INFO is not set
+CONFIG_RT_USING_CONSOLE=y
+CONFIG_RT_CONSOLEBUF_SIZE=128
+CONFIG_RT_CONSOLE_DEVICE_NAME="console"
+# CONFIG_RT_USING_MODULE is not set
+
+#
+# RT-Thread Components
+#
+# CONFIG_RT_USING_COMPONENTS_INIT is not set
+
+#
+# C++ features
+#
+CONFIG_RT_USING_CPLUSPLUS=y
+
+#
+# Command shell
+#
+CONFIG_RT_USING_FINSH=y
+CONFIG_FINSH_USING_HISTORY=y
+CONFIG_FINSH_USING_SYMTAB=y
+CONFIG_FINSH_USING_DESCRIPTION=y
+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
+
+#
+# Device virtual file system
+#
+CONFIG_RT_USING_DFS=y
+CONFIG_DFS_USING_WORKDIR=y
+CONFIG_DFS_FILESYSTEMS_MAX=2
+CONFIG_DFS_FILESYSTEM_TYPES_MAX=2
+CONFIG_DFS_FD_MAX=4
+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=y
+# 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 is not set
+CONFIG_RT_DFS_ELM_USE_LFN=0
+CONFIG_RT_DFS_ELM_MAX_LFN=255
+CONFIG_RT_DFS_ELM_DRIVES=2
+CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=512
+# 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_NET is not set
+# CONFIG_RT_USING_DFS_ROMFS is not set
+# CONFIG_RT_USING_DFS_RAMFS is not set
+# CONFIG_RT_USING_DFS_UFFS 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_I2C is not set
+# CONFIG_RT_USING_PIN 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 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 is not set
+# CONFIG_RT_USING_PTHREADS is not set
+
+#
+# Network stack
+#
+
+#
+# light weight TCP/IP stack
+#
+# CONFIG_RT_USING_LWIP is not set
+
+#
+# Modbus master and slave stack
+#
+# CONFIG_RT_USING_MODBUS is not set
+
+#
+# RT-Thread UI Engine
+#
+CONFIG_RT_USING_GUIENGINE=y
+CONFIG_RTGUI_NAME_MAX=16
+# CONFIG_RTGUI_USING_TTF is not set
+CONFIG_RTGUI_USING_FONT16=y
+CONFIG_RTGUI_USING_FONT12=y
+# CONFIG_RTGUI_USING_FONTHZ is not set
+# CONFIG_RTGUI_IMAGE_XPM is not set
+CONFIG_RTGUI_IMAGE_JPEG_NONE=y
+# CONFIG_RTGUI_IMAGE_JPEG is not set
+# CONFIG_RTGUI_IMAGE_TJPGD is not set
+# CONFIG_RTGUI_IMAGE_PNG_NONE is not set
+# CONFIG_RTGUI_IMAGE_PNG is not set
+CONFIG_RTGUI_IMAGE_LODEPNG=y
+# CONFIG_RTGUI_IMAGE_BMP is not set
+CONFIG_RTGUI_IMAGE_CONTAINER=y
+CONFIG_RTGUI_USING_DEMO=y
+
+#
+# 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
+#
+
+#
+# system packages
+#
+# CONFIG_PKG_USING_PARTITION is not set
+# CONFIG_PKG_USING_SQLITE is not set
+# CONFIG_PKG_USING_RTI is not set
+
+#
+# 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_EZXML is not set
+# CONFIG_PKG_USING_NANOPB 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
+
+#
+# tools packages
+#
+# CONFIG_PKG_USING_CMBACKTRACE is not set
+# CONFIG_PKG_USING_EASYLOGGER is not set
+# CONFIG_PKG_USING_SYSTEMVIEW is not set
+# CONFIG_PKG_USING_IPERF is not set
+
+#
+# miscellaneous packages
+#
+# CONFIG_PKG_USING_FASTLZ is not set
+# CONFIG_PKG_USING_MINILZO is not set
+
+#
+# example package: hello
+#
+# CONFIG_PKG_USING_HELLO is not set
+
+#
+# Privated Packages of RealThread
+#
+# CONFIG_PKG_USING_CODEC is not set
+# CONFIG_PKG_USING_PLAYER is not set
+
+#
+# Network Utilities
+#
+CONFIG_RT_USING_DFS_WINSHAREDIR=y
diff --git a/bsp/simulator/Kconfig b/bsp/simulator/Kconfig
new file mode 100644
index 0000000000..7014632801
--- /dev/null
+++ b/bsp/simulator/Kconfig
@@ -0,0 +1,25 @@
+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"
+
+if RT_USING_DFS
+ config RT_USING_DFS_WINSHAREDIR
+ bool "Enable shared file system between windows"
+ default n
+endif
diff --git a/bsp/simulator/applications/application.c b/bsp/simulator/applications/application.c
index c899baaa3d..2ffa50f197 100755
--- a/bsp/simulator/applications/application.c
+++ b/bsp/simulator/applications/application.c
@@ -35,6 +35,13 @@ void rt_init_thread_entry(void *parameter)
platform_init();
mnt_init();
+
+#if defined(RT_USING_GUIENGINE) && defined(RTGUI_USING_DEMO)
+ {
+ extern int rt_gui_demo_init(void);
+ rt_gui_demo_init();
+ }
+#endif
}
int rt_application_init()
diff --git a/bsp/simulator/applications/platform.c b/bsp/simulator/applications/platform.c
index 00d4a1b6a0..c77e336844 100644
--- a/bsp/simulator/applications/platform.c
+++ b/bsp/simulator/applications/platform.c
@@ -29,5 +29,15 @@ int platform_init(void)
#endif /* RT_USING_DFS */
+#ifdef RT_USING_GUIENGINE
+ {
+ extern void rt_hw_sdl_start(void);
+ extern int rtgui_system_server_init(void);
+
+ rtgui_system_server_init();
+ rt_hw_sdl_start();
+ }
+#endif
+
return 0;
}
diff --git a/bsp/simulator/drivers/SConscript b/bsp/simulator/drivers/SConscript
index f71b3f9ea3..153375ec07 100644
--- a/bsp/simulator/drivers/SConscript
+++ b/bsp/simulator/drivers/SConscript
@@ -8,7 +8,7 @@ LIBPATH = []
CPPPATH = [cwd]
# remove no need file.
-if GetDepend('RT_USING_RTGUI') == False:
+if GetDepend('RT_USING_GUIENGINE') == False:
SrcRemove(src, 'sdl_fb.c')
else:
LIBS.append('SDL')
diff --git a/bsp/simulator/drivers/board.c b/bsp/simulator/drivers/board.c
index 4e498395c9..2bf10263f2 100755
--- a/bsp/simulator/drivers/board.c
+++ b/bsp/simulator/drivers/board.c
@@ -86,6 +86,7 @@ void rt_hw_exit(void)
#if defined(RT_USING_FINSH)
#include <finsh.h>
FINSH_FUNCTION_EXPORT_ALIAS(rt_hw_exit, exit, exit rt - thread);
+FINSH_FUNCTION_EXPORT_ALIAS(rt_hw_exit, __cmd_quit, exit rt-thread);
#endif /* RT_USING_FINSH */
/**
diff --git a/bsp/simulator/drivers/sdl_fb.c b/bsp/simulator/drivers/sdl_fb.c
index bd43a633b5..5399de8d58 100755
--- a/bsp/simulator/drivers/sdl_fb.c
+++ b/bsp/simulator/drivers/sdl_fb.c
@@ -306,11 +306,11 @@ static void *sdl_loop(void *lpParam)
break;
}
- if (quit)
- {
- exit(1);
- break;
- }
+ if (quit)
+ {
+ exit(1);
+ break;
+ }
}
rt_hw_exit();
diff --git a/bsp/simulator/rtconfig.h b/bsp/simulator/rtconfig.h
index 4a045637bd..84610f07a8 100755
--- a/bsp/simulator/rtconfig.h
+++ b/bsp/simulator/rtconfig.h
@@ -1,241 +1,225 @@
-/* RT-Thread config file */
+#ifndef RT_CONFIG_H__
+#define RT_CONFIG_H__
-#ifndef __RTTHREAD_CFG_H__
-#define __RTTHREAD_CFG_H__
+/* Automatically generated file; DO NOT EDIT. */
+/* RT-Thread Configuration */
-// <RDTConfigurator URL="http://www.rt-thread.com/eclipse">
+/* RT-Thread Kernel */
-// <integer name="RT_NAME_MAX" description="Maximal size of kernel object name length" default="6" />
-#define RT_NAME_MAX 6
-// <integer name="RT_ALIGN_SIZE" description="Alignment size for CPU architecture data access" default="4" />
-#define RT_ALIGN_SIZE 4
-// <integer name="RT_THREAD_PRIORITY_MAX" description="Maximal level of thread priority" default="32">
-// <item description="8">8</item>
-// <item description="32">32</item>
-// <item description="256">256</item>
-// </integer>
-#define RT_THREAD_PRIORITY_MAX 32
-// <integer name="RT_TICK_PER_SECOND" description="OS tick per second" default="100" />
-#define RT_TICK_PER_SECOND 100
-// <section name="RT_DEBUG" description="Kernel Debug Configuration" default="true" >
+#define RT_NAME_MAX 8
+#define RT_ALIGN_SIZE 4
+/* RT_THREAD_PRIORITY_8 is not set */
+#define RT_THREAD_PRIORITY_32
+/* RT_THREAD_PRIORITY_256 is not set */
+#define RT_THREAD_PRIORITY_MAX 32
+#define RT_TICK_PER_SECOND 100
#define RT_DEBUG
-// <bool name="RT_THREAD_DEBUG" description="Thread debug enable" default="false" />
-// #define RT_THREAD_DEBUG
-// <bool name="RT_USING_OVERFLOW_CHECK" description="Thread stack over flow detect" default="true" />
#define RT_USING_OVERFLOW_CHECK
-// </section>
-
-// <bool name="RT_USING_HOOK" description="Using hook functions" default="true" />
+#define RT_DEBUG_INIT 0
+#define RT_DEBUG_THREAD 0
#define RT_USING_HOOK
-// <section name="RT_USING_TIMER_SOFT" description="Using software timer which will start a thread to handle soft-timer" default="true" >
-// #define RT_USING_TIMER_SOFT
-// <integer name="RT_TIMER_THREAD_PRIO" description="The priority level of timer thread" default="4" />
-#define RT_TIMER_THREAD_PRIO 4
-// <integer name="RT_TIMER_THREAD_STACK_SIZE" description="The stack size of timer thread" default="512" />
-#define RT_TIMER_THREAD_STACK_SIZE 512
-// </section>
+#define IDLE_THREAD_STACK_SIZE 256
+/* RT_USING_TIMER_SOFT is not set */
+
+/* Inter-Thread communication */
-// <section name="IPC" description="Inter-Thread communication" default="always" >
-// <bool name="RT_USING_SEMAPHORE" description="Using semaphore in the system" default="true" />
#define RT_USING_SEMAPHORE
-// <bool name="RT_USING_MUTEX" description="Using mutex in the system" default="true" />
#define RT_USING_MUTEX
-// <bool name="RT_USING_EVENT" description="Using event group in the system" default="true" />
#define RT_USING_EVENT
-// <bool name="RT_USING_MAILBOX" description="Using mailbox in the system" default="true" />
#define RT_USING_MAILBOX
-// <bool name="RT_USING_MESSAGEQUEUE" description="Using message queue in the system" default="true" />
#define RT_USING_MESSAGEQUEUE
-// </section>
+/* RT_USING_SIGNALS is not set */
+
+/* Memory Management */
-// <section name="MM" description="Memory Management" default="always" >
-// <bool name="RT_USING_MEMPOOL" description="Using Memory Pool Management in the system" default="true" />
#define RT_USING_MEMPOOL
-// <bool name="RT_USING_MEMHEAP" description="Using Memory Heap Object in the system" default="true" />
-#define RT_USING_MEMHEAP
-// <bool name="RT_USING_HEAP" description="Using Dynamic Heap Management in the system" default="true" />
-#define RT_USING_HEAP
-// <bool name="RT_USING_SMALL_MEM" description="Optimizing for small memory" default="false" />
+/* RT_USING_MEMHEAP is not set */
+/* RT_USING_NOHEAP is not set */
#define RT_USING_SMALL_MEM
-// <bool name="RT_USING_SLAB" description="Using SLAB memory management for large memory" default="false" />
-// #define RT_USING_SLAB
-// </section>
+/* RT_USING_SLAB is not set */
+#define RT_USING_HEAP
-// <section name="RT_USING_DEVICE" description="Using Device Driver Framework" default="true" >
-#define RT_USING_DEVICE
-// <bool name="RT_USING_DEVICE_IPC" description="Using Inter-Thread communication for Device" default="true" >
-#define RT_USING_DEVICE_IPC
-// <bool name="RT_USING_SERIAL" description="Using serial device framework" default="true">
-#define RT_USING_SERIAL
-// <bool name="RT_USING_UART0" description="Using UART0" default="true" />
-#define RT_USING_UART0
-// </section>
+/* Kernel Device Object */
-// <section name="RT_USING_CONSOLE" description="Using console" default="true" >
+#define RT_USING_DEVICE
+/* RT_USING_INTERRUPT_INFO is not set */
#define RT_USING_CONSOLE
-// <integer name="RT_CONSOLEBUF_SIZE" description="The buffer size for console output" default="128" />
-#define RT_CONSOLEBUF_SIZE 128
-// <string name="RT_CONSOLE_DEVICE_NAME" description="The device name for console" default="uart" />
-#define RT_CONSOLE_DEVICE_NAME "console"
-// </section>
+#define RT_CONSOLEBUF_SIZE 128
+#define RT_CONSOLE_DEVICE_NAME "console"
+/* RT_USING_MODULE is not set */
+
+/* RT-Thread Components */
+
+/* RT_USING_COMPONENTS_INIT is not set */
+
+/* C++ features */
+
+#define RT_USING_CPLUSPLUS
+
+/* Command shell */
-// <section name="RT_USING_FINSH" description="Using finsh as shell, which is a C-Express shell" default="true" >
#define RT_USING_FINSH
-// <bool name="FINSH_USING_SYMTAB" description="Using symbol table in finsh shell" default="true" />
+#define FINSH_USING_HISTORY
#define FINSH_USING_SYMTAB
-// <bool name="FINSH_USING_DESCRIPTION" description="Keeping description in symbol table" default="true" />
#define FINSH_USING_DESCRIPTION
-// <integer name="FINSH_THREAD_STACK_SIZE" description="The stack size for finsh thread" default="4096" />
-#define FINSH_THREAD_STACK_SIZE 4096
-// <bool name="FINSH_USING_MSH" description="Enable module shell feature" />
+#define FINSH_THREAD_PRIORITY 20
+#define FINSH_THREAD_STACK_SIZE 4096
+#define FINSH_CMD_SIZE 80
+/* FINSH_USING_AUTH is not set */
#define FINSH_USING_MSH
-// <bool name="FINSH_USING_MSH_DEFAULT" description="Use module shell as the default shell" />
#define FINSH_USING_MSH_DEFAULT
-// </section>
+/* FINSH_USING_MSH_ONLY is not set */
-// <section name="LIBC" description="C Runtime library setting" default="always" >
-// <bool name="RT_USING_LIBC" description="Using C library" default="true" />
-// #define RT_USING_LIBC
-// <bool name="RT_USING_PTHREADS" description="Using POSIX threads library" default="true" />
-// #define RT_USING_PTHREADS
-// <bool name="RT_USING_COMPONENTS_INIT" description="Using automatically component initialization." default="true" />
-// #define RT_USING_COMPONENTS_INIT
-// <bool name="RT_USING_MODULE" description="Enable Moudle Application" default="true" />
-// #define RT_USING_MODULE
-// </section>
+/* Device virtual file system */
-// <section name="RT_USING_DFS" description="Device file system" default="true" >
#define RT_USING_DFS
-// <bool name="DFS_USING_WORKDIR" description="Using working directory" default="true" />
#define DFS_USING_WORKDIR
-// <integer name="DFS_FILESYSTEMS_MAX" description="The maximal number of mounted file system" default="4" />
-#define DFS_FILESYSTEMS_MAX 2
-// <integer name="DFS_FD_MAX" description="The maximal number of opened files" default="4" />
-#define DFS_FD_MAX 4
-// <bool name="RT_USING_DFS_ELMFAT" description="Using ELM FatFs" default="true" />
+#define DFS_FILESYSTEMS_MAX 2
+#define DFS_FILESYSTEM_TYPES_MAX 2
+#define DFS_FD_MAX 4
#define RT_USING_DFS_ELMFAT
-// <integer name="RT_DFS_ELM_USE_LFN" description="Support long file name" default="0">
-// <item description="LFN with static LFN working buffer">1</item>
-// <item description="LFN with dynamic LFN working buffer on the stack">2</item>
-// <item description="LFN with dynamic LFN working buffer on the heap">3</item>
-// </integer>
-#define RT_DFS_ELM_USE_LFN 3
-// <integer name="RT_DFS_ELM_CODE_PAGE" description="OEM code page" default="437">
-#define RT_DFS_ELM_CODE_PAGE 437
-// <integer name="RT_DFS_ELM_MAX_LFN" description="Maximal size of file name length" default="255" />
-#define RT_DFS_ELM_MAX_LFN 128
-// <bool name="RT_USING_DFS_YAFFS2" description="Using YAFFS2" default="false" />
-// #define RT_USING_DFS_YAFFS2
-// <bool name="RT_USING_DFS_UFFS" description="Using UFFS" default="false" />
-// #define RT_USING_DFS_UFFS
-// <bool name="RT_USING_DFS_DEVFS" description="Using devfs for device objects" default="true" />
-// #define RT_USING_DFS_DEVFS
-// <bool name="RT_USING_DFS_NFS" description="Using NFS v3 client file system" default="false" />
-// #define RT_USING_DFS_NFS
-// <string name="RT_NFS_HOST_EXPORT" description="NFSv3 host export" default="192.168.1.5:/" />
-#define RT_NFS_HOST_EXPORT "192.168.1.5:/"
-// <bool name="RT_USING_DFS_WINSHAREDIR" description="shared windows file to rtt" default="false" />
-#define RT_USING_DFS_WINSHAREDIR
-// </section>
-// <section name="RT_USING_LWIP" description="lwip, a lightweight TCP/IP protocol stack" default="true" >
-// #define RT_USING_LWIP
-// <bool name="RT_LWIP_ICMP" description="Enable ICMP protocol" default="true" />
-#define RT_LWIP_ICMP
-// <bool name="RT_LWIP_IGMP" description="Enable IGMP protocol" default="false" />
-// #define RT_LWIP_IGMP
-// <bool name="RT_LWIP_UDP" description="Enable UDP protocol" default="true" />
-#define RT_LWIP_UDP
-// <bool name="RT_LWIP_TCP" description="Enable TCP protocol" default="true" />
-#define RT_LWIP_TCP
-// <bool name="RT_LWIP_DNS" description="Enable DNS protocol" default="true" />
-#define RT_LWIP_DNS
-// <bool name="RT_LWIP_SNMP" description="Enable SNMP protocol" default="false" />
-// #define RT_LWIP_SNMP
-// <bool name="RT_LWIP_DHCP" description="Enable DHCP client to get IP address" default="false" />
-// #define RT_LWIP_DHCP
-// <integer name="RT_LWIP_TCPTHREAD_PRIORITY" description="the thread priority of TCP thread" default="128" />
-#define RT_LWIP_TCPTHREAD_PRIORITY 12
-// <integer name="RT_LWIP_TCPTHREAD_MBOX_SIZE" description="the mail box size of TCP thread to wait for" default="32" />
-#define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
-// <integer name="RT_LWIP_TCPTHREAD_STACKSIZE" description="the thread stack size of TCP thread" default="4096" />
-#define RT_LWIP_TCPTHREAD_STACKSIZE 4096
-// <integer name="RT_LWIP_ETHTHREAD_PRIORITY" description="the thread priority of ethnetif thread" default="144" />
-#define RT_LWIP_ETHTHREAD_PRIORITY 14
-// <integer name="RT_LWIP_ETHTHREAD_MBOX_SIZE" description="the mail box size of ethnetif thread to wait for" default="8" />
-#define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
-// <integer name="RT_LWIP_ETHTHREAD_STACKSIZE" description="the stack size of ethnetif thread" default="512" />
-#define RT_LWIP_ETHTHREAD_STACKSIZE 512
-// <ipaddr name="RT_LWIP_IPADDR" description="IP address of device" default="192.168.1.30" />
-#define RT_LWIP_IPADDR0 192
-#define RT_LWIP_IPADDR1 168
-#define RT_LWIP_IPADDR2 1
-#define RT_LWIP_IPADDR3 30
-// <ipaddr name="RT_LWIP_GWADDR" description="Gateway address of device" default="192.168.1.1" />
-#define RT_LWIP_GWADDR0 192
-#define RT_LWIP_GWADDR1 168
-#define RT_LWIP_GWADDR2 1
-#define RT_LWIP_GWADDR3 1
-// <ipaddr name="RT_LWIP_MSKADDR" description="Mask address of device" default="255.255.255.0" />
-#define RT_LWIP_MSKADDR0 255
-#define RT_LWIP_MSKADDR1 255
-#define RT_LWIP_MSKADDR2 255
-#define RT_LWIP_MSKADDR3 0
-// </section>
+/* 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_0
+/* RT_DFS_ELM_USE_LFN_1 is not set */
+/* RT_DFS_ELM_USE_LFN_2 is not set */
+/* RT_DFS_ELM_USE_LFN_3 is not set */
+#define RT_DFS_ELM_USE_LFN 0
+#define RT_DFS_ELM_MAX_LFN 255
+#define RT_DFS_ELM_DRIVES 2
+#define RT_DFS_ELM_MAX_SECTOR_SIZE 512
+/* RT_DFS_ELM_USE_ERASE is not set */
+#define RT_DFS_ELM_REENTRANT
+#define RT_USING_DFS_DEVFS
+/* RT_USING_DFS_NET is not set */
+/* RT_USING_DFS_ROMFS is not set */
+/* RT_USING_DFS_RAMFS is not set */
+/* RT_USING_DFS_UFFS is not set */
+
+/* Device Drivers */
+
+#define RT_USING_DEVICE_IPC
+#define RT_USING_SERIAL
+/* RT_USING_CAN is not set */
+/* RT_USING_HWTIMER is not set */
+/* RT_USING_I2C is not set */
+/* RT_USING_PIN is not set */
+/* RT_USING_MTD_NOR is not set */
+/* RT_USING_MTD_NAND is not set */
+/* RT_USING_RTC is not set */
+/* RT_USING_SDIO is not set */
+/* RT_USING_SPI is not set */
+/* RT_USING_WDT is not set */
+/* RT_USING_WIFI is not set */
+
+/* Using USB */
+
+/* RT_USING_USB_HOST is not set */
+/* RT_USING_USB_DEVICE is not set */
+
+/* POSIX layer and C standard library */
+
+/* RT_USING_LIBC is not set */
+/* RT_USING_PTHREADS is not set */
+
+/* Network stack */
-// <section name="RT_USING_RTGUI" description="RT-Thread/GUI" default="true" >
-// #define RT_USING_RTGUI
-// <integer name="RTGUI_NAME_MAX" description="the name size of RT-Thread/GUI widget/objects" default="12" />
-#define RTGUI_NAME_MAX 12
-// <bool name="RTGUI_USING_SMALL_SIZE" description="use small size in RT-Thread/GUI" default="true" />
-#define RTGUI_USING_SMALL_SIZE
-// <bool name="RTGUI_USING_FONT16" description="support 16 weight font" default="true" />
+/* light weight TCP/IP stack */
+
+/* RT_USING_LWIP is not set */
+
+/* Modbus master and slave stack */
+
+/* RT_USING_MODBUS is not set */
+
+/* RT-Thread UI Engine */
+
+#define RT_USING_GUIENGINE
+#define RTGUI_NAME_MAX 16
+/* RTGUI_USING_TTF is not set */
#define RTGUI_USING_FONT16
-// <bool name="RTGUI_USING_FONT12" description="support 12 weight font" default="true" />
-// #define RTGUI_USING_FONT12
-// <bool name="RTGUI_USING_FONTHZ" description="support Chinese font" default="true" />
-#define RTGUI_USING_FONTHZ
-// <integer name="RTGUI_DEFAULT_FONT_SIZE" description="default font size in RT-Thread/GUI" default="16" />
-#define RTGUI_DEFAULT_FONT_SIZE 16
-// <bool name="RTGUI_USING_DFS_FILERW" description="use RT-Thread/DFS as file interface" default="true" />
-#define RTGUI_USING_DFS_FILERW
-// <bool name="RTGUI_USING_HZ_BMP" description="use Chinese font bitmap engine" default="true" />
-#define RTGUI_USING_HZ_BMP
-// <bool name="RTGUI_IMAGE_XPM" description="Using xpm image in RTGUI" default="true" />
-#define RTGUI_IMAGE_XPM
-// <bool name="RTGUI_IMAGE_JPEG" description="Using jpeg image in RTGUI" default="true" />
-// #define RTGUI_IMAGE_JPEG
-// <bool name="RTGUI_IMAGE_PNG" description="Using PNG image in RTGUI" default="true" />
-// #define RTGUI_IMAGE_PNG
-// <bool name="RTGUI_IMAGE_PNG" description="Using PNG image in RTGUI" default="true" />
-#define RTGUI_IMAGE_BMP
-// <bool name="RTGUI_USING_HZ_FILE" description="use font file as Chinese font" default="false" />
- #define RTGUI_USING_HZ_FILE
-// <bool name="RTGUI_USING_MOUSE_CURSOR" description="use mouse cursor" default="false" />
-#define RTGUI_USING_MOUSE_CURSOR
-// </section>
+#define RTGUI_USING_FONT12
+/* RTGUI_USING_FONTHZ is not set */
+/* RTGUI_IMAGE_XPM is not set */
+#define RTGUI_IMAGE_JPEG_NONE
+/* RTGUI_IMAGE_JPEG is not set */
+/* RTGUI_IMAGE_TJPGD is not set */
+/* RTGUI_IMAGE_PNG_NONE is not set */
+/* RTGUI_IMAGE_PNG is not set */
+#define RTGUI_IMAGE_LODEPNG
+/* RTGUI_IMAGE_BMP is not set */
+#define RTGUI_IMAGE_CONTAINER
+#define RTGUI_USING_DEMO
+
+/* VBUS(Virtual Software BUS) */
+
+/* RT_USING_VBUS is not set */
+
+/* Utilities */
+
+/* RT_USING_LOGTRACE is not set */
+/* RT_USING_RYM is not set */
+
+/* RT-Thread online packages */
+
+/* system packages */
+
+/* PKG_USING_PARTITION is not set */
+/* PKG_USING_SQLITE is not set */
+/* PKG_USING_RTI is not set */
+
+/* IoT - internet of things */
-// </RDTConfigurator>
+/* PKG_USING_PAHOMQTT is not set */
+/* PKG_USING_WEBCLIENT is not set */
+/* PKG_USING_MONGOOSE is not set */
+/* PKG_USING_WEBTERMINAL is not set */
+/* PKG_USING_CJSON is not set */
+/* PKG_USING_EZXML is not set */
+/* PKG_USING_NANOPB is not set */
-#define RT_HEAP_SIZE (1024*1024*2)
+/* security packages */
-#if defined(_MSC_VER)
-#define NORESOURCE //RT_VESRION in winuser.h
-#define _CRT_ERRNO_DEFINED //errno macro redefinition
-#define _INC_WTIME_INL//dfs_elm.c time.h conflicts with wtime.inl
-#define _INC_TIME_INL //dfs_elm.c time.h conflicts with wtime.inl
+/* PKG_USING_MBEDTLS is not set */
+/* PKG_USING_libsodium is not set */
+/* PKG_USING_TINYCRYPT is not set */
-/* disable some warning in MSC */
-#pragma warning(disable:4273) /* to ignore: warning C4273: inconsistent dll linkage */
-#pragma warning(disable:4312) /* to ignore: warning C4312: 'type cast' : conversion from 'rt_uint32_t' to 'rt_uint32_t *' */
-#pragma warning(disable:4311) /* to ignore: warning C4311: 'type cast' : pointer truncation from 'short *__w64 ' to 'long' */
-#pragma warning(disable:4996) /* to ignore: warning C4996: The POSIX name for this item is deprecated. */
-#pragma warning(disable:4267) /* to ignore: warning C4267: conversion from 'size_t' to 'rt_size_t', possible loss of data */
-#pragma warning(disable:4244) /* to ignore: warning C4244: '=' : conversion from '__w64 int' to 'rt_size_t', possible loss of data */
+/* language packages */
-#elif defined(__GNUC__)
-#define RT_USING_NOLIBC
+/* PKG_USING_JERRYSCRIPT is not set */
+/* PKG_USING_MICROPYTHON is not set */
-#endif /* end of _MSC_VER */
+/* multimedia packages */
+
+/* PKG_USING_OPENMV is not set */
+
+/* tools packages */
+
+/* PKG_USING_CMBACKTRACE is not set */
+/* PKG_USING_EASYLOGGER is not set */
+/* PKG_USING_SYSTEMVIEW is not set */
+/* PKG_USING_IPERF is not set */
+
+/* miscellaneous packages */
+
+/* PKG_USING_FASTLZ is not set */
+/* PKG_USING_MINILZO is not set */
+
+/* example package: hello */
+
+/* PKG_USING_HELLO is not set */
+
+/* Privated Packages of RealThread */
+
+/* PKG_USING_CODEC is not set */
+/* PKG_USING_PLAYER is not set */
+
+/* Network Utilities */
+
+#define RT_USING_DFS_WINSHAREDIR
+#include "rtconfig_project.h"
#endif
diff --git a/bsp/simulator/rtconfig_project.h b/bsp/simulator/rtconfig_project.h
new file mode 100644
index 0000000000..bdf1792cd1
--- /dev/null
+++ b/bsp/simulator/rtconfig_project.h
@@ -0,0 +1,25 @@
+#ifndef RTCONFIG_PROJECT_H__
+#define RTCONFIG_PROJECT_H__
+
+#define RT_HEAP_SIZE (1024*1024*2)
+
+#if defined(_MSC_VER)
+#define NORESOURCE //RT_VESRION in winuser.h
+#define _CRT_ERRNO_DEFINED //errno macro redefinition
+#define _INC_WTIME_INL//dfs_elm.c time.h conflicts with wtime.inl
+#define _INC_TIME_INL //dfs_elm.c time.h conflicts with wtime.inl
+
+/* disable some warning in MSC */
+#pragma warning(disable:4273) /* to ignore: warning C4273: inconsistent dll linkage */
+#pragma warning(disable:4312) /* to ignore: warning C4312: 'type cast' : conversion from 'rt_uint32_t' to 'rt_uint32_t *' */
+#pragma warning(disable:4311) /* to ignore: warning C4311: 'type cast' : pointer truncation from 'short *__w64 ' to 'long' */
+#pragma warning(disable:4996) /* to ignore: warning C4996: The POSIX name for this item is deprecated. */
+#pragma warning(disable:4267) /* to ignore: warning C4267: conversion from 'size_t' to 'rt_size_t', possible loss of data */
+#pragma warning(disable:4244) /* to ignore: warning C4244: '=' : conversion from '__w64 int' to 'rt_size_t', possible loss of data */
+
+#elif defined(__GNUC__)
+#define RT_USING_NOLIBC
+
+#endif /* end of _MSC_VER */
+
+#endif
diff --git a/components/gui/include/rtgui/color.h b/components/gui/include/rtgui/color.h
index cf6ef08623..f47189bd84 100644
--- a/components/gui/include/rtgui/color.h
+++ b/components/gui/include/rtgui/color.h
@@ -69,7 +69,11 @@ extern const rtgui_color_t default_background;
#define HIGH_LIGHT RTGUI_RGB(0xfc, 0xfc, 0xfc)
#define DARK_GREY RTGUI_RGB(0x7f, 0x7f, 0x7f)
#define LIGHT_GREY RTGUI_RGB(0xc0, 0xc0, 0xc0)
-#define TRANSPARENT RTGUI_ARGB(0, 0, 0, 0)
+
+#ifdef TRANSPARENT
+#undef TRANSPARENT
+#define TRANSPARENT 0
+#endif
extern const rtgui_color_t red;
extern const rtgui_color_t green;
diff --git a/components/gui/src/rtgui_app.c b/components/gui/src/rtgui_app.c
index 3488cbeced..9878ff4ea7 100644
--- a/components/gui/src/rtgui_app.c
+++ b/components/gui/src/rtgui_app.c
@@ -23,10 +23,13 @@
* 2012-07-07 Bernard move the send/recv message to the rtgui_system.c
*/
+#include <rthw.h>
+#include <rtthread.h>
+
#include <rtgui/rtgui_system.h>
#include <rtgui/rtgui_app.h>
#include <rtgui/widgets/window.h>
-#include <topwin.h>
+#include "topwin.h"
static void _rtgui_app_constructor(struct rtgui_app *app)
{
diff --git a/tools/codeblocks.py b/tools/codeblocks.py
index cb07956e73..7db82b49e9 100644
--- a/tools/codeblocks.py
+++ b/tools/codeblocks.py
@@ -31,17 +31,20 @@ import xml.etree.ElementTree as etree
from xml.etree.ElementTree import SubElement
from utils import _make_path_relative
from utils import xml_indent
+
+import utils
+
fs_encoding = sys.getfilesystemencoding()
def CB_AddHeadFiles(program, elem, project_path):
- building.source_ext = []
- building.source_ext = ["h"]
+ utils.source_ext = []
+ utils.source_ext = ["h"]
for item in program:
- building.walk_children(item)
- building.source_list.sort()
- # print building.source_list
+ utils.walk_children(item)
+ utils.source_list.sort()
+ # print utils.source_list
- for f in building.source_list:
+ for f in utils.source_list:
path = _make_path_relative(project_path, f)
Unit = SubElement(elem, 'Unit')
Unit.set('filename', path.decode(fs_encoding))
diff --git a/tools/utils.py b/tools/utils.py
index 0fa8cc742e..b0472b6f2e 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -103,3 +103,24 @@ def xml_indent(elem, level=0):
else:
if level and (not elem.tail or not elem.tail.strip()):
elem.tail = i
+
+
+source_ext = ["c", "h", "s", "S", "cpp", "xpm"]
+source_list = []
+
+def walk_children(child):
+ global source_list
+ global source_ext
+
+ # print child
+ full_path = child.rfile().abspath
+ file_type = full_path.rsplit('.',1)[1]
+ #print file_type
+ if file_type in source_ext:
+ if full_path not in source_list:
+ source_list.append(full_path)
+
+ children = child.all_children()
+ if children != []:
+ for item in children:
+ walk_children(item)
diff --git a/tools/vs.py b/tools/vs.py
index cdad83cd10..43d25ec87f 100644
--- a/tools/vs.py
+++ b/tools/vs.py
@@ -26,6 +26,7 @@ import os
import sys
import string
import building
+import utils
import xml.etree.ElementTree as etree
from xml.etree.ElementTree import SubElement
@@ -59,14 +60,14 @@ def VS_AddGroup(ProjectFiles, parent, name, files, libs, project_path):
File.set('RelativePath', path.decode(fs_encoding))
def VS_AddHeadFilesGroup(program, elem, project_path):
- building.source_ext = []
- building.source_ext = ["h"]
+ utils.source_ext = []
+ utils.source_ext = ["h"]
for item in program:
- building.walk_children(item)
- building.source_list.sort()
- # print building.source_list
+ utils.walk_children(item)
+ utils.source_list.sort()
+ # print utils.source_list
- for f in building.source_list:
+ for f in utils.source_list:
path = _make_path_relative(project_path, f)
File = SubElement(elem, 'File')
File.set('RelativePath', path.decode(fs_encoding))
diff --git a/tools/vs2012.py b/tools/vs2012.py
index 63457e0a0a..76850279bb 100644
--- a/tools/vs2012.py
+++ b/tools/vs2012.py
@@ -32,6 +32,8 @@ import xml.etree.ElementTree as etree
from xml.etree.ElementTree import SubElement
from utils import _make_path_relative
from utils import xml_indent
+import utils
+
fs_encoding = sys.getfilesystemencoding()
#reference
@@ -123,12 +125,12 @@ def VS_add_ItemGroup(parent, file_type, files, project_path):
ObjName.text = ''.join('$(IntDir)'+objpath+'\\')
def VS_add_HeadFiles(program, elem, project_path):
- building.source_ext = []
- building.source_ext = ["h"]
+ utils.source_ext = []
+ utils.source_ext = ["h"]
for item in program:
- building.walk_children(item)
- building.source_list.sort()
- # print building.source_list
+ utils.walk_children(item)
+ utils.source_list.sort()
+ # print utils.source_list
ItemGroup = SubElement(elem, 'ItemGroup')
filter_h_ItemGroup = SubElement(filter_project, 'ItemGroup')