EmbeddedRelated.com
Forums

AT91SAM7x512

Started by bhav...@yahoo.com August 13, 2008
I m using AT91SAM7x512. I m using YAGARTO tool to compile my code. My code is working ok. But, I have one problem is that As I add more variables than my code is not working. I have used RAM just around 5K to 7K. I dont know why this is happing. I m also using SAM-ICE to debugge my code. I have taken refrence from project "demo_at91sam7_blink_flash". I have loaded .OUT file to debugg my code. So, as i try to debugge code than it runs. But without debugging it is not running. I program my CPU by SAM-BA v2.6.

--- In A..., bhavintailor_ec@... wrote:
>
> I m using AT91SAM7x512. I m using YAGARTO tool to compile my code.
My code is working ok. But, I have one problem is that As I add more
variables than my code is not working. I have used RAM just around 5K
to 7K. I dont know why this is happing. I m also using SAM-ICE to
debugge my code. I have taken refrence from project
"demo_at91sam7_blink_flash". I have loaded .OUT file to debugg my
code. So, as i try to debugge code than it runs. But without debugging
it is not running. I program my CPU by SAM-BA v2.6.
>

Do you have any code size restrictions with YAGARTO? I am not
familiar with it, but if you get the trial copy of uVision, you will
not be allowed to compile code greater than (I believe) 16KB.

My advice is to check your compiler documentation and not be concerned
with the board.

--- In A..., "v333k" wrote:
>
> --- In A..., bhavintailor_ec@ wrote:
> >
> > I m using AT91SAM7x512. I m using YAGARTO tool to compile my code.
> My code is working ok. But, I have one problem is that As I add more
> variables than my code is not working. I have used RAM just around
5K
> to 7K. I dont know why this is happing. I m also using SAM-ICE to
> debugge my code. I have taken refrence from project
> "demo_at91sam7_blink_flash". I have loaded .OUT file to debugg my
> code. So, as i try to debugge code than it runs. But without
debugging
> it is not running. I program my CPU by SAM-BA v2.6.
> > Do you have any code size restrictions with YAGARTO? I am not
> familiar with it, but if you get the trial copy of uVision, you will
> not be allowed to compile code greater than (I believe) 16KB.
>
> My advice is to check your compiler documentation and not be
concerned
> with the board.
>
Thanks for replay,
YAGARTO tool includes Eclipse as editor & GCC for ARM as compiler. I
dont have problem with code size. I only have problem with Global
Variables. Normally my code is working ok. But as i add global
variables which r even not used in code at that time my code stop
running.
I had the same problem a few weeks ago.
The cause was the unproper use of 'extern' key word. So when i wanted
to use a global variable in an other file then i typed 'extern tmp'
instead of 'extern unsigned char tmp' for example. It was pretty hard
to find this problem as i didnt get even a warning for it. So just
check the whether you use the 'extern' key word properly.

regards,
David
2008/8/14 bhavintailor_ec :
> --- In A..., "v333k" wrote:
>>
>> --- In A..., bhavintailor_ec@ wrote:
>> >
>> > I m using AT91SAM7x512. I m using YAGARTO tool to compile my code.
>> My code is working ok. But, I have one problem is that As I add more
>> variables than my code is not working. I have used RAM just around
> 5K
>> to 7K. I dont know why this is happing. I m also using SAM-ICE to
>> debugge my code. I have taken refrence from project
>> "demo_at91sam7_blink_flash". I have loaded .OUT file to debugg my
>> code. So, as i try to debugge code than it runs. But without
> debugging
>> it is not running. I program my CPU by SAM-BA v2.6.
>> >
>>
>> Do you have any code size restrictions with YAGARTO? I am not
>> familiar with it, but if you get the trial copy of uVision, you will
>> not be allowed to compile code greater than (I believe) 16KB.
>>
>> My advice is to check your compiler documentation and not be
> concerned
>> with the board.
>>
> Thanks for replay,
> YAGARTO tool includes Eclipse as editor & GCC for ARM as compiler. I
> dont have problem with code size. I only have problem with Global
> Variables. Normally my code is working ok. But as i add global
> variables which r even not used in code at that time my code stop
> running.

