From: "b.robinson.jp@gmail.com" <b.robinson.jp@gmail.com>
Subject: Re: USB Boarduino on AVR-Ada Tutorial
Date: Wed, 1 Sep 2010 20:39:59 -0700 (PDT)
Date: 2010-09-01T20:39:59-07:00 [thread overview]
Message-ID: <3be87447-5b06-4fcc-a0ed-7037659b81a5@m1g2000yqo.googlegroups.com> (raw)
In-Reply-To: Xns9DE15A1995F60WarrensBlatherings@188.40.43.230
Thanks for the suggestion.
I do have the right chip number (I verified it on the surface of the
IC too), and I do have the right IO port and pin number (verified with
the C program). The C version compiles and runs as expected, so I
think I'm going to have to study the bootstrapping process and get my
hands wet.
On Aug 27, 8:51 am, Warren <ve3...@gmail.com> wrote:
> b.robinson...@gmail.com expounded in news:1db702dd-3289-4e76-98fe-
> 08ab4bae3...@v8g2000yqe.googlegroups.com:
>
> >>.. I was able to
> > compile the project and generate my binary. The LED stays lit and
> > does not flash, but at least I have something to work on now. :)
>
> Check that you have exactly the right part specified for
> compiling the unit. What happens is that the object code
> may be compatible, but the configured SRAM size is not. This
> is critical in the main program, where it initializes the
> stack pointer (SP) at startup.
>
> I ran into this when building for atmega328, which supports
> a 2K SRAM. I was using an atmega168 with a 1K SRAM instead,
> but is otherwise completely compatible with the 328.
>
> So everything would work until you _called_ something. The
> called routine might work (if it needed no local vars or kept
> them in registers). But when it would try to return to the
> calling program, it would go west. Building for the 328
> sets the SP 1K higher than the 168 address wise, where
> there is no SRAM. So a return would go to address 16#FFFF#,
> since FF is what "no memory" returns.
>
> Compiling _libraries_ for a bigger part is ok, since it
> doesn't have to initialize the SP. But the main program
> has to be "right on" in this respect.
>
> In your case, I suspect that the delay routine is not
> returning properly. This strongly hints at the stack
> size problem. So check that MCU= parameter (I had to
> get a magnifying glass out to read my chip).
>
> Warren
next prev parent reply other threads:[~2010-09-02 3:39 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-04 2:50 USB Boarduino on AVR-Ada Tutorial Warren
2010-08-04 10:52 ` Brian Drummond
2010-08-04 12:42 ` Warren
2010-08-04 13:13 ` Warren
2010-08-04 21:26 ` Brian Drummond
2010-08-05 0:59 ` Warren
2010-08-22 22:41 ` Brian Drummond
2010-08-23 9:29 ` Tero Koskinen
2010-08-24 11:37 ` Brian Drummond
2010-08-24 12:25 ` Ludovic Brenta
2010-08-23 15:28 ` Warren
2010-08-23 22:08 ` Brian Drummond
2010-08-24 9:07 ` David Sauvage
2010-08-24 11:15 ` Brian Drummond
2010-08-24 13:40 ` Warren
2010-08-24 12:12 ` Brian Drummond
2010-08-05 14:53 ` Brian Drummond
2010-08-16 14:16 ` Warren
2010-08-23 22:10 ` Brian Drummond
2010-08-26 0:26 ` b.robinson.jp
2010-08-26 7:48 ` David Sauvage
2010-08-26 12:59 ` Warren
2010-08-27 1:44 ` b.robinson.jp
2010-08-27 12:51 ` Warren
2010-09-02 3:39 ` b.robinson.jp [this message]
2010-09-02 16:11 ` Charmed Snark
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox