Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

How to set up butterfly flash memory in studio?

How to set up butterfly flash memory in studio?

2006-04-09 by scmikes03

Hello All,

I downloaded 4.12 and applied service pack 2.

I created a winavr project

I snagged some sample butterfly code from
http://www.siwawi.arubi.uni-kl.de/avr_projects/#bf_app


I set the device type to simulator, 169.

How do I set the simulator to use the 4 meg flash memory.

---------------------- build output ---------------

AVR Memory Usage
----------------
Device: atmega169
Program:   21182 bytes (129.3% Full)
(.text + .data + .bootloader)

Data:        241 bytes (23.5% Full)
(.data + .bss + .noinit)


When I try to run the program:

The contents of the objectfile exceeds the maximum program memory of
the device
Error loading object file C:\work\avr\bf_proj\default\bf_proj.elf


This makes sense since the Program memory is 129.3%



Newbie Question:  the 129.3% Full, shouldn't the 29.3% roll over to
the flash memory?


Thanks 
Mike

Re: How to set up butterfly flash memory in studio?

2006-04-09 by ufo2joe

I don't think that's possible. 

The 4 Megabit DataFlash on the Buttrerfly is a serial SPI device 
isn't it?

--- In AVR-Chat@yahoogroups.com, "scmikes03" <michaelschneider@...> 
wrote:
Show quoted textHide quoted text
>
> Hello All,
> 
> I downloaded 4.12 and applied service pack 2.
> 
> I created a winavr project
> 
> I snagged some sample butterfly code from
> http://www.siwawi.arubi.uni-kl.de/avr_projects/#bf_app
> 
> 
> I set the device type to simulator, 169.
> 
> How do I set the simulator to use the 4 meg flash memory.
> 
> ---------------------- build output ---------------
> 
> AVR Memory Usage
> ----------------
> Device: atmega169
> Program:   21182 bytes (129.3% Full)
> (.text + .data + .bootloader)
> 
> Data:        241 bytes (23.5% Full)
> (.data + .bss + .noinit)
> 
> 
> When I try to run the program:
> 
> The contents of the objectfile exceeds the maximum program memory of
> the device
> Error loading object file C:\work\avr\bf_proj\default\bf_proj.elf
> 
> 
> This makes sense since the Program memory is 129.3%
> 
> 
> 
> Newbie Question:  the 129.3% Full, shouldn't the 29.3% roll over to
> the flash memory?
> 
> 
> Thanks 
> Mike
>

Re: [AVR-Chat] How to set up butterfly flash memory in studio?

2006-04-09 by Ned Konz

On Apr 8, 2006, at 9:38 PM, scmikes03 wrote:

> Hello All,
>
> I downloaded 4.12 and applied service pack 2.
>
> I created a winavr project
>
> I snagged some sample butterfly code from
> http://www.siwawi.arubi.uni-kl.de/avr_projects/#bf_app
>
>
> I set the device type to simulator, 169.
>
> How do I set the simulator to use the 4 meg flash memory.
>

> This makes sense since the Program memory is 129.3%
>
>
>
> Newbie Question:  the 129.3% Full, shouldn't the 29.3% roll over to
> the flash memory?

No;  the AVR can't execute instructions directly from external  
memories like that.

There are a few (relatively rare) AVR parts that can execute from RAM  
(one of the USB ones comes to mind), but no others that I know of  
that can execute normal AVR instructions from external memory.  
Especially serial flash memory like that, which takes quite a few  
cycles to move a single byte.

This doesn't mean that you couldn't write a program that could  
execute some kind of code from that memory; it just means that the  
AVR itself can't do that.

-- 
Ned Konz
ned@bike-nomad.com




-- 
Ned Konz
MetaMagix embedded consulting
MetaMagix@gmail.com

Re: How to set up butterfly flash memory in studio?

2006-04-09 by scmikes03

--- In AVR-Chat@yahoogroups.com, Ned Konz <bikenomad@...> wrote:
>
> 
> On Apr 8, 2006, at 9:38 PM, scmikes03 wrote:
> 
> > Hello All,
> >
> > I downloaded 4.12 and applied service pack 2.
> >
> > I created a winavr project
> >
> > I snagged some sample butterfly code from
> > http://www.siwawi.arubi.uni-kl.de/avr_projects/#bf_app
> >
> >
> > I set the device type to simulator, 169.
> >
> > How do I set the simulator to use the 4 meg flash memory.
> >
> 
> > This makes sense since the Program memory is 129.3%
> >
> >
> >
> > Newbie Question:  the 129.3% Full, shouldn't the 29.3% roll over to
> > the flash memory?
> 
> No;  the AVR can't execute instructions directly from external  
> memories like that.
> 
> There are a few (relatively rare) AVR parts that can execute from RAM  
> (one of the USB ones comes to mind), but no others that I know of  
> that can execute normal AVR instructions from external memory.  
> Especially serial flash memory like that, which takes quite a few  
> cycles to move a single byte.
> 
> This doesn't mean that you couldn't write a program that could  
> execute some kind of code from that memory; it just means that the  
> AVR itself can't do that.
> 
> -- 
> Ned Konz
> ned@...
> 
> 
> 
> 
> -- 
> Ned Konz
> MetaMagix embedded consulting
> MetaMagix@...
>

Ned,

