{"id":19065405,"url":"https://github.com/newaetech/chipshouter-ballisticgel","last_synced_at":"2025-10-26T02:35:04.766Z","repository":{"id":57413834,"uuid":"112991940","full_name":"newaetech/ChipSHOUTER-ballisticgel","owner":"newaetech","description":"ChipSHOUTER Ballistic Gel","archived":false,"fork":false,"pushed_at":"2022-08-16T20:11:35.000Z","size":13701,"stargazers_count":5,"open_issues_count":4,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-28T11:27:17.509Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-sa-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/newaetech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-04T03:49:56.000Z","updated_at":"2023-03-20T23:33:40.000Z","dependencies_parsed_at":"2022-09-05T03:32:15.073Z","dependency_job_id":null,"html_url":"https://github.com/newaetech/ChipSHOUTER-ballisticgel","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newaetech%2FChipSHOUTER-ballisticgel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newaetech%2FChipSHOUTER-ballisticgel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newaetech%2FChipSHOUTER-ballisticgel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newaetech%2FChipSHOUTER-ballisticgel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/newaetech","download_url":"https://codeload.github.com/newaetech/ChipSHOUTER-ballisticgel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251303888,"owners_count":21567769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-09T00:49:49.100Z","updated_at":"2025-10-26T02:35:04.741Z","avatar_url":"https://github.com/newaetech.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChipSHOUTER® CW521 Ballistic Gel\n\nThe CW521 is an Electro-Magnetic Fault Injection (EMFI) target. It is specially designed to help you understand fault injection patterns for a given tip.\n\nIt uses a large SRAM chip as a target, which has a relatively simple layout. This lets you understand how much of a given chip you are corrupting.\n\n![](cw520_photo.jpg)\n\n## GIT Layout ##\n\nThe GIT repository contains the following:\n\n1) PCB source (Altium) + gerber files\n2) Firmware for the microcontroller.\n3) Python library / PC application.\n\n## PC Application ##\n\nThe PC application is a simple example of using the Python library. This application does the following (via the library)\n\n1. Downloads a pattern to the SRAM chip.\n2. Waits for fault injection.\n3. Uploads SRAM chip contents \u0026 determines corrupt locations.\n4. Graphs map of physical SRAM locations (NB: not yet fully working).\n\nThe SRAM pattern can be something besides the random pattern, but the random pattern ensures \"odd\" corruptions (such as shorting address lines etc) will easily be caught.\n\nAn example of using the file is given at the end of ballisticgel.py, see the following:\n\n\tcw521 = CW521()\n    cw521.con()\n    \n    doplot = False\n    savefile = None\n    #savefile = 'error_locations.bin' \n    \n    #Raw method recommended - same speed and more flexible\n    use_raw_method = True\n\n    while True:\n        try:        \n            if use_raw_method:\n                print \"Writing data...\"\n                cw521.raw_test_setup()\n                raw_input(\"Hit enter when glitch inserted\")\n                results = cw521.raw_test_compare()\n            else:\n                print \"Writing data...\"\n                cw521.seed_test_setup()\n                raw_input(\"Hit enter when glitch inserted\")\n                results = cw521.seed_test_compare()\n            \n            errdatay = results['errdatay']\n            errdatax = results['errdatax']\n            errorlist = results['errorlist']\n            \n            if doplot:\n                plt.plot(errdatax, errdatay, '.r')\n                plt.axis([0, 8192, 0, 4096])\n                plt.show()\n\n            if savefile:\n                with open(savefile, \"wb\") as errfile:\n                    errfile.write(bytearray(errorlist))\n        except:\n            cw521.close()\n\nThe \"graph\" that pops up afterwards is slightly bogus - the physical map of the SRAM is not yet accurate. But the most interesting aspect is that you can see number of bit flips (positive/negative), and total number of bytes corrupted.\n\n### Result Format ###\n\nThe result information is provided in a dictionary. Depending if you use the fast (but less detailed) method or the slow (but more detailed) method you may not have all of these fields. It currently provides you with this:\n\n - 'errorlist': A list of addresses of each byte error. The length of this is the number of byte errors.\n - 'errdatax', 'errdatay': errdatax \u0026 errdatay attempt to provide a map of locations on SRAM chip where errors occurred. Until mapping is complete this is not fully accurate.\n - 'set_errors': Number of bit-set errors that occurred. Note number of bit errors is different from number of byte errors.\n - 'reset_errors': Number of bit-reset errors that occurred. Note number of bit errors is different from number of byte errors.\n\n## Building Firmware ##\n\nThe firmware uses the ChipWhisperer capture build system (naeusb). Navigate to\n`firmware/cw521` and run `git submodule update --init naeusb`. Once this has completed,\nrun `make`.\n\nThe firmware build requires `make` and `arm-none-eabi-gcc`.\n\n## Drivers ##\n\nAs of commit `f62ccdf0ea2d611deabf48ec3ad5db759205dbb0` and firmware version 2.0.0, \nthe CW521 now uses the same WCID driver assignment as ChipWhisperer devices,\nmeaning no custom drivers need to be installed.\n\nIf you have old firmware/drivers and want to update, the easiest method is to:\n\n1. Plug your Ballistic Gel board in\n1. Short JP1 (labelled ERASE)\n1. Unplug + replug your Ballistic Gel\n1. Run the following code:\n\n```python\nfrom ballisticgel import program_sam_firmware\nprogram_sam_firmware()\n```\n\nNote that the same `upgrade_firmware()` method is now available on the CW521 object:\n\n```python\nfrom ballisticgel import CW521\ncw521 = CW521()\ncw521.upgrade_firmware()\n```\n\n## Legal ##\n\nBallistic Gel is part of the ChipSHOUTER project (which is itself related to the ChipWhisperer project). It is also known as the CW521 target board.\n\nBallistic Gel is an open-source project, and is released with the GPL license. Assembled boards can be purchased from NewAE Technology Inc at https://store.newae.com .\n\nChipSHOUTER is a registered trademark of NewAE Technoloy Inc. Note you CANNOT sell boards using the ChipSHOUTER name without permission, and you cannot use NewAE Technology Inc's USB VID on your own products as the USB-IF license disallows sub-licensing in this manner. If you change the VID/PID, simply change the associated VID/PID in the .inf (driver) file as needed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnewaetech%2Fchipshouter-ballisticgel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnewaetech%2Fchipshouter-ballisticgel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnewaetech%2Fchipshouter-ballisticgel/lists"}