Skip to content

Commit bd44c1e

Browse files
authored
Merge pull request #4970 from cndabai/master
Remove C Style Command Shell
2 parents f3df67d + 782c288 commit bd44c1e

File tree

59 files changed

+558
-5942
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+558
-5942
lines changed

bsp/lm3s8962/applications/startup.c

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
#include "board.h"
1919

2020
#ifdef RT_USING_LWIP
21-
#include <lwip/sys.h>
22-
#include <netif/ethernetif.h>
21+
#include <lwip/sys.h>
22+
#include <netif/ethernetif.h>
2323
#endif
2424

2525
/**
@@ -30,20 +30,20 @@ extern void rt_hw_serial_init(void);
3030

3131
/*@{*/
3232
#ifdef RT_USING_FINSH
33-
extern int finsh_system_init(void);
34-
extern void finsh_set_device(char* device);
33+
extern int finsh_system_init(void);
34+
extern void finsh_set_device(const char *device);
3535
#endif
3636

3737
extern int rt_application_init(void);
3838
extern void rt_hw_sdcard_init(void);
3939
extern int rt_hw_luminaryif_init(void);
4040

4141
#ifdef __CC_ARM
42-
extern int Image$$RW_IRAM1$$ZI$$Limit;
42+
extern int Image$$RW_IRAM1$$ZI$$Limit;
4343
#elif __ICCARM__
44-
#pragma section="HEAP"
44+
#pragma section="HEAP"
4545
#else
46-
extern int __bss_end;
46+
extern int __bss_end;
4747
#endif
4848

4949
#ifdef DEBUG
@@ -56,13 +56,13 @@ extern int __bss_end;
5656
* Output : None
5757
* Return : None
5858
*******************************************************************************/
59-
void assert_failed(u8* file, u32 line)
59+
void assert_failed(u8 *file, u32 line)
6060
{
61-
rt_kprintf("\n\r Wrong parameter value detected on\r\n");
62-
rt_kprintf(" file %s\r\n", file);
63-
rt_kprintf(" line %d\r\n", line);
61+
rt_kprintf("\n\r Wrong parameter value detected on\r\n");
62+
rt_kprintf(" file %s\r\n", file);
63+
rt_kprintf(" line %d\r\n", line);
6464

65-
while (1) ;
65+
while (1) ;
6666
}
6767
#endif
6868

@@ -71,76 +71,76 @@ void assert_failed(u8* file, u32 line)
7171
*/
7272
void rtthread_startup(void)
7373
{
74-
/* init board */
75-
rt_hw_board_init();
74+
/* init board */
75+
rt_hw_board_init();
7676

77-
/* show version */
78-
rt_show_version();
77+
/* show version */
78+
rt_show_version();
7979

80-
/* init timer system */
81-
rt_system_timer_init();
80+
/* init timer system */
81+
rt_system_timer_init();
8282

8383
#ifdef RT_USING_HEAP
8484
#ifdef __CC_ARM
85-
rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)LM3S_SRAM_END);
85+
rt_system_heap_init((void *)&Image$$RW_IRAM1$$ZI$$Limit, (void *)LM3S_SRAM_END);
8686
#elif __ICCARM__
87-
rt_system_heap_init(__segment_end("HEAP"), (void*)LM3S_SRAM_END);
87+
rt_system_heap_init(__segment_end("HEAP"), (void *)LM3S_SRAM_END);
8888
#else
89-
/* init memory system */
90-
rt_system_heap_init((void*)&__bss_end, (void*)LM3S_SRAM_END);
89+
/* init memory system */
90+
rt_system_heap_init((void *)&__bss_end, (void *)LM3S_SRAM_END);
9191
#endif
9292
#endif
9393

94-
#ifdef RT_USING_MODULE
95-
/* init module system */
96-
rt_system_module_init();
94+
#ifdef RT_USING_MODULE
95+
/* init module system */
96+
rt_system_module_init();
9797
#endif
9898

