能打印了,系统还跑不起来
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
#include "main.h"
|
||||
#include <rthw.h>
|
||||
#include <rtthread.h>
|
||||
#include "libc.h"
|
||||
#include "string.h"
|
||||
|
||||
void SystemClock_Config(void);
|
||||
#if 1
|
||||
#define _SCB_BASE (0xE000E010UL)
|
||||
@@ -103,32 +106,42 @@ void mpu_init(void)
|
||||
MPU->CTRL=1;
|
||||
}
|
||||
|
||||
|
||||
const libc_device_file *g_usart;
|
||||
|
||||
/**
|
||||
* This function will initial your board.
|
||||
*/
|
||||
void rt_hw_board_init()
|
||||
{
|
||||
NVIC_SetVectorTable(NVIC_VectTab_FLASH,(u32)128*1024);
|
||||
// NVIC_SetVectorTable(NVIC_VectTab_FLASH,(u32)128*1024);
|
||||
NVIC_SetVectorTable(NVIC_VectTab_FLASH,(u32)0);
|
||||
_SysTick_Config (SystemCoreClock/1000);
|
||||
// LED_Init(); // LED初始<E5889D>?
|
||||
// Usart_Config(); // 串口初始<E5889D>?
|
||||
// SDRAM_Init(); // sdram要先于emwin之前初始<E5889D>?
|
||||
// sFLASH_Init();
|
||||
//SPI_Flash_Init();
|
||||
LED_Init(); // LED初始<E5889D>?
|
||||
Usart_Config(); // 串口初始<E5889D>?
|
||||
SDRAM_Init(); // sdram要先于emwin之前初始<E5889D>?
|
||||
sFLASH_Init();
|
||||
mymem_init();
|
||||
rt_system_heap_init(rt_heap_begin_get(),rt_heap_end_get());
|
||||
irq_vector_init();
|
||||
// irq_vector_init();
|
||||
mpu_init();
|
||||
Touch_Init(); // 触摸屏初始化
|
||||
USART3_Init();
|
||||
RANDOM_Init();
|
||||
// USBD_InitAsVcp ();
|
||||
|
||||
g_usart = libc_find_dev("usart");
|
||||
g_usart->open();
|
||||
}
|
||||
|
||||
void OS_CPU_SysTickHandler(void)
|
||||
|
||||
void rt_hw_console_output(const char *str)
|
||||
{
|
||||
/* empty console output */
|
||||
g_usart->write(str,strlen(str));
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SysTick_Handler(void)
|
||||
{
|
||||
/* enter interrupt */
|
||||
rt_interrupt_enter();
|
||||
|
Reference in New Issue
Block a user