Thank you very much for answering my newbie question.  I am going back
to my ancient EE roots.  I have been slinging code for 3d solid
modelers for the last 15 years, and am looking forward to the
challenges and rewards of programming the microcontrollers.

It is truly amazing of the capabilities of the microcontrollers,  I
look forward to alot of fun.

Hopeful I will add some value to the group soon (after my learning the
microcontroller way :-).

My current motivation is to automate some woodworking tasks.

1) gear cutting for wooden clocks
2) simple CNC router

I used to do NC generation, so I have some comfort level in most of
this domain :-)

Thanks for you kind response to my newbie question,
Mike

Re: How to set up butterfly flash memory in studio?

2006-04-09 by scmikes03

Thank you,

It is an spi device. The butterfly is a fun starter kit.  Atmel did a
very nice job with this :-)

Mike

--- In AVR-Chat@yahoogroups.com, "ufo2joe" <ufo-joe@...> wrote:
Show quoted textHide quoted text
>
> I don't think that's possible. 
> 
> The 4 Megabit DataFlash on the Buttrerfly is a serial SPI device 
> isn't it?
> 
> --- In AVR-Chat@yahoogroups.com, "scmikes03" <michaelschneider@> 
> wrote:
> >
> > Hello All,
> > 
> > I downloaded 4.12 and applied service pack 2.
> > 
> > I created a winavr project
> > 
> > I snagged some sample butterfly code from
> > http://www.siwawi.arubi.uni-kl.de/avr_projects/#bf_app
> > 
> > 
> > I set the device type to simulator, 169.
> > 
> > How do I set the simulator to use the 4 meg flash memory.
> > 
> > ---------------------- build output ---------------
> > 
> > AVR Memory Usage
> > ----------------
> > Device: atmega169
> > Program:   21182 bytes (129.3% Full)
> > (.text + .data + .bootloader)
> > 
> > Data:        241 bytes (23.5% Full)
> > (.data + .bss + .noinit)
> > 
> > 
> > When I try to run the program:
> > 
> > The contents of the objectfile exceeds the maximum program memory of
> > the device
> > Error loading object file C:\work\avr\bf_proj\default\bf_proj.elf
> > 
> > 
> > This makes sense since the Program memory is 129.3%
> > 
> > 
> > 
> > Newbie Question:  the 129.3% Full, shouldn't the 29.3% roll over to
> > the flash memory?
> > 
> > 
> > Thanks 
> > Mike
> >
>

Re: How to set up butterfly flash memory in studio?

2006-04-09 by scmikes03

Thanks Kat,

I will try this approach. 
Mike 
--- In AVR-Chat@yahoogroups.com, Kathy Quinlan <kat-yahoo@...> wrote:
>
> Ned Konz wrote:
> 
> >> How do I set the simulator to use the 4 meg flash memory.
> 
> > No;  the AVR can't execute instructions directly from external  
> > memories like that.
> > 
> > There are a few (relatively rare) AVR parts that can execute from
RAM  
Show quoted textHide quoted text
> > (one of the USB ones comes to mind), but no others that I know of  
> > that can execute normal AVR instructions from external memory.  
> > Especially serial flash memory like that, which takes quite a few  
> > cycles to move a single byte.
> > 
> > This doesn't mean that you couldn't write a program that could  
> > execute some kind of code from that memory; it just means that the  
> > AVR itself can't do that.
> > 
> I was writing a "Basic Stamp" type app for the AVR, but realised it was 
> going to be useless, it is just as easy to use BASCOM and compile and 
> send the assembled code down as it would to run an interpreter on chip. 
> BUT it is faster to compile once and download the assembled code :)
> 
> -- 
> Regards,
> 
> Kat.
> ---------------------------------------------------------------
>   K.A.Q. Electronics     Website: www.kaqelectronics.dyndns.org
>   IM: Yahoo: PinkyDwaggy MSN: katinka@...
>   For Everything Electronics 		   Phone: 0419 923 731
> ---------------------------------------------------------------
> 
> 
> -- 
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.385 / Virus Database: 268.4.0/305 - Release Date: 8/04/2006
>

Re: [AVR-Chat] How to set up butterfly flash memory in studio?

2006-04-09 by Kathy Quinlan

Ned Konz wrote:

>> How do I set the simulator to use the 4 meg flash memory.

> No;  the AVR can't execute instructions directly from external  
> memories like that.
> 
> There are a few (relatively rare) AVR parts that can execute from RAM  
> (one of the USB ones comes to mind), but no others that I know of  
> that can execute normal AVR instructions from external memory.  
> Especially serial flash memory like that, which takes quite a few  
> cycles to move a single byte.
> 
> This doesn't mean that you couldn't write a program that could  
> execute some kind of code from that memory; it just means that the  
> AVR itself can't do that.
> 
I was writing a "Basic Stamp" type app for the AVR, but realised it was 
going to be useless, it is just as easy to use BASCOM and compile and 
send the assembled code down as it would to run an interpreter on chip. 
BUT it is faster to compile once and download the assembled code :)

-- 
Regards,

Kat.
---------------------------------------------------------------
  K.A.Q. Electronics     Website: www.kaqelectronics.dyndns.org
  IM: Yahoo: PinkyDwaggy MSN: katinka@kaqelectronics.dyndns.org
  For Everything Electronics 		   Phone: 0419 923 731
---------------------------------------------------------------


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.0/305 - Release Date: 8/04/2006

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.