1 /* RT-Thread config file */ 2 #ifndef __RTTHREAD_CFG_H__ 3 #define __RTTHREAD_CFG_H__ 4 5 //add by mojingxian.defualt idle stack is too small. 6 #define IDLE_THREAD_STACK_SIZE 512 7 8 /* RT_NAME_MAX*/ 9 #define RT_NAME_MAX 32 10 11 /* RT_ALIGN_SIZE*/ 12 #define RT_ALIGN_SIZE 8 13 14 /* PRIORITY_MAX */ 15 #define RT_THREAD_PRIORITY_MAX 256 16 17 /* Tick per Second */ 18 #define RT_TICK_PER_SECOND 1000 19 20 /* SECTION: RT_DEBUG */ 21 /* Thread Debug */ 22 /* #define RT_DEBUG */ 23 /* #define RT_THREAD_DEBUG */ 24 25 #define RT_USING_OVERFLOW_CHECK 26 27 /* Using Hook */ 28 #define RT_USING_HOOK 29 30 /* Using Software Timer */ 31 //#define RT_USING_TIMER_SOFT 32 #define RT_TIMER_THREAD_PRIO 8 33 #define RT_TIMER_THREAD_STACK_SIZE 512 34 #define RT_TICK_PER_SECOND 1000 35 36 /* SECTION: IPC */ 37 /* Using Semaphore */ 38 #define RT_USING_SEMAPHORE 39 40 /* Using Mutex */ 41 #define RT_USING_MUTEX 42 43 /* Using Event */ 44 #define RT_USING_EVENT 45 46 /* Using MailBox */ 47 #define RT_USING_MAILBOX 48 49 /* Using Message Queue */ 50 #define RT_USING_MESSAGEQUEUE 51 52 /* SECTION: Memory Management */ 53 /* Using Memory Pool Management*/ 54 #define RT_USING_MEMPOOL 55 56 /* Using Dynamic Heap Management */ 57 #define RT_USING_HEAP 58 59 /* Using Small MM */ 60 #define RT_USING_SMALL_MEM 61 62 /* Using SLAB Allocator */ 63 //#define RT_USING_SLAB 64 65 /* SECTION: Device System */ 66 /* Using Device System */ 67 #define RT_USING_DEVICE 68 69 /* Using Module System */ 70 //#define RT_USING_MODULE 71 72 /* SECTION: Console options */ 73 #define RT_USING_CONSOLE 74 75 /* the buffer size of console */ 76 #define RT_CONSOLEBUF_SIZE 128 77 78 /* SECTION: finsh, a C-Express shell */ 79 /* Using FinSH as Shell*/ 80 #define RT_USING_FINSH 81 /* Using symbol table */ 82 #define FINSH_USING_SYMTAB 83 #define FINSH_USING_DESCRIPTION 84 #define FINSH_THREAD_STACK_SIZE 1024 85 86 /* SECTION: a runtime libc library */ 87 /* a runtime libc library */ 88 //#define RT_USING_NEWLIBC 89 //#define RT_USING_PTHREADS 90 91 /* SECTION: C++ support */ 92 /* Using C++ support */ 93 /* #define RT_USING_CPLUSPLUS */ 94 95 /* SECTION: Device filesystem support */ 96 /* using DFS support */ 97 //#define RT_USING_DFS 98 #define RT_USING_DFS_ELMFAT 99 /* use long file name feature */ 100 #define RT_DFS_ELM_USE_LFN 1 101 /* the max number of file length */ 102 #define RT_DFS_ELM_MAX_LFN 128 103 /* #define RT_USING_DFS_YAFFS2 */ 104 /* #define RT_USING_DFS_UFFS */ 105 #define RT_USING_DFS_DEVFS 106 107 /* #define RT_USING_DFS_NFS */ 108 #define RT_NFS_HOST_EXPORT "192.168.1.5:/" 109 110 #define DFS_USING_WORKDIR 111 112 /* the max number of mounted filesystem */ 113 #define DFS_FILESYSTEMS_MAX 4 114 /* the max number of opened files */ 115 #define DFS_FD_MAX 16 116 /* the max number of cached sector */ 117 #define DFS_CACHE_MAX_NUM 4 118 119 /* Enable freemodbus protocal stack*/ 120 /* #define RT_USING_MODBUS */ 121 122 /* SECTION: lwip, a lighwight TCP/IP protocol stack */ 123 /* Using lighweight TCP/IP protocol stack */ 124 /* #define RT_USING_LWIP */ 125 //#define RT_LWIP_DNS 126 127 /* Trace LwIP protocol */ 128 /* #define RT_LWIP_DEBUG */ 129 130 /* Enable ICMP protocol */ 131 #define RT_LWIP_ICMP 132 133 /* Enable IGMP protocol */ 134 #define RT_LWIP_IGMP 135 136 /* Enable UDP protocol */ 137 #define RT_LWIP_UDP 138 139 /* Enable TCP protocol */ 140 #define RT_LWIP_TCP 141 142 /* the number of simulatenously active TCP connections*/ 143 #define RT_LWIP_TCP_PCB_NUM 5 144 145 /* TCP sender buffer space */ 146 #define RT_LWIP_TCP_SND_BUF 1024*8 147 148 /* TCP receive window. */ 149 #define RT_LWIP_TCP_WND 1024*8 150 151 /* Enable SNMP protocol */ 152 /* #define RT_LWIP_SNMP */ 153 154 /* Using DHCP */ 155 /* #define RT_LWIP_DHCP */ 156 157 /* ip address of target */ 158 #define RT_LWIP_IPADDR0 192 159 #define RT_LWIP_IPADDR1 168 160 #define RT_LWIP_IPADDR2 1 161 #define RT_LWIP_IPADDR3 30 162 163 /* gateway address of target */ 164 #define RT_LWIP_GWADDR0 192 165 #define RT_LWIP_GWADDR1 168 166 #define RT_LWIP_GWADDR2 1 167 #define RT_LWIP_GWADDR3 1 168 169 /* mask address of target */ 170 #define RT_LWIP_MSKADDR0 255 171 #define RT_LWIP_MSKADDR1 255 172 #define RT_LWIP_MSKADDR2 255 173 #define RT_LWIP_MSKADDR3 0 174 175 /* the number of blocks for pbuf */ 176 #define RT_LWIP_PBUF_NUM 16 177 178 /* the number of simultaneously queued TCP */ 179 #define RT_LWIP_TCP_SEG_NUM 40 180 181 /* thread priority of tcpip thread */ 182 #define RT_LWIP_TCPTHREAD_PRIORITY 128 183 184 /* mail box size of tcpip thread to wait for */ 185 #define RT_LWIP_TCPTHREAD_MBOX_SIZE 32 186 187 /* thread stack size of tcpip thread */ 188 #define RT_LWIP_TCPTHREAD_STACKSIZE 4096 189 190 /* thread priority of ethnetif thread */ 191 #define RT_LWIP_ETHTHREAD_PRIORITY 144 192 193 /* mail box size of ethnetif thread to wait for */ 194 #define RT_LWIP_ETHTHREAD_MBOX_SIZE 32 195 196 /* thread stack size of ethnetif thread */ 197 #define RT_LWIP_ETHTHREAD_STACKSIZE 1024 198 199 /* SECTION: RTGUI support */ 200 /* using RTGUI support */ 201 #define RT_USING_RTGUI 202 203 /* name length of RTGUI object */ 204 #define RTGUI_NAME_MAX 16 205 /* support 16 weight font */ 206 #define RTGUI_USING_FONT16 207 /* support 16 weight font */ 208 #define RTGUI_USING_FONT12 209 /* support Chinese font */ 210 #define RTGUI_USING_FONTHZ 211 /* use DFS as file interface */ 212 #define RTGUI_USING_DFS_FILERW 213 /* use font file as Chinese font */ 214 /* #define RTGUI_USING_HZ_FILE */ 215 /* use Chinese bitmap font */ 216 #define RTGUI_USING_HZ_BMP 217 /* use small size in RTGUI */ 218 /* #define RTGUI_USING_SMALL_SIZE */ 219 /* use mouse cursor */ 220 /* #define RTGUI_USING_MOUSE_CURSOR */ 221 /* RTGUI image options */ 222 //#define RTGUI_IMAGE_XPM 223 //#define RTGUI_IMAGE_JPEG 224 //#define RTGUI_IMAGE_PNG 225 //#define RTGUI_IMAGE_BMP 226 227 /* SECTION: FTK support */ 228 /* using FTK support */ 229 /* #define RT_USING_FTK */ 230 231 /* 232 * Note on FTK: 233 * 234 * FTK depends : 235 * #define RT_USING_NEWLIBC 236 * #define DFS_USING_WORKDIR 237 * 238 * And the maximal length must great than 64 239 * #define RT_DFS_ELM_MAX_LFN 128 240 */ 241 242 #endif 243