Grissiom
e12dd58405
freetype: fix a memory leak
...
Roughly backport of commit 75534a04327b54f upstream.
2015-06-12 10:09:09 +08:00
Grissiom
8031b6248d
freetype: upgrade to 2.5.5
2015-06-12 10:08:40 +08:00
Grissiom
d921353f14
freetype: misc fix in gb2312tounicode
2015-06-12 10:08:29 +08:00
Grissiom
f435a214d4
SConscript: fix LINKFLAGS over-written
...
Fix a regression on 62a0172d11 .
2015-04-15 16:13:29 +08:00
Grissiom
81d7ef1e9f
SConscript: fix the --keep parameter for Keil
...
The old `--keep` parameter for Keil is wrong. RTFM of Keil and get it
right.
2015-04-15 16:13:29 +08:00
Grissiom
b3214ed45f
SConscript: fix LINKFLAGS over-written
...
Fix a regression on 62a0172d11 .
2015-04-14 18:34:09 +08:00
Grissiom
54f8b19e12
SConscript: fix the --keep parameter for Keil
...
The old `--keep` parameter for Keil is wrong. RTFM of Keil and get it
right.
2015-04-14 18:22:46 +08:00
Grissiom
2d3b2f1e94
memheap: check the USED bit in rt_memheap_free
...
This will ease the debugging of double-free bug.
2015-04-08 16:39:50 +08:00
Grissiom
43e020d481
building: PrepareBuilding forgot to declare BuildOptions as global
...
The global variables in the building.py are totally a pile of shit.
2015-03-18 15:50:10 +08:00
Grissiom
01ab0c1d1e
crt_init: fix hardfault in Keil toolchain when there is no cpp object
...
If there is no SHT$$INIT_ARRAY, calling
$Super$$__cpp_initialize__aeabi_() will fault. At least until Keil5.12
the problem still exists. So we have to initialize the C++ runtime our
own.
2015-01-22 17:27:17 +08:00
Grissiom
f8c171d5ad
memheap: check against over written in rt_memheap_free
2015-01-16 11:41:20 +08:00
Grissiom
c565925169
bsp/{cortex-M}: fix the SysTick_Config
...
SysTick_Config substract one inside the function. So there is no need to
substract one when passing the parameter.
2015-01-09 15:26:06 +08:00
Grissiom
d7fb5d5444
vbus: remove the rt_ prefix in the watermark queue source file
2015-01-09 10:11:32 +08:00
Grissiom
81b37fb1f9
lpc43xx: add copy-right info in vbus drivers
2015-01-08 17:16:26 +08:00
Grissiom
17aa3b1975
vbus: update copy-right information
2015-01-08 17:05:56 +08:00
Grissiom
05a01884e6
lpc43xx: fix clock configure
2015-01-07 17:15:50 +08:00
Grissiom
11026d0579
lpc43xx: clean the .o before building M0 and M4
...
SCons will omit the file in parent dir of SConstruct somehow and build
the object files in that dir instead of in variant dir. This cause
problem because we cannot mix the object files between M0 and M4 which
SCons failed to rebuild. So we have to manually remove the files before
building.
2015-01-07 17:15:49 +08:00
Grissiom
17a75eaa02
lpc43xx: remove the fpu settings in startup_LPC43xx_M0
2015-01-07 17:15:49 +08:00
Grissiom
22938a93ef
lpc43xx: fix some compile warnings
2015-01-07 17:15:49 +08:00
Grissiom
f7415e595e
VBus: added
...
Currently only lpc43xx is supported.
2015-01-07 17:15:49 +08:00
Grissiom
fcff552626
lpc43xx: fix the SConscripts
2015-01-07 10:25:44 +08:00
Grissiom
03a2847f12
lpc43xx: fix some compile warnings
2015-01-07 10:25:44 +08:00
Grissiom
7965708050
lpc43xx: add -Wall
2015-01-07 10:25:44 +08:00
Grissiom
df31744178
lpc43xx: fix the M0 project template
2015-01-07 10:25:43 +08:00
Grissiom
0ca281c162
lpc43xx: add flash linker script for GCC
2015-01-06 13:40:46 +08:00
Grissiom
bcbe180886
lpc43xx: fix the default RTT_ROOT in SConstruct
2015-01-06 13:39:54 +08:00
Grissiom
fca84daa9d
lpc43xx: fix the startup code for GCC
2015-01-06 12:42:12 +08:00
Grissiom
833339e1c6
lpc43xx: output a newline in the header file
...
Some compiler is brain-damaged that it will yeild a warning for headers
not ended with a newline. Yes, I mean you, Keil.
2015-01-06 11:03:01 +08:00
Grissiom
ff3ab9c0ab
lpc43xx: add readme
2015-01-06 10:46:32 +08:00
Grissiom
090adcf4c0
lpc43xx: don't set the Clock again in M0 core
...
M0 core is always booted by the M4 core. It means that if we are running
in M0, the clock is always configured.
2015-01-06 10:46:32 +08:00
Grissiom
21ef733251
lpc43xx: use the RIT timer as SysTick in M0 core
2015-01-06 10:46:31 +08:00
Grissiom
773a884a4b
lpc43xx: move board.c into M0/M4
2015-01-06 10:46:31 +08:00
Grissiom
d2e4050a70
lpc43xx: update template.uvproj and add sct files
2015-01-06 10:46:31 +08:00
Grissiom
959f6c695f
lpc43xx: move the application code into its own space
2015-01-06 10:46:31 +08:00
Grissiom
5542af8b7c
lpc43xx/driver: fix the VTOR setting
2015-01-06 10:25:43 +08:00
Grissiom
f609a63564
lpc43xx: add uart3 support
2015-01-06 10:25:43 +08:00
Grissiom
a447b5f3cf
lpc43xx: refactor uart drivers
2015-01-06 10:25:43 +08:00
Grissiom
57b5c74a71
rt_kprintf: force the open_flag to be RT_DEVICE_FLAG_STREAM
...
Commit a6251a439e changed the serial device to check open_flag
instead of flag. So we should change the rt_kprintf counterpart as well.
2015-01-04 19:43:33 +08:00
Grissiom
099ada6699
finsh: open the finsh device with RT_DEVICE_FLAG_STREAM
2015-01-04 19:42:58 +08:00
Grissiom
d0540f0d85
external: update freetype to 2.5.4
2014-12-29 11:30:07 +08:00
Grissiom
d479960aac
ymodem: fix a race-condition in handshaking
...
As we are sending C continuously, there is a chance that the
sender(remote) receive an C after sending the first handshake package.
So the sender will interpret it as NAK and re-send the package. So we
just ignore it and proceed.
2014-12-26 22:20:17 +08:00
Grissiom
9944a1b69c
lodepng: make the crc32 LUT const
...
This saves 1KiB ram usage.
2014-12-24 16:05:50 +08:00
Grissiom
ee59452ee5
clang-analyze: force 32bit compile
2014-12-24 12:10:00 +08:00
Grissiom
c045281ee2
object: fix module name testing
2014-12-24 12:10:00 +08:00
Grissiom
4bb6c8cf0c
module: add !__CC_ARM when test __GNUC__
...
ARMCC will define __GNUC__ in "GNU mode"(with --gnu command line
option). So iff __GNUC__ && !__CC_ARM is GCC.
2014-12-01 18:54:55 +08:00
Grissiom
cf692a4ab4
msh: use list_memheap when RT_USING_MEMHEAP_AS_HEAP is enabled
...
There is no list_mem and only list_memheap when RT_USING_MEMHEAP_AS_HEAP
is enabled.
2014-12-01 18:54:14 +08:00
Grissiom
6c1c83e6da
efm32: return empty variable instead of Return('')
2014-11-19 13:20:32 +08:00
Grissiom
767720c1f7
SCons: allow set object files in DefineGroup
...
The source files can be the raw file names end with .c or .o. So return
the raw file names is more flexible than wrap them with Object.
2014-11-18 17:08:21 +08:00
Grissiom
28ff3ed186
romfs: fix a use-before-set bug on checking the dirent
2014-11-03 17:32:50 +08:00
Grissiom
b43573844d
romfs: rewrite mkromfs.py
2014-11-03 12:20:09 +08:00
Grissiom
e882597f9c
romfs: check the dirent before use it
...
System will crash when the romfs is erased. Add checks before using them
to avoid it.
2014-11-03 12:10:25 +08:00
Grissiom
fe603dd379
ymodem: fix examples due to new API
2014-11-03 11:46:57 +08:00
Grissiom
3531fa71aa
romfs: declare the dummy entry as weak
2014-11-01 17:57:43 +08:00
Grissiom
3d584266e5
finsh: allow user to disable the FINSH_USING_HISTORY
2014-10-21 16:01:08 +08:00
Grissiom
e030451220
minilibc: only define malloc family when RT_USING_HEAP enabled
2014-10-14 16:14:02 +08:00
Grissiom
9a75583349
dfs: check for null reference
2014-10-14 16:09:10 +08:00
Grissiom
4c39f8765a
msh: free is only available when HEAP is enabled
2014-10-14 16:07:49 +08:00
Grissiom
23cc390474
msh: check path is non-null in msh_auto_complete_path
2014-10-14 16:07:19 +08:00
Grissiom
8615e2c8e5
kernel/timer: change row_lvl to unsigned
...
Use signed int as array index is unsecure.
2014-10-14 16:00:42 +08:00
Grissiom
d33df46f19
tools: fix SrcRemove on empty src
...
If the src is empty list, it will crash at:
IndexError: list index out of range:
File "/home/xxx/src/SConstruct", line 39:
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=True)
...
File "/home/xxx/src/drivers/SConscript", line 12:
SrcRemove(src, src_need_remove)
File "/home/rt-thread-stable/tools/building.py", line 496:
if type(src[0]) == type('str'):
2014-10-08 18:03:12 +08:00
Grissiom
2c5eea4c21
tools: preserve the order of CPPPATH/CPPDEFINES/LIBPATH/LIBS
...
The order of them are important while the uniqueness has nothing to do
with the compiling.
2014-10-08 12:22:30 +08:00
Grissiom
d4133990b0
kernel/idle: fix rt_thread_idle_excute in high optimization level
...
The rt_list_isempty has prototype of "int rt_list_isempty(const rt_list_t *l)".
So the compiler has a good reason that the rt_thread_defunct list does
not change within rt_thread_idle_excute thus optimize the "while" loop
into a "if".
So add the volatile qualifier when test against the rt_thread_defunc list.
2014-09-02 17:21:31 +08:00
Grissiom
ab729429b3
minilibc: define SIZE_MAX in stdint.h
2014-09-01 10:41:37 +08:00
Grissiom
51c4a3aeae
tools/building: remove the use of startupinfo
...
The startupinfo does not have any visible effects on the building
process and some old Python version does not have it at all. So remove
it for the seek of simple.
Tested `scons -j4` in a dual core virtual machine.
2014-09-01 10:11:10 +08:00
Grissiom
83f8b52064
tools/keil: preserve the order of CPPPATH
...
The order of CPPPATH is important: some project would use the order of
CPPPATH to override the default configuration headers. This commit also
refine the this piece of code in a more Pythonic way.
2014-08-27 11:39:34 +08:00
Grissiom
be0c0481e9
workqueue: fix the windows eol
2014-08-20 10:24:41 +08:00
Grissiom
b8bf6bef76
kernel: mempool: fix race condition in rt_mp_alloc
...
When thread wake up from waiting for memory, there is a chance that
there is no memory available in high pressure. So use a loop to check
again. Otherwise, there will be a NULL reference.
2014-08-20 10:16:04 +08:00
Grissiom
11fb9060e0
mips/loongson_1b: format code
2014-08-18 15:24:21 +08:00
Grissiom
0ee101ccb0
mips/loongson_1b: install NULL handler is OK
2014-08-18 15:22:16 +08:00
Grissiom
1d928f7daf
mips/loongson_1b: fix rt_interrupt_dispatch
2014-08-18 15:21:09 +08:00
Grissiom
39ac8baeac
ls1bdev: format code in startup.c
2014-08-18 15:19:06 +08:00
Grissiom
bfc140826a
ls1bdev: init application after other things initialized
2014-08-18 15:17:36 +08:00
Grissiom
259cfdc79f
ls1bdev: don't hardcode the uart base address in rt_hw_console_output
2014-08-18 15:14:22 +08:00
Grissiom
f1bc40d697
ls1bdev: add uart3 support
2014-08-18 15:13:49 +08:00
Grissiom
30d68a515c
src/timer: fix a compile warning
2014-07-16 22:05:02 +08:00
Grissiom
2aa51d42f9
ymodem: increase the default RYM_CHD_INTV_TICK
...
Frequent 'C' on the handshake will confuse some sender(lrzsz for
example).
2014-07-15 14:58:05 +08:00
Grissiom
ff1eb2cbc9
ymodem: refactor _rym_read_code
...
Make fast path fast and slow path slow.
2014-07-14 18:45:46 +08:00
Grissiom
97fb91dcc6
bsp: add zynq7000
2014-06-27 14:12:36 +08:00
Grissiom
aca8f8eb2d
shell: print the ref count in list_device
2014-06-18 11:18:43 +08:00
Grissiom
dc366ecf7a
device: only increase the ref_count when device is truly opened
2014-06-18 11:16:21 +08:00
Grissiom
af3dc0e63e
tools/building.py: more descriptive on error
...
Print the command that failed to execute and try to tell the reason to
fall.
2014-06-09 11:35:36 +08:00
Grissiom
2c5cfe4bcf
ls1b: cleanup code
2014-05-29 12:35:17 +08:00
Grissiom
6f53402e03
ls1b: add nostartfiles to LFLAGS
...
We don't need the crt0 from the toolchain.
2014-05-29 12:32:46 +08:00
Grissiom
a87ae1abee
ls1b: add rt_init section
2014-05-29 12:30:39 +08:00
Grissiom
66ac9821de
Scons: fix the Win32Spawn
...
Windows(tm) CreateProcess does not use the env passed to it to find the
executables. So we have to modify our own PATH to make Popen work. Also,
detect the cmd build-in commands and execute it directly.
Tested on MDK toolchain on RB4088 and the MSVS toolchain on simulator
BSP.
2014-05-24 13:04:49 +08:00
Grissiom
a78e42a7c8
[mempool] reset the thread->error before suspending thread
...
Time out result and other errors is recorded in thread->error. Dirty
error will screw up the error handling code after the thread has been
wake up.
2014-04-16 10:59:33 +08:00
Grissiom
ab4d18a137
[bsp/taihu] fix the link error
...
The taihu.lds hardcoded the path of start_gcc.o. Change it as the layout
of build/ has change by commit a03816ef9a .
2014-04-14 18:01:50 +08:00
Grissiom
5ad58a59a4
minilibc: no double braces in if statement
2014-04-12 16:58:17 +08:00
Grissiom
a95370aa56
msh: remove usless ptr set
...
The ptr is set in the following code. So remove the first one.
2014-04-12 16:57:14 +08:00
Grissiom
ec4b865579
finsh: add check on converting octal numbers
...
The digit in octal numbers should with in 0~7. Check on it in
token_proc_number. This issue is found by Clang.
2014-04-12 16:55:00 +08:00
Grissiom
1422569e7c
pthreads: remove some useless variables
2014-04-12 16:54:20 +08:00
Grissiom
4b7e9c6447
dfs: assert the path is not null in dfs_filesystem_lookup
...
Clang complains about "Null pointer argument in call to string
comparison function". So assert on it.
2014-04-12 16:35:07 +08:00
Grissiom
1b878f256f
examples/kernel: fix warnings issued by Clang
...
Fix some "unused variable" and "used before set" warnings.
2014-04-12 16:33:35 +08:00
Grissiom
299cccfb26
logtrace: add log_session_lvl
...
log_session_lvl is suitable for performance critical places where in
most cases, the log is turned off by level. If the session is const and
the level is greater than session->lvl, the whole function will be
optimized out.
2014-04-10 21:22:39 +08:00
Grissiom
12728bcdff
logtrace: add const modifier to the APIs
...
Compiler may do more optimization when the parameter is const.
2014-04-10 21:22:39 +08:00
Grissiom
81b284b316
scons: no need to set RTT_ROOT as Repository
...
In SCons manual:
=================
In order to inform the C compiler about the repositories, SCons will
add appropriate -I flags to the compilation commands for each directory
in the $CPPPATH list. So if we add the current directory to the
construction environment $CPPPATH like so:
env = Environment(CPPPATH = ['.'])
env.Program('hello.c')
Repository('/usr/repository1')
Then re-executing SCons yields:
% scons -Q
cc -o hello.o -c -I. -I/usr/repository1 hello.c
cc -o hello hello.o
=================
The additional include directory is definitely not what we want. Just
remove the additional Repository line.
2014-04-10 15:09:20 +08:00
Grissiom
a03816ef9a
scons: seperate the BSP build with the kernel build
...
BSPs could have their own components/ etc. If they point to the same
folder, SCons would find the wrong source code to compile.
2014-04-10 15:03:11 +08:00
Grissiom
841898abe2
[shell] define FINSH_PROMPT as finsh_get_prompt when FINSH_USING_MSH enabled
...
When MSH enabled, the prompt will change at the two shells. So we should
use dynamic prompt when FINSH_USING_MSH defined.
2014-04-08 15:12:44 +08:00
Grissiom
2b7be29cad
[bsp/rva8] enable group{0,1} interrupt forwarding in gic initialization
...
When RT-Thread is running stand alone, it forgot to enable the
distributor of GIC.
2014-04-08 11:54:03 +08:00
Grissiom
c0f0c2322f
[libcpu/arm] remove useless cpsr updating in rt_hw_context_switch_to
...
This piece of code will enable the interrupt early before switching to
the first thread. Although it is harmless, but not prefect.
2014-04-08 11:24:04 +08:00