0
\$\begingroup\$

i have a code for avr that write with iar, and have a header file,"ATxmega128A3.h. if i want to port this code to GCC (i am working with atmel studio),will i need to call this header file, or this header file just for IAR compiler?

\$\endgroup\$
0

1 Answer 1

0
\$\begingroup\$

You'll need the equivalent GCC header (iox128a3.h) and try to compile. You might have to fix and debug anything where the definitions aren't exactly the same... but don't worry, your compiler will complain for every... last... one... of... them.

\$\endgroup\$
2
  • \$\begingroup\$ can you tell me please why we need this header file,and why we should use this header file? \$\endgroup\$
    – AqaRashid
    Commented Apr 18, 2017 at 16:11
  • \$\begingroup\$ You don't 'need' it, but otherwise you will have to define any hardware-specific numbers (I/O register addresses and bits, interrupt vectors, memory ranges etc.) in your own code. \$\endgroup\$ Commented Apr 18, 2017 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.