I will start to describe the problem to compiling software for the Atmega328PB.
As most people know, the Atmega328P is a very often used and older IC, which is supported by the gcc since a while. This chip is also used on a lot of Arduino Boards.
Atmel and also Arduino uses the gcc for compiling the sources. If you use the latest Atmel Studio under Windows you can compile a firmware for that chip.
IMHO: I don't recommend the Atmel Studio 7 as development tool. It is very, very slow and has a very weird menu structure. Completely unusable.
October 2015 Atmel send a patch to gcc which should add the support of these IC ( and some other more). But the problem is, it is a patch for the gcc 6.0.0 (gcc patch). Arduino itself uses the gcc 4.8.1, even in the latest IDE version 1.6.7.
So what I did till now:
I look deeper and found a Atmel Website with a Atmel Pack, which contains even the Atmega328PB xml file, the header and some other stuff.
I even found the Atmel Toolchain script. But also there is a helpful information, how to build the avr toolchain at the avrlibc website.
Later I will describe the toolchain build, why the Atmel script doesn't work for me and how I found a way to use Arduino.