I don't think so ...the only fictional book based on his life that I can recall was by Georgette Heyer ..The Spanish Bride ..which I read many moons ago .
Peter Luke wrote a book ..The Other Side of the Hill..a novel about the Peninsular War based upon Sir Harry Smith .
One of the TV programmes Sharpes Justice the original story set between Toulouse and the Waterloo campaign was based in part on incidents described by Harry Smith which occurred after the war.But whether Cornwell based the book on this is not clear.
You can always ask him !
http://www.bernardcornwell.net/