99-
/* init scheduler system */
100-
rt_system_scheduler_init();
99+
/* init scheduler system */
100+
rt_system_scheduler_init();
101101

102102
#ifdef RT_USING_LWIP
103-
eth_system_device_init();
103+
eth_system_device_init();
104104

105-
/* register ethernetif device */
106-
rt_hw_luminaryif_init();
105+
/* register ethernetif device */
106+
rt_hw_luminaryif_init();
107107
#endif
108108

109-
/* init hardware serial device */
110-
rt_hw_serial_init();
109+
/* init hardware serial device */
110+
rt_hw_serial_init();
111111
#ifdef RT_USING_DFS
112-
/* init sd card device */
113-
rt_hw_sdcard_init();
112+
/* init sd card device */
113+
rt_hw_sdcard_init();
114114
#endif
115115

116-
/* init application */
117-
rt_application_init();
116+
/* init application */
117+
rt_application_init();
118118

119119
#ifdef RT_USING_FINSH
120-
/* init finsh */
121-
finsh_system_init();
120+
/* init finsh */
121+
finsh_system_init();
122122
#ifdef RT_USING_DEVICE
123-
finsh_set_device("uart1");
123+
finsh_set_device("uart1");
124124
#endif
125125
#endif
126126

127-
/* init idle thread */
128-
rt_thread_idle_init();
127+
/* init idle thread */
128+
rt_thread_idle_init();
129129

130-
/* start scheduler */
131-
rt_system_scheduler_start();
130+
/* start scheduler */
131+
rt_system_scheduler_start();
132132

133-
/* never reach here */
134-
return ;
133+
/* never reach here */
134+
return ;
135135
}
136136

137137
int main(void)
138138
{
139-
/* disable interrupt first */
140-
rt_hw_interrupt_disable();
141-
rtthread_startup();
142-
143-
return 0;
139+
/* disable interrupt first */
140+
rt_hw_interrupt_disable();
141+
rtthread_startup();
142+
143+
return 0;
144144
}
145145

146146
/*@}*/

bsp/lm3s9b9x/applications/startup.c

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
#include "board.h"
1919

2020
#ifdef RT_USING_LWIP
21-
#include <lwip/sys.h>
22-
#include <netif/ethernetif.h>
21+
#include <lwip/sys.h>
22+
#include <netif/ethernetif.h>
2323
#endif
2424

2525
/**
@@ -30,20 +30,20 @@ extern void rt_hw_serial_init(void);
3030

3131
/*@{*/
3232
#ifdef RT_USING_FINSH
33-
extern int finsh_system_init(void);
34-
extern void finsh_set_device(char* device);
33+
extern int finsh_system_init(void);
34+
extern void finsh_set_device(const char *device);
3535
#endif
3636

3737
extern int rt_application_init(void);
3838
extern void rt_hw_sdcard_init(void);
3939
extern int rt_hw_luminaryif_init(void);
4040

4141
#ifdef __CC_ARM
42-
extern int Image$$RW_IRAM1$$ZI$$Limit;
42+
extern int Image$$RW_IRAM1$$ZI$$Limit;
4343
#elif __ICCARM__
44-
#pragma section="HEAP"
44+
#pragma section="HEAP"
4545
#else
46-
extern int __bss_end;
46+
extern int __bss_end;
4747
#endif
4848

4949
#ifdef DEBUG
@@ -56,13 +56,13 @@ extern int __bss_end;
5656
* Output : None
5757
* Return : None
5858
*******************************************************************************/
59-
void __error__(char* file, unsigned long line)
59+
void __error__(char *file, unsigned long line)
6060
{
61-
rt_kprintf("\n\r Wrong parameter value detected on\r\n");
62-
rt_kprintf(" file %s\r\n", file);
63-
rt_kprintf(" line %d\r\n", line);
61+
rt_kprintf("\n\r Wrong parameter value detected on\r\n");
62+
rt_kprintf(" file %s\r\n", file);
63+
rt_kprintf(" line %d\r\n", line);
6464

65-
while (1) ;
65+
while (1) ;
6666
}
6767
#endif
6868

