这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » MCU » ~~求助~~下载vxworks出现问题???

共1条 1/1 1 跳转至

~~求助~~下载vxworks出现问题???

菜鸟
2006-06-11 22:42:14     打赏

我串口和网口都是通的,以前做过点灯程序测试,vxwoks都能正常下载,我想测试一下scanf在vxworks下能不能使用,但是vxworks下载的时候总是出现问题:

Branch through zero
Current Processor Status Register: 0x60000013
Task: 0xf8b940 "tNetTask"

r0 = 0 r1 = 0 r2 = 0 r3 = 0
r4 = 0 r5 = 0 r6 = 0 r7 = 0
r8 = 0 r9 = eeeeeeee r10 = eeeeeeee r11/fp = 492180
r12/ip = 492180 r13/sp = f8b8e0 r14/lr = 4b18a0 pc = 0
cpsr = 60000013

为什么以前都能正常下载,现在却总是出错,程序出错了吗:

/* usrAppInit.c - stub application initialization routine */

/* Copyright 1984-1998 Wind River Systems, Inc. */

/*
modification history
--------------------
01a,02jun98,ms written
*/
/*#include <u_Lib.h>*/
#include <stdio.h>
#include <time.h>
/*
DESCRIPTION
Initialize user application code.
*/

/******************************************************************************
*
* usrAppInit - initialize the users application
*/
#define IOPMOD ((volatile unsigned *)0x3ff5000)
#define IOPDATA ((volatile unsigned *)0x3ff5008)

void out(unsigned int port,unsigned int val)
{
volatile unsigned *p=(volatile unsigned *)port;
printf("in function :out \n");
*p=val;
printf("leave function :out \n");
}

void usrAppInit (void)
{
#ifdef USER_APPL_INIT
USER_APPL_INIT; /* for backwards compatibility */
#endif

/* add application specific code here */
char i=0;
struct timespec t;
t.tv_sec = 0;
t.tv_nsec = 500000000;
printf("hello!!now run ledshow!\n");
out(IOPMOD,0xff);
while(1)
{
printf("input the ni \n");
scanf("%d",&i);
out(IOPDATA,i);
nanosleep(&t, NULL);
printf(" \n%d\n",i);
}

}





关键词: 求助     下载     vxworks     出现     问题    

共1条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]