finsh is moved to component, so change the project setting for M16C, and fixed some small issues.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@657 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
91ecf31a08
commit
7e0ad698a3
@ -29,12 +29,12 @@ void led_init(void)
|
||||
|
||||
void led_on(void)
|
||||
{
|
||||
p11_0 = 1;
|
||||
p11_0 = 0;
|
||||
}
|
||||
|
||||
void led_off(void)
|
||||
{
|
||||
p11_0 = 0;
|
||||
p11_0 = 1;
|
||||
}
|
||||
|
||||
static void mcu_init(void)
|
||||
|
@ -64,7 +64,7 @@ LDSTACK MACRO segment,reg
|
||||
|
||||
__program_start:
|
||||
LDC #sfe(ISTACK), ISP ; Set up interrupt stack
|
||||
FSET I ; Select interrupt stack
|
||||
FCLR U ; Select interrupt stack
|
||||
LDC #sfe(CSTACK), SP ; Set up C stack
|
||||
LDINTB #RelocatableVectTbl ; Set up INTB register
|
||||
JSR.A __low_level_init ; Call __low_level_init
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -341,7 +341,7 @@
|
||||
<name>newCCIncludePaths</name>
|
||||
<state>$PROJ_DIR$\</state>
|
||||
<state>$PROJ_DIR$\..\..\include\</state>
|
||||
<state>$PROJ_DIR$\..\..\finsh\</state>
|
||||
<state>$PROJ_DIR$\..\..\components\finsh\</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCStdIncCheck</name>
|
||||
@ -1793,70 +1793,70 @@
|
||||
<group>
|
||||
<name>finsh</name>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\cmd.c</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\cmd.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\finsh.h</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\finsh.h</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\finsh_compiler.c</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\finsh_compiler.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\finsh_error.c</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\finsh_error.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\finsh_error.h</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\finsh_error.h</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\finsh_heap.c</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\finsh_heap.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\finsh_heap.h</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\finsh_heap.h</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\finsh_init.c</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\finsh_init.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\finsh_node.c</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\finsh_node.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\finsh_node.h</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\finsh_node.h</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\finsh_ops.c</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\finsh_ops.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\finsh_ops.h</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\finsh_ops.h</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\finsh_parser.c</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\finsh_parser.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\finsh_parser.h</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\finsh_parser.h</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\finsh_token.c</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\finsh_token.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\finsh_token.h</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\finsh_token.h</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\finsh_var.c</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\finsh_var.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\finsh_var.h</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\finsh_var.h</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\finsh_vm.c</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\finsh_vm.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\finsh_vm.h</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\finsh_vm.h</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\shell.c</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\shell.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\finsh\symbol.c</name>
|
||||
<name>$PROJ_DIR$\..\..\components\finsh\symbol.c</name>
|
||||
</file>
|
||||
</group>
|
||||
<group>
|
||||
|
@ -65,6 +65,7 @@ void u0rec_handler(void)
|
||||
|
||||
static rt_err_t rt_uart_init (rt_device_t dev)
|
||||
{
|
||||
rt_uint32_t level;
|
||||
/* set UART0 bit rate generator bit rate can be calculated by:
|
||||
bit rate = ((BRG count source / 16)/baud rate) - 1
|
||||
Baud rate is based on main crystal or PLL not CPU core clock */
|
||||
@ -124,13 +125,11 @@ static rt_err_t rt_uart_init (rt_device_t dev)
|
||||
u0tb = 0;
|
||||
|
||||
/* disable irqs before setting irq registers */
|
||||
//DISABLE_IRQ
|
||||
level = rt_hw_interrupt_disable();
|
||||
/* Enable UART0 receive interrupt, priority level 4 */
|
||||
asm("fset i");
|
||||
s0ric = 0x04;
|
||||
asm("fclr i");
|
||||
/* Enable all interrupts */
|
||||
//ENABLE_IRQ
|
||||
rt_hw_interrupt_enable(level);
|
||||
|
||||
/* UART0 transmit/receive control register 1 */
|
||||
/* enable transmit and receive */
|
||||
|
Loading…
x
Reference in New Issue
Block a user