How can I set a font size smaller than \tiny in lstlisting?
You can define (for ease of use and re-use) a \srcsize
command that sets an arbitrary font size (here 5pt for example)
\makeatletter
\newcommand{\srcsize}{\@setfontsize{\srcsize}{5pt}{5pt}}
\makeatother
and then in the style, you can use to set the size for the basic style:
basicstyle={\ttfamily\srcsize}
(adapt for other font families)