@@ -71,77 +71,77 @@ void __error__(char* file, unsigned long line)
7171
*/
7272
void rtthread_startup(void)
7373
{
74-
/* init board */
75-
rt_hw_board_init();
74+
/* init board */
75+
rt_hw_board_init();
7676

77-
/* show version */
78-
rt_show_version();
77+
/* show version */
78+
rt_show_version();
7979

80-
/* init timer system */
81-
rt_system_timer_init();
80+
/* init timer system */
81+
rt_system_timer_init();
8282

8383
#ifdef RT_USING_HEAP
8484
#if LM3S_EXT_SRAM == 1
85-
/* init sdram */
86-
rt_system_heap_init((void*)LM3S_EXT_SRAM_BEGIN, (void*)LM3S_EXT_SRAM_END);
85+
/* init sdram */
86+
rt_system_heap_init((void *)LM3S_EXT_SRAM_BEGIN, (void *)LM3S_EXT_SRAM_END);
8787
#else
8888
#ifdef __CC_ARM
89-
rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)LM3S_SRAM_END);
89+
rt_system_heap_init((void *)&Image$$RW_IRAM1$$ZI$$Limit, (void *)LM3S_SRAM_END);
9090
#elif __ICCARM__
91-
rt_system_heap_init(__segment_end("HEAP"), (void*)LM3S_SRAM_END);
91+
rt_system_heap_init(__segment_end("HEAP"), (void *)LM3S_SRAM_END);
9292
#else
93-
/* init memory system */
94-
rt_system_heap_init((void*)&__bss_end, (void*)LM3S_SRAM_END);
93+
/* init memory system */
94+
rt_system_heap_init((void *)&__bss_end, (void *)LM3S_SRAM_END);
9595
#endif
9696
#endif
9797
#endif
9898

99-
/* init scheduler system */
100-
rt_system_scheduler_init();
99+
/* init scheduler system */
100+
rt_system_scheduler_init();
101101

102102
#ifdef RT_USING_LWIP
103-
eth_system_device_init();
103+
eth_system_device_init();
104104

105-
/* register ethernetif device */
106-
rt_hw_luminaryif_init();
105+
/* register ethernetif device */
106+
rt_hw_luminaryif_init();
107107
#endif
108108

109-
/* init hardware serial device */
110-
rt_hw_serial_init();
109+
/* init hardware serial device */
110+
rt_hw_serial_init();
111111
#ifdef RT_USING_DFS
112-
/* init sd card device */
113-
rt_hw_sdcard_init();
112+
/* init sd card device */
113+
rt_hw_sdcard_init();
114114
#endif
115115

116-
/* init application */
117-
rt_application_init();
116+
/* init application */
117+
rt_application_init();
118118

119119
#ifdef RT_USING_FINSH
120-
/* init finsh */
121-
finsh_system_init();
120+
/* init finsh */
121+
finsh_system_init();
122122
#ifdef RT_USING_DEVICE
123-
finsh_set_device("uart1");
123+
finsh_set_device("uart1");
124124
#endif
125125
#endif
126126

127-
/* init idle thread */
128-
rt_thread_idle_init();
127+
/* init idle thread */
128+
rt_thread_idle_init();
129129

130-
/* start scheduler */
131-
rt_system_scheduler_start();
130+
/* start scheduler */
131+
rt_system_scheduler_start();
132132

133-
/* never reach here */
134-
return ;
133+
/* never reach here */
134+
return ;
135135
}
136136

137137
int main(void)
138138
{
139-
/* disable interrupt first */
139+
/* disable interrupt first */
140140
rt_hw_interrupt_disable();
141141

142-
rtthread_startup();
142+
rtthread_startup();
143143

144-
return 0;
144+
return 0;
145145
}
146146

147147
/*@}*/

0 commit comments

Comments
 (0)