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

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

Re: [avr-gcc-list] Stuckness with ATTiny15 program and avr-gcc


From: Andy Warner
Subject: Re: [avr-gcc-list] Stuckness with ATTiny15 program and avr-gcc
Date: Fri, 7 Jan 2005 23:19:27 -0600
User-agent: Mutt/1.2.5i

Bruce D. Lightner wrote:
> [...]
> One problem that I see after looking at your mixed listing (i.e., 
> "regulator.lss") is that you have linked with the standard avr-gcc 
> "startup code", which assumes that you have RAM memory with .data and .bss 
> sections.  This is likely causing problems.

Copying zero length data and zeroing zero length bss shouldn't cause
a problem, I've (wastefully and sloppily) used similar crt0.s code
in Tiny15 without a problem. I do see two differences with your
listing:

1. your data section has 2 bytes in it (for the variables
   "true" and "false" (attiny15.h) according to my hacking.)
   I can vouch for the harmlessness of things like __do_copy_data
   and _do_clear_bss if both sections are zero length.

2. Your crt0.s seems to be from a different lineage than the
   one I'm using and tries to write 0x025F to SP, which
   may be breaking things. I've used startup that only wrote
   an 8-bit SP and they worked.

You're probably well advised to get rid of true/false from the
header file and update to use Bruce's linker goo and I'll bet
you will be back in business.
-- 
address@hidden

Andy Warner             Voice: (612) 801-8549   Fax: (208) 575-5634


reply via email to

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