2010-11-25 01:04:54 +08:00
|
|
|
#include <rtthread.h>
|
|
|
|
|
2011-09-28 10:10:43 +08:00
|
|
|
static int a = 0;
|
|
|
|
static int b = 1000000;
|
|
|
|
int c = 100;
|
2010-11-25 01:04:54 +08:00
|
|
|
|
|
|
|
static void function(int count1, int count2, int count3)
|
|
|
|
{
|
|
|
|
rt_kprintf("Hello RT-Thread %d %d\n", count1, count2, count3);
|
|
|
|
}
|
|
|
|
|
2011-09-28 10:10:43 +08:00
|
|
|
int main(void)
|
2010-11-25 01:04:54 +08:00
|
|
|
{
|
|
|
|
int i;
|
2011-09-28 10:10:43 +08:00
|
|
|
|
2010-11-25 01:04:54 +08:00
|
|
|
rt_kprintf("application entry\n");
|
2011-09-28 10:10:43 +08:00
|
|
|
rt_kprintf("[addr]a-0x%x,b-0x%x,c-0x%x\n", &a, &b, &c);
|
|
|
|
rt_kprintf("[value]a-%d,b-%d,c-%d\n", a, b, c);
|
|
|
|
|
2010-11-25 01:04:54 +08:00
|
|
|
for(i=0; i<100; i++)
|
|
|
|
{
|
|
|
|
a++;
|
|
|
|
b--;
|
|
|
|
c++;
|
|
|
|
function(a, c, b );
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|