• AVR Freaks

Hot!SAME70 Header Files Question

Author
MisterHemi
Super Member
  • Total Posts : 275
  • Reward points : 0
  • Joined: 2017/11/02 12:24:21
  • Location: Commerce, CA USA
  • Status: offline
2020/06/19 20:17:26 (permalink)
0

SAME70 Header Files Question

Does anyone know if there's an equivalent of XC.H for the SAME70?
 
I'm doing some bare metal programming using MPLABX and i've found a few things and was able to successfully convert some ATMEL START projects but I was wondering if there was something simpler rather than copying a million header files.

My configuration:
MacBook Pro (Retina, 15-inch, Mid 2015) with MacOS Mojave (10.14.6) and MPLAB X IDE v5.30
 
Curiosity PIC32MZ EF 1 & 2, PIC24F Curiosity, XPRESS EVAL BOARD (PIC16F18855), SAMA5D3 Xplained and various custom boards.
#1

2 Replies Related Threads

    jdeguire
    Super Member
    • Total Posts : 582
    • Reward points : 0
    • Joined: 2012/01/13 07:48:44
    • Location: United States
    • Status: offline
    Re: SAME70 Header Files Question 2020/06/23 11:03:31 (permalink)
    0
    If I remember correctly, you should just be able to include "xc.h" and it'll pull in the correct file, which is location at "<XC32 Install Path>/pic32c/include/proc/<series>/<device name>.h".  This is true if you are using XC32 (which uses GCC 6.2.1 for the Arm devices), but I don't know about the Arm GCC that Atmel used to ship.
     
    Microchip changed the format of the SAM header files starting in XC32 v2.40 to match how Harmony 3 works.  If you want the older format to be compatible with Atmel START, then you'll want to use an older version of XC32.  The biggest difference is that bitfields are no longer arranged in structs and so you'll access register fields using REG_FIELDNAME_Msk macros (or something like that).
    #2
    MisterHemi
    Super Member
    • Total Posts : 275
    • Reward points : 0
    • Joined: 2017/11/02 12:24:21
    • Location: Commerce, CA USA
    • Status: offline
    Re: SAME70 Header Files Question 2020/06/23 17:48:55 (permalink)
    0
    Ok i'll try that and try to find the correct syntax for the newer version, which is what I prefer.
     
    I was able to get something from Atmel Start but, as you said, it seemed to be an older format. I prefer the newer version with the structs.
     
     

    My configuration:
    MacBook Pro (Retina, 15-inch, Mid 2015) with MacOS Mojave (10.14.6) and MPLAB X IDE v5.30
     
    Curiosity PIC32MZ EF 1 & 2, PIC24F Curiosity, XPRESS EVAL BOARD (PIC16F18855), SAMA5D3 Xplained and various custom boards.
    #3
    Jump to:
    © 2020 APG vNext Commercial Version 4.5