7. Given the sequence $\left\{x_{n}\right\}$ satisfies
$$
x_{1}=0, x_{2}=1, x_{n}=\frac{x_{n-1}+x_{n-2}}{2}(n \geqslant 3)
$$

then the general term formula of the sequence $\left\{x_{n}\right\}$ is $x_{n}=$ $\qquad$
7. $\frac{2}{3}-\frac{2}{3}\left(-\frac{1}{2}\right)^{n-1}$.

From $x_{n}=\frac{x_{n-1}+x_{n-2}}{2}$ we get
$x_{n}+\frac{1}{2} x_{n-1}=x_{n-1}+\frac{1}{2} x_{n-2}$.
Also, $x_{2}+\frac{1}{2} x_{1}=1$, so the sequence $\left\{x_{n}+\frac{1}{2} x_{n-1}\right\}$
is a constant sequence, with each term being 1, i.e.,
$$
\begin{array}{l}
x_{n}+\frac{1}{2} x_{n-1}=1, \\
x_{n}-\frac{2}{3}=-\frac{1}{2}\left(x_{n-1}-\frac{2}{3}\right) .
\end{array}
$$

Since $x_{1}-\frac{2}{3}=-\frac{2}{3}$, the sequence $\left.x_{n}-\frac{2}{3}\right\}$ is a geometric sequence with the first term $-\frac{2}{3}$ and common ratio $-\frac{1}{2}$.
Thus, $x_{n}-\frac{2}{3}=-\frac{2}{3}\left(-\frac{1}{2}\right)^{n-1}$.
Therefore, $x_{n}=\frac{2}{3}-\frac{2}{3}\left(-\frac{1}{2}\right)^{n-1}$.