Hi Francesco Ferraro,
Do you want to use the UART bootloader?
If yes, you can refer to the application note and it's sample code.
The application note is AN2295:
http://cache.nxp.com/files/microcontrollers/doc/app_note/AN2295.pdf?fsrch=1&sr=1&pageNum=1
The according sample code is AN2295SW:
http://cache.nxp.com/files/microcontrollers/doc/app_note/AN2295SW.zip
Wish it helps you!
If you still have question, please let me know!
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------