reduce memory use by cmsis rtx

able to run with IAR host cmsis rtx
This commit is contained in:
hathach 2014-03-19 17:26:35 +07:00
parent 61657f6751
commit 7a57428f3e
4 changed files with 30 additions and 30 deletions

View File

@ -417,10 +417,10 @@
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<ColumnNumber>20</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>1</TopLine>
<CurrentLine>1</CurrentLine>
<CurrentLine>3</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\src\main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
@ -449,10 +449,10 @@
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>59</ColumnNumber>
<ColumnNumber>48</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>0</TopLine>
<CurrentLine>0</CurrentLine>
<TopLine>100</TopLine>
<CurrentLine>107</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\src\keyboard_app.c</PathWithFileName>
<FilenameWithoutPath>keyboard_app.c</FilenameWithoutPath>
@ -499,7 +499,7 @@
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>139</TopLine>
<TopLine>140</TopLine>
<CurrentLine>145</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\src\msc_app.c</PathWithFileName>
@ -771,7 +771,7 @@
<Focus>0</Focus>
<ColumnNumber>17</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>366</TopLine>
<TopLine>367</TopLine>
<CurrentLine>373</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\tinyusb\host\usbh.c</PathWithFileName>
@ -969,10 +969,10 @@
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>52</ColumnNumber>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>3</TopLine>
<CurrentLine>9</CurrentLine>
<TopLine>1</TopLine>
<CurrentLine>1</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\vendor\cmsis_rtos_rtx\RTX_Conf_CM.c</PathWithFileName>
<FilenameWithoutPath>RTX_Conf_CM.c</FilenameWithoutPath>
@ -1075,7 +1075,7 @@
<Focus>0</Focus>
<ColumnNumber>68</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>113</TopLine>
<TopLine>114</TopLine>
<CurrentLine>120</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\mcu\lpc43xx\CMSIS_LPC43xx_DriverLib\src\system_LPC43xx.c</PathWithFileName>
@ -1107,7 +1107,7 @@
<Focus>0</Focus>
<ColumnNumber>25</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>159</TopLine>
<TopLine>160</TopLine>
<CurrentLine>166</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\mcu\lpc43xx\keil\startup_LPC43xx.s</PathWithFileName>

View File

@ -158,12 +158,12 @@ typedef osal_queue_t * osal_queue_handle_t;
#define OSAL_QUEUE_DEF(name, queue_depth, type)\
osMailQDef(name, queue_depth, type);
#define OSAL_QUEUE_REF(name) osMailQ(name)
#define OSAL_QUEUE_REF(name) ((osal_queue_t*) osMailQ(name))
static inline osal_queue_handle_t osal_queue_create(osal_queue_t * const p_queue) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline osal_queue_handle_t osal_queue_create(osal_queue_t * const p_queue)
{
return (NULL != osMailCreate(p_queue, NULL)) ? p_queue : NULL;
return (NULL != osMailCreate( (osMailQDef_t const *) p_queue, NULL)) ? p_queue : NULL;
}
static inline void osal_queue_receive (osal_queue_handle_t const queue_hdl, void *p_data, uint32_t msec, tusb_error_t *p_error) ATTR_ALWAYS_INLINE;

View File

@ -115,9 +115,9 @@ _declare_box8 (mp_stk, OS_STKSIZE*4, OS_TASK_CNT-OS_PRIV_CNT+1);
uint32_t const mp_stk_size = sizeof(mp_stk);
/* Memory pool for user specified stack allocation (+main, +timer) */
#ifdef __CODE_RED
__attribute__ (( section(".data.$RAM2") )) // overflow RamLoc32
#endif
//#ifdef __CODE_RED
//__attribute__ (( section(".data.$RAM2") )) // overflow RamLoc32
//#endif
uint64_t os_stack_mem[2+OS_PRIV_CNT+(OS_STACK_SZ/8)];
uint32_t const os_stack_sz = sizeof(os_stack_mem);

View File

@ -62,7 +62,7 @@
// <i> Defines stack size for main thread.
// <i> Default: 200
#ifndef OS_MAINSTKSIZE
#define OS_MAINSTKSIZE 200
#define OS_MAINSTKSIZE 50
#endif
// <o>Number of threads with user-provided stack size <0-250>
@ -76,7 +76,7 @@
// <i> Defines the combined stack size for threads with user-provided stack size.
// <i> Default: 0
#ifndef OS_PRIVSTKSIZE
#define OS_PRIVSTKSIZE (8*1024)
#define OS_PRIVSTKSIZE (3*1024)
#endif
// <q>Check for stack overflow