File tree Expand file tree Collapse file tree 5 files changed +21
-10
lines changed
components/utilities/utest Expand file tree Collapse file tree 5 files changed +21
-10
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ CONFIG_RT_USING_DEVICE=y
7777# CONFIG_RT_USING_DM is not set
7878# CONFIG_RT_USING_INTERRUPT_INFO is not set
7979CONFIG_RT_USING_CONSOLE=y
80- CONFIG_RT_CONSOLEBUF_SIZE=128
80+ CONFIG_RT_CONSOLEBUF_SIZE=256
8181CONFIG_RT_CONSOLE_DEVICE_NAME="console"
8282CONFIG_RT_VER_NUM=0x50001
8383# CONFIG_RT_USING_STDC_ATOMIC is not set
Original file line number Diff line number Diff line change @@ -66,6 +66,12 @@ SECTIONS
6666
6767 /* setction information for finsh shell begin */
6868 . = ALIGN (8 );
69+ UtestTcTab : {
70+ __rt_utest_tc_tab_start = .;
71+ KEEP (*(UtestTcTab))
72+ __rt_utest_tc_tab_end = .;
73+ }
74+ . = ALIGN (8 );
6975 FSymTab : {
7076 __fsymtab_start = .;
7177 KEEP (*(FSymTab))
Original file line number Diff line number Diff line change 4242
4343#define RT_USING_DEVICE
4444#define RT_USING_CONSOLE
45- #define RT_CONSOLEBUF_SIZE 128
45+ #define RT_CONSOLEBUF_SIZE 256
4646#define RT_CONSOLE_DEVICE_NAME "console"
4747#define RT_VER_NUM 0x50001
4848
Original file line number Diff line number Diff line change @@ -88,19 +88,19 @@ int utest_init(void)
8888#elif defined (__ICCARM__ ) || defined(__ICCRX__ ) /* for IAR Compiler */
8989 tc_table = (utest_tc_export_t )__section_begin ("UtestTcTab" );
9090 tc_num = (utest_tc_export_t )__section_end ("UtestTcTab" ) - tc_table ;
91- #elif defined (__GNUC__ ) /* for GCC Compiler */
91+ #else
92+ unsigned int * ptr_begin , * ptr_end ;
93+ #if defined(__GNUC__ )
9294 extern const int __rt_utest_tc_tab_start ;
9395 extern const int __rt_utest_tc_tab_end ;
94- tc_table = (utest_tc_export_t )& __rt_utest_tc_tab_start ;
95- tc_num = (utest_tc_export_t ) & __rt_utest_tc_tab_end - tc_table ;
96+ ptr_begin = (unsigned int * )& __rt_utest_tc_tab_start ;
97+ ptr_end = (unsigned int * ) & __rt_utest_tc_tab_end ;
9698#elif defined(_MSC_VER )
97- unsigned int * ptr_begin , * ptr_end ;
98-
99- ptr_begin = (unsigned int * )& __tc_export_begin ;
99+ ptr_begin = (unsigned int * )& __tc_export_begin ;
100+ ptr_end = (unsigned int * )& __tc_export_end ;
100101 ptr_begin += (sizeof (struct utest_tc_export ) / sizeof (unsigned int ));
102+ #endif
101103 while (* ptr_begin == 0 ) ptr_begin ++ ;
102-
103- ptr_end = (unsigned int * )& __tc_export_end ;
104104 ptr_end -- ;
105105 while (* ptr_end == 0 ) ptr_end -- ;
106106 /* copy tc_table from rodata section to ram */
Original file line number Diff line number Diff line change @@ -1574,8 +1574,13 @@ rt_inline void _heap_unlock(rt_base_t level)
15741574
15751575#ifdef RT_USING_UTESTCASES
15761576/* export to utest to observe the inner statements */
1577+ #ifdef _MSC_VER
1578+ #define rt_heap_lock () _heap_lock()
1579+ #define rt_heap_unlock () _heap_unlock()
1580+ #else
15771581rt_base_t rt_heap_lock (void ) __attribute__((alias ("_heap_lock" )));
15781582void rt_heap_unlock (rt_base_t level ) __attribute__((alias ("_heap_unlock" )));
1583+ #endif /* _MSC_VER */
15791584#endif
15801585
15811586#if defined(RT_USING_SMALL_MEM_AS_HEAP )
You can’t perform that action at this time.
0 commit comments