avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] New prosessor goes into stack violation!


From: Per Arnold Blåsmo
Subject: Re: [avr-gcc-list] New prosessor goes into stack violation!
Date: Tue, 11 Jan 2005 12:37:08 +0100
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

That worked :-)
I tried both as an option and changing in avr-gcc. I go for the last option.

The code runs now and everything looks good.
Maybe the patches to the binutils and avr-gcc should be submitted to the project. I cant submit the header file for the MCU without Atmel approving it, but the patches to binutils, avr-gcc and avr-libc should be OK to submit.

There also is a couple of sections that could be defined for the MCU. I believed that was done in the linker script, but maybe that can be done as option to the linker?

I have one small problem though; When starting the debugger in AVRstudio it always makes a break on the ST X+,r0 instruction in the .do_copy_data_loop. I have to step trough every loop. When I am finished copying data the program runs as normal.

I don't now if there is something I set in AVRstudio or if its a bug somewhere?
Go figure???

Per A.

Marek Michalkiewicz wrote:

On Mon, Jan 10, 2005 at 10:47:51AM +0100, Per Arnold Bl?smo wrote:

So the question now is how do I tell the compiler that the start of SRAM is at 0x100?
Is this done in the linker script?

This can be done by passing the "-Tdata 0x800100" option to avr-ld:

avr-gcc -Wl,-Tdata,0x800100

This is done automagically if you specify a device with extended I/O
(such as -mmcu=atmega128) - see LINK_SPEC in gcc/config/avr/avr.h .

Marek




--
Per Arnold Blåsmo
e-mail: address@hidden
Get Thunderbird <http://www.mozilla.org/products/thunderbird/>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]