Commit Graph

2890 Commits

Author SHA1 Message Date
Grissiom 377c6e6cc9 cortex-r4: dump register on traps
We could not handle any traps except IRQ/FIQ.
2013-10-20 23:46:50 +08:00
Grissiom e1e563e85c cortex-r4: remove RM48x50.h and add armv7.h 2013-10-20 21:10:26 +08:00
Grissiom d3648dbc9f rm48x50: cleanup sys_startup.c 2013-10-20 18:51:47 +08:00
Grissiom 81ab083ae5 rm48: move some asm file to libcpu 2013-10-20 18:51:46 +08:00
Grissiom 9568669109 rm48x50: add GCC support 2013-10-20 18:51:45 +08:00
Grissiom 2f4329430d rm48x50: cleanup HALCoGen code 2013-10-20 04:04:59 +08:00
Grissiom 6bcf1bc48b rm48x50: fix the prototype of finsh_system_init 2013-10-19 21:10:49 +08:00
Bernard Xiong a0ffbc1fb8 Merge pull request #179 from grissiom/finsh-ex
Finsh ex
2013-10-18 17:06:36 -07:00
Grissiom 1e01252824 finsh: refactor the control key handling
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.
2013-10-18 22:36:51 +08:00
Bernard Xiong 3eac58ce8e Merge pull request #173 from grissiom/new-timer
kernel: use skip list to implement timer list
2013-10-17 15:44:20 -07:00
Bernard Xiong c29ff6b0ac Merge pull request #161 from aozima/pulls
make sure the device is in STREAM mode when used by rt_kprintf.
2013-10-17 15:43:56 -07:00
Bernard Xiong 8d5dfec3b7 Merge pull request #162 from joyhope/master
UART DMA tx_complete() with buffer information
2013-10-17 15:40:50 -07:00
Bernard Xiong b17ca1fa17 Merge pull request #178 from prife/jffs2
simulator/jffs2: remove _TIME_T_DEFINED when built by VC++
2013-10-17 15:39:01 -07:00
prife 3a33906ab1 simulator/jffs2: remove _TIME_T_DEFINED when built by VC++
_TIME_T_DEFINED was pre-defined in order to build jffs2 with VC.
While it may cause many side effects.
2013-10-17 23:47:08 +08:00
Bernard Xiong 887076bab1 Merge pull request #175 from prife/simulator
simulator: add createdef.py to generate def file for VS
2013-10-14 16:24:03 -07:00
Bernard Xiong 28caaecee3 Merge pull request #174 from grissiom/rtt-next
kernel: mutex could only be released in thread context
2013-10-14 16:23:43 -07:00
prife 5641360b49 simulator: add createdef.py to generate def file for VS
Now we can get rid off Mingw to create def file. To create def file, one
should run:

    scons --def

in the bsp/simulator.
2013-10-14 22:53:59 +08:00
Grissiom b72001fcac kernel: mutex could only be released in thread context
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.
2013-10-14 09:50:18 +08:00
Grissiom d59aa279c3 kernel: use skip list to implement timer list
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.
2013-10-12 22:48:29 +08:00
Bernard Xiong ca9b83c68f Merge pull request #172 from grissiom/rtt-next
kernel: fix compiling error when RT_DEBUG is not defined
2013-10-12 06:57:00 -07:00
Grissiom c9b8b7465f kernel: fix compiling error when RT_DEBUG is not defined
Define RT_DEBUG_IN_THREAD_CONTEXT when RT_DEBUG is not defined.
2013-10-12 10:58:56 +08:00
Bernard Xiong 9193acafbf Merge pull request #170 from grissiom/rtt-next
kernel: add RT_DEBUG_IN_THREAD_CONTEXT
2013-10-11 08:36:47 -07:00
Grissiom 6f71308ef5 kernel: add RT_DEBUG_IN_THREAD_CONTEXT
In thread context means: 1) the scheduler has been started; 2) not in
interrupt context. It is more stronger than RT_DEBUG_NOT_IN_INTERRUPT.
With this commit, you will catch the error on situations like taking
mutex before scheduling instead of crashing on NULL pointer reference.
2013-10-11 22:51:38 +08:00
Bernard Xiong 4eaadb7a98 Merge pull request #168 from grissiom/dfs-fix
DFS: add dfs_file_flush prototype in dfs_file.h
2013-10-11 07:40:50 -07:00
Bernard Xiong 1c16c5851e Merge pull request #169 from grissiom/log_trace-fix
log_trace: fix the memmove use
2013-10-11 07:40:30 -07:00
Grissiom d0251a523a log_trace: fix the memmove use
The first parameter of memmove is the dst, not src. Besides, fix the
wrong move size.
2013-10-11 17:23:30 +08:00
Grissiom 5fdca8371b DFS: add dfs_file_flush prototype in dfs_file.h 2013-10-11 14:55:23 +08:00
bernard 786a5541a3 Merge branch 'master' of https://github.com/RT-Thread/rt-thread 2013-10-10 00:42:11 +09:00
bernard d092105f3a Add tap netif driver 2013-10-10 00:41:36 +09:00
Bernard Xiong 69bbd35f38 Merge pull request #167 from grissiom/ymodem
components/utilities: add ymodem
2013-10-09 08:33:02 -07:00
Grissiom 5674198759 components/utilities: add ymodem
Real-YModem implemented a flexible YModem support. It use callback-based
structure to let the user application to deal with the data. It contains
3 examples:

    1. echo.c: write the data recieved on YModem to an other device
    2. null.c: discard the YModem data
    3. tofile.c: write the data to the file system

