This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to make variables in continuously memory?

I am using several array variables. The last variable is always using a separate memory instead of using the consecutive memory right after the previous one.  How do I make them in continuously memory?

Parents
  • Indeed, collect related items, variables, arrays, etc into a STRUCTURE or UNION

    The linker also provides for means of describing areas/sections of memory into which specific variables can be directed.

    But for pulling data too/from EEPROM, FLASH, or a File a struct is the way to go.

    Much better than a random assortment of globals with no order or associativity.

Reply
  • Indeed, collect related items, variables, arrays, etc into a STRUCTURE or UNION

    The linker also provides for means of describing areas/sections of memory into which specific variables can be directed.

    But for pulling data too/from EEPROM, FLASH, or a File a struct is the way to go.

    Much better than a random assortment of globals with no order or associativity.

Children