Skip to content

Commit c4ba5ee

Browse files
unicornxmysterywolf
authored andcommitted
kernel: Optimize display format for auto init when debugging
When RT_DEBUGING_AUTO_INIT is enabled, kenrel will add more print message for auto init. However, the original format easily causes the kernel printing and the init function printing to be connected together, resulting in a confusing display format. For exmaple: ``` initialize lwip_system_initlwIP-2.0.3 initialized! :0 done ``` Or ``` initialize sal_init[I/sal.skt] Socket Abstraction Layer initialize success. :0 done ``` Solution: Add a carriage return to separate the kernel printing and the init function printing. After changing, the output will be: ``` initialize lwip_system_init lwIP-2.0.3 initialized! :0 done ``` Or ``` initialize sal_init [I/sal.skt] Socket Abstraction Layer initialize success. :0 done ``` Signed-off-by: Chen Wang <[email protected]>
1 parent ca1d4e6 commit c4ba5ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void rt_components_board_init(void)
9090
const struct rt_init_desc *desc;
9191
for (desc = &__rt_init_desc_rti_board_start; desc < &__rt_init_desc_rti_board_end; desc ++)
9292
{
93-
rt_kprintf("initialize %s", desc->fn_name);
93+
rt_kprintf("initialize %s\n", desc->fn_name);
9494
result = desc->fn();
9595
rt_kprintf(":%d done\n", result);
9696
}
@@ -116,7 +116,7 @@ void rt_components_init(void)
116116
rt_kprintf("do components initialization.\n");
117117
for (desc = &__rt_init_desc_rti_board_end; desc < &__rt_init_desc_rti_end; desc ++)
118118
{
119-
rt_kprintf("initialize %s", desc->fn_name);
119+
rt_kprintf("initialize %s\n", desc->fn_name);
120120
result = desc->fn();
121121
rt_kprintf(":%d done\n", result);
122122
}

0 commit comments

Comments
 (0)