[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] I have met a problem.....
From: |
janeleee |
Subject: |
[avr-gcc-list] I have met a problem..... |
Date: |
Thu, 9 Aug 2007 01:16:06 -0700 (PDT) |
I try to insert a new section in FLASH, and at the same time, some functions
will add into this section. In my project, I need call these functions by
functions pointer, so i do the following test code:
#include <stdint.h>
void foo(uint8_t* t) __attribute__((section(".mysection")));
void (*pfun)();
int main(void)
{
uint8_t m;
pfun = foo;
(*pfun)(&m);
foo(&m);
while(1);
return (0);
}
void foo(uint8_t* t)
{
uint8_t c;
uint8_t i;
c=0;
for(i=0;i<30;i++)
c++;
*t = c;
}
and add the -Wl,--section-start=.mysection=0x1c00 in link option of WINAVR.
I try to compile this file, it works ok. but when i try to load debugger,
the AVR studio 4.13 beta528 exit abnormally.
Now, I do not know where the problem is.......Need your help! :)
Thanks a lot.
Jane
--
View this message in context:
http://www.nabble.com/I-have-met-a-problem.....-tf4241266.html#a12068348
Sent from the AVR - gcc mailing list archive at Nabble.com.
- [avr-gcc-list] I have met a problem.....,
janeleee <=