{"id":19942907,"url":"https://github.com/looran/poojtag","last_synced_at":"2026-05-13T03:37:24.878Z","repository":{"id":186226927,"uuid":"612458372","full_name":"looran/poojtag","owner":"looran","description":"pure python JTAG over BusPirate-like OCD protocol","archived":false,"fork":false,"pushed_at":"2023-04-02T12:13:25.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T13:25:44.096Z","etag":null,"topics":["atmega","avr","buspirate","hydrabus","jtag","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/looran.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-03-11T02:14:17.000Z","updated_at":"2023-03-11T02:22:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"5cdf78c3-8594-4cfa-b118-42e48c5a0862","html_url":"https://github.com/looran/poojtag","commit_stats":null,"previous_names":["looran/poojtag"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/looran/poojtag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/looran%2Fpoojtag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/looran%2Fpoojtag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/looran%2Fpoojtag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/looran%2Fpoojtag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/looran","download_url":"https://codeload.github.com/looran/poojtag/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/looran%2Fpoojtag/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32967208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T23:30:32.555Z","status":"online","status_checked_at":"2026-05-13T02:00:07.132Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atmega","avr","buspirate","hydrabus","jtag","python"],"created_at":"2024-11-13T00:14:35.570Z","updated_at":"2026-05-13T03:37:24.872Z","avatar_url":"https://github.com/looran.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"### poojtag - pure python JTAG over BusPirate-like OCD protocol\n\npoojtag uses python objects to describe JTAG instructions in an attempt to ease experimentation with new instructions, for both encoding of TDI/TMS sequence and TDO decoding.\n\nInstruction implementation can be tested (test_poojtag.py) and loosely simulated (TAP.sim_seq()).\n\npoojtag has a focus on Atmel AVR chips.\n\n### Example\n\n#### Running the IDCODE command\n\n```\n$ ./poojtag.py /dev/ttyACM0 IDCODE\nPassword:\nstarting at 2023-03-11 03:00:25.000688, logging to poojtag.log, using device '/dev/ttyACM0', actions: ['IDCODE']\nBP initialized\nIDCODE[]: [b'00000000', b'00000000']\nstopping at 2023-03-11 03:00:25.009613\n```\n\n#### Pretending to run the IDCODE command\n\n```\n$ ./poojtag.py pretend IDCODE\nstarting at 2023-03-11 03:01:17.326655, logging to poojtag.log, using device 'pretend', actions: ['IDCODE']\ndump sequence [9] : [(0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 0, 0)]\ntdi = [0, 0, 0, 0, 0, 0, 0, 0, 0]\ntms = [1, 1, 1, 1, 1, 1, 1, 1, 0]\n01/09          STATE_UNKNOWN  tdi=0 tms=1 decode_tdo=0\n02/09          STATE_UNKNOWN  tdi=0 tms=1 decode_tdo=0\n03/09          STATE_UNKNOWN  tdi=0 tms=1 decode_tdo=0\n04/09          STATE_UNKNOWN  tdi=0 tms=1 decode_tdo=0\n05/09          STATE_UNKNOWN  tdi=0 tms=1 decode_tdo=0\n06/09          STATE_UNKNOWN  tdi=0 tms=1 decode_tdo=0\n07/09          STATE_UNKNOWN  tdi=0 tms=1 decode_tdo=0\n08/09 STATE_TEST_LOGIC_RESET  tdi=0 tms=1 decode_tdo=0\n09/09 STATE_TEST_LOGIC_RESET  tdi=0 tms=0 decode_tdo=0\nend          STATE_RUN_TEST_IDLE\ndump sequence [79] : [(0, 1, 0), (0, 1, 0), (0, 0, 0), (0, 0, 0), (1, 0, 0), (0, 0, 0), (0, 0, 0), (0, 1, 0), (0, 1, 0), (0, 0, 0), (0, 1, 0), (0, 0, 0), (0, 0, 0), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1),(0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 1, 1), (0, 1, 0), (0, 0, 0)]\ntdi = [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\ntms = [1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0]\n01/79    STATE_RUN_TEST_IDLE  tdi=0 tms=1 decode_tdo=0 \n02/79   STATE_SELECT_DR_SCAN  tdi=0 tms=1 decode_tdo=0\n03/79   STATE_SELECT_IR_SCAN  tdi=0 tms=0 decode_tdo=0 \n04/79       STATE_CAPTURE_IR  tdi=0 tms=0 decode_tdo=0 \n05/79         STATE_SHIFT_IR  tdi=1 tms=0 decode_tdo=0 \n06/79         STATE_SHIFT_IR  tdi=0 tms=0 decode_tdo=0 \n07/79         STATE_SHIFT_IR  tdi=0 tms=0 decode_tdo=0 \n08/79         STATE_SHIFT_IR  tdi=0 tms=1 decode_tdo=0 \n09/79         STATE_EXIT1_IR  tdi=0 tms=1 decode_tdo=0 ir=0001 [4] 0x1\n10/79        STATE_UPDATE_IR  tdi=0 tms=0 decode_tdo=0\n11/79    STATE_RUN_TEST_IDLE  tdi=0 tms=1 decode_tdo=0\n12/79   STATE_SELECT_DR_SCAN  tdi=0 tms=0 decode_tdo=0 \n13/79       STATE_CAPTURE_DR  tdi=0 tms=0 decode_tdo=0\n14/79         STATE_SHIFT_DR  tdi=0 tms=0 decode_tdo=1 \n15/79         STATE_SHIFT_DR  tdi=0 tms=0 decode_tdo=1 \n[...]\n75/79         STATE_SHIFT_DR  tdi=0 tms=0 decode_tdo=1 \n76/79         STATE_SHIFT_DR  tdi=0 tms=0 decode_tdo=1 \n77/79         STATE_SHIFT_DR  tdi=0 tms=1 decode_tdo=1 \n78/79         STATE_EXIT1_DR  tdi=0 tms=1 decode_tdo=0 dr=0000000000000000000000000000000000000000000000000000000000000000 [64] 0x0\n79/79        STATE_UPDATE_DR  tdi=0 tms=0 decode_tdo=0 \nend          STATE_RUN_TEST_IDLE\nstopping at 2023-03-11 03:01:17.335403\n```\n\n### Usage\n\n```\n$ ./poojtag.py  -h\nusage: poojtag.py [-h] [-d] device {interactive,\u003cinstruction\u003e[:arg]} [{interactive,\u003cinstruction\u003e[:arg]} ...]\n\npoojtag v20230402 - pure python JTAG over BusPirate-like OCD protocol\n\npositional arguments:\n  device                Serial port to BusPirate-compatible device eg. /dev/ttyUSB0, or 'pretend' to only display the JTAG sequence\n  {interactive,\u003cinstruction\u003e[:arg]}\n\noptions:\n  -h, --help            show this help message and exit\n  -d, --debug           show debug output\n\nInstructions:\nAVR_Chip_Erase\nAVR_OCD_Break[:run_or_stop=None]\nAVR_OCD_Read_PC_Private\nAVR_OCD_Read_Register_Private[:register=13]\nAVR_OCD_Run\nAVR_Prog_Enter\nAVR_Prog_Leave\nAVR_Program_Lock_bits[:lb1=1,lb2=1,blb01=1,blb02=1,blb11=1,blb12=1]\nAVR_Read_Flash_Byte_NOTWORKING[:low=0,high=0,exthigh=0]\nAVR_Read_Flash_Page[:high=0,exthigh=0,read_bytes=512]\nAVR_Read_Fuses_and_Lock_bits\nAVR_Read_Signature\nAVR_Reset[:tdi=1]\nAVR_Write_Flash_Page[:high=0,exthigh=0,page_hex=ff ff 00 ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\nff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff]\nBYPASS\nIDCODE\nIDCODE_implicit\nSAMPLE_PRELOAD[:chain_len=64]\nSleep[:usec=1000]\n```\n\n### Compatibility\n\nThis python object oriented jtag tool is compatible with any JTAG controller supporting the BusPirate JTAG OCD protocol.\n\nIt has been tested on:\n* BusPirate\n* HydraBus\n\n### Dependencies\n\n* pySerial\n* python-bitstring\n\n### Alternatives\n\n* Use urjtag with busblaster or other UUSB to JTAG hardware cable\n* Use OpenOCD, that can have less target chip support than urjtag\n* Develop some code over https://github.com/eblot/pyftdi and use a compatible FTDI chip for the bridge\n\n### Ressources\n\n#### python libraries\n\n* FTDI device driver written in pure Python\nhttps://github.com/eblot/pyftdi\nSuported FTDI devices include:\nUART and GPIO bridges\n    FT232R (single port, 3Mbps)\n    FT230X/FT231X/FT234X (single port, 3Mbps)\nUART, GPIO and multi-serial protocols (SPI, I2C, JTAG) bridges\n    FT2232C/D (dual port, clock up to 6 MHz)\n    FT232H (single port, clock up to 30 MHz)\n    FT2232H (dual port, clock up to 30 MHz)\n    FT4232H (quad port, clock up to 30 MHz)\n\n* python-bsdl-parser\nhttps://github.com/raczben/python-bsdl-parser\nThis is a Grako-based parser for IEEE 1149.1 Boundary-Scan Description Language (BSDL) files.\n\n* pyBSDL, \nhttps://github.com/BCadet/pyBSDL\nuses pyftdi and integrates code from python-bsdl-parser\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flooran%2Fpoojtag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flooran%2Fpoojtag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flooran%2Fpoojtag/lists"}