summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-09-23kservice: export vsnprintf as rt_vsnprintfGrissiom
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-22Merge pull request #158 from grissiom/finsh-fixBernard Xiong
finsh: unregister rx_indicate when closing the device
2013-09-22finsh: unregister rx_indicate when closing the deviceGrissiom
Because the device could still remain opened when closed by finsh, the old rx_indicate is useless for finsh. Some buggy driver will still generate rx_indicate even after the device has been closed. So FinSh should unregister the rx_indicate when releasing the old device.
2013-09-22Delete SConscriptBernard Xiong
2013-09-21use UART0 as consolebernard
2013-09-20Import beaglebone portingbernard
2013-09-17Merge branch 'master' of https://github.com/RT-Thread/rt-threadbernard
2013-09-17change the compiling macro before DFS optionbernard
2013-09-14Merge pull request #156 from grissiom/fix-event_recvBernard Xiong
rt_event_recv: add a check on the option flag
2013-09-14Merge pull request #155 from grissiom/simulatorprife
Simulator
2013-09-14rt_event_recv: add a check on the option flagGrissiom
Either RT_EVENT_FLAG_AND or RT_EVENT_FLAG_OR should be set in the option flag. If none of them is present, the waiting thread will never be resumed.
2013-09-08Add gettimeofday declaration in sys/time.hBernard Xiong
2013-09-07travis: add scan-build in PATHGrissiom
2013-09-07travis: don't export RTT_CC in before_script if it's been setGrissiom
This gives ways for bsp to set it's own RTT_CC.
2013-09-07travis: install the gcc-multilib to get the 32bit build OKGrissiom
2013-09-07travis: try to fix the SDL buildingGrissiom
2013-09-07travis: auto build the simulatorGrissiom
Building is only the first step. Correctness is what we need. There are already many GCC builds for other bsp so GCC building for simulator is not important. So I use clang-analyze to check all the source codes in simulator project. Hope it will help us.
2013-09-07simulator: add clang-analyze tool supportGrissiom
When CROSS_TOOL or 'RTT_CC' env is setted to 'clang-analyze', it will use Clang to check the codes.
2013-09-07Scons: add a custom tool to do clang static analyzeGrissiom
Bsps can use the clang analyzer as a tool: env = Environment(toolpath=[os.path.join(RTT_ROOT, 'tools', 'tools')], tools = ['clang-analyze']) When building the project, the static analyzer will be called to check all the C code. The warnings are print to stderr.
2013-09-07Scons: run `clang -Wall -fsyntax-only` in clang-analyzeGrissiom
The `clang -fsyntax-only` will give us additional warning messages in the console.
2013-09-06simulator: get CROSS_TOOL and EXEC_PATH from envGrissiom
Simulator get it's way to Travis CI ready.
2013-09-06simulator: move SDL setting staff into drivers/SConstructGrissiom
This could not only make a cleaner SConstruct, but could also benefit RTGUI building.
2013-09-03Merge pull request #154 from grissiom/simulatorBernard Xiong
sim/posix: move rt_hw_context_switch_interrupt after it's definition
2013-09-04sim/posix: move rt_hw_context_switch_interrupt after it's definitionGrissiom
This fix a compile error in Clang.
2013-09-03Merge pull request #153 from grissiom/stm32f10xBernard Xiong
stm32f10x: fix the rtgui initialization
2013-09-03stm32f10x: fix the rtgui initializationGrissiom
The rtgui_system_server_init prototype is wrong. And if we use RT_USING_COMPONENTS_INIT, there is no need to call rtgui_system_server_init again.
2013-09-03Merge pull request #152 from grissiom/log-traceBernard Xiong
log_trace: cleanup
2013-09-03log_trace: cleanupGrissiom
2013-09-02Merge pull request #151 from grissiom/finshBernard Xiong
finsh: use alias in the variable definition
2013-08-31Merge pull request #150 from grissiom/simulator-linuxBernard Xiong
Simulator linux
2013-08-31finsh: use alias in the variable definitionGrissiom
With this patch, one could define two alias for the same function like: FINSH_FUNCTION_EXPORT_ALIAS(rt_hw_cpu_reset, reboot, reboot the cpu); FINSH_FUNCTION_EXPORT_ALIAS(rt_hw_cpu_reset, __cmd_reboot, reboot the cpu); Suitable for being used in MSH/Finsh.
2013-08-31simulator: init SDL after rt_components_initGrissiom
SDL may use DFS to open files. It should be run after rt_components_init.
2013-08-31simulator: fix SDL initialization under LinuxGrissiom
rt_hw_sdl_start should wait untill the rtgui_graphic_set_device is called int the sdl_loop. Use pthread_cond_wait to achieve this in Linux.
2013-08-26Merge pull request #146 from grissiom/rtt-nextBernard Xiong
Some fix for the portal device
2013-08-22dev/portal: fix bug in portal callback forwardingGrissiom
When forwarding rx/tx callback from the underlaying device(pipe), the "dev" argument should be the portal. So the portal callback could think itself as called.
2013-08-22dev/portal: add checks on oflagGrissiom
It does not make sense to open portal without a flag. One should open a portal with RT_DEVICE_OFLAG_RDWR in most cases.
2013-08-20Merge pull request #145 from grissiom/hot-fixBernard Xiong
finsh/cmd: add description for new pipe and portal device
2013-08-20finsh/cmd: add description for new pipe and portal deviceGrissiom
2013-08-19Merge pull request #144 from grissiom/portal-deviceBernard Xiong
Portal device
2013-08-20dev/portal: implement portal deviceGrissiom
Portal is a device that connect devices. Currently, you can only connect pipes in portal. Pipes are unidirectional. But with portal, you can construct a bidirectional device with two pipes.
2013-08-20dev/pipe: make pipe a type of deviceGrissiom
Pipe have many differences with char device. The main difference is altough pipe have both read and write, it is unidirectional in nature.
2013-08-19Merge pull request #143 from grissiom/ringbuffer-pipeBernard Xiong
Ringbuffer and Pipe
2013-08-19dev/pipe: cleanupGrissiom
2013-08-19dev/pipe: call rx_indicate the time we resume readerGrissiom
Some reader(FinSh again) would like to block on a semaphore which is released in rx_indicate. So we should invoke rx_indicate in _rt_pipe_resume_reader.
2013-08-19device/pipe: add nonblocking read/write and force write modeGrissiom
The previous implementation will always blocks the reader/writer. However, at least FinSh would expect the device to be nonblocking --- read should return 0 when there is no data in it.
2013-08-19ringbuffer: add put_force and putchar_force APIGrissiom
Add the APIs that will discard the old data when rb is full.
2013-08-19ringbuffer: fix the ambiguous nameGrissiom
RT_RINGBUFFER_SIZE could mean "the size of the whole buffer", "the size of the empty space" or "the size of the data". Moreover, it's never a micro anymore. Change it to rt_ringbuffer_data_len before it's too late. Also, RT_RINGBUFFER_EMPTY is changed to rt_ringbuffer_space_len.
2013-08-19Merge branch 'master' of https://github.com/RT-Thread/rt-threadbernard
2013-08-18Merge pull request #142 from grissiom/pipe-deviceBernard Xiong
device/pipe: add rt_pipe_{init,detach}
2013-08-19Merge branch 'master' of https://github.com/RT-Thread/rt-threadbernard