No announcement yet.

Trouble building project with two files

  • Filter
  • Time
  • Show
Clear All
new posts

  • Trouble building project with two files

    I'm working on an ATMega32A project that reads bytes from an array in internal flash and writes them out to IO ports. Everything works fine when this flash code is included in main.c. I'd like to move it to a separate file (Composition.c) for clarity, but when I do so, I get build errors for every reference to the array ("type error: pointer expected"). Most of my projects are simple enough to fit in one file, so I rarely build from multiple files; I'm probably leaving something simple out. See my setup in the attachment. Thanks for any tips.

  • #2
    Never mind. I realized that, since I'm reading from flash, that data should be stored in a header (.h) file, not a code (.c) file. All's good now.