Refactoring and adding ps_debugger tool to help Firmware development