fixed build errors and warnings and added setup logic to jtag pins