rm48x50: add finsh support
This commit is contained in:
parent
eda09ab002
commit
4d40978a70
@ -12,6 +12,8 @@
|
|||||||
/* Linker Settings */
|
/* Linker Settings */
|
||||||
|
|
||||||
--retain="*(.intvecs)"
|
--retain="*(.intvecs)"
|
||||||
|
--retain="*(FSymTab)"
|
||||||
|
--retain="*(VSymTab)"
|
||||||
|
|
||||||
/* USER CODE BEGIN (8) */
|
/* USER CODE BEGIN (8) */
|
||||||
/* USER CODE END */
|
/* USER CODE END */
|
||||||
@ -45,12 +47,28 @@ SECTIONS
|
|||||||
.const : {} > FLASH0 | FLASH1
|
.const : {} > FLASH0 | FLASH1
|
||||||
.cinit : {} > FLASH0 | FLASH1
|
.cinit : {} > FLASH0 | FLASH1
|
||||||
.pinit : {} > FLASH0 | FLASH1
|
.pinit : {} > FLASH0 | FLASH1
|
||||||
.bss : {} > RAM
|
GROUP
|
||||||
.data : {} > RAM
|
{
|
||||||
.sysmem : {} > RAM
|
.bss : {}
|
||||||
|
.data : {}
|
||||||
|
.sysmem : {}
|
||||||
|
._dummy : {system_data_end = .;}
|
||||||
|
} > RAM
|
||||||
|
|
||||||
|
|
||||||
/* USER CODE BEGIN (11) */
|
/* USER CODE BEGIN (11) */
|
||||||
|
/* place this section in the last section in RAM. The brain damaged linker
|
||||||
|
* could only create symbols in sections. */
|
||||||
|
._FSymTab : {
|
||||||
|
__fsymtab_start = .;
|
||||||
|
*(FSymTab)
|
||||||
|
__fsymtab_end = .;
|
||||||
|
} > FLASH0 | FLASH1
|
||||||
|
._VSymTab : {
|
||||||
|
__vsymtab_start = .;
|
||||||
|
*(VSymTab)
|
||||||
|
__vsymtab_end = .;
|
||||||
|
} > FLASH0 | FLASH1
|
||||||
/* USER CODE END */
|
/* USER CODE END */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,11 +34,8 @@ static void user_thread_entry(void *p)
|
|||||||
|
|
||||||
for(i = 0; ;i++)
|
for(i = 0; ;i++)
|
||||||
{
|
{
|
||||||
rt_kprintf("loop %d\n", i);
|
|
||||||
gioSetBit(hetPORT1, 17, gioGetBit(hetPORT1, 17) ^ 1);
|
gioSetBit(hetPORT1, 17, gioGetBit(hetPORT1, 17) ^ 1);
|
||||||
/*sciSendByte(scilinREG, 'b');*/
|
|
||||||
rt_thread_delay(100);
|
rt_thread_delay(100);
|
||||||
/*sciSendByte(scilinREG, 'a');*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,15 +50,15 @@ void vRegTestTask2(void*);
|
|||||||
int rt_application_init()
|
int rt_application_init()
|
||||||
{
|
{
|
||||||
rt_thread_init(&user_thread, "user1", user_thread_entry, RT_NULL,
|
rt_thread_init(&user_thread, "user1", user_thread_entry, RT_NULL,
|
||||||
user_thread_stack, sizeof(user_thread_stack), 8, 20);
|
user_thread_stack, sizeof(user_thread_stack), 21, 20);
|
||||||
rt_thread_startup(&user_thread);
|
rt_thread_startup(&user_thread);
|
||||||
|
|
||||||
rt_thread_init(&test_thread, "test1", vRegTestTask1, RT_NULL,
|
rt_thread_init(&test_thread, "test1", vRegTestTask1, RT_NULL,
|
||||||
test_thread_stack, sizeof(test_thread_stack), 8, 20);
|
test_thread_stack, sizeof(test_thread_stack), 21, 20);
|
||||||
rt_thread_startup(&test_thread);
|
rt_thread_startup(&test_thread);
|
||||||
|
|
||||||
rt_thread_init(&test_thread2, "test2", vRegTestTask2, RT_NULL,
|
rt_thread_init(&test_thread2, "test2", vRegTestTask2, RT_NULL,
|
||||||
test_thread_stack2, sizeof(test_thread_stack2), 9, 20);
|
test_thread_stack2, sizeof(test_thread_stack2), 22, 20);
|
||||||
rt_thread_startup(&test_thread2);
|
rt_thread_startup(&test_thread2);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -38,8 +38,8 @@ extern rt_err_t rt_hw_serial_init(void);
|
|||||||
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
extern int __bss_end;
|
extern int __bss_end;
|
||||||
#else
|
#elif defined(__TI_COMPILER_VERSION__)
|
||||||
extern unsigned char *__TI_DATA_Limit;
|
extern unsigned char * const system_data_end;
|
||||||
#endif
|
#endif
|
||||||
#define MEMEND 0x08040000
|
#define MEMEND 0x08040000
|
||||||
|
|
||||||
@ -70,9 +70,11 @@ void rtthread_startup(void)
|
|||||||
#ifdef __CC_ARM
|
#ifdef __CC_ARM
|
||||||
rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)MEMEND);
|
rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)MEMEND);
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
rt_system_heap_init((void*)&__bss_end, (void*)MEMEND);
|
rt_system_heap_init((void*)&__bss_end, (void*)MEMEND);
|
||||||
|
#elif defined(__TI_COMPILER_VERSION__)
|
||||||
|
rt_system_heap_init((void*)&system_data_end, (void*)MEMEND);
|
||||||
#else
|
#else
|
||||||
rt_system_heap_init((void*)&__TI_DATA_Limit, (void*)MEMEND);
|
#error Unkown compiler
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -85,7 +87,7 @@ void rtthread_startup(void)
|
|||||||
#ifdef RT_USING_FINSH
|
#ifdef RT_USING_FINSH
|
||||||
/* init finsh */
|
/* init finsh */
|
||||||
finsh_system_init();
|
finsh_system_init();
|
||||||
finsh_set_device("uart1");
|
finsh_set_device("sci2");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* init soft timer thread */
|
/* init soft timer thread */
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
// <bool name="RT_USING_MEMHEAP" description="Using Memory Heap Object in the system" default="true" />
|
// <bool name="RT_USING_MEMHEAP" description="Using Memory Heap Object in the system" default="true" />
|
||||||
#define RT_USING_MEMHEAP
|
#define RT_USING_MEMHEAP
|
||||||
// <bool name="RT_USING_HEAP" description="Using Dynamic Heap Management in the system" default="true" />
|
// <bool name="RT_USING_HEAP" description="Using Dynamic Heap Management in the system" default="true" />
|
||||||
//#define RT_USING_HEAP
|
#define RT_USING_HEAP
|
||||||
// <bool name="RT_USING_SMALL_MEM" description="Optimizing for small memory" default="false" />
|
// <bool name="RT_USING_SMALL_MEM" description="Optimizing for small memory" default="false" />
|
||||||
#define RT_USING_SMALL_MEM
|
#define RT_USING_SMALL_MEM
|
||||||
// <bool name="RT_USING_SLAB" description="Using SLAB memory management for large memory" default="false" />
|
// <bool name="RT_USING_SLAB" description="Using SLAB memory management for large memory" default="false" />
|
||||||
@ -85,7 +85,7 @@
|
|||||||
// <bool name="RT_USING_COMPONENTS_INIT" description="Using RT-Thread components initialization" default="true" />
|
// <bool name="RT_USING_COMPONENTS_INIT" description="Using RT-Thread components initialization" default="true" />
|
||||||
#define RT_USING_COMPONENTS_INIT
|
#define RT_USING_COMPONENTS_INIT
|
||||||
// <section name="RT_USING_FINSH" description="Using finsh as shell, which is a C-Express shell" default="true" >
|
// <section name="RT_USING_FINSH" description="Using finsh as shell, which is a C-Express shell" default="true" >
|
||||||
//#define RT_USING_FINSH
|
#define RT_USING_FINSH
|
||||||
// <bool name="FINSH_USING_SYMTAB" description="Using symbol table in finsh shell" default="true" />
|
// <bool name="FINSH_USING_SYMTAB" description="Using symbol table in finsh shell" default="true" />
|
||||||
#define FINSH_USING_SYMTAB
|
#define FINSH_USING_SYMTAB
|
||||||
// <bool name="FINSH_USING_DESCRIPTION" description="Keeping description in symbol table" default="true" />
|
// <bool name="FINSH_USING_DESCRIPTION" description="Keeping description in symbol table" default="true" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user