External memory in AS

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all,

 

I'm currently trying to expand ram memory on mega64 but I'm having some problems with AS.

 

I'm using custom make file and I have specified EXTMEMOPTS in LDFLAGS but AS is complaining about memory overflow. Now since I'm using custom make file I'm unable to select "External ram check ......" in AS. Is there some workaround for this check when using custom make file ?

 

Best regards,

geronimo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

No where near enough detail. Just saying "complaining about memory overflow" tells us nothing about what you are attempting or the exact wording of the error message.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
No where near enough detail.

Indeed!

 

geronimo350 wrote:
I have specified EXTMEMOPTS in LDFLAGS

What, exactly, have you specified?

 

but AS is complaining about memory overflow

What "complaint(s)", exactly, is it giving?

As clawson says, you need to show the full error text.

 

 

EDIT

 

Does this help: https://www.avrfreaks.net/forum/trying-use-xram - has some detail about linker settings ...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Fri. Apr 6, 2018 - 11:15 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi clawson,

 

the error that I'm getting is:

     Using "RunOutputFileVerifyTask" task from assembly "C:\Program Files (x86)\Atmel\Studio\7.0\Extensions\Application\AvrGCC.dll".

     Task "RunOutputFileVerifyTask"

     estt(0,0): error: Program Memory Usage : 24128 bytes   36,8 % Full

     Data Memory Usage : 12029 bytes   293,7 % Full (Memory Overflow)

 

With extended memory I should have more than 64k of RAM but that's not the case. As stated before I'm using custom make file which is preventing me to enable "External ram check for memory overflow (only if device supports this)" under Toolchain -> AVR/GNU Common -> General

 

Options set in make file:

     EXTMEMOPTS = -Wl,--defsym=__heap_start=0x801100,--defsym=__heap_end=0x80ffff

     LDFLAGS += -Wl,--gc-sections
     LDFLAGS += $(EXTMEMOPTS)
     LDFLAGS += -mmcu=$(MCU)

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

geronimo350 wrote:

     Data Memory Usage : 12029 bytes   293,7 % Full (Memory Overflow)

Maybe that issue is solved in Atmel Studio 7.0.1645 :

Microchip Technology Inc

Microchip Technology

Atmel Studio 7

http://www.microchip.com/avr-support/atmel-studio-7

http://studio.download.atmel.com/7.0.1645/as-installer-7.0.1645-readme.pdf

(page 3)

...

• Atmel Studio 7.0.1645 contains fixes for the following issues that were present in 7.0.1417:

...

– AVRSV-7877: Devices with external SRAM fails to calculate available SRAM

...

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi gchapman,

 

thanks for the info. I'm using the 7.0.1645 version but maybe the issue is still present in some cases. 

 

I did go through the map file and the bss section is correctly linked to 801100 location but AS still keeps complaining about xram. I'm including the map file, maybe I did overlook something. Otherwise I think it would be best to raise a bug on AS.

 

Also awneil thanks for the link, those external memory allocation shared by stu_san is explained nicely.

 

Attachment(s): 

Last Edited: Sat. Apr 7, 2018 - 07:29 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Behind the scenes Studio runs avr-size but I think it then post processes the results with a "knowledge" of how much memory each device has. This doesn't "know" about memory you have added so I believe that threads in the past have given the method to "switch off" that Atmel supplied memory check. Not sure how you will find such threads though so maybe best to wait for Morten to appear to remind us.