Unresolved Identifiers in wiring.c

I'm working on a MacBook Pro (2011 vintage) with OSX 10.12.6. I'm attempting to set up NetBeans IDE version 8.2 as a development environment for my Arduino Uno.
Following a suggestion I read in some forum, I've been trying to compile a static Arduino Core library to link my projects against. So I've created a project for which the source files are from the Arduino 1.8.6 installation directory.

After much experimentation, I can create a makefile using the wizard and have been able to compile all of the *.cpp files in the project. However, the two *.c files (wiring.c and WInterrupts.c) are giving me trouble. In wiring.c, there are "unresolved identifiers" that I cannot seem to track down. (e.g., TCD0_CNT, TCD0_INTFLAGS, OSC_CTRL and several others, see the attached screen capture). All seem to be associated with timers and clocks and appear to be the result of a "mass re-write" of this source code to handle XMEGA chips.

Some stuff I was able to fix by adding definitions to the avr-gcc command line (e.g., --mmcu-atmega328p)

Can anyone point me to the code that is missing?

unresolved.png

the megaavr core is for the Uno WiFi R2 (megaAVR-0 series ATmega4809). avr core is for Uno and co. what is "mass xmega rewrite"?

Hello Juraj and thank you for your reply.

I should have used the word "complete re-write" instead of "massive". This comes from the comments in the "wiring.c" which are taken from the file I downloaded from Git repository. (See the attached screen shot; lines 36-38).

Apparently, it was desired to add xmega capability to the existing wiring.c file, hence the re-write. I know nothing of the details of the re-write and I'm making no comment about it. It might be useful to see a copy of the original file before the changes were made.

I'm using the UNO (mega328p). I'm getting compile errors because stuff hasn't been defined before the compile process. I've been burrowing through the include hierarchy trying to find the definitions but have run into a block.

This quest was initiated by an article I found on setting Netbeans up for C/C++ coding for Arduino.

the dfines for registers are in avr-libc, not in Arduino core

The problem has been resolved:
Somehow I replaced the "wiring.c" file from the Arduino installation with the one from github that was revised for use with the xmega. So nothing worked for the UNO.

Replacing that file with the original from the Arduino installation (1.8.6) eliminated the undefined macros.

Thanks for the help.