On Friday 15 August 2008 02:34:33 Dávid Bacsa wrote:
> I had the same problem a few weeks ago.
> The cause was the unproper use of 'extern' key word. So when i wanted
> to use a global variable in an other file then i typed 'extern tmp'
> instead of 'extern unsigned char tmp' for example. It was pretty hard
> to find this problem as i didnt get even a warning for it. So just
> check the whether you use the 'extern' key word properly.

Always declare externs in a header file.
Always include that header file in the file where you actually put the
variable. That way the compiler will keep everything honest.

>
> regards,
> David
>
> 2008/8/14 bhavintailor_ec :
> > --- In A..., "v333k" wrote:
> >> --- In A..., bhavintailor_ec@ wrote:
> >> > I m using AT91SAM7x512. I m using YAGARTO tool to compile my code.
> >>
> >> My code is working ok. But, I have one problem is that As I add more
> >> variables than my code is not working. I have used RAM just around
> >
> > 5K
> >
> >> to 7K. I dont know why this is happing. I m also using SAM-ICE to
> >> debugge my code. I have taken refrence from project
> >> "demo_at91sam7_blink_flash". I have loaded .OUT file to debugg my
> >> code. So, as i try to debugge code than it runs. But without
> >
> > debugging
> >
> >> it is not running. I program my CPU by SAM-BA v2.6.
> >>
> >>
> >> Do you have any code size restrictions with YAGARTO? I am not
> >> familiar with it, but if you get the trial copy of uVision, you will
> >> not be allowed to compile code greater than (I believe) 16KB.
> >>
> >> My advice is to check your compiler documentation and not be
> >
> > concerned
> >
> >> with the board.
> >
> > Thanks for replay,
> > YAGARTO tool includes Eclipse as editor & GCC for ARM as compiler. I
> > dont have problem with code size. I only have problem with Global
> > Variables. Normally my code is working ok. But as i add global
> > variables which r even not used in code at that time my code stop
> > running.

We name all our files with .cpp extensions, even if the project is
just in straight 'C'. This enforces that your declarations are
correct, and can save a lot of grief!

> Always declare externs in a header file.
> Always include that header file in the file where you actually put the
> variable. That way the compiler will keep everything honest.
>
> >
> > regards,
> > David
> >
> > 2008/8/14 bhavintailor_ec :
> > > --- In A..., "v333k" wrote:
> > >> --- In A..., bhavintailor_ec@ wrote:
> > >> > I m using AT91SAM7x512. I m using YAGARTO tool to compile my
code.
> > >>
> > >> My code is working ok. But, I have one problem is that As I add
more
> > >> variables than my code is not working. I have used RAM just around
> > >
> > > 5K
> > >
> > >> to 7K. I dont know why this is happing. I m also using SAM-ICE to
> > >> debugge my code. I have taken refrence from project
> > >> "demo_at91sam7_blink_flash". I have loaded .OUT file to debugg my
> > >> code. So, as i try to debugge code than it runs. But without
> > >
> > > debugging
> > >
> > >> it is not running. I program my CPU by SAM-BA v2.6.
> > >>
> > >>
> > >> Do you have any code size restrictions with YAGARTO? I am not
> > >> familiar with it, but if you get the trial copy of uVision, you
will
> > >> not be allowed to compile code greater than (I believe) 16KB.
> > >>
> > >> My advice is to check your compiler documentation and not be
> > >
> > > concerned
> > >
> > >> with the board.
> > >
> > > Thanks for replay,
> > > YAGARTO tool includes Eclipse as editor & GCC for ARM as compiler. I
> > > dont have problem with code size. I only have problem with Global
> > > Variables. Normally my code is working ok. But as i add global
> > > variables which r even not used in code at that time my code stop
> > > running.
>