1. rt_console_get_device should be call to set shell device only when it is null, or it will make finsh_set_device useless.
2. RT_USING_CONSOLE can be disabled in bsp/rtconfig.h
As the svc stack is the stack of threads, there is no need to allocate a
separate stack for the startup. Reuse the IRQ stack should be OK.
Tested on rm48 board.
1. fix heap management for stm32f0xx(SRAM=8k)
2. add USART1, USART2 driver for stm32f051R8
3. fix finsh support for stm32f0x
4. fix board components initial for stm32f0x and open debug msg
5. add led driver(pc9) and test thread for stm32f0discovery board
6. add init thread for stm32f0x do components initial
7. add rcc initial for stm32f0x in rt_hw_board_init()
8. add print rcc freq information function
the console output example is:
SYSCLK_Frequency is 48000000HZ
PCLK_Frequency is 48000000HZ
HCLK_Frequency is 48000000HZ
CECCLK_Frequency is 32786HZ
ADCCLK_Frequency is 14000000HZ
USART1CLK_Frequency is 48000000HZ
I2C1CLK_Frequency is 8000000HZ
SystemCoreClock is 48000000HZ
initialize rti_start:0 done
\ | /
- RT - Thread Operating System
/ | \ 1.2.0 build Nov 15 2013
2006 - 2013 Copyright by rt-thread team
do components intialization.
initialize rti_board_end:0 done
initialize rt_hw_led_init:32768 done
initialize finsh_system_init:0 done
finsh>>
for 2013-02-20 aozima commmit "port for gcc", but the commit is
not tested,and the kernel is breakdown in context_gcc.S, the file
is a copy from cortex-m3,but not port for cortex-m0, so i complete
this port for aozima, test it in stm32f0discovery board ,
and it works fine.
After `log_trace_init()`, call `memlog_init`. It then turn the logtrace
into a "in-memory" logger which will buffer all the log in memory. It
also set a hook in idle to flush all the log into console. One may
create an other thread to flush the logs but idle might be the simplest
place to go.
With new timer algorithm, timer should be initialized during startup. So
add them to the bsps. Use these commands to get which bsp is missing
calling the function:
% git grep rt_system_timer_init bsp|sed -n 's|bsp/\([^/]*\).*|\1|p' | sort | uniq > have_tm_init
% ls -1 bsp |sed -n 's|\([^/]*\).*|\1|p' | sort > all_bsp
% comm -3 all_bsp have_tm_init
beaglebone
lpc176x
lpc178x
ls1bdev
mb9bf506r
stm32f10x
xplorer4330
We split the history handling form the key handling. So we could handle
the direction key even if the history is disabled. As a "side effect", I
also remove the unnecessary "use_history" bit.
Mutex has the idea of ownership, only the thread which owns the mutex
can release it. So rt_mutex_release could only be called in thread
context. Add a debug guard to it.
Skip list is a "random" data structure that in high possibilities it
would get O(log(N)) time complexity in inserting while the old list get
O(N). Forthermore, when set RT_TIMER_SKIP_LIST_LEVEL to 1, it will just
the same as the old double linked list, both in time and space
complexity.
Benchmarks shows that when RT_TIMER_SKIP_LIST_LEVEL is 3, the average
time of random insertion of new timer is about 2 times faster than the
old timer when there are 100 timers and 3 times faster when there are
200 timers.
However, it restores the deprecated funcion rt_system_timer_init. BSPs
must invoke it upon system startup.