在线时间5 小时
UID94779
注册时间2007-8-7
NXP金币0
该用户从未签到
注册会员

- 积分
- 92
- 最后登录
- 1970-1-1
|
我根据目标板修改了BSP,重新编译生成库后,建立自己的应用程序,一个程序是led点灯,其中也有串口输出,能正常工作,同样的库,再建立另外工程,只进行串口输出。第二个工程不能正常运行,调试后发现,一直是boot.s中的两个语句中循环,重复进行硬件初始化
ASM_EXTERN(init_hardware)
ASM_EXTERN(__main)
bl ASM_PREFIX(init_hardware)
b ASM_PREFIX(__main)
进入不了main函数,
工程的其他配置都相同,
为什么一个能运行,另外一个不可以呢?
串口输出程序:
#if ! BSPCFG_ENABLE_IO_SUBSYSTEM
#error This application requires BSPCFG_ENABLE_IO_SUBSYSTEM defined non-zero in user_config.h. Please recompile BSP with this option.
#endif
#ifndef BSP_DEFAULT_IO_CHANNEL_DEFINED
#error This application requires BSP_DEFAULT_IO_CHANNEL to be not NULL. Please set corresponding BSPCFG_ENABLE_TTYx to non-zero in user_config.h and recompile BSP with this option.
#endif
/* Task IDs */
#define HELLO_TASK 5
extern void hello_task(uint_32);
const TASK_TEMPLATE_STRUCT MQX_template_list[] =
{
/* Task Index, Function, Stack, Priority, Name, Attributes, Param, Time Slice */
{ HELLO_TASK, hello_task, 1500, 8, "hello", MQX_AUTO_START_TASK, 0, 0 },
{ 0 }
};
/*TASK*-----------------------------------------------------
*
* Task Name : hello_task
* Comments :
* This task prints " Hello World "
*
*END*-----------------------------------------------------*/
void hello_task
(
uint_32 initial_data
)
{
printf("Hello World\n");
_task_block();
}
/* EOF */
|
|