Currently, it does not support batch file transmission.
2013-10-09 23:26:42 +08:00
bernard 1ffb99e6f5 Merge branch 'master' of https://github.com/RT-Thread/rt-thread 2013-10-10 00:22:59 +09:00
bernard f1107f6714 add BGR565 definition 2013-10-10 00:22:11 +09:00
bernard 6c5e34fa70 fix the line too long issue 2013-10-09 18:06:40 +09:00
Bernard Xiong 83bb05419f Merge pull request #166 from prife/simulator
scons script: support to generate vs2012 project xml
2013-10-01 01:01:28 -07:00
prife 821ab3b9aa scons script: support to generate vs2012 project xml
rename template.vcproj to template_vs2005.vcproj
add template_vs2012.vcxproj
NOTE: the vs2012.py is ugly, just can work.
2013-10-01 15:37:34 +08:00
Bernard Xiong 0d378bbeac Merge pull request #165 from prife/jffs2-fix
DFS/jffs2: fix file mode init bug in jffs2_open/opendir
2013-09-28 00:42:04 -07:00
prife f71f0595d6 DFS/jffs2: fix bug when umount jffs2
found by haitao5198
clear mount parition device talbe when jffs2 mount falied
2013-09-28 14:57:05 +08:00
prife 12a6366217 DFS/jffs2: fix file mode init bug in jffs2_open/opendir
found by haitao52198
URL:http://www.rt-thread.org/phpBB3/viewtopic.php?f=3&t=3112&p=17153#p17153
2013-09-28 14:43:00 +08:00
Bernard Xiong bfc0d8c91d Merge pull request #163 from grissiom/compiling-fix
Compiling fix
2013-09-25 20:57:46 -07:00
Grissiom df4e8ff060 msh: only export cd/pwd when DFS_USING_WORKDIR is set 2013-09-26 11:50:28 +08:00
Grissiom 05651e7c66 logtrace: only export cmd when finsh is enabled 2013-09-26 11:49:33 +08:00
joyhope 281e55e973 notification function: rt_err_t (*tx_complete)(rt_device_t dev, void
*buffer) with buffer pointer
2013-09-24 20:57:00 +08:00
aozima cad12ee14e update rt_kprintf: make sure the device is in STREAM mode when used by rt_kprintf. 2013-09-24 15:29:08 +08:00
Bernard Xiong 0b844aa82d Merge pull request #160 from grissiom/misc-fix
logtrace: cleanup code and fix compiling warnings
2013-09-23 05:28:03 -07:00
Grissiom 2a20337707 logtrace: adjust the log values
logtrace only use odd number of log levels. So the use could set some
custom level amount them.
2013-09-23 15:13:45 +08:00
Grissiom 519982fa74 logtrace: add LOG_TRACE_VERBOSE log level 2013-09-23 15:10:02 +08:00
Grissiom 783a6a6717 logtrace: cleanup code and fix compiling warnings 2013-09-23 13:13:03 +08:00
Bernard Xiong 29871c0d84 Merge pull request #159 from grissiom/misc-fix
kservice: export vsnprintf as rt_vsnprintf
2013-09-22 21:07:20 -07:00
Grissiom 7b0a3afdf9 kservice: export vsnprintf as rt_vsnprintf
vsnprintf is a common string function that could be used in many places.
Using both vsnprintf in libc and vsnprintf in the RTT could make a
bigger image. Moreover, if newlib is not enabled when compiling with
GCC, referencing vsnprintf will lead to link error:

    .../arm-none-eabi/lib/armv7-ar/thumb/softfp/libc.a(lib_a-sbrkr.o):
    In function `_sbrk_r':
    sbrkr.c:(.text._sbrk_r+0xc): undefined reference to `_sbrk'
    collect2: error: ld returned 1 exit status

Using rt_vsnprintf could avoid such problem.
2013-09-23 11:34:13 +08:00