GCC -- PSTR and LPM

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

If the GCC compiler needs the LPM opcode to use strings out out flash, how does it initialize the ram variables with the flash strings at startup?

Jeff

Jeff Dombach, JLD Systems
"We do the stuff behind the buttons!"
Your source for embedded solutions with a 100% Guarantee.
http://www.jldsystems.com
Phone 717.892.1100

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

This is done inside the C runtime startup code, using
either LPM or ELPM as well. It requires that your
flash programmer Hex file has been constructed out of
both, the .text and the .data section of the generated
ELF file.

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

I thought I heard that some of the Tiny processors don't support the LPM opcode. If that's true, how do they init ram with flash strings?

Jeff Dombach, JLD Systems
"We do the stuff behind the buttons!"
Your source for embedded solutions with a 100% Guarantee.
http://www.jldsystems.com
Phone 717.892.1100

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

They are not supported by the C compiler anyway. ;-)
These are the controllers that don't have RAM.