├── .clang-format
├── .gitattributes
├── .github
├── ISSUE_TEMPLATE
│ ├── bug-report.yml
│ ├── config.yml
│ ├── documentation-request.yml
│ ├── feature-request.yml
│ ├── question.yml
│ └── technical-support.yml
└── workflows
│ ├── build.yml
│ └── clang-format-check.yml
├── .gitignore
├── .gitmodules
├── .readthedocs.yaml
├── CODE_OF_CONDUCT.md
├── COPYING
├── Dockerfile
├── Jenkinsfile
├── Readme.md
├── TRADEMARK
├── appveyor.yml
├── ci-scripts
├── install-firmware.sh
├── install-host.sh
├── test-debug.py
├── test-firmware-flash.sh
├── test-firmware-program.sh
├── test-host.sh
├── test-sgpio-debug.py
└── test-transfer.py
├── doc
└── hardware
│ ├── README
│ ├── README.production
│ ├── hackrf-one-assembly.pdf
│ ├── hackrf-one-gerbers
│ ├── hackrf-one-B_Mask.gbr
│ ├── hackrf-one-C1F.gbr
│ ├── hackrf-one-C2.gbr
│ ├── hackrf-one-C3.gbr
│ ├── hackrf-one-C4B.gbr
│ ├── hackrf-one-Edge_Cuts.gbr
│ ├── hackrf-one-F_Mask.gbr
│ ├── hackrf-one-F_Paste.gbr
│ ├── hackrf-one-F_Silkscreen.gbr
│ ├── hackrf-one-Placement.gbr
│ ├── hackrf-one-all-pos.csv
│ ├── hackrf-one-drl.rpt
│ ├── hackrf-one-drl_map.gbr
│ ├── hackrf-one.bom.csv
│ └── hackrf-one.drl
│ ├── hackrf-one-schematic.pdf
│ ├── jawbreaker-assembly.pdf
│ ├── jawbreaker-bom.csv
│ ├── jawbreaker-gerbers
│ ├── README
│ ├── jawbreaker-B_Mask.gbs
│ ├── jawbreaker-Back.gbl
│ ├── jawbreaker-Edge_Cuts.gbr
│ ├── jawbreaker-F_Mask.gts
│ ├── jawbreaker-F_Paste.gtp
│ ├── jawbreaker-F_SilkS.gto
│ ├── jawbreaker-Front.gtl
│ ├── jawbreaker-Inner2.gbr
│ ├── jawbreaker-Inner3.gbr
│ └── jawbreaker.drl
│ └── jawbreaker-schematic.pdf
├── docs
├── .readthedocs.yaml
├── Makefile
├── doxygen
│ └── Doxyfile
├── images
│ ├── HackRF-One-fd0-0009.jpeg
│ ├── block-diagram-r9.png
│ ├── block-diagram-r9.svg
│ ├── block-diagram.png
│ ├── block-diagram.svg
│ ├── grc-hw-sync-streaming.png
│ ├── jawbreaker.JPG
│ ├── max2837-1m75bw-at-2m.png
│ ├── max2837-1m75bw-at-8m.png
│ ├── noisereducingcable.jpeg
│ ├── noisereducingcablescreenshot.jpeg
│ ├── operacake.jpeg
│ ├── rf_shield_1.jpeg
│ ├── rf_shield_2.jpg
│ ├── rf_shield_3.jpg
│ ├── rf_shield_4.jpg
│ ├── rf_shield_5.jpg
│ ├── rf_shield_6.jpg
│ ├── rf_shield_7.jpg
│ ├── rf_shield_8.jpg
│ ├── rf_shield_9.jpg
│ └── trigger-pins.png
├── make.bat
├── requirements.txt
└── source
│ ├── LPC43XX_Debugging.rst
│ ├── LPC43XX_SGPIO_Configuration.rst
│ ├── conf.py
│ ├── enclosure_options.rst
│ ├── expansion_interface.rst
│ ├── external_clock_interface.rst
│ ├── faq.rst
│ ├── firmware_development_setup.rst
│ ├── getting_help.rst
│ ├── hackrf_connectors.rst
│ ├── hackrf_minimum_requirements.rst
│ ├── hackrf_one.rst
│ ├── hackrf_projects_mentions.rst
│ ├── hackrf_tools.rst
│ ├── hackrfs_buttons.rst
│ ├── hardware_components.rst
│ ├── hardware_triggering.rst
│ ├── index.rst
│ ├── installing_hackrf_software.rst
│ ├── jawbreaker.rst
│ ├── leds.rst
│ ├── list_of_hardware_revisions.rst
│ ├── opera_cake.rst
│ ├── opera_cake_board_addressing.rst
│ ├── opera_cake_faq.rst
│ ├── opera_cake_hardware.rst
│ ├── opera_cake_modes_of_operation.rst
│ ├── opera_cake_port_configuration.rst
│ ├── rf_shield_installation.rst
│ ├── sampling_rate.rst
│ ├── setting_gain.rst
│ ├── software_support.rst
│ ├── updating_firmware.rst
│ ├── usb_cables.rst
│ └── virtual_machines.rst
├── firmware
├── .gitignore
├── CMakeLists.txt
├── README
├── appveyor.sh
├── blinky
│ ├── CMakeLists.txt
│ ├── README
│ └── blinky.c
├── common
│ ├── LPC4320_M4_memory.ld
│ ├── LPC4330_M4_memory.ld
│ ├── LPC43xx_M0_memory.ld
│ ├── LPC43xx_M4_M0_image_from_text.ld
│ ├── LPC43xx_M4_memory.ld
│ ├── README
│ ├── bitband.c
│ ├── bitband.h
│ ├── clkin.c
│ ├── clkin.h
│ ├── configure_file.cmake
│ ├── cpld_jtag.c
│ ├── cpld_jtag.h
│ ├── cpld_xc2c.c
│ ├── cpld_xc2c.h
│ ├── crc.c
│ ├── crc.h
│ ├── fault_handler.c
│ ├── fault_handler.h
│ ├── firmware_info.c
│ ├── firmware_info.h
│ ├── gpdma.c
│ ├── gpdma.h
│ ├── gpio.h
│ ├── gpio_lpc.c
│ ├── gpio_lpc.h
│ ├── hackrf_core.c
│ ├── hackrf_core.h
│ ├── hackrf_ui.c
│ ├── hackrf_ui.h
│ ├── i2c_bus.c
│ ├── i2c_bus.h
│ ├── i2c_lpc.c
│ ├── i2c_lpc.h
│ ├── m0_bin.s.cmake
│ ├── m0_sleep.c
│ ├── max2837.c
│ ├── max2837.h
│ ├── max2837_regs.def
│ ├── max2837_target.c
│ ├── max2837_target.h
│ ├── max2839.c
│ ├── max2839.h
│ ├── max2839_regs.def
│ ├── max2839_target.c
│ ├── max2839_target.h
│ ├── max283x.c
│ ├── max283x.h
│ ├── max2871.c
│ ├── max2871.h
│ ├── max2871_regs.c
│ ├── max2871_regs.h
│ ├── max5864.c
│ ├── max5864.h
│ ├── max5864_target.c
│ ├── max5864_target.h
│ ├── mixer.c
│ ├── mixer.h
│ ├── operacake.c
│ ├── operacake.h
│ ├── operacake_sctimer.c
│ ├── operacake_sctimer.h
│ ├── platform_detect.c
│ ├── platform_detect.h
│ ├── portapack.c
│ ├── portapack.h
│ ├── rad1o
│ │ ├── decoder.c
│ │ ├── decoder.h
│ │ ├── display.c
│ │ ├── display.h
│ │ ├── draw.c
│ │ ├── draw.h
│ │ ├── fonts.h
│ │ ├── print.c
│ │ ├── print.h
│ │ ├── render.c
│ │ ├── render.h
│ │ ├── smallfonts.c
│ │ ├── smallfonts.h
│ │ ├── ubuntu18.c
│ │ └── ubuntu18.h
│ ├── rf_path.c
│ ├── rf_path.h
│ ├── rffc5071.c
│ ├── rffc5071.h
│ ├── rffc5071_regs.def
│ ├── rffc5071_spi.c
│ ├── rffc5071_spi.h
│ ├── rom_iap.c
│ ├── rom_iap.h
│ ├── sct.h
│ ├── sgpio.c
│ ├── sgpio.h
│ ├── si5351c.c
│ ├── si5351c.h
│ ├── spi_bus.c
│ ├── spi_bus.h
│ ├── spi_ssp.c
│ ├── spi_ssp.h
│ ├── streaming.c
│ ├── streaming.h
│ ├── tuning.c
│ ├── tuning.h
│ ├── ui_portapack.c
│ ├── ui_portapack.h
│ ├── ui_rad1o.c
│ ├── ui_rad1o.h
│ ├── usb.c
│ ├── usb.h
│ ├── usb_queue.c
│ ├── usb_queue.h
│ ├── usb_request.c
│ ├── usb_request.h
│ ├── usb_standard_request.c
│ ├── usb_standard_request.h
│ ├── usb_type.h
│ ├── user_config.c
│ ├── user_config.h
│ ├── w25q80bv.c
│ ├── w25q80bv.h
│ ├── w25q80bv_target.c
│ ├── w25q80bv_target.h
│ └── xapp058
│ │ ├── README
│ │ ├── lenval.c
│ │ ├── lenval.h
│ │ ├── micro.c
│ │ ├── micro.h
│ │ ├── ports.c
│ │ └── ports.h
├── cpld
│ ├── README
│ ├── sgpio_debug
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── batch_svf
│ │ ├── batch_xsvf
│ │ ├── default.xsvf
│ │ ├── sgpio_debug.xise
│ │ ├── top.jed
│ │ ├── top.ucf
│ │ ├── top.vhd
│ │ └── top_tb.vhd
│ └── sgpio_if
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── batch_svf
│ │ ├── batch_xsvf
│ │ ├── default.xsvf
│ │ ├── sgpio_if.xise
│ │ ├── top.jed
│ │ ├── top.ucf
│ │ ├── top.vhd
│ │ └── top_tb.vhd
├── dfu-util.cmake
├── dfu.py
├── hackrf-common.cmake
├── hackrf_usb
│ ├── CMakeLists.txt
│ ├── hackrf_usb.c
│ ├── sgpio_m0.s
│ ├── usb_api_board_info.c
│ ├── usb_api_board_info.h
│ ├── usb_api_cpld.c
│ ├── usb_api_cpld.h
│ ├── usb_api_m0_state.c
│ ├── usb_api_m0_state.h
│ ├── usb_api_operacake.c
│ ├── usb_api_operacake.h
│ ├── usb_api_register.c
│ ├── usb_api_register.h
│ ├── usb_api_spiflash.c
│ ├── usb_api_spiflash.h
│ ├── usb_api_sweep.c
│ ├── usb_api_sweep.h
│ ├── usb_api_transceiver.c
│ ├── usb_api_transceiver.h
│ ├── usb_api_ui.c
│ ├── usb_api_ui.h
│ ├── usb_bulk_buffer.h
│ ├── usb_descriptor.c
│ ├── usb_descriptor.h
│ ├── usb_device.c
│ ├── usb_device.h
│ ├── usb_endpoint.c
│ └── usb_endpoint.h
├── toolchain-arm-cortex-m.cmake
└── tools
│ ├── check_clock.py
│ ├── cpld_bitstream.py
│ ├── dumb_crc32.py
│ ├── dump_cgu.py
│ └── xsvf.py
├── hardware
├── .gitignore
├── LNA915
│ ├── LNA915-cache.lib
│ ├── LNA915.cmp
│ ├── LNA915.kicad_pcb
│ ├── LNA915.net
│ ├── LNA915.pro
│ ├── LNA915.sch
│ └── README
├── bubblegum
│ ├── bubblegum-cache.lib
│ ├── bubblegum.brd
│ ├── bubblegum.cmp
│ ├── bubblegum.net
│ ├── bubblegum.pro
│ └── bubblegum.sch
├── gsg-kicad-lib
├── hackrf-one
│ ├── PlasticCase_CAD
│ │ ├── Case_With_HackRF.png
│ │ ├── HackRF_One_Case.png
│ │ ├── HackRF_One_Case_With_Button_CutOuts.dxf
│ │ └── README
│ ├── Production.md
│ ├── README
│ ├── acrylic_case
│ │ ├── HackRF_One_Case_v2.dxf
│ │ ├── HackRF_One_Case_v2.pdf
│ │ ├── HackRF_One_Case_v2.svg
│ │ └── README.md
│ ├── baseband.kicad_sch
│ ├── fp-lib-table
│ ├── frontend.kicad_sch
│ ├── hackrf-one-cache.lib
│ ├── hackrf-one.cmp
│ ├── hackrf-one.kicad_pcb
│ ├── hackrf-one.kicad_prl
│ ├── hackrf-one.kicad_pro
│ ├── hackrf-one.kicad_sch
│ ├── hackrf-one.kicad_sym
│ ├── hackrf-one.net
│ ├── hackrf-one.pro
│ └── mcu.kicad_sch
├── jawbreaker
│ ├── README
│ ├── SoBv1_DP17298
│ │ ├── README
│ │ ├── SoBv1-DP17298-jawbreaker-Bottom.skp
│ │ ├── SoBv1-DP17298-jawbreaker-Bottom.svg
│ │ ├── SoBv1-DP17298-jawbreaker-Bottom_laser_cutting_493.3mm_Easy.txt
│ │ ├── SoBv1-DP17298-jawbreaker-Top.skp
│ │ ├── SoBv1-DP17298-jawbreaker-Top.svg
│ │ ├── SoBv1-DP17298-jawbreaker-Top_laser_cutting_1153.3mm_Normal.txt
│ │ ├── SoBv1-DP17298-jawbreaker.jpg
│ │ └── jawbreaker_and_case.png
│ ├── baseband.sch
│ ├── frontend.sch
│ ├── jawbreaker-cache.lib
│ ├── jawbreaker.brd
│ ├── jawbreaker.cmp
│ ├── jawbreaker.net
│ ├── jawbreaker.pro
│ ├── jawbreaker.sch
│ └── mcu.sch
├── jellybean
│ ├── JellyBean_PinMux.pmx
│ ├── JellyBean_TPS62410.ods
│ ├── JellyBean_pins.png
│ ├── README
│ ├── jellybean-cache.lib
│ ├── jellybean.brd
│ ├── jellybean.cmp
│ ├── jellybean.net
│ ├── jellybean.pro
│ ├── jellybean.sch
│ ├── jellybean_BOM.ods
│ ├── jellybean_board_PCB_layers.pdf
│ └── jellybean_schematic.pdf
├── kicad
│ ├── hackrf.dcm
│ ├── hackrf.lib
│ └── hackrf.mod
├── lemondrop
│ ├── README
│ ├── lemondrop-cache.lib
│ ├── lemondrop.brd
│ ├── lemondrop.cmp
│ ├── lemondrop.net
│ ├── lemondrop.pro
│ └── lemondrop.sch
├── licorice
│ ├── licorice-cache.lib
│ ├── licorice.brd
│ ├── licorice.cmp
│ ├── licorice.net
│ ├── licorice.pro
│ └── licorice.sch
├── lollipop
│ ├── lollipop-cache.lib
│ ├── lollipop.brd
│ ├── lollipop.cmp
│ ├── lollipop.net
│ ├── lollipop.pro
│ ├── lollipop.sch
│ └── lollipop_logic.py
├── marzipan
│ ├── README
│ ├── baseband.sch
│ ├── fp-lib-table
│ ├── frontend.sch
│ ├── marzipan-cache.lib
│ ├── marzipan.cmp
│ ├── marzipan.kicad_pcb
│ ├── marzipan.net
│ ├── marzipan.pro
│ ├── marzipan.sch
│ └── mcu.sch
├── neapolitan
│ ├── README
│ ├── baseband.sch
│ ├── fp-lib-table
│ ├── frontend.sch
│ ├── mcu.sch
│ ├── neapolitan-cache.lib
│ ├── neapolitan.cmp
│ ├── neapolitan.kicad_pcb
│ ├── neapolitan.net
│ ├── neapolitan.pro
│ └── neapolitan.sch
├── operacake
│ ├── README
│ ├── fp-lib-table
│ ├── operacake-cache.lib
│ ├── operacake.kicad_pcb
│ ├── operacake.net
│ ├── operacake.pro
│ └── operacake.sch
└── test
│ └── si5351-configure.py
├── host
├── CMakeLists.txt
├── README.md
├── cmake
│ ├── cmake_uninstall.cmake.in
│ ├── modules
│ │ ├── FindFFTW.cmake
│ │ ├── FindLIBHACKRF.cmake
│ │ ├── FindThreads.cmake
│ │ └── FindUSB1.cmake
│ └── set_release.cmake
├── hackrf-tools
│ ├── CMakeLists.txt
│ ├── getopt
│ │ ├── getopt.c
│ │ └── getopt.h
│ └── src
│ │ ├── CMakeLists.txt
│ │ ├── hackrf_biast.c
│ │ ├── hackrf_clock.c
│ │ ├── hackrf_cpldjtag.c
│ │ ├── hackrf_debug.c
│ │ ├── hackrf_info.c
│ │ ├── hackrf_operacake.c
│ │ ├── hackrf_spiflash.c
│ │ ├── hackrf_sweep.c
│ │ └── hackrf_transfer.c
└── libhackrf
│ ├── 53-hackrf.rules
│ ├── 53-hackrf.rules.in
│ ├── CMakeLists.txt
│ ├── libhackrf.pc.in
│ └── src
│ ├── CMakeLists.txt
│ ├── hackrf.c
│ └── hackrf.h
└── tools
├── add-braces.sh
├── deploy-nightly.sh
├── reformat-source.sh
└── sgpio_debug
├── create_tx_counter.py
├── sgpio_debug_rx.grc
└── sgpio_debug_tx.sh
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.brd linguist-language=KiCad
2 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug-report.yml:
--------------------------------------------------------------------------------
1 | name: Bug Report
2 | description: Submit a bug report
3 | labels: ["bug report"]
4 | body:
5 | - type: markdown
6 | attributes:
7 | value: |
8 | Thank you for taking the time to fill out this bug report!
9 | - type: dropdown
10 | id: issue-type
11 | attributes:
12 | label: What type of issue is this?
13 | options:
14 | - transient - occurring only once
15 | - intermittent - occurring irregularly
16 | - permanent - occurring repeatedly
17 | validations:
18 | required: true
19 | - type: textarea
20 | id: issue
21 | attributes:
22 | label: What issue are you facing?
23 | placeholder: Please describe what you have encountered
24 | validations:
25 | required: true
26 | - type: textarea
27 | id: reproduce-issue
28 | attributes:
29 | label: What are the steps to reproduce this?
30 | placeholder: Please provide the steps to reproduce this issue
31 | validations:
32 | required: true
33 | - type: textarea
34 | id: logs
35 | attributes:
36 | label: Can you provide any logs? (output, errors, etc.)
37 | placeholder: Please provide any logs you might have that illustrate the issue
38 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/documentation-request.yml:
--------------------------------------------------------------------------------
1 | name: Documentation
2 | description: Make a request regarding HackRF documentation
3 | labels: ["documentation"]
4 | body:
5 | - type: markdown
6 | attributes:
7 | value: |
8 | Thank you for taking the time to help Great Scott Gadgets improve the HackRF One documentation!
9 | - type: textarea
10 | id: documentation-request
11 | attributes:
12 | label: What would you like us to add to or change about the HackRF One documentation?
13 | validations:
14 | required: true
15 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature-request.yml:
--------------------------------------------------------------------------------
1 | name: Feature Request
2 | description: File a feature request
3 | labels: ["enhancement"]
4 | body:
5 | - type: markdown
6 | attributes:
7 | value: |
8 | Thank you for taking the time to fill out this feature request form!
9 | - type: textarea
10 | id: feature-request
11 | attributes:
12 | label: What feature would you like to see and why?
13 | description: Please be as detailed as possible with your feature request.
14 | validations:
15 | required: true
16 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/question.yml:
--------------------------------------------------------------------------------
1 | name: Question
2 | description: Ask a question not covered by current hackrf.rtfd.io documentation
3 | labels: ["question"]
4 | body:
5 | - type: markdown
6 | attributes:
7 | value: |
8 | Thank you for taking the time to ask your question! If you need technical support, want to open a feature request, or need to file a bug report, please abandon this issue, open a new issue, and choose the correct template. If you do not choose the correct template, you will be asked to re-open your issue with the correct template.
9 | - type: textarea
10 | id: question
11 | attributes:
12 | label: What would you like to know?
13 | validations:
14 | required: true
--------------------------------------------------------------------------------
/.github/workflows/clang-format-check.yml:
--------------------------------------------------------------------------------
1 | name: Check code style
2 | on: [push, pull_request]
3 | jobs:
4 | formatting-check:
5 | name: clang-format
6 | runs-on: ubuntu-latest
7 | strategy:
8 | matrix:
9 | path:
10 | - check: 'host/libhackrf/src'
11 | exclude: ''
12 | - check: 'host/hackrf-tools/src'
13 | exclude: ''
14 | - check: 'firmware/common'
15 | exclude: 'firmware/common/xapp058'
16 | - check: 'firmware/hackrf_usb'
17 | exclude: ''
18 | steps:
19 | - uses: actions/checkout@v4
20 | - name: Run clang-format-action
21 | uses: jidicula/clang-format-action@v4.6.2
22 | with:
23 | clang-format-version: '14'
24 | check-path: ${{ matrix.path['check'] }}
25 | exclude-regex: ${{ matrix.path['exclude'] }}
26 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled output
2 | *.bin
3 | *.d
4 | *.elf
5 | *.hex
6 | *.srec
7 | host/build/
8 | host/**/build
9 | install/
10 |
11 | # Operating system spew
12 | .DS_Store
13 | .Spotlight-V100
14 | .Trashes
15 | ehthumbs.db
16 | Thumbs.db
17 |
18 | # Editor junk
19 | *.swp
20 | *.sublime-project
21 | *.sublime-workspace
22 | .vscode*
23 |
24 | # Documentation Stuff
25 | docs/build/
26 |
27 | # Kicad junk
28 | fp-info-cache
29 | sym-lib-table
30 | hackrf-one-rescue.dcm
31 | hackrf-one-rescue.lib
32 | hackrf-one.xml
33 | rescue-backup/
34 | *-bak
35 | ~*.kicad_*.lck
36 |
37 | # Old manufacturing files
38 | doc/hardware/hackrf-one-fabrication-draft*
39 |
40 | # Xilinx tools create an enormous amount of poop:
41 | firmware/cpld/**/isim/
42 | firmware/cpld/**/_ngo/
43 | firmware/cpld/**/_xmsgs/
44 | firmware/cpld/**/iseconfig/
45 | firmware/cpld/**/*_html/
46 | firmware/cpld/**/xlnx_auto_0_xdb/
47 | firmware/cpld/**/xst/
48 | firmware/cpld/**/_*.cmd
49 | firmware/cpld/**/_*.log
50 | firmware/cpld/**/*.bld
51 | firmware/cpld/**/*.chk
52 | firmware/cpld/**/*.cmd
53 | firmware/cpld/**/*.cmd_log
54 | firmware/cpld/**/*.csv
55 | firmware/cpld/**/*.cxt
56 | firmware/cpld/**/*.dat
57 | firmware/cpld/**/*.err
58 | firmware/cpld/**/*.exe
59 | firmware/cpld/**/*.gise
60 | firmware/cpld/**/*.gyd
61 | firmware/cpld/**/*.html
62 | firmware/cpld/**/*.ini
63 | firmware/cpld/**/*.ipf
64 | firmware/cpld/**/*.log
65 | firmware/cpld/**/*.lso
66 | firmware/cpld/**/*.mfd
67 | firmware/cpld/**/*.ng[acdr]
68 | firmware/cpld/**/*.pad
69 | firmware/cpld/**/*.phd
70 | firmware/cpld/**/*.pnx
71 | firmware/cpld/**/*.prj
72 | firmware/cpld/**/*.rpt
73 | firmware/cpld/**/*.stx
74 | firmware/cpld/**/*.syr
75 | firmware/cpld/**/*.tim
76 | firmware/cpld/**/*.tspec
77 | firmware/cpld/**/*.vm6
78 | firmware/cpld/**/*.wcfg
79 | firmware/cpld/**/*.wdb
80 | firmware/cpld/**/*.xml
81 | firmware/cpld/**/*.xmsgs
82 | firmware/cpld/**/*.xrpt
83 | firmware/cpld/**/*.xsl
84 | firmware/cpld/**/*.xst
85 | firmware/cpld/**/*.xwbt
86 |
87 | firmware/**/build
88 |
89 | *.pyc
90 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "firmware/libopencm3"]
2 | path = firmware/libopencm3
3 | url = https://github.com/mossmann/libopencm3.git
4 | [submodule "hardware/gsg-kicad-lib"]
5 | path = hardware/gsg-kicad-lib
6 | url = https://github.com/greatscottgadgets/gsg-kicad-lib.git
7 |
--------------------------------------------------------------------------------
/.readthedocs.yaml:
--------------------------------------------------------------------------------
1 | # .readthedocs.yaml
2 | # Read the Docs configuration file
3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4 |
5 | # Required
6 | version: 2
7 |
8 | # Set the OS, Python version and other tools
9 | build:
10 | os: ubuntu-22.04
11 | tools:
12 | python: "3.12"
13 |
14 | # Build documentation in the "docs/" directory with Sphinx
15 | sphinx:
16 | configuration: docs/source/conf.py
17 |
18 | # Build PDF for docs
19 | formats:
20 | - pdf
21 |
22 | python:
23 | install:
24 | - requirements: docs/requirements.txt
25 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | # Environment for HackRF HIL testing with Jenkins CI
2 | FROM ubuntu:22.04
3 | USER root
4 |
5 | # Copy usb hub script from Jenkins' container
6 | COPY --from=gsg-jenkins /startup/hubs.py /startup/hubs.py
7 | COPY --from=gsg-jenkins /startup/.hubs /startup/.hubs
8 | RUN ln -s /startup/hubs.py /usr/local/bin/hubs
9 |
10 | # Override interactive installations and install software dependencies
11 | ENV DEBIAN_FRONTEND=noninteractive
12 | RUN apt-get update && apt-get install -y \
13 | build-essential \
14 | cmake \
15 | curl \
16 | dfu-util \
17 | gcc-arm-none-eabi \
18 | git \
19 | libfftw3-dev \
20 | libusb-1.0-0-dev \
21 | pkg-config \
22 | python3 \
23 | python3-pip \
24 | python3-yaml \
25 | usbutils \
26 | && rm -rf /var/lib/apt/lists/*
27 |
28 | # Install USB hub PPPS dependencies
29 | RUN pip3 install python-dotenv git+https://github.com/CapableRobot/CapableRobot_USBHub_Driver --upgrade
30 | RUN curl -L https://github.com/mvp/uhubctl/archive/refs/tags/v2.5.0.tar.gz > uhubctl-2.5.0.tar.gz \
31 | && mkdir uhubctl-2.5.0 \
32 | && tar -xvzf uhubctl-2.5.0.tar.gz -C uhubctl-2.5.0 --strip-components 1 \
33 | && rm uhubctl-2.5.0.tar.gz \
34 | && cd uhubctl-2.5.0 \
35 | && make \
36 | && make install
37 |
38 | # Inform Docker that the container is listening on port 8080 at runtime
39 | EXPOSE 8080
40 |
--------------------------------------------------------------------------------
/Jenkinsfile:
--------------------------------------------------------------------------------
1 | pipeline {
2 | agent any
3 | stages {
4 | stage('Build Docker Image') {
5 | steps {
6 | sh 'docker build -t hackrf https://github.com/greatscottgadgets/hackrf.git'
7 | }
8 | }
9 | stage('Test Suite') {
10 | agent {
11 | docker {
12 | image 'hackrf'
13 | reuseNode true
14 | args '--group-add=20 --group-add=46 --device-cgroup-rule="c 189:* rmw" --device-cgroup-rule="c 166:* rmw" -v /dev/bus/usb:/dev/bus/usb -e TESTER=0000000000000000325866e629a25623 -e EUT=RunningFromRAM'
15 | }
16 | }
17 | steps {
18 | sh './ci-scripts/install-host.sh'
19 | sh './ci-scripts/install-firmware.sh'
20 | sh 'hubs all off'
21 | retry(3) {
22 | sh './ci-scripts/test-host.sh'
23 | }
24 | retry(3) {
25 | sh './ci-scripts/test-firmware-program.sh'
26 | }
27 | sh './ci-scripts/test-firmware-flash.sh'
28 | sh 'python3 ci-scripts/test-debug.py'
29 | retry(3) {
30 | sh 'python3 ci-scripts/test-transfer.py tx'
31 | }
32 | retry(3) {
33 | sh 'python3 ci-scripts/test-transfer.py rx'
34 | }
35 | sh 'hubs all off'
36 | sh 'python3 ci-scripts/test-sgpio-debug.py'
37 | sh 'hubs all reset'
38 | }
39 | }
40 | }
41 | post {
42 | always {
43 | cleanWs(cleanWhenNotBuilt: false,
44 | deleteDirs: true,
45 | disableDeferredWipeout: true,
46 | notFailBuild: true)
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/TRADEMARK:
--------------------------------------------------------------------------------
1 | "HackRF" is a trademark of Great Scott Gadgets. Permission to use the trademark
2 | with attribution to Great Scott Gadgets is granted to all licensees of HackRF for
3 | the sole purpose of naming or describing copies or derived works. (See COPYING.)
4 |
--------------------------------------------------------------------------------
/ci-scripts/install-firmware.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 | git submodule init
4 | git submodule update
5 | mkdir firmware/hackrf_usb/build
6 | cd firmware/hackrf_usb/build
7 | cmake ..
8 | make
9 | cd ../../..
10 |
--------------------------------------------------------------------------------
/ci-scripts/install-host.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 | mkdir host/build
4 | cd host/build
5 | cmake ..
6 | make
7 | cd ../..
8 |
--------------------------------------------------------------------------------
/ci-scripts/test-debug.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python3
2 | import sys
3 | import subprocess
4 |
5 | PASS, FAIL = range(2)
6 | EUT = "RunningFromRAM"
7 |
8 |
9 | def check_debug(target, register, reg_val):
10 | hackrf_debug = subprocess.run(["host/build/hackrf-tools/src/hackrf_debug",
11 | f"--{target}", "--register", register,
12 | "--read", "--device", EUT],
13 | capture_output=True, encoding="UTF-8")
14 |
15 | if reg_val in hackrf_debug.stdout:
16 | print(f"hackrf_debug --{target} passed.")
17 | return PASS
18 | else:
19 | print(f"hackrf_debug --{target} failed.")
20 | return FAIL
21 |
22 |
23 | def main():
24 | results = [
25 | check_debug("si5351c", "2", "0x03"),
26 | check_debug("max2837", "3", "0x1b9"),
27 | check_debug("rffc5072", "2", "0x9055"),
28 | ]
29 |
30 | if FAIL not in results:
31 | sys.exit(PASS)
32 | else:
33 | sys.exit(FAIL)
34 |
35 |
36 | if __name__ == "__main__":
37 | main()
38 |
--------------------------------------------------------------------------------
/ci-scripts/test-firmware-flash.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | host/build/hackrf-tools/src/hackrf_spiflash -w firmware/hackrf_usb/build/hackrf_usb.bin
3 | EXIT_CODE="$?"
4 | if [ "$EXIT_CODE" == "1" ]
5 | then
6 | echo "No HackRF found! Disconnected? Exiting.."
7 | exit $EXIT_CODE
8 | elif [ "$EXIT_CODE" == "0" ]
9 | then
10 | echo "Firmware successfully flashed!"
11 | elif [ "$EXIT_CODE" == "127" ]
12 | then
13 | echo "Host tool installation failed! Exiting.."
14 | exit $EXIT_CODE
15 | else
16 | echo "Unknown error"
17 | exit $EXIT_CODE
18 | fi
19 |
--------------------------------------------------------------------------------
/ci-scripts/test-firmware-program.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | hubs hackrf_dfu reset
3 | sleep 1s
4 | dfu-util --device 1fc9:000c --alt 0 --download firmware/hackrf_usb/build/hackrf_usb.dfu
5 | sleep 1s
6 | EXIT_CODE="$?"
7 | if [ "$EXIT_CODE" == "0" ]
8 | then
9 | echo "DFU installation success! Exiting.."
10 | exit $EXIT_CODE
11 | elif [ "$EXIT_CODE" == "74" ]
12 | then
13 | echo "No DFU capable USB device available! Disconnected? Exiting.."
14 | exit 1
15 | elif [ "$EXIT_CODE" == "127" ]
16 | then
17 | echo "dfu-util installation failed! Exiting.."
18 | exit $EXIT_CODE
19 | else
20 | echo "Unhandled exception"
21 | exit $EXIT_CODE
22 | fi
23 |
--------------------------------------------------------------------------------
/ci-scripts/test-host.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | hubs hackrf_dfu reset
3 | sleep 1s
4 | host/build/hackrf-tools/src/hackrf_info
5 | EXIT_CODE="$?"
6 | if [ "$EXIT_CODE" == "1" ]
7 | then
8 | echo "Host tool installation success! Exiting.."
9 | exit 0
10 | elif [ "$EXIT_CODE" == "0" ]
11 | then
12 | echo "Failed to boot HackRF into DFU mode! Check DFU pin jumper. Exiting.."
13 | exit 1
14 | elif [ "$EXIT_CODE" == "127" ]
15 | then
16 | echo "Host tool installation failed! Exiting.."
17 | exit $EXIT_CODE
18 | else
19 | echo "god have mercy on your soul"
20 | exit $EXIT_CODE
21 | fi
22 |
--------------------------------------------------------------------------------
/doc/hardware/README:
--------------------------------------------------------------------------------
1 | These files are generated from KiCad source. They are provided for
2 | convenience but may not be as up to date as the KiCad source files.
3 |
--------------------------------------------------------------------------------
/doc/hardware/README.production:
--------------------------------------------------------------------------------
1 | Copyright 2012, 2013, 2014 Michael Ossmann
2 |
3 | These files are part of HackRF.
4 |
5 | This is a free hardware design; you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation; either version 2, or (at your option)
8 | any later version.
9 |
10 | This design is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this design; see the file COPYING. If not, write to
17 | the Free Software Foundation, Inc., 51 Franklin Street,
18 | Boston, MA 02110-1301, USA.
19 |
20 |
21 | HackRF One is a wideband software radio transceiver with a USB interface.
22 |
23 | hardware notes:
24 |
25 | Schematic and layout files were designed in KiCad, an open source electronic
26 | design automation package.
27 |
28 | order of copper layers:
29 | Copper 1: C1F (front)
30 | Copper 2: C2
31 | Copper 3: C3
32 | Copper 4: C1B (back)
33 |
34 | PCB description: 4 layer PCB 0.062 in
35 | Copper 1 0.5 oz foil plated to approximately 0.0017 in
36 | Dielectric 1-2 0.0119 in
37 | Copper 2 1 oz foil (0.0014 in)
38 | Dielectric 2-3 0.0280 in
39 | Copper 3 1 oz foil (0.0014 in)
40 | Dielectric 3-4 0.0119 in
41 | Copper 4 0.5 oz foil plated to approximately 0.0017 in
42 |
43 | FR4 or similar substrate with Er=4.5 (+/- 0.1)
44 | double side solder mask green
45 | single side silkscreen white
46 | 6 mil min trace width and
47 | 6 mil min isolation
48 |
--------------------------------------------------------------------------------
/doc/hardware/hackrf-one-assembly.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/doc/hardware/hackrf-one-assembly.pdf
--------------------------------------------------------------------------------
/doc/hardware/hackrf-one-gerbers/hackrf-one-drl.rpt:
--------------------------------------------------------------------------------
1 | Drill report for hackrf-one.kicad_pcb
2 | Created on 2024-12-03T18:25:20+1100
3 |
4 | Copper Layer Stackup:
5 | =============================================================
6 | L1 : C1F front
7 | L2 : C2 in1
8 | L3 : C3 in2
9 | L4 : C4B back
10 |
11 |
12 | Drill file 'hackrf-one.drl' contains
13 | plated through holes:
14 | =============================================================
15 | T1 0.330mm 0.0130" (2 holes)
16 | T2 0.330mm 0.0130" (489 holes)
17 | T3 0.330mm 0.0130" (3 holes)
18 | T4 0.350mm 0.0138" (14 holes)
19 | T5 0.381mm 0.0150" (120 holes)
20 | T6 0.711mm 0.0280" (10 holes)
21 | T7 0.800mm 0.0315" (4 holes) (with 4 slots)
22 | T8 0.990mm 0.0390" (4 holes)
23 | T9 1.016mm 0.0400" (130 holes)
24 | T10 1.300mm 0.0512" (4 holes)
25 | T11 3.200mm 0.1260" (6 holes)
26 |
27 | Total plated holes count 786
28 |
29 |
30 | Not plated through holes are merged with plated holes
31 | unplated through holes:
32 | =============================================================
33 | T12 0.750mm 0.0295" (2 holes)
34 |
35 | Total unplated holes count 2
36 |
--------------------------------------------------------------------------------
/doc/hardware/hackrf-one-schematic.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/doc/hardware/hackrf-one-schematic.pdf
--------------------------------------------------------------------------------
/doc/hardware/jawbreaker-assembly.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/doc/hardware/jawbreaker-assembly.pdf
--------------------------------------------------------------------------------
/doc/hardware/jawbreaker-gerbers/README:
--------------------------------------------------------------------------------
1 | order of copper layers:
2 | Copper 1: Front
3 | Copper 2: Inner3
4 | Copper 3: Inner2
5 | Copper 4: Back
6 |
7 | PCB description: 4 layer PCB 0.062 in
8 | Copper 1 0.5 oz foil plated to approximately 0.0017 in
9 | Dielectric 1-2 0.0119 in
10 | Copper 2 1 oz foil (0.0014 in)
11 | Dielectric 2-3 0.0280 in
12 | Copper 3 1 oz foil (0.0014 in)
13 | Dielectric 3-4 0.0119 in
14 | Copper 4 0.5 oz foil plated to approximately 0.0017 in
15 | FR4 or similar substrate with Er=4.5 (+/- 0.1)
16 | double side solder mask black
17 | single side silkscreen white
18 | 6 mil min trace width and
19 | 6 mil min isolation
20 |
--------------------------------------------------------------------------------
/doc/hardware/jawbreaker-gerbers/jawbreaker-Edge_Cuts.gbr:
--------------------------------------------------------------------------------
1 | G04 (created by PCBNEW (2013-01-23 BZR 3920)-stable) date Mon Jun 10 00:49:26 2013*
2 | %MOIN*%
3 | G04 Gerber Fmt 3.4, Leading zero omitted, Abs format*
4 | %FSLAX34Y34*%
5 | G01*
6 | G70*
7 | G90*
8 | G04 APERTURE LIST*
9 | %ADD10C,2.3622e-06*%
10 | %ADD11C,0.015*%
11 | G04 APERTURE END LIST*
12 | G54D10*
13 | G54D11*
14 | X26075Y-21500D02*
15 | X80975Y-21500D01*
16 | X26075Y-50500D02*
17 | X80925Y-50500D01*
18 | X24500Y-23075D02*
19 | X24500Y-48925D01*
20 | X82500Y-23075D02*
21 | X82500Y-48925D01*
22 | X82500Y-23075D02*
23 | G75*
24 | G03X80925Y-21500I-1575J0D01*
25 | G74*
26 | G01*
27 | X80925Y-50500D02*
28 | G75*
29 | G03X82500Y-48925I0J1575D01*
30 | G74*
31 | G01*
32 | X24500Y-48925D02*
33 | G75*
34 | G03X26075Y-50500I1575J0D01*
35 | G74*
36 | G01*
37 | X26075Y-21500D02*
38 | G75*
39 | G03X24500Y-23075I0J-1575D01*
40 | G74*
41 | G01*
42 | M02*
43 |
--------------------------------------------------------------------------------
/doc/hardware/jawbreaker-schematic.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/doc/hardware/jawbreaker-schematic.pdf
--------------------------------------------------------------------------------
/docs/.readthedocs.yaml:
--------------------------------------------------------------------------------
1 | build:
2 | os: "ubuntu-20.04"
3 | tools:
4 | python: "3.9"
5 |
6 | sphinx:
7 | configuration: conf.py
8 |
9 | python:
10 | install:
11 | - requirements: requirements.txt
--------------------------------------------------------------------------------
/docs/Makefile:
--------------------------------------------------------------------------------
1 | # Minimal makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line.
5 | SPHINXOPTS =
6 | SPHINXBUILD = sphinx-build
7 | SOURCEDIR = source
8 | BUILDDIR = build
9 |
10 | # Put it first so that "make" without argument is like "make help".
11 | help:
12 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
13 |
14 | .PHONY: help Makefile
15 |
16 | # Catch-all target: route all unknown targets to Sphinx using the new
17 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
18 | %: Makefile
19 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
--------------------------------------------------------------------------------
/docs/images/HackRF-One-fd0-0009.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/docs/images/HackRF-One-fd0-0009.jpeg
--------------------------------------------------------------------------------
/docs/images/block-diagram-r9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/docs/images/block-diagram-r9.png
--------------------------------------------------------------------------------
/docs/images/block-diagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/docs/images/block-diagram.png
--------------------------------------------------------------------------------
/docs/images/grc-hw-sync-streaming.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/docs/images/grc-hw-sync-streaming.png
--------------------------------------------------------------------------------
/docs/images/jawbreaker.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/docs/images/jawbreaker.JPG
--------------------------------------------------------------------------------
/docs/images/max2837-1m75bw-at-2m.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/docs/images/max2837-1m75bw-at-2m.png
--------------------------------------------------------------------------------
/docs/images/max2837-1m75bw-at-8m.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/docs/images/max2837-1m75bw-at-8m.png
--------------------------------------------------------------------------------
/docs/images/noisereducingcable.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/docs/images/noisereducingcable.jpeg
--------------------------------------------------------------------------------
/docs/images/noisereducingcablescreenshot.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/docs/images/noisereducingcablescreenshot.jpeg
--------------------------------------------------------------------------------
/docs/images/operacake.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/docs/images/operacake.jpeg
--------------------------------------------------------------------------------
/docs/images/rf_shield_1.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/docs/images/rf_shield_1.jpeg
--------------------------------------------------------------------------------
/docs/images/rf_shield_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/docs/images/rf_shield_2.jpg
--------------------------------------------------------------------------------
/docs/images/rf_shield_3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/docs/images/rf_shield_3.jpg
--------------------------------------------------------------------------------
/docs/images/rf_shield_4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/docs/images/rf_shield_4.jpg
--------------------------------------------------------------------------------
/docs/images/rf_shield_5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/docs/images/rf_shield_5.jpg
--------------------------------------------------------------------------------
/docs/images/rf_shield_6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/docs/images/rf_shield_6.jpg
--------------------------------------------------------------------------------
/docs/images/rf_shield_7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/docs/images/rf_shield_7.jpg
--------------------------------------------------------------------------------
/docs/images/rf_shield_8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/docs/images/rf_shield_8.jpg
--------------------------------------------------------------------------------
/docs/images/rf_shield_9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/docs/images/rf_shield_9.jpg
--------------------------------------------------------------------------------
/docs/images/trigger-pins.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/docs/images/trigger-pins.png
--------------------------------------------------------------------------------
/docs/make.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 |
3 | pushd %~dp0
4 |
5 | REM Command file for Sphinx documentation
6 |
7 | if "%SPHINXBUILD%" == "" (
8 | set SPHINXBUILD=sphinx-build
9 | )
10 | set SOURCEDIR=source
11 | set BUILDDIR=build
12 |
13 | if "%1" == "" goto help
14 |
15 | %SPHINXBUILD% >NUL 2>NUL
16 | if errorlevel 9009 (
17 | echo.
18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19 | echo.installed, then set the SPHINXBUILD environment variable to point
20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you
21 | echo.may add the Sphinx directory to PATH.
22 | echo.
23 | echo.If you don't have Sphinx installed, grab it from
24 | echo.http://sphinx-doc.org/
25 | exit /b 1
26 | )
27 |
28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
29 | goto end
30 |
31 | :help
32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
33 |
34 | :end
35 | popd
36 |
--------------------------------------------------------------------------------
/docs/requirements.txt:
--------------------------------------------------------------------------------
1 | sphinx==7.2.6
2 | sphinx_rtd_theme==2.0.0
3 | readthedocs-sphinx-search==0.3.2
4 | jinja2==3.1.4
5 |
--------------------------------------------------------------------------------
/docs/source/conf.py:
--------------------------------------------------------------------------------
1 | import sphinx_rtd_theme
2 |
3 | extensions = [
4 | 'sphinx_rtd_theme'
5 | ]
6 |
7 | # -- Project information -----------------------------------------------------
8 |
9 | project = 'HackRF'
10 | copyright = '2021, Great Scott Gadgets'
11 | author = 'Great Scott Gadgets'
12 |
13 | version = ''
14 | release = ''
15 |
16 |
17 | # -- General configuration ---------------------------------------------------
18 |
19 | extensions = [
20 | 'sphinx.ext.autodoc'
21 | ]
22 |
23 | templates_path = ['_templates']
24 | exclude_patterns = ['_build']
25 | source_suffix = '.rst'
26 | master_doc = 'index'
27 | language = None
28 | exclude_patterns = []
29 | pygments_style = None
30 |
31 |
32 | # -- Options for HTML output -------------------------------------------------
33 | # run pip install sphinx_rtd_theme if you get sphinx_rtd_theme errors
34 | html_theme = "sphinx_rtd_theme"
35 | html_css_files = ['status.css']
36 |
37 |
--------------------------------------------------------------------------------
/docs/source/enclosure_options.rst:
--------------------------------------------------------------------------------
1 | Enclosure Options
2 | ~~~~~~~~~~~~~~~~~
3 |
4 | The commercial version of HackRF One from Great Scott Gadgets ships with an injection molded plastic enclosure, but it is designed to fit two optional enclosures:
5 |
6 | * Hammond 1455J1201: HackRF One fits this extruded aluminum enclosure and other similar models from Hammond Manufacturing. In order to use the enclosure's end plates, you will have to drill them. An end plate template can be found in the HackRF One KiCad layout.
7 |
8 | * Acrylic sandwich: You can also use a laser cut acrylic enclosure with HackRF One. This is a good option for access to the expansion headers. A design can be found in the HackRF One hardware directory. Use any laser cutting service or purchase from a `reseller `__.
--------------------------------------------------------------------------------
/docs/source/external_clock_interface.rst:
--------------------------------------------------------------------------------
1 | ===========================================
2 | External Clock Interface (CLKIN and CLKOUT)
3 | ===========================================
4 |
5 | .. _external_clock_interface:
6 |
7 | HackRF One produces a 10 MHz clock signal on CLKOUT. The signal is a 3.3 V, 10 MHz square wave intended for a high impedance load.
8 |
9 | The CLKIN port on HackRF One is a high impedance input that expects 3.3 V square wave at 10 MHz. Do not exceed 3.3 V or drop below 0 V on this input. Do not connect a clock signal at a frequency other than 10 MHz (unless you modify the firmware to support this). You may directly connect the CLKOUT port of one HackRF One to the CLKIN port of another HackRF One.
10 |
11 | HackRF One uses CLKIN instead of the internal crystal when a clock signal is detected on CLKIN. The switch to or from CLKIN only happens when a transmit or receive operation begins.
12 |
13 | To verify that a signal has been detected on CLKIN, use ``hackrf_clock -i``. The expected output with a clock detected is `CLKIN status: clock signal detected`. The expected output with no clock detected is `CLKIN status: no clock signal detected`.
14 |
15 | To activate CLKOUT, use ``hackrf_clock -o 1``. To switch it off, use ``hackrf_clock -o 0``.
16 |
--------------------------------------------------------------------------------
/docs/source/firmware_development_setup.rst:
--------------------------------------------------------------------------------
1 | ================================================
2 | Firmware Development Setup
3 | ================================================
4 |
5 | Firmware build instructions are included in the repository under firmware/README:
6 |
7 | `https://github.com/greatscottgadgets/hackrf/blob/master/firmware/README `__
8 |
--------------------------------------------------------------------------------
/docs/source/getting_help.rst:
--------------------------------------------------------------------------------
1 | ============
2 | Getting Help
3 | ============
4 |
5 | Before asking for help with HackRF, check to see if your question is answered in this documentation, listed in the :ref:`FAQ `, or addressed in the `HackRF GitHub repository issues `__.
6 |
7 | For assistance with HackRF general use or development, please look at the `issues on the GitHub project `__. This is the preferred place to ask questions so that others may locate the answer to your question in the future.
8 |
9 | We invite you to join our community discussions on `Discord `__. Note that while technical support requests are welcome here, we do not have support staff on duty at all times. Be sure to also submit an issue on GitHub if you’ve found a bug or if you want to ensure that your request will be tracked and not overlooked.
10 |
11 | If you wish to see past discussions and questions about HackRF, you may also view the `mailing list archives `__.
12 |
--------------------------------------------------------------------------------
/docs/source/hackrf_connectors.rst:
--------------------------------------------------------------------------------
1 | ==========
2 | Connectors
3 | ==========
4 |
5 | The connectors on HackRF One are SMA.
6 |
7 | **Note:** SMA connectors and RP-SMA connectors are visually very similar. If you connect an RP-SMA antenna to HackRF One, it will seem to connect snugly but won't function at all because neither the male nor female side has a center pin. RP-SMA connectors are most common on 2.4 GHz antennas and are popular on Wi-Fi equipment. Adapters are available.
8 |
--------------------------------------------------------------------------------
/docs/source/hackrf_minimum_requirements.rst:
--------------------------------------------------------------------------------
1 | ============================================
2 | Minimum Host System Requirements for HackRF
3 | ============================================
4 |
5 | HackRF requires you to supply 500 mA at 5 V DC to your HackRF via the USB port. If your host computer has difficulty meeting this requirement, you may need to use a powered USB hub.
6 |
7 | There is no specific minimum CPU requirement for the host computer when using a HackRF, but SDR is generally a CPU-intensive application. If you have a slower CPU, you may be unable to run certain SDR software or you may only be able to operate at lower sample rates.
8 |
9 | Most users will want to stream data to or from the HackRF at high speeds. This requires that the host computer supports Hi-Speed USB. Some Hi-Speed USB hosts are better than others, and you may have multiple host controllers on your computer. If you have difficulty operating your HackRF at high sample rates (10 Msps to 20 Msps), try using a different USB port on your computer. If possible, arrange things so that the HackRF is the only device on the bus.
--------------------------------------------------------------------------------
/docs/source/hackrf_one.rst:
--------------------------------------------------------------------------------
1 | ================================================
2 | HackRF One
3 | ================================================
4 |
5 | .. image:: ../images/HackRF-One-fd0-0009.jpeg
6 | :alt: HackRF One
7 |
8 | HackRF One is the current hardware platform for the HackRF project. It is a Software Defined Radio peripheral capable of transmission or reception of radio signals from 1 MHz to 6 GHz. Designed to enable test and development of modern and next generation radio technologies, HackRF One is an open source hardware platform that can be used as a USB peripheral or programmed for stand-alone operation.
9 |
10 |
11 |
12 | Features
13 | ~~~~~~~~
14 |
15 | * half-duplex transceiver
16 | * operating freq: 1 MHz to 6 GHz
17 | * supported sample rates: 2 Msps to 20 Msps (quadrature)
18 | * resolution: 8 bits
19 | * interface: High Speed USB (with USB Micro-B connector)
20 | * power supply: USB bus power
21 | * software-controlled antenna port power (max 50 mA at 3.0 to 3.3 V)
22 | * SMA female antenna connector (50 ohms)
23 | * SMA female clock input and output for synchronization
24 | * convenient buttons for programming
25 | * pin headers for expansion
26 | * portable
27 | * open source
28 |
29 |
30 |
--------------------------------------------------------------------------------
/docs/source/hackrf_projects_mentions.rst:
--------------------------------------------------------------------------------
1 | ================================================
2 | HackRF Community Projects and Mentions
3 | ================================================
4 |
5 | Have you done something cool with HackRF or mentioned HackRF in one of your presentations? Let us know and we might post a link here!
6 |
7 | * `HackRF vs. Tesla Model S `__ (Sam Edwards)
8 | * `Jawbreaker/VFD spectrum analyzer `__ (Jared Boone)
9 | * `LEGO car `__ (Michael Ossmann)
10 | * `wireless microphones `__ (Jared Boone)
11 | * `Tesla Charging Port Opener `__ (Radoslav Gerganov)
12 | * `Hacking my smart tooth brush `__ (Cyrill Künzi)
13 |
14 |
15 |
16 | Retired Projects
17 | ~~~~~~~~~~~~~~~~
18 |
19 | * Automotive Remote Keyless Entry Systems (Mike Kershaw)
20 | * Decoding Pocsag Pagers With The HackRF (BinaryRF)
21 | * Sniffing GSM with HackRF (BinaryRF)
--------------------------------------------------------------------------------
/docs/source/hackrfs_buttons.rst:
--------------------------------------------------------------------------------
1 | =======
2 | Buttons
3 | =======
4 |
5 | The **RESET button** resets the microcontroller. This is a reboot that should result in a USB re-enumeration.
6 |
7 | The **DFU button** invokes a USB DFU bootloader located in the microcontroller's ROM. This bootloader makes it possible to unbrick a HackRF One with damaged firmware because the ROM cannot be overwritten.
8 |
9 | The DFU button only invokes the bootloader during reset. This means that it can be used for other functions by custom firmware.
10 |
11 | To invoke DFU mode: Press and hold the DFU button. While holding the DFU button, reset the HackRF One either by pressing and releasing the RESET button or by powering on the HackRF One. Release the DFU button.
12 |
--------------------------------------------------------------------------------
/docs/source/index.rst:
--------------------------------------------------------------------------------
1 | ==================================
2 | Welcome to HackRF's documentation!
3 | ==================================
4 |
5 | .. toctree::
6 | :maxdepth: 2
7 | :caption: User Documentation
8 |
9 | getting_help
10 | faq
11 | hackrf_projects_mentions
12 |
13 | .. toctree::
14 | :maxdepth: 2
15 | :caption: HackRF One Hardware
16 |
17 | hackrf_one
18 | hackrf_minimum_requirements
19 | list_of_hardware_revisions
20 | hardware_components
21 | leds
22 | hackrfs_buttons
23 | hackrf_connectors
24 | external_clock_interface
25 | expansion_interface
26 | hardware_triggering
27 | enclosure_options
28 | usb_cables
29 | rf_shield_installation
30 |
31 | .. toctree::
32 | :maxdepth: 2
33 | :caption: Jawbreaker Hardware
34 |
35 | jawbreaker
36 |
37 |
38 | .. toctree::
39 | :maxdepth: 2
40 | :caption: Firmware
41 |
42 | updating_firmware
43 | firmware_development_setup
44 | LPC43XX_Debugging
45 | LPC43XX_SGPIO_Configuration
46 |
47 | .. toctree::
48 | :maxdepth: 2
49 | :caption: Software
50 |
51 | installing_hackrf_software
52 | hackrf_tools
53 | software_support
54 | sampling_rate
55 | setting_gain
56 | virtual_machines
57 |
58 | .. toctree::
59 | :maxdepth: 2
60 | :caption: Opera Cake Documentation
61 |
62 | opera_cake
63 | opera_cake_faq
64 | opera_cake_hardware
65 | opera_cake_board_addressing
66 | opera_cake_port_configuration
67 | opera_cake_modes_of_operation
68 |
69 |
70 |
--------------------------------------------------------------------------------
/docs/source/leds.rst:
--------------------------------------------------------------------------------
1 | ====
2 | LEDs
3 | ====
4 |
5 |
6 | When HackRF One is plugged in to a USB host, four LEDs should turn on: 3V3, 1V8, RF, and USB. The 3V3 LED indicates that the primary internal power supply is working properly. The 1V8 and RF LEDs indicate that firmware is running and has switched on additional internal power supplies. The USB LED indicates that the HackRF One is communicating with the host over USB.
7 |
8 | The RX and TX LEDs indicate that a receive or transmit operation is currently in progress.
9 |
--------------------------------------------------------------------------------
/docs/source/opera_cake.rst:
--------------------------------------------------------------------------------
1 | ==========
2 | Opera Cake
3 | ==========
4 |
5 | .. image:: ../images/operacake.jpeg
6 | :alt: Opera Cake
7 |
8 | Opera Cake is an antenna switching add-on board for HackRF One. Consisting of two 1x4 switches, Opera Cake also has a cross-over switch that permits operation as a 1x8 switch. Up to eight Opera Cakes may be stacked onto a single HackRF One provided that each Opera Cake is configured with a different board address.
9 |
10 | Opera Cake can be used as a 1x8 switch to connect your HackRF One to a variety of antennas at once, such as a long wire antenna for HF bands, a discone for VHF and UHF, a dipole for 2.4 GHz, and a dish for a satellite band. Once connected to your Opera Cake you can switch between all of your antennas in software instead of making physical hardware swaps.
11 |
12 | When set up as a pair of 1x4 switches you could use Opera Cake as a switched filter bank. To do this, connect port A1 to B1, A2 to B2, A3 to B3, and A4 to B4 through physical SMA filters and cables of your choosing. This setup allows you to change your transmit or receive to be through the filter of your choosing without having to reconnect hardware every time you would like to use a different filter.
13 |
14 | Opera Cake is configured with the ``hackrf_operacake`` command-line tool.
15 |
--------------------------------------------------------------------------------
/docs/source/opera_cake_board_addressing.rst:
--------------------------------------------------------------------------------
1 | ================
2 | Board Addressing
3 | ================
4 |
5 | Each Opera Cake has a numeric address set by optional jumpers installed on header P1. The default address (without jumpers) is 0. The ``--list`` or ``-l`` option can be used to list the address(es) of one or more Opera Cakes installed on a HackRF One:
6 |
7 | .. code-block:: sh
8 |
9 | hackrf_operacake -l
10 |
11 | The address may be set to any number from 0 to 7 by installing jumpers across the A0, A1, and/or A2 pins of header P1.
12 |
13 | .. list-table::
14 | :header-rows: 1
15 | :widths: 1 1 1 1
16 |
17 | * - Address
18 | - A2 Jumper
19 | - A1 Jumper
20 | - A0 Jumper
21 | * - 0
22 | - No
23 | - No
24 | - No
25 | * - 1
26 | - No
27 | - No
28 | - Yes
29 | * - 2
30 | - No
31 | - Yes
32 | - No
33 | * - 3
34 | - No
35 | - Yes
36 | - Yes
37 | * - 4
38 | - Yes
39 | - No
40 | - No
41 | * - 5
42 | - Yes
43 | - No
44 | - Yes
45 | * - 6
46 | - Yes
47 | - Yes
48 | - No
49 | * - 7
50 | - Yes
51 | - Yes
52 | - Yes
53 |
54 | When configuring an Opera Cake, the address may be specified with the ``--address`` or ``-o`` option:
55 |
56 | .. code-block:: sh
57 |
58 | hackrf_operacake -o 1 -a A1 -b B2
59 |
60 | If the address is unspecified, 0 is assumed. It is only necessary to specify the address if the address has been changed with the addition of jumpers, typically required only if multiple Opera Cakes are stacked onto a single HackRF One.
61 |
--------------------------------------------------------------------------------
/docs/source/opera_cake_faq.rst:
--------------------------------------------------------------------------------
1 | =====================================
2 | Frequently Asked Questions
3 | =====================================
4 |
5 | Why the name 'Opera Cake'?
6 | ~~~~~~~~~~~~~~~~~~~~~~~~~~
7 |
8 | Internally at Great Scott Gadgets, HackRF related boards are code named with a candy or confection name. The Opera Cake code name was fun enough that we didn't change from it when we released the project.
9 |
10 | When was Opera Cake first for sale?
11 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12 |
13 | Great Scott Gadgets first released Opera Cake for sale in 2022. The open source project for Opera Cake has been available since 2016 from Great Scott Gadgets.
--------------------------------------------------------------------------------
/docs/source/opera_cake_hardware.rst:
--------------------------------------------------------------------------------
1 | ========
2 | Hardware
3 | ========
4 |
5 | Banks
6 | ~~~~~
7 |
8 | The ports on Opera Cake are grouped in two banks (or "sides"), one on each end of the board. Bank A consists of ports A0 through A4 while bank B consists of ports B0 through B4.
9 |
10 | Ports
11 | ~~~~~
12 |
13 | Opera Cake has two primary ports, A0 and B0, each of which can be switched to any of eight secondary ports, A1-A4 and B1-B4. Each primary port is always connected to one secondary port. By default, A0 is connected to A1, and B0 is connected to B1. It is not possible to connect both primary ports to secondary ports in the same bank at the same time.
14 |
15 | LEDs
16 | ~~~~
17 |
18 | Port selections are indicated by LEDs next to each port's connector. Port A0 and the secondary port connected to A0 are indicated with a green LED. Port B0 and the secondary port connected to B0 are indicated with a yellow LED.
--------------------------------------------------------------------------------
/docs/source/opera_cake_port_configuration.rst:
--------------------------------------------------------------------------------
1 | .. _portconfiguration:
2 |
3 | ===================
4 | Port Configurations
5 | ===================
6 |
7 | Port connections may be configured manually. For example, to connect A0 to A2 and B0 to B3:
8 |
9 | .. code-block:: sh
10 |
11 | hackrf_operacake -a A2 -b B3
12 |
13 | To connect A0 to B2 and B0 to A4:
14 |
15 | .. code-block:: sh
16 |
17 | hackrf_operacake -a B2 -b A4
18 |
19 | If only one primary port is configured, the other primary port will be connected to the first secondary port on the opposite side. For example, after the next two commands B0 will be connected to A1:
20 |
21 | .. code-block:: sh
22 |
23 | hackrf_operacake -a A2 -b B3
24 | hackrf_operacake -a B2
25 |
--------------------------------------------------------------------------------
/docs/source/sampling_rate.rst:
--------------------------------------------------------------------------------
1 | Sampling Rate and Baseband Filters
2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 |
4 | Using a sampling rate of less than 8MHz is not recommended. Partly, this is because the MAX5864 (ADC/DAC chip) isn't specified to operate at less than 8MHz, and therefore, no promises are made by Maxim about how it performs. But more importantly, the baseband filter in the MAX2837 has a minimum bandwidth of 1.75MHz. It can't provide enough filtering at 2MHz sampling rate to remove substantial signal energy in adjacent spectrum (more than +/-1MHz from the tuned frequency). The MAX2837 datasheet suggests that at +/-1MHz, the filter provides only 4dB attenuation, and at +/-2MHz (where a signal would alias right into the center of your 2MHz spectrum), it attenuates about 33dB. That's significant. Here's a picture:
5 |
6 | .. image:: ../images/max2837-1m75bw-at-2m.png
7 | :align: center
8 |
9 | At 8MHz sampling rate, and using the minimum 1.75MHz bandwidth filter, this is the response:
10 |
11 | .. image:: ../images/max2837-1m75bw-at-8m.png
12 | :align: center
13 |
14 | You can see that the attenuation is more than 60dB at +/-2.8MHz, which is more than sufficient to remove significant adjacent spectrum interference before the ADC digitizes the baseband. If using this configuration to get a 2MHz sampling rate, use a GNU Radio block after the 8MHz source that performs a 4:1 decimation with a decently sharp low pass filter (complex filter with a cut-off of <1MHz).
--------------------------------------------------------------------------------
/docs/source/setting_gain.rst:
--------------------------------------------------------------------------------
1 | ============================
2 | Setting Gain Controls for RX
3 | ============================
4 |
5 | A good default setting to start with is RF=0 (off), IF=16, baseband=16. Increase or decrease the IF and baseband gain controls roughly equally to find the best settings for your situation. Turn on the RF amp if you need help picking up weak signals. If your gain settings are too low, your signal may be buried in the noise. If one or more of your gain settings is too high, you may see distortion (look for unexpected frequencies that pop up when you increase the gain) or the noise floor may be amplified more than your signal is.
6 |
--------------------------------------------------------------------------------
/docs/source/usb_cables.rst:
--------------------------------------------------------------------------------
1 | ==========
2 | USB Cables
3 | ==========
4 |
5 | The USB cable you choose can make a big difference in what you see when using your HackRF and especially when using it around between 120 and 480 MHz where USB is doing all its work.
6 |
7 | #. Use a shielded USB cable. The best way to guarantee RF interference from USB is to use an unshielded cable. You can test that your cable is shielded by using a continuity tester to verify that the shield on one connector has continuity to the shield on the connector at the other end of the cable.
8 |
9 | #. Use a short USB cable. Trying anything larger than a 6ft cable may yield poor results. The longer the cable, the more loss you can expect and when making this post a 15ft cable was tried and the result was the HackRF would only power up half way.
10 |
11 | #. For best results, select a cable with a ferrite core. These cables are usually advertised to be noise reducing and are recognizable from the plastic block towards one end.
12 |
13 | Screenshot before and after changing to a noise reducing cable (`view full size image `__):
14 |
15 | .. image:: ../images/noisereducingcablescreenshot.jpeg
16 | :align: center
17 |
18 | A shielded cable with ferrite core was used in the right-hand image.
19 |
20 | The before and after images were both taken with the preamp on and the LNA and VGA both set to 24db.
21 |
22 |
23 |
24 | Why isn't my HackRF One detectable after I plug it into my computer?
25 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 |
27 | If your HackRF One isn't immediately detectable it is very possible that your Micro USB cable is not meeting HackRF One's requirements. HackRF One requires quite a bit of supply current and solid USB 2.0 high speed communications to operate. It is common for HackRF One to reveal cables with deficiencies such as carrying power but not data, carrying data but not enough power, etc. Please try multiple cables to resolve this issue. More than once people have gotten their HackRF One to work after trying their fifth cable.
--------------------------------------------------------------------------------
/docs/source/virtual_machines.rst:
--------------------------------------------------------------------------------
1 | ================
2 | Virtual Machines
3 | ================
4 |
5 | HackRF requires the ability to stream data at very high rates over USB. Unfortunately VM software typically has problems with USB passthrough; especially continuous high speed USB transfers. It is recommended to not use a HackRF with a VM.
--------------------------------------------------------------------------------
/firmware/.gitignore:
--------------------------------------------------------------------------------
1 | *.bin
2 | *.d
3 | *.elf
4 | *.hex
5 | *.list
6 | *.map
7 | *.o
8 | *.srec
9 | *.dfu
10 |
--------------------------------------------------------------------------------
/firmware/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright 2012 Jared Boone
2 | #
3 | # This file is part of HackRF.
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2, or (at your option)
8 | # any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program; see the file COPYING. If not, write to
17 | # the Free Software Foundation, Inc., 51 Franklin Street,
18 | # Boston, MA 02110-1301, USA.
19 | #
20 |
21 | # Top directory CMake project for HackRF firmware
22 |
23 | cmake_minimum_required(VERSION 3.1.3)
24 | set(CMAKE_TOOLCHAIN_FILE toolchain-arm-cortex-m.cmake)
25 |
26 | project (hackrf_firmware_all C)
27 |
28 | add_subdirectory(blinky)
29 | add_subdirectory(hackrf_usb)
30 |
--------------------------------------------------------------------------------
/firmware/appveyor.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | /usr/bin/env python -m ensurepip
4 | /usr/bin/env python -m pip install pyyaml
5 |
6 | cd firmware/libopencm3
7 | export SRCLIBDIR='c:\projects\hackrf\firmware\libopencm3\lib\'
8 | make lib/lpc43xx/m0
9 | make lib/lpc43xx/m4
10 | cd ..
11 | mkdir build-hackrf-one
12 | cd build-hackrf-one
13 | cmake -G "Unix Makefiles" ..
14 | make VERBOSE=1
15 |
--------------------------------------------------------------------------------
/firmware/blinky/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright 2012 Michael Ossmann
2 | # Copyright 2012 Jared Boone
3 | #
4 | # This file is part of HackRF.
5 | #
6 | # This program is free software; you can redistribute it and/or modify
7 | # it under the terms of the GNU General Public License as published by
8 | # the Free Software Foundation; either version 2, or (at your option)
9 | # any later version.
10 | #
11 | # This program is distributed in the hope that it will be useful,
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | # GNU General Public License for more details.
15 | #
16 | # You should have received a copy of the GNU General Public License
17 | # along with this program; see the file COPYING. If not, write to
18 | # the Free Software Foundation, Inc., 51 Franklin Street,
19 | # Boston, MA 02110-1301, USA.
20 | #
21 |
22 | cmake_minimum_required(VERSION 3.1.3)
23 | set(CMAKE_TOOLCHAIN_FILE ../toolchain-arm-cortex-m.cmake)
24 |
25 | project(blinky C)
26 |
27 | include(../hackrf-common.cmake)
28 |
29 | set(SRC_M4
30 | blinky.c
31 | )
32 |
33 | DeclareTargets()
34 |
--------------------------------------------------------------------------------
/firmware/blinky/README:
--------------------------------------------------------------------------------
1 | This is the simplest example firmware for HackRF. It flashes three LEDs.
2 |
--------------------------------------------------------------------------------
/firmware/blinky/blinky.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010-2017 Great Scott Gadgets
3 | *
4 | * This file is part of HackRF.
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; see the file COPYING. If not, write to
18 | * the Free Software Foundation, Inc., 51 Franklin Street,
19 | * Boston, MA 02110-1301, USA.
20 | */
21 |
22 | #include "hackrf_core.h"
23 | #include "platform_detect.h"
24 |
25 | int main(void)
26 | {
27 | detect_hardware_platform();
28 | pin_setup();
29 |
30 | /* enable 1V8 power supply so that the 1V8 LED lights up */
31 | enable_1v8_power();
32 |
33 | /* Blink LED1/2/3 on the board. */
34 | while (1)
35 | {
36 | led_on(LED1);
37 | led_on(LED2);
38 | led_on(LED3);
39 |
40 | delay(2000000);
41 |
42 | led_off(LED1);
43 | led_off(LED2);
44 | led_off(LED3);
45 |
46 | delay(2000000);
47 | }
48 |
49 | return 0;
50 | }
51 |
--------------------------------------------------------------------------------
/firmware/common/LPC4320_M4_memory.ld:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2014 Great Scott Gadgets
3 | * Copyright 2012 Jared Boone
4 | *
5 | * This file is part of HackRF
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | /* Linker script for HackRF One (LPC4320, 1M SPI flash, 200K SRAM). */
24 |
25 | MEMORY
26 | {
27 | /* rom is really the shadow region that points to SPI flash or elsewhere */
28 | rom (rx) : ORIGIN = 0x00000000, LENGTH = 96K
29 | ram_local1 (rwx) : ORIGIN = 0x10000000, LENGTH = 96K
30 | ram_local2 (rwx) : ORIGIN = 0x10080000, LENGTH = 32K
31 | ram_sleep (rwx) : ORIGIN = 0x10088000, LENGTH = 8K
32 | }
33 |
34 | INCLUDE LPC43xx_M4_memory.ld
35 |
--------------------------------------------------------------------------------
/firmware/common/LPC4330_M4_memory.ld:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2017 Great Scott Gadgets
3 | * Copyright 2012 Jared Boone
4 | *
5 | * This file is part of HackRF
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | /* Linker script for Rad1o badge - (LPC4330, 1M SPI flash, 264K SRAM). */
24 |
25 | MEMORY
26 | {
27 | /* rom is really the shadow region that points to SPI flash or elsewhere */
28 | rom (rx) : ORIGIN = 0x00000000, LENGTH = 128K
29 | ram_local1 (rwx) : ORIGIN = 0x10000000, LENGTH = 128K
30 | ram_local2 (rwx) : ORIGIN = 0x10080000, LENGTH = 64K
31 | ram_sleep (rwx) : ORIGIN = 0x10090000, LENGTH = 8K
32 | }
33 |
34 | INCLUDE LPC43xx_M4_memory.ld
35 |
--------------------------------------------------------------------------------
/firmware/common/LPC43xx_M0_memory.ld:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2014 Great Scott Gadgets
3 | * Copyright 2012 Jared Boone
4 | *
5 | * This file is part of HackRF
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | MEMORY
24 | {
25 | ram (rwx) : ORIGIN = 0x00000000, LENGTH = 28K
26 | }
27 |
--------------------------------------------------------------------------------
/firmware/common/LPC43xx_M4_M0_image_from_text.ld:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2021 Great Scott Gadgets
3 | * Copyright 2012 Jared Boone
4 | *
5 | * This file is part of HackRF
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | SECTIONS
24 | {
25 | .m0_text : {
26 | PROVIDE(__m0_start__ = .);
27 | KEEP(*(.m0_bin*));
28 | . = ALIGN(4);
29 | PROVIDE(__m0_end__ = .);
30 | } >rom
31 | }
32 |
--------------------------------------------------------------------------------
/firmware/common/LPC43xx_M4_memory.ld:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2021 Great Scott Gadgets
3 | * Copyright 2012 Jared Boone
4 | *
5 | * This file is part of HackRF
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | MEMORY
24 | {
25 | /* Physical address in Flash used to copy Code from Flash to RAM */
26 | rom_flash (rx) : ORIGIN = 0x80000000, LENGTH = 1M
27 | ram_m0 (rwx) : ORIGIN = 0x20000000, LENGTH = 28K
28 | ram_shared (rwx) : ORIGIN = 0x20007000, LENGTH = 4K
29 | ram_usb (rwx) : ORIGIN = 0x20008000, LENGTH = 32K
30 | /* ram_usb: USB buffer. Straddles two blocks of RAM
31 | * to get performance benefit of having two USB buffers addressable
32 | * simultaneously (on two different buses of the AHB multilayer matrix)
33 | */
34 | }
35 |
36 | usb_bulk_buffer = ORIGIN(ram_usb);
37 | m0_state = ORIGIN(ram_shared);
38 | PROVIDE(__ram_m0_start__ = ORIGIN(ram_m0));
39 |
--------------------------------------------------------------------------------
/firmware/common/README:
--------------------------------------------------------------------------------
1 | This directory contains things shared by multiple HackRF firmware
2 | implementations.
3 |
--------------------------------------------------------------------------------
/firmware/common/bitband.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2022 Great Scott Gadgets
3 | * Copyright 2012 Jared Boone
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #ifndef __BITBAND_H__
24 | #define __BITBAND_H__
25 |
26 | #include
27 |
28 | volatile uint32_t* peripheral_bitband_address(
29 | volatile void* const address,
30 | const uint_fast8_t bit_number);
31 | void peripheral_bitband_set(
32 | volatile void* const peripheral_address,
33 | const uint_fast8_t bit_number);
34 | void peripheral_bitband_clear(
35 | volatile void* const peripheral_address,
36 | const uint_fast8_t bit_number);
37 | uint32_t peripheral_bitband_get(
38 | volatile void* const peripheral_address,
39 | const uint_fast8_t bit_number);
40 |
41 | #endif //__BITBAND_H__
42 |
--------------------------------------------------------------------------------
/firmware/common/clkin.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 Great Scott Gadgets
3 | *
4 | * This file is part of HackRF.
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; see the file COPYING. If not, write to
18 | * the Free Software Foundation, Inc., 51 Franklin Street,
19 | * Boston, MA 02110-1301, USA.
20 | */
21 |
22 | #ifndef __CLKIN_H__
23 | #define __CLKIN_H__
24 |
25 | #include
26 |
27 | void clkin_detect_init(void);
28 | uint32_t clkin_frequency(void);
29 |
30 | #endif //__CLKIN_H__
31 |
--------------------------------------------------------------------------------
/firmware/common/configure_file.cmake:
--------------------------------------------------------------------------------
1 | configure_file(
2 | ${SRC}
3 | ${DEST}
4 | )
--------------------------------------------------------------------------------
/firmware/common/cpld_jtag.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013-2022 Great Scott Gadgets
3 | *
4 | * This file is part of HackRF.
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; see the file COPYING. If not, write to
18 | * the Free Software Foundation, Inc., 51 Franklin Street,
19 | * Boston, MA 02110-1301, USA.
20 | */
21 |
22 | #ifndef __CPLD_JTAG_H__
23 | #define __CPLD_JTAG_H__
24 |
25 | #include
26 |
27 | #include "gpio.h"
28 |
29 | typedef struct jtag_gpio_t {
30 | gpio_t gpio_tms;
31 | gpio_t gpio_tck;
32 | gpio_t gpio_tdi;
33 | gpio_t gpio_tdo;
34 | #ifdef HACKRF_ONE
35 | gpio_t gpio_pp_tms;
36 | gpio_t gpio_pp_tdo;
37 | #endif
38 | } jtag_gpio_t;
39 |
40 | typedef struct jtag_t {
41 | jtag_gpio_t* const gpio;
42 | } jtag_t;
43 |
44 | typedef void (*refill_buffer_cb)(void);
45 |
46 | void cpld_jtag_take(jtag_t* const jtag);
47 | void cpld_jtag_release(jtag_t* const jtag);
48 |
49 | /* Return 0 if success else return error code see xsvfExecute() see micro.h.
50 | *
51 | * We expect the buffer to be initially full of data. After the entire
52 | * contents of the buffer has been streamed to the CPLD the given
53 | * refill_buffer callback will be called. */
54 | int cpld_jtag_program(
55 | jtag_t* const jtag,
56 | const uint32_t buffer_length,
57 | unsigned char* const buffer,
58 | refill_buffer_cb refill);
59 | unsigned char cpld_jtag_get_next_byte(void);
60 |
61 | #endif //__CPLD_JTAG_H__
62 |
--------------------------------------------------------------------------------
/firmware/common/crc.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2022 Great Scott Gadgets
3 | * Copyright 2019 Jared Boone
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #include "crc.h"
24 |
25 | #include
26 |
27 | void crc32_init(crc32_t* const crc)
28 | {
29 | crc->remainder = 0xffffffff;
30 | crc->reversed_polynomial = 0xedb88320;
31 | crc->final_xor = 0xffffffff;
32 | }
33 |
34 | void crc32_update(crc32_t* const crc, const uint8_t* const data, const size_t byte_count)
35 | {
36 | uint32_t remainder = crc->remainder;
37 | const size_t bit_count = byte_count * 8;
38 | for (size_t bit_n = 0; bit_n < bit_count; bit_n++) {
39 | const bool bit_in = data[bit_n >> 3] & (1 << (bit_n & 7));
40 | remainder ^= (bit_in ? 1 : 0);
41 | const bool bit_out = (remainder & 1);
42 | remainder >>= 1;
43 | if (bit_out) {
44 | remainder ^= crc->reversed_polynomial;
45 | }
46 | }
47 | crc->remainder = remainder;
48 | }
49 |
50 | uint32_t crc32_digest(const crc32_t* const crc)
51 | {
52 | return crc->remainder ^ crc->final_xor;
53 | }
54 |
--------------------------------------------------------------------------------
/firmware/common/crc.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2022 Great Scott Gadgets
3 | * Copyright 2019 Jared Boone
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #ifndef __CRC_H__
24 | #define __CRC_H__
25 |
26 | #include
27 | #include
28 |
29 | typedef struct {
30 | uint32_t remainder;
31 | uint32_t reversed_polynomial;
32 | uint32_t final_xor;
33 | } crc32_t;
34 |
35 | void crc32_init(crc32_t* const crc);
36 | void crc32_update(crc32_t* const crc, const uint8_t* const data, const size_t byte_count);
37 | uint32_t crc32_digest(const crc32_t* const crc);
38 |
39 | #endif //__CRC_H__
40 |
--------------------------------------------------------------------------------
/firmware/common/firmware_info.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 Great Scott Gadgets
3 | *
4 | * This file is part of HackRF.
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; see the file COPYING. If not, write to
18 | * the Free Software Foundation, Inc., 51 Franklin Street,
19 | * Boston, MA 02110-1301, USA.
20 | */
21 |
22 | #include "firmware_info.h"
23 | #include "platform_detect.h"
24 | #include "gpio_lpc.h"
25 | #include "hackrf_core.h"
26 |
27 | #include
28 | #include
29 |
30 | #ifdef JAWBREAKER
31 | #define SUPPORTED_PLATFORM PLATFORM_JAWBREAKER
32 | #elif HACKRF_ONE
33 | #define SUPPORTED_PLATFORM (PLATFORM_HACKRF1_OG | PLATFORM_HACKRF1_R9)
34 | #elif RAD1O
35 | #define SUPPORTED_PLATFORM PLATFORM_RAD1O
36 | #else
37 | #define SUPPORTED_PLATFORM 0
38 | #endif
39 |
40 | #ifdef DFU_MODE
41 | #define DFU_MODE_VALUE 1
42 | #else
43 | #define DFU_MODE_VALUE 0
44 | #endif
45 |
46 | __attribute__((section(".firmware_info"))) const struct firmware_info_t firmware_info = {
47 | .magic = "HACKRFFW",
48 | .struct_version = 1,
49 | .dfu_mode = DFU_MODE_VALUE,
50 | .supported_platform = SUPPORTED_PLATFORM,
51 | .version_string = VERSION_STRING,
52 | };
53 |
--------------------------------------------------------------------------------
/firmware/common/firmware_info.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 Great Scott Gadgets
3 | *
4 | * This file is part of HackRF.
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; see the file COPYING. If not, write to
18 | * the Free Software Foundation, Inc., 51 Franklin Street,
19 | * Boston, MA 02110-1301, USA.
20 | */
21 |
22 | #ifndef FIRMWARE_INFO_H
23 | #define FIRMWARE_INFO_H
24 |
25 | #include
26 |
27 | struct firmware_info_t {
28 | char magic[8];
29 | uint16_t struct_version;
30 | uint16_t dfu_mode;
31 | uint32_t supported_platform;
32 | char version_string[32];
33 | } __attribute__((packed, aligned(1)));
34 |
35 | extern const struct firmware_info_t firmware_info;
36 |
37 | #endif
--------------------------------------------------------------------------------
/firmware/common/gpdma.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013-2022 Great Scott Gadgets
3 | * Copyright 2013 Jared Boone
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #ifndef __GPDMA_H__
24 | #define __GPDMA_H__
25 |
26 | #include
27 | #include
28 |
29 | #include
30 |
31 | void gpdma_controller_enable();
32 |
33 | void gpdma_channel_enable(const uint_fast8_t channel);
34 | void gpdma_channel_disable(const uint_fast8_t channel);
35 |
36 | void gpdma_channel_interrupt_tc_clear(const uint_fast8_t channel);
37 | void gpdma_channel_interrupt_error_clear(const uint_fast8_t channel);
38 |
39 | void gpdma_lli_enable_interrupt(gpdma_lli_t* const lli);
40 |
41 | void gpdma_lli_create_loop(gpdma_lli_t* const lli, const size_t lli_count);
42 | void gpdma_lli_create_oneshot(gpdma_lli_t* const lli, const size_t lli_count);
43 |
44 | #endif /*__GPDMA_H__*/
45 |
--------------------------------------------------------------------------------
/firmware/common/gpio.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2022 Great Scott Gadgets
3 | * Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #ifndef __GPIO_H__
24 | #define __GPIO_H__
25 |
26 | #include
27 |
28 | typedef const struct gpio_t* gpio_t;
29 |
30 | void gpio_init();
31 | void gpio_set(gpio_t gpio);
32 | void gpio_clear(gpio_t gpio);
33 | void gpio_toggle(gpio_t gpio);
34 | void gpio_output(gpio_t gpio);
35 | void gpio_input(gpio_t gpio);
36 | void gpio_write(gpio_t gpio, const bool value);
37 | bool gpio_read(gpio_t gpio);
38 |
39 | #endif /*__GPIO_H__*/
40 |
--------------------------------------------------------------------------------
/firmware/common/gpio_lpc.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2022 Great Scott Gadgets
3 | * Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #include "gpio_lpc.h"
24 |
25 | #include
26 |
27 | void gpio_init()
28 | {
29 | for (size_t i = 0; i < 8; i++) {
30 | GPIO_LPC_PORT(i)->dir = 0;
31 | }
32 | }
33 |
34 | void gpio_set(gpio_t gpio)
35 | {
36 | gpio->port->set = gpio->mask;
37 | }
38 |
39 | void gpio_clear(gpio_t gpio)
40 | {
41 | gpio->port->clr = gpio->mask;
42 | }
43 |
44 | void gpio_toggle(gpio_t gpio)
45 | {
46 | gpio->port->not = gpio->mask;
47 | }
48 |
49 | void gpio_output(gpio_t gpio)
50 | {
51 | gpio->port->dir |= gpio->mask;
52 | }
53 |
54 | void gpio_input(gpio_t gpio)
55 | {
56 | gpio->port->dir &= ~gpio->mask;
57 | }
58 |
59 | void gpio_write(gpio_t gpio, const bool value)
60 | {
61 | *gpio->gpio_w = value;
62 | }
63 |
64 | bool gpio_read(gpio_t gpio)
65 | {
66 | return *gpio->gpio_w;
67 | }
68 |
--------------------------------------------------------------------------------
/firmware/common/i2c_bus.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2022 Great Scott Gadgets
3 | * Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #include "i2c_bus.h"
24 |
25 | void i2c_bus_start(i2c_bus_t* const bus, const void* const config)
26 | {
27 | bus->start(bus, config);
28 | }
29 |
30 | void i2c_bus_stop(i2c_bus_t* const bus)
31 | {
32 | bus->stop(bus);
33 | }
34 |
35 | void i2c_bus_transfer(
36 | i2c_bus_t* const bus,
37 | const uint_fast8_t peripheral_address,
38 | const uint8_t* const tx,
39 | const size_t tx_count,
40 | uint8_t* const rx,
41 | const size_t rx_count)
42 | {
43 | bus->transfer(bus, peripheral_address, tx, tx_count, rx, rx_count);
44 | }
45 |
--------------------------------------------------------------------------------
/firmware/common/i2c_bus.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2022 Great Scott Gadgets
3 | * Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #ifndef __I2C_BUS_H__
24 | #define __I2C_BUS_H__
25 |
26 | #include
27 | #include
28 |
29 | struct i2c_bus_t;
30 | typedef struct i2c_bus_t i2c_bus_t;
31 |
32 | struct i2c_bus_t {
33 | void* const obj;
34 | void (*start)(i2c_bus_t* const bus, const void* const config);
35 | void (*stop)(i2c_bus_t* const bus);
36 | void (*transfer)(
37 | i2c_bus_t* const bus,
38 | const uint_fast8_t peripheral_address,
39 | const uint8_t* const tx,
40 | const size_t tx_count,
41 | uint8_t* const rx,
42 | const size_t rx_count);
43 | };
44 |
45 | void i2c_bus_start(i2c_bus_t* const bus, const void* const config);
46 | void i2c_bus_stop(i2c_bus_t* const bus);
47 | void i2c_bus_transfer(
48 | i2c_bus_t* const bus,
49 | const uint_fast8_t peripheral_address,
50 | const uint8_t* const tx,
51 | const size_t tx_count,
52 | uint8_t* const rx,
53 | const size_t rx_count);
54 |
55 | #endif /*__I2C_BUS_H__*/
56 |
--------------------------------------------------------------------------------
/firmware/common/i2c_lpc.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2022 Great Scott Gadgets
3 | * Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #ifndef __I2C_LPC_H__
24 | #define __I2C_LPC_H__
25 |
26 | #include
27 | #include
28 | #include
29 |
30 | #include "i2c_bus.h"
31 |
32 | typedef struct i2c_lpc_config_t {
33 | const uint16_t duty_cycle_count;
34 | } i2c_lpc_config_t;
35 |
36 | void i2c_lpc_start(i2c_bus_t* const bus, const void* const config);
37 | void i2c_lpc_stop(i2c_bus_t* const bus);
38 | void i2c_lpc_transfer(
39 | i2c_bus_t* const bus,
40 | const uint_fast8_t peripheral_address,
41 | const uint8_t* const data_tx,
42 | const size_t count_tx,
43 | uint8_t* const data_rx,
44 | const size_t count_rx);
45 | bool i2c_probe(i2c_bus_t* const bus, const uint_fast8_t device_address);
46 |
47 | #endif /*__I2C_LPC_H__*/
48 |
--------------------------------------------------------------------------------
/firmware/common/m0_bin.s.cmake:
--------------------------------------------------------------------------------
1 | # Copyright 2013 Jared Boone
2 | #
3 | # This file is part of HackRF.
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2, or (at your option)
8 | # any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program; see the file COPYING. If not, write to
17 | # the Free Software Foundation, Inc., 51 Franklin Street,
18 | # Boston, MA 02110-1301, USA.
19 |
20 | .data
21 | .section .m0_bin, "ax"
22 |
23 | .incbin "${BIN}"
24 |
--------------------------------------------------------------------------------
/firmware/common/m0_sleep.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013-2022 Great Scott Gadgets
3 | * Copyright 2013 Jared Boone
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | int main()
24 | {
25 | while (1) {}
26 | }
27 |
--------------------------------------------------------------------------------
/firmware/common/max2837_target.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2022 Great Scott Gadgets
3 | * Copyright 2012 Will Code
4 | * Copyright 2014 Jared Boone
5 | *
6 | * This file is part of HackRF.
7 | *
8 | * This program is free software; you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation; either version 2, or (at your option)
11 | * any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program; see the file COPYING. If not, write to
20 | * the Free Software Foundation, Inc., 51 Franklin Street,
21 | * Boston, MA 02110-1301, USA.
22 | */
23 |
24 | #ifndef __MAX2837_TARGET_H
25 | #define __MAX2837_TARGET_H
26 |
27 | #include "max2837.h"
28 |
29 | void max2837_target_init(max2837_driver_t* const drv);
30 | void max2837_target_set_mode(max2837_driver_t* const drv, const max2837_mode_t new_mode);
31 |
32 | #endif // __MAX2837_TARGET_H
33 |
--------------------------------------------------------------------------------
/firmware/common/max2839_target.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2022 Great Scott Gadgets
3 | * Copyright 2014 Jared Boone
4 | * Copyright 2012 Will Code
5 | *
6 | * This file is part of HackRF.
7 | *
8 | * This program is free software; you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation; either version 2, or (at your option)
11 | * any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program; see the file COPYING. If not, write to
20 | * the Free Software Foundation, Inc., 51 Franklin Street,
21 | * Boston, MA 02110-1301, USA.
22 | */
23 |
24 | #ifndef __MAX2839_TARGET_H
25 | #define __MAX2839_TARGET_H
26 |
27 | #include "max2839.h"
28 |
29 | void max2839_target_init(max2839_driver_t* const drv);
30 | void max2839_target_set_mode(max2839_driver_t* const drv, const max2839_mode_t new_mode);
31 |
32 | #endif // __MAX2839_TARGET_H
33 |
--------------------------------------------------------------------------------
/firmware/common/max2871.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Great Scott Gadgets
3 | *
4 | * This file is part of HackRF.
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; see the file COPYING. If not, write to
18 | * the Free Software Foundation, Inc., 51 Franklin Street,
19 | * Boston, MA 02110-1301, USA.
20 | */
21 |
22 | #ifndef MAX2871_H
23 | #define MAX2871_H
24 |
25 | #include "gpio.h"
26 |
27 | #include
28 |
29 | typedef struct {
30 | gpio_t gpio_vco_ce;
31 | gpio_t gpio_vco_sclk;
32 | gpio_t gpio_vco_sdata;
33 | gpio_t gpio_vco_le;
34 | gpio_t gpio_synt_rfout_en;
35 | gpio_t gpio_vco_mux;
36 | } max2871_driver_t;
37 |
38 | extern void max2871_setup(max2871_driver_t* const drv);
39 | extern uint64_t max2871_set_frequency(max2871_driver_t* const drv, uint16_t mhz);
40 | extern void max2871_enable(max2871_driver_t* const drv);
41 | extern void max2871_disable(max2871_driver_t* const drv);
42 | #endif
43 |
--------------------------------------------------------------------------------
/firmware/common/max5864.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2014 Great Scott Gadgets
3 | * Copyright 2012 Jared Boone
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #ifndef __MAX5864_H
24 | #define __MAX5864_H
25 |
26 | #include "spi_bus.h"
27 |
28 | struct max5864_driver_t;
29 | typedef struct max5864_driver_t max5864_driver_t;
30 |
31 | struct max5864_driver_t {
32 | spi_bus_t* const bus;
33 | void (*target_init)(max5864_driver_t* const drv);
34 | };
35 |
36 | void max5864_setup(max5864_driver_t* const drv);
37 |
38 | void max5864_shutdown(max5864_driver_t* const drv);
39 | void max5864_standby(max5864_driver_t* const drv);
40 | void max5864_idle(max5864_driver_t* const drv);
41 | void max5864_rx(max5864_driver_t* const drv);
42 | void max5864_tx(max5864_driver_t* const drv);
43 | void max5864_xcvr(max5864_driver_t* const drv);
44 |
45 | #endif // __MAX5864_H
46 |
--------------------------------------------------------------------------------
/firmware/common/max5864_target.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2022 Great Scott Gadgets
3 | * Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #include "max5864_target.h"
24 |
25 | #include
26 | #include "hackrf_core.h"
27 |
28 | void max5864_target_init(max5864_driver_t* const drv)
29 | {
30 | (void) drv;
31 |
32 | /* Configure SSP1 Peripheral (to be moved later in SSP driver) */
33 | scu_pinmux(SCU_SSP1_CIPO, (SCU_SSP_IO | SCU_CONF_FUNCTION5));
34 | scu_pinmux(SCU_SSP1_COPI, (SCU_SSP_IO | SCU_CONF_FUNCTION5));
35 | scu_pinmux(SCU_SSP1_SCK, (SCU_SSP_IO | SCU_CONF_FUNCTION1));
36 |
37 | /*
38 | * Configure CS_AD pin to keep the MAX5864 SPI disabled while we use the
39 | * SPI bus for the MAX2837. FIXME: this should probably be somewhere else.
40 | */
41 | scu_pinmux(SCU_AD_CS, SCU_GPIO_FAST);
42 | }
43 |
--------------------------------------------------------------------------------
/firmware/common/max5864_target.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2022 Great Scott Gadgets
3 | * Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #ifndef __MAX5864_TARGET_H__
24 | #define __MAX5864_TARGET_H__
25 |
26 | #include "max5864.h"
27 |
28 | void max5864_target_init(max5864_driver_t* const drv);
29 |
30 | #endif /*__MAX5864_TARGET_H__*/
31 |
--------------------------------------------------------------------------------
/firmware/common/mixer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2022 Great Scott Gadgets
3 | * Copyright 2014 Jared Boone
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #ifndef __MIXER_H
24 | #define __MIXER_H
25 |
26 | #if (defined JAWBREAKER || defined HACKRF_ONE)
27 | #include "rffc5071.h"
28 | typedef rffc5071_driver_t mixer_driver_t;
29 | #endif
30 |
31 | #ifdef RAD1O
32 | #include "max2871.h"
33 | typedef max2871_driver_t mixer_driver_t;
34 | #endif
35 |
36 | #include
37 | extern void mixer_bus_setup(mixer_driver_t* const mixer);
38 | extern void mixer_setup(mixer_driver_t* const mixer);
39 |
40 | /* Set frequency (MHz). */
41 | extern uint64_t mixer_set_frequency(mixer_driver_t* const mixer, uint16_t mhz);
42 |
43 | /* Set up rx only, tx only, or full duplex. Chip should be disabled
44 | * before _tx, _rx, or _rxtx are called. */
45 | extern void mixer_tx(mixer_driver_t* const mixer);
46 | extern void mixer_rx(mixer_driver_t* const mixer);
47 | extern void mixer_rxtx(mixer_driver_t* const mixer);
48 | extern void mixer_enable(mixer_driver_t* const mixer);
49 | extern void mixer_disable(mixer_driver_t* const mixer);
50 | extern void mixer_set_gpo(mixer_driver_t* const drv, uint8_t gpo);
51 |
52 | #endif // __MIXER_H
53 |
--------------------------------------------------------------------------------
/firmware/common/operacake.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016-2022 Great Scott Gadgets
3 | * Copyright 2016 Dominic Spill
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #ifndef __OPERACAKE_H
24 | #define __OPERACAKE_H
25 |
26 | #ifdef __cplusplus
27 | extern "C" {
28 | #endif
29 |
30 | #include
31 | #include
32 |
33 | #define OPERACAKE_PA1 0
34 | #define OPERACAKE_PA2 1
35 | #define OPERACAKE_PA3 2
36 | #define OPERACAKE_PA4 3
37 |
38 | #define OPERACAKE_PB1 4
39 | #define OPERACAKE_PB2 5
40 | #define OPERACAKE_PB3 6
41 | #define OPERACAKE_PB4 7
42 |
43 | #define MAX_OPERACAKE_RANGES 8
44 |
45 | uint8_t operacake_init(bool allow_gpio);
46 | bool operacake_is_board_present(uint8_t address);
47 | void operacake_get_boards(uint8_t* addresses);
48 | bool operacake_set_mode(uint8_t address, uint8_t mode);
49 | uint8_t operacake_get_mode(uint8_t address);
50 | uint8_t operacake_set_ports(uint8_t address, uint8_t PA, uint8_t PB);
51 | uint8_t operacake_add_range(uint16_t freq_min, uint16_t freq_max, uint8_t port);
52 | uint8_t operacake_set_range(uint32_t freq_mhz);
53 | void operacake_clear_ranges(void);
54 | uint16_t gpio_test(uint8_t address);
55 |
56 | #ifdef __cplusplus
57 | }
58 | #endif
59 |
60 | #endif /* __OPERACAKE_H */
61 |
--------------------------------------------------------------------------------
/firmware/common/operacake_sctimer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016-2022 Great Scott Gadgets
3 | * Copyright 2016 Dominic Spill
4 | * Copyright 2018 Schuyler St. Leger
5 | *
6 | * This file is part of HackRF.
7 | *
8 | * This program is free software; you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation; either version 2, or (at your option)
11 | * any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program; see the file COPYING. If not, write to
20 | * the Free Software Foundation, Inc., 51 Franklin Street,
21 | * Boston, MA 02110-1301, USA.
22 | */
23 |
24 | #ifndef __OPERACAKE_SCTIMER_H
25 | #define __OPERACAKE_SCTIMER_H
26 |
27 | #include
28 | #include
29 |
30 | struct operacake_dwell_times {
31 | uint32_t dwell;
32 | uint8_t port;
33 | };
34 |
35 | void operacake_sctimer_init();
36 | void operacake_sctimer_enable(bool enable);
37 | void operacake_sctimer_set_dwell_times(struct operacake_dwell_times* times, int n);
38 | void operacake_sctimer_stop();
39 | void operacake_sctimer_reset_state();
40 |
41 | #endif /* __OPERACAKE_SCTIMER_H */
42 |
--------------------------------------------------------------------------------
/firmware/common/rad1o/decoder.h:
--------------------------------------------------------------------------------
1 | #ifndef __RAD1O_DECODER_H__
2 | #define __RAD1O_DECODER_H__
3 |
4 | #include
5 |
6 | uint8_t* rad1o_pk_decode(const uint8_t* data, int* len);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/firmware/common/rad1o/display.h:
--------------------------------------------------------------------------------
1 | #ifndef __RAD1O_DISPLAY_H__
2 | #define __RAD1O_DISPLAY_H__
3 |
4 | #include
5 |
6 | #include
7 |
8 | #define RESX 130
9 | #define RESY 130
10 |
11 | #define TYPE_CMD 0
12 | #define TYPE_DATA 1
13 |
14 | #define _PIN(pin, func, ...) pin
15 | #define _FUNC(pin, func, ...) func
16 | #define SETUPpin(args...) scu_pinmux(_PIN(args), _FUNC(args))
17 |
18 | #define LCD_DI P1_4, SCU_CONF_FUNCTION5 | SCU_SSP_IO
19 | #define LCD_SCK P1_19, SCU_CONF_FUNCTION1 | SCU_SSP_IO
20 |
21 | #define LCD_SSP SSP1_NUM
22 |
23 | void rad1o_lcdInit(void);
24 | void rad1o_lcdDeInit(void);
25 | void rad1o_lcdFill(uint8_t f);
26 | void rad1o_lcdDisplay(void);
27 | void rad1o_lcdSetPixel(uint8_t x, uint8_t y, uint8_t f);
28 | uint8_t* rad1o_lcdGetBuffer(void);
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/firmware/common/rad1o/draw.c:
--------------------------------------------------------------------------------
1 | #include "display.h"
2 |
3 | #include
4 |
5 | #define SWAP(p1, p2) \
6 | do { \
7 | uint8_t SWAP = p1; \
8 | p1 = p2; \
9 | p2 = SWAP; \
10 | } while (0)
11 |
12 | void rad1o_drawHLine(uint8_t y, uint8_t x1, uint8_t x2, uint8_t color)
13 | {
14 | if (x1 > x2) {
15 | SWAP(x1, x2);
16 | }
17 | for (uint8_t i = x1; i <= x2; ++i) {
18 | rad1o_lcdSetPixel(i, y, color);
19 | }
20 | }
21 |
22 | void rad1o_drawVLine(uint8_t x, uint8_t y1, uint8_t y2, uint8_t color)
23 | {
24 | if (y1 > y2) {
25 | SWAP(y1, y2);
26 | }
27 | for (uint8_t i = y1; i <= y2; ++i) {
28 | rad1o_lcdSetPixel(x, i, color);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/firmware/common/rad1o/draw.h:
--------------------------------------------------------------------------------
1 | #ifndef __RAD1O_DRAW_H__
2 | #define __RAD1O_DRAW_H__
3 |
4 | #include
5 |
6 | void rad1o_drawHLine(uint8_t y, uint8_t x1, uint8_t x2, uint8_t color);
7 | void rad1o_drawVLine(uint8_t x, uint8_t y1, uint8_t y2, uint8_t color);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/firmware/common/rad1o/fonts.h:
--------------------------------------------------------------------------------
1 | #ifndef __RAD1O_FONTS_H__
2 | #define __RAD1O_FONTS_H__
3 |
4 | #include
5 |
6 | /* Partially based on original code for the KS0108 by Stephane Rey */
7 | /* Based on code code by Kevin Townsend */
8 |
9 | typedef struct {
10 | const uint8_t widthBits; // width, in bits (or pixels), of the character
11 | } FONT_CHAR_INFO;
12 |
13 | struct FONT_DEF {
14 | uint8_t u8Width; /* Character width for storage */
15 | uint8_t u8Height; /* Character height for storage */
16 | uint8_t u8FirstChar; /* The first character available */
17 | uint8_t u8LastChar; /* The last character available */
18 | const uint8_t* au8FontTable; /* Font table start address in memory */
19 | const FONT_CHAR_INFO* charInfo; /* Pointer to array of char information */
20 | const uint16_t* charExtra; /* Pointer to array of extra char info */
21 | };
22 |
23 | struct EXTFONT {
24 | uint8_t type; // 0: none, 1: static, 2: loaded
25 | char name[13];
26 | struct FONT_DEF def;
27 | };
28 |
29 | typedef const struct FONT_DEF* FONT;
30 |
31 | #define FONT_DEFAULT 0
32 | #define FONT_INTERNAL 1
33 | #define FONT_EXTERNAL 2
34 |
35 | #endif
36 |
--------------------------------------------------------------------------------
/firmware/common/rad1o/print.c:
--------------------------------------------------------------------------------
1 | #include "print.h"
2 | #include "display.h"
3 | #include "fonts.h"
4 | #include "render.h"
5 | #include "smallfonts.h"
6 |
7 | static int32_t x = 0;
8 | static int32_t y = 0;
9 |
10 | void rad1o_lcdPrint(const char* string)
11 | {
12 | x = rad1o_DoString(x, y, string);
13 | }
14 |
15 | void rad1o_lcdNl(void)
16 | {
17 | x = 0;
18 | y += rad1o_getFontHeight();
19 | }
20 |
21 | void rad1o_lcdClear(void)
22 | {
23 | x = 0;
24 | y = 0;
25 | rad1o_lcdFill(0xff);
26 | }
27 |
28 | void rad1o_lcdMoveCrsr(int32_t dx, int32_t dy)
29 | {
30 | x += dx;
31 | y += dy;
32 | }
33 |
34 | void rad1o_lcdSetCrsr(int32_t dx, int32_t dy)
35 | {
36 | x = dx;
37 | y = dy;
38 | }
39 |
40 | void rad1o_setSystemFont(void)
41 | {
42 | rad1o_setIntFont(&Font_7x8);
43 | }
44 |
--------------------------------------------------------------------------------
/firmware/common/rad1o/print.h:
--------------------------------------------------------------------------------
1 | #ifndef __RAD1O_PRINT_H__
2 | #define __RAD1O_PRINT_H__
3 |
4 | #include
5 |
6 | void rad1o_lcdPrint(const char* string);
7 | void rad1o_lcdNl(void);
8 | void rad1o_lcdClear(void);
9 | void rad1o_lcdMoveCrsr(int32_t dx, int32_t dy);
10 | void rad1o_lcdSetCrsr(int32_t dx, int32_t dy);
11 | void rad1o_setSystemFont(void);
12 |
13 | #endif
14 |
--------------------------------------------------------------------------------
/firmware/common/rad1o/render.h:
--------------------------------------------------------------------------------
1 | #ifndef __RENDER_H_
2 | #define __RENDER_H_
3 |
4 | #include "fonts.h"
5 |
6 | void rad1o_setTextColor(uint8_t bg, uint8_t fg);
7 | void rad1o_setIntFont(const struct FONT_DEF* font);
8 | int rad1o_getFontHeight(void);
9 | int rad1o_DoString(int sx, int sy, const char* s);
10 | int rad1o_DoChar(int sx, int sy, int c);
11 | #endif
12 |
--------------------------------------------------------------------------------
/firmware/common/rad1o/ubuntu18.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/firmware/common/rad1o/ubuntu18.c
--------------------------------------------------------------------------------
/firmware/common/rad1o/ubuntu18.h:
--------------------------------------------------------------------------------
1 | #ifndef __RAD1O_UBUNTU18_H__
2 | #define __RAD1O_UBUNTU18_H__
3 | #include "fonts.h"
4 |
5 | extern const struct FONT_DEF Font_Ubuntu18pt;
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/firmware/common/rffc5071_spi.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2022 Great Scott Gadgets
3 | * Copyright 2014 Jared Boone
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #ifndef __RFFC5071_SPI_H
24 | #define __RFFC5071_SPI_H
25 |
26 | #include "spi_bus.h"
27 |
28 | #include "gpio.h"
29 |
30 | typedef struct rffc5071_spi_config_t {
31 | gpio_t gpio_select;
32 | gpio_t gpio_clock;
33 | gpio_t gpio_data;
34 | } rffc5071_spi_config_t;
35 |
36 | void rffc5071_spi_start(spi_bus_t* const bus, const void* const config);
37 | void rffc5071_spi_stop(spi_bus_t* const bus);
38 | void rffc5071_spi_transfer(spi_bus_t* const bus, void* const data, const size_t count);
39 | void rffc5071_spi_transfer_gather(
40 | spi_bus_t* const bus,
41 | const spi_transfer_t* const transfer,
42 | const size_t count);
43 |
44 | #endif // __RFFC5071_SPI_H
45 |
--------------------------------------------------------------------------------
/firmware/common/sgpio.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2022 Great Scott Gadgets
3 | * Copyright 2012 Jared Boone
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #ifndef __SGPIO_H__
24 | #define __SGPIO_H__
25 |
26 | #include
27 | #include
28 |
29 | #include
30 |
31 | #include "gpio.h"
32 |
33 | typedef enum {
34 | SGPIO_DIRECTION_RX,
35 | SGPIO_DIRECTION_TX,
36 | } sgpio_direction_t;
37 |
38 | typedef struct sgpio_config_t {
39 | gpio_t gpio_q_invert;
40 | gpio_t gpio_hw_sync_enable;
41 | bool slice_mode_multislice;
42 | } sgpio_config_t;
43 |
44 | void sgpio_configure_pin_functions(sgpio_config_t* const config);
45 | void sgpio_test_interface(sgpio_config_t* const config);
46 | void sgpio_set_slice_mode(sgpio_config_t* const config, const bool multi_slice);
47 | void sgpio_configure(sgpio_config_t* const config, const sgpio_direction_t direction);
48 | void sgpio_cpld_stream_enable(sgpio_config_t* const config);
49 | void sgpio_cpld_stream_disable(sgpio_config_t* const config);
50 | bool sgpio_cpld_stream_is_enabled(sgpio_config_t* const config);
51 |
52 | void sgpio_cpld_set_mixer_invert(sgpio_config_t* const config, uint_fast8_t invert);
53 |
54 | #endif //__SGPIO_H__
55 |
--------------------------------------------------------------------------------
/firmware/common/spi_bus.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2022 Great Scott Gadgets
3 | * Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #include "spi_bus.h"
24 |
25 | void spi_bus_start(spi_bus_t* const bus, const void* const config)
26 | {
27 | bus->start(bus, config);
28 | }
29 |
30 | void spi_bus_stop(spi_bus_t* const bus)
31 | {
32 | bus->stop(bus);
33 | }
34 |
35 | void spi_bus_transfer(spi_bus_t* const bus, void* const data, const size_t count)
36 | {
37 | bus->transfer(bus, data, count);
38 | }
39 |
40 | void spi_bus_transfer_gather(
41 | spi_bus_t* const bus,
42 | const spi_transfer_t* const transfers,
43 | const size_t count)
44 | {
45 | bus->transfer_gather(bus, transfers, count);
46 | }
47 |
--------------------------------------------------------------------------------
/firmware/common/spi_bus.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2022 Great Scott Gadgets
3 | * Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #ifndef __SPI_BUS_H__
24 | #define __SPI_BUS_H__
25 |
26 | #include
27 |
28 | typedef struct {
29 | void* const data;
30 | const size_t count;
31 | } spi_transfer_t;
32 |
33 | struct spi_bus_t;
34 | typedef struct spi_bus_t spi_bus_t;
35 |
36 | struct spi_bus_t {
37 | void* const obj;
38 | const void* config;
39 | void (*start)(spi_bus_t* const bus, const void* const config);
40 | void (*stop)(spi_bus_t* const bus);
41 | void (*transfer)(spi_bus_t* const bus, void* const data, const size_t count);
42 | void (*transfer_gather)(
43 | spi_bus_t* const bus,
44 | const spi_transfer_t* const transfers,
45 | const size_t count);
46 | };
47 |
48 | void spi_bus_start(spi_bus_t* const bus, const void* const config);
49 | void spi_bus_stop(spi_bus_t* const bus);
50 | void spi_bus_transfer(spi_bus_t* const bus, void* const data, const size_t count);
51 | void spi_bus_transfer_gather(
52 | spi_bus_t* const bus,
53 | const spi_transfer_t* const transfers,
54 | const size_t count);
55 |
56 | #endif /*__SPI_BUS_H__*/
57 |
--------------------------------------------------------------------------------
/firmware/common/spi_ssp.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2022 Great Scott Gadgets
3 | * Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #ifndef __SPI_SSP_H__
24 | #define __SPI_SSP_H__
25 |
26 | #include
27 | #include
28 |
29 | #include "spi_bus.h"
30 |
31 | #include "gpio.h"
32 |
33 | #include
34 |
35 | typedef struct ssp_config_t {
36 | ssp_datasize_t data_bits;
37 | uint8_t serial_clock_rate;
38 | uint8_t clock_prescale_rate;
39 | gpio_t gpio_select;
40 | } ssp_config_t;
41 |
42 | void spi_ssp_start(spi_bus_t* const bus, const void* const config);
43 | void spi_ssp_stop(spi_bus_t* const bus);
44 | void spi_ssp_transfer(spi_bus_t* const bus, void* const data, const size_t count);
45 | void spi_ssp_transfer_gather(
46 | spi_bus_t* const bus,
47 | const spi_transfer_t* const transfers,
48 | const size_t count);
49 |
50 | #endif /*__SPI_SSP_H__*/
51 |
--------------------------------------------------------------------------------
/firmware/common/streaming.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2022 Great Scott Gadgets
3 | * Copyright 2012 Jared Boone
4 | * Copyright 2013 Benjamin Vernoux
5 | *
6 | * This file is part of HackRF.
7 | *
8 | * This program is free software; you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation; either version 2, or (at your option)
11 | * any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program; see the file COPYING. If not, write to
20 | * the Free Software Foundation, Inc., 51 Franklin Street,
21 | * Boston, MA 02110-1301, USA.
22 | */
23 |
24 | #include
25 |
26 | #include
27 | #include
28 |
29 | void baseband_streaming_enable(sgpio_config_t* const sgpio_config)
30 | {
31 | SGPIO_SET_EN_1 = (1 << SGPIO_SLICE_A);
32 |
33 | sgpio_cpld_stream_enable(sgpio_config);
34 | }
35 |
36 | void baseband_streaming_disable(sgpio_config_t* const sgpio_config)
37 | {
38 | sgpio_cpld_stream_disable(sgpio_config);
39 | }
40 |
--------------------------------------------------------------------------------
/firmware/common/streaming.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2022 Great Scott Gadgets
3 | * Copyright 2012 Jared Boone
4 | * Copyright 2013 Benjamin Vernoux
5 | *
6 | * This file is part of HackRF.
7 | *
8 | * This program is free software; you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation; either version 2, or (at your option)
11 | * any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program; see the file COPYING. If not, write to
20 | * the Free Software Foundation, Inc., 51 Franklin Street,
21 | * Boston, MA 02110-1301, USA.
22 | */
23 |
24 | #ifndef __STREAMING_H__
25 | #define __STREAMING_H__
26 |
27 | #include
28 |
29 | void baseband_streaming_enable(sgpio_config_t* const sgpio_config);
30 | void baseband_streaming_disable(sgpio_config_t* const sgpio_config);
31 |
32 | #endif /*__STREAMING_H__*/
33 |
--------------------------------------------------------------------------------
/firmware/common/tuning.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2022 Great Scott Gadgets
3 | * Copyright 2012 Jared Boone
4 | * Copyright 2013 Benjamin Vernoux
5 | *
6 | * This file is part of HackRF.
7 | *
8 | * This program is free software; you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation; either version 2, or (at your option)
11 | * any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program; see the file COPYING. If not, write to
20 | * the Free Software Foundation, Inc., 51 Franklin Street,
21 | * Boston, MA 02110-1301, USA.
22 | */
23 |
24 | #ifndef __TUNING_H__
25 | #define __TUNING_H__
26 |
27 | #include "rf_path.h"
28 |
29 | #include
30 | #include
31 |
32 | bool set_freq(const uint64_t freq);
33 | bool set_freq_explicit(
34 | const uint64_t if_freq_hz,
35 | const uint64_t lo_freq_hz,
36 | const rf_path_filter_t path);
37 |
38 | #endif /*__TUNING_H__*/
39 |
--------------------------------------------------------------------------------
/firmware/common/ui_portapack.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018-2022 Great Scott Gadgets
3 | * Copyright 2018 Jared Boone
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #ifndef __UI_PORTAPACK_H__
24 | #define __UI_PORTAPACK_H__
25 |
26 | #include "hackrf_ui.h"
27 |
28 | const hackrf_ui_t* portapack_hackrf_ui_init() __attribute__((weak));
29 |
30 | #endif /*__UI_PORTAPACK_H__*/
31 |
--------------------------------------------------------------------------------
/firmware/common/ui_rad1o.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-2022 Great Scott Gadgets
3 | * Copyright 2019 Dominic Spill
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #ifndef __UI_RAD1O_H__
24 | #define __UI_RAD1O_H__
25 |
26 | #include "hackrf_ui.h"
27 |
28 | const hackrf_ui_t* rad1o_ui_setup(void) __attribute__((weak));
29 |
30 | #endif /*__UI_RAD1O_H__*/
31 |
--------------------------------------------------------------------------------
/firmware/common/usb_request.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2022 Great Scott Gadgets
3 | * Copyright 2012 Jared Boone
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #ifndef __USB_REQUEST_H__
24 | #define __USB_REQUEST_H__
25 |
26 | #include "usb_type.h"
27 |
28 | typedef enum {
29 | USB_RESPONSE_NONE,
30 | USB_RESPONSE_IN,
31 | USB_RESPONSE_OUT,
32 | USB_RESPONSE_STALL,
33 | } usb_endpoint_type_t;
34 |
35 | typedef enum {
36 | USB_TRANSFER_STAGE_SETUP,
37 | USB_TRANSFER_STAGE_DATA,
38 | USB_TRANSFER_STAGE_STATUS,
39 | } usb_transfer_stage_t;
40 |
41 | typedef enum {
42 | USB_REQUEST_STATUS_OK = 0,
43 | USB_REQUEST_STATUS_STALL = 1,
44 | } usb_request_status_t;
45 |
46 | typedef usb_request_status_t (*usb_request_handler_fn)(
47 | usb_endpoint_t* const endpoint,
48 | const usb_transfer_stage_t stage);
49 |
50 | typedef struct {
51 | usb_request_handler_fn standard;
52 | usb_request_handler_fn class;
53 | usb_request_handler_fn vendor;
54 | usb_request_handler_fn reserved;
55 | } usb_request_handlers_t;
56 |
57 | extern const usb_request_handlers_t usb_request_handlers;
58 |
59 | void usb_setup_complete(usb_endpoint_t* const endpoint);
60 |
61 | void usb_control_in_complete(usb_endpoint_t* const endpoint);
62 |
63 | void usb_control_out_complete(usb_endpoint_t* const endpoint);
64 |
65 | #endif //__USB_REQUEST_H__
66 |
--------------------------------------------------------------------------------
/firmware/common/usb_standard_request.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2022 Great Scott Gadgets
3 | * Copyright 2012 Jared Boone
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #ifndef __USB_STANDARD_REQUEST_H__
24 | #define __USB_STANDARD_REQUEST_H__
25 |
26 | #include "usb_type.h"
27 | #include "usb_request.h"
28 |
29 | void usb_set_configuration_changed_cb(void (*callback)(usb_device_t* const));
30 |
31 | usb_request_status_t usb_vendor_request_read_wcid(
32 | usb_endpoint_t* const endpoint,
33 | const usb_transfer_stage_t stage);
34 |
35 | usb_request_status_t usb_standard_request(
36 | usb_endpoint_t* const endpoint,
37 | const usb_transfer_stage_t stage);
38 |
39 | const uint8_t* usb_endpoint_descriptor(const usb_endpoint_t* const endpoint);
40 |
41 | uint_fast16_t usb_endpoint_descriptor_max_packet_size(
42 | const uint8_t* const endpoint_descriptor);
43 |
44 | usb_transfer_type_t usb_endpoint_descriptor_transfer_type(
45 | const uint8_t* const endpoint_descriptor);
46 |
47 | bool usb_set_configuration(
48 | usb_device_t* const device,
49 | const uint_fast8_t configuration_number);
50 |
51 | #endif //__USB_STANDARD_REQUEST_H__
52 |
--------------------------------------------------------------------------------
/firmware/common/user_config.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2023 Jonathan Suite (GitHub: @ai6aj)
3 | *
4 | * This file is part of HackRF.
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; see the file COPYING. If not, write to
18 | * the Free Software Foundation, Inc., 51 Franklin Street,
19 | * Boston, MA 02110-1301, USA.
20 | */
21 |
22 | #ifndef __USER_CONFIG_H__
23 | #define __USER_CONFIG_H__
24 |
25 | #include "rf_path.h"
26 |
27 | typedef enum {
28 | RF_DIRECTION_USER_OPT_NOP, // No OPeration / Ignore the thing
29 | RF_DIRECTION_USER_OPT_RESERVED, // Currently a NOP
30 | RF_DIRECTION_USER_OPT_CLEAR, // Clear/Disable the thing
31 | RF_DIRECTION_USER_OPT_SET, // Set/Enable the thing
32 | } user_config_user_opt_t;
33 |
34 | void user_config_set_bias_t_opt(
35 | const rf_path_direction_t direction,
36 | const user_config_user_opt_t action);
37 | void user_config_set_bias_t_opts(uint16_t value);
38 |
39 | void user_config_on_rf_path_direction_change(
40 | rf_path_t* const rf_path,
41 | const rf_path_direction_t direction);
42 |
43 | #endif
--------------------------------------------------------------------------------
/firmware/common/w25q80bv_target.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2022 Great Scott Gadgets
3 | * Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #ifndef __W25Q80BV_TARGET_H__
24 | #define __W25Q80BV_TARGET_H__
25 |
26 | #include "w25q80bv.h"
27 |
28 | void w25q80bv_target_init(w25q80bv_driver_t* const drv);
29 |
30 | #endif /*__W25Q80BV_TARGET_H__*/
31 |
--------------------------------------------------------------------------------
/firmware/common/xapp058/README:
--------------------------------------------------------------------------------
1 | The code in this directory was originally is taken from:
2 | http://www.xilinx.com/support/documentation/application_notes/xapp058.zip
3 | (v.5.01)
4 |
5 | Ian Lesnet wrote: "I contacted Xilinx support and they said the license is do
6 | what you want, no warranty. (BSD I guess...)"
7 | (http://dangerousprototypes.com/forum/viewtopic.php?f=51&t=2239#p21257)
8 |
9 | Refer to XAPP058 for more information:
10 | http://www.xilinx.com/support/documentation/application_notes/xapp058.pdf
11 |
12 | This software has been modified for HackRF.
13 |
--------------------------------------------------------------------------------
/firmware/common/xapp058/micro.h:
--------------------------------------------------------------------------------
1 | /*****************************************************************************
2 | * File: micro.h
3 | * Description: This header file contains the function prototype to the
4 | * primary interface function for the XSVF player.
5 | * Usage: FIRST - PORTS.C
6 | * Customize the ports.c function implementations to establish
7 | * the correct protocol for communicating with your JTAG ports
8 | * (setPort() and readTDOBit()) and tune the waitTime() delay
9 | * function. Also, establish access to the XSVF data source
10 | * in the readByte() function.
11 | * FINALLY - Call xsvfExecute().
12 | *****************************************************************************/
13 | #ifndef XSVF_MICRO_H
14 | #define XSVF_MICRO_H
15 |
16 | #include "cpld_jtag.h"
17 |
18 | /* Legacy error codes for xsvfExecute from original XSVF player v2.0 */
19 | #define XSVF_LEGACY_SUCCESS 1
20 | #define XSVF_LEGACY_ERROR 0
21 |
22 | /* 4.04 [NEW] Error codes for xsvfExecute. */
23 | /* Must #define XSVF_SUPPORT_ERRORCODES in micro.c to get these codes */
24 | #define XSVF_ERROR_NONE 0
25 | #define XSVF_ERROR_UNKNOWN 1
26 | #define XSVF_ERROR_TDOMISMATCH 2
27 | #define XSVF_ERROR_MAXRETRIES 3 /* TDO mismatch after max retries */
28 | #define XSVF_ERROR_ILLEGALCMD 4
29 | #define XSVF_ERROR_ILLEGALSTATE 5
30 | #define XSVF_ERROR_DATAOVERFLOW 6 /* Data > lenVal MAX_LEN buffer size*/
31 | /* Insert new errors here */
32 | #define XSVF_ERROR_LAST 7
33 |
34 | /*****************************************************************************
35 | * Function: xsvfExecute
36 | * Description: Process, interpret, and apply the XSVF commands.
37 | * See port.c:readByte for source of XSVF data.
38 | * Parameters: none.
39 | * Returns: int - For error codes see above.
40 | *****************************************************************************/
41 | extern int xsvfExecute(jtag_gpio_t* const gpio);
42 |
43 | #endif /* XSVF_MICRO_H */
44 |
45 |
--------------------------------------------------------------------------------
/firmware/common/xapp058/ports.h:
--------------------------------------------------------------------------------
1 | /*******************************************************/
2 | /* file: ports.h */
3 | /* abstract: This file contains extern declarations */
4 | /* for providing stimulus to the JTAG ports.*/
5 | /*******************************************************/
6 |
7 | #ifndef ports_dot_h
8 | #define ports_dot_h
9 |
10 | #include "cpld_jtag.h"
11 |
12 | /* these constants are used to send the appropriate ports to setPort */
13 | /* they should be enumerated types, but some of the microcontroller */
14 | /* compilers don't like enumerated types */
15 | #define TCK (short) 0
16 | #define TMS (short) 1
17 | #define TDI (short) 2
18 |
19 | /* set the port "p" (TCK, TMS, or TDI) to val (0 or 1) */
20 | extern void setPort(jtag_gpio_t* const gpio, short p, short val);
21 |
22 | /* read the TDO bit and store it in val */
23 | extern unsigned char readTDOBit(jtag_gpio_t* const gpio);
24 |
25 | /* make clock go down->up->down*/
26 | extern void pulseClock(jtag_gpio_t* const gpio);
27 |
28 | /* read the next byte of data from the xsvf file */
29 | extern void readByte(unsigned char *data);
30 |
31 | extern void waitTime(jtag_gpio_t* const gpio, long microsec);
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/firmware/cpld/README:
--------------------------------------------------------------------------------
1 | The primary CPLD image is: sgpio_if/default.xsvf
2 |
3 | This is a binary file built from HDL source in sgpio_if. You do not need
4 | Xilinx tools unless you want to make your own modifications.
5 |
6 | CPLD images are automatically included in HackRF firmware. You do not normally
7 | need to update the bitstream stored in the CPLD's flash memory as it is
8 | superseded by the image loaded into SRAM by the firmware.
9 |
10 | If you want to update the bitstream in CPLD flash for some reason, first update
11 | the firmware, libhackrf, and hackrf-tools.
12 | Then:
13 |
14 | $ hackrf_cpldjtag -x sgpio_if/default.xsvf
15 |
16 | After a few seconds, three LEDs should start blinking. This indicates that the
17 | CPLD has been programmed successfully. Reset the HackRF device by pressing the
18 | RESET button or by unplugging it and plugging it back in.
19 |
--------------------------------------------------------------------------------
/firmware/cpld/sgpio_debug/README.md:
--------------------------------------------------------------------------------
1 | CPLD interface between LPC43xx microcontroller SGPIO peripheral and MAX5864
2 | RF codec.
3 |
4 | CPLD-based triggered capture
5 | ============================
6 |
7 | To build this VHDL project and produce an SVF file for flashing the CPLD:
8 |
9 | * Xilinx WebPACK 13.4 for Windows or Linux.
10 |
11 | Generate an XSVF
12 | ================
13 |
14 | After generating a programming file:
15 |
16 | * In the ISE Project Navigator, "Processes: top - Behavioral" pane, double-click "Configure Target Device".
17 | * Click "OK" to open iMPACT.
18 | * Ctrl-N to create a "New Project".
19 | * "Yes" to automatically create and save a project file.
20 | * Select "Prepare a Boundary-Scan File", choose "XSVF".
21 | * Select file name "default.xsvf".
22 | * Click "OK" to start adding devices.
23 | * Assign new configuration file: "top.jed".
24 | * Right-click the "xc2c64a top.jed" icon and select "Erase". Accept defaults.
25 | * Right-click the "xc2c64a top.jed" icon and select "Program".
26 | * Right-click the "xc2c64a top.jed" icon and select "Verify".
27 | * Choose menu "Output" -> "XSVF File" -> "Stop Writing to XSVF File".
28 | * Close iMPACT.
29 |
30 | To Program
31 | ==========
32 |
33 | $ hackrf_cpldjtag -x default.xsvf
34 |
--------------------------------------------------------------------------------
/firmware/cpld/sgpio_debug/batch_svf:
--------------------------------------------------------------------------------
1 | setMode -bscan
2 | setCable -port svf -file default.svf
3 | addDevice -p 1 -file top.jed
4 | Erase -p 1
5 | Program -p 1 -e -v
6 | Verify -p 1
7 | quit
8 |
--------------------------------------------------------------------------------
/firmware/cpld/sgpio_debug/batch_xsvf:
--------------------------------------------------------------------------------
1 | setMode -bscan
2 | setCable -port xsvf -file default.xsvf
3 | addDevice -p 1 -file top.jed
4 | Erase -p 1
5 | Program -p 1 -e -v
6 | Verify -p 1
7 | quit
8 |
--------------------------------------------------------------------------------
/firmware/cpld/sgpio_debug/default.xsvf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/firmware/cpld/sgpio_debug/default.xsvf
--------------------------------------------------------------------------------
/firmware/cpld/sgpio_if/README.md:
--------------------------------------------------------------------------------
1 | CPLD interface between LPC43xx microcontroller SGPIO peripheral and MAX5864
2 | RF codec.
3 |
4 | CPLD-based triggered capture
5 | ============================
6 |
7 | To build this VHDL project and produce an SVF file for flashing the CPLD:
8 |
9 | * Xilinx WebPACK 13.4 for Windows or Linux.
10 |
11 | Generate an XSVF
12 | ================
13 |
14 | After generating a programming file:
15 |
16 | * In the ISE Project Navigator, "Processes: top - Behavioral" pane, double-click "Configure Target Device".
17 | * Click "OK" to open iMPACT.
18 | * Ctrl-N to create a "New Project".
19 | * "Yes" to automatically create and save a project file.
20 | * Select "Prepare a Boundary-Scan File", choose "XSVF".
21 | * Select file name "default.xsvf".
22 | * Click "OK" to start adding devices.
23 | * Assign new configuration file: "top.jed".
24 | * Right-click the "xc2c64a top.jed" icon and select "Erase". Accept defaults.
25 | * Right-click the "xc2c64a top.jed" icon and select "Program".
26 | * Right-click the "xc2c64a top.jed" icon and select "Verify".
27 | * Choose menu "Output" -> "XSVF File" -> "Stop Writing to XSVF File".
28 | * Close iMPACT.
29 |
30 | To Program
31 | ==========
32 |
33 | $ hackrf_cpldjtag -x default.xsvf
34 |
--------------------------------------------------------------------------------
/firmware/cpld/sgpio_if/batch_svf:
--------------------------------------------------------------------------------
1 | setMode -bscan
2 | setCable -port svf -file default.svf
3 | addDevice -p 1 -file top.jed
4 | Erase -p 1
5 | Program -p 1 -e -v
6 | Verify -p 1
7 | quit
8 |
--------------------------------------------------------------------------------
/firmware/cpld/sgpio_if/batch_xsvf:
--------------------------------------------------------------------------------
1 | setMode -bscan
2 | setCable -port xsvf -file default.xsvf
3 | addDevice -p 1 -file top.jed
4 | Erase -p 1
5 | Program -p 1 -e -v
6 | Verify -p 1
7 | quit
8 |
--------------------------------------------------------------------------------
/firmware/cpld/sgpio_if/default.xsvf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/firmware/cpld/sgpio_if/default.xsvf
--------------------------------------------------------------------------------
/firmware/dfu-util.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2015 Dominic Spill
3 | #
4 | # This file is part of GreatFET.
5 | #
6 | # This program is free software; you can redistribute it and/or modify
7 | # it under the terms of the GNU General Public License as published by
8 | # the Free Software Foundation; either version 2, or (at your option)
9 | # any later version.
10 | #
11 | # This program is distributed in the hope that it will be useful,
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | # GNU General Public License for more details.
15 | #
16 | # You should have received a copy of the GNU General Public License
17 | # along with this program; see the file COPYING. If not, write to
18 | # the Free Software Foundation, Inc., 51 Franklin Street,
19 | # Boston, MA 02110-1301, USA.
20 | #
21 |
22 | execute_process(
23 | COMMAND dfu-suffix -V
24 | WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
25 | RESULT_VARIABLE DFU_NOT_FOUND
26 | ERROR_QUIET
27 | OUTPUT_VARIABLE DFU_VERSION_STRING
28 | OUTPUT_STRIP_TRAILING_WHITESPACE
29 | )
30 |
31 | set(DFU_ALL "")
32 | if(NOT DFU_NOT_FOUND)
33 | set(DFU_ALL "ALL")
34 | else(NOT DFU_NOT_FOUND)
35 | MESSAGE(STATUS "dfu-suffix not found: not building DFU file")
36 | endif(NOT DFU_NOT_FOUND)
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/firmware/dfu.py:
--------------------------------------------------------------------------------
1 | import os.path
2 | import struct
3 | import sys
4 |
5 | with open("_header.bin", "wb") as f:
6 | x = struct.pack('
3 | * Copyright 2012 Jared Boone
4 | * Copyright 2013 Benjamin Vernoux
5 | *
6 | * This file is part of HackRF.
7 | *
8 | * This program is free software; you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation; either version 2, or (at your option)
11 | * any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program; see the file COPYING. If not, write to
20 | * the Free Software Foundation, Inc., 51 Franklin Street,
21 | * Boston, MA 02110-1301, USA.
22 | */
23 |
24 | #ifndef __USB_API_CPLD_H__
25 | #define __USB_API_CPLD_H__
26 |
27 | #include
28 |
29 | #include
30 | #include
31 |
32 | void cpld_update(void);
33 |
34 | usb_request_status_t usb_vendor_request_cpld_checksum(
35 | usb_endpoint_t* const endpoint,
36 | const usb_transfer_stage_t stage);
37 |
38 | #endif /* end of include guard: __USB_API_CPLD_H__ */
39 |
--------------------------------------------------------------------------------
/firmware/hackrf_usb/usb_api_spiflash.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2022 Great Scott Gadgets
3 | * Copyright 2012 Jared Boone
4 | * Copyright 2013 Benjamin Vernoux
5 | *
6 | * This file is part of HackRF.
7 | *
8 | * This program is free software; you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation; either version 2, or (at your option)
11 | * any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program; see the file COPYING. If not, write to
20 | * the Free Software Foundation, Inc., 51 Franklin Street,
21 | * Boston, MA 02110-1301, USA.
22 | */
23 |
24 | #ifndef __USB_API_SPIFLASH_H__
25 | #define __USB_API_SPIFLASH_H__
26 |
27 | #include
28 | #include
29 |
30 | usb_request_status_t usb_vendor_request_erase_spiflash(
31 | usb_endpoint_t* const endpoint,
32 | const usb_transfer_stage_t stage);
33 | usb_request_status_t usb_vendor_request_write_spiflash(
34 | usb_endpoint_t* const endpoint,
35 | const usb_transfer_stage_t stage);
36 | usb_request_status_t usb_vendor_request_read_spiflash(
37 | usb_endpoint_t* const endpoint,
38 | const usb_transfer_stage_t stage);
39 | usb_request_status_t usb_vendor_request_spiflash_status(
40 | usb_endpoint_t* const endpoint,
41 | const usb_transfer_stage_t stage);
42 | usb_request_status_t usb_vendor_request_spiflash_clear_status(
43 | usb_endpoint_t* const endpoint,
44 | const usb_transfer_stage_t stage);
45 |
46 | #endif /* end of include guard: __USB_API_SPIFLASH_H__ */
47 |
--------------------------------------------------------------------------------
/firmware/hackrf_usb/usb_api_sweep.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016-2022 Great Scott Gadgets
3 | * Copyright 2016 Mike Walters, Dominic Spill
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #ifndef __USB_API_SWEEP_H__
24 | #define __USB_API_SWEEP_H__
25 |
26 | #include
27 | #include
28 | #include
29 |
30 | enum sweep_style {
31 | LINEAR = 0,
32 | INTERLEAVED = 1,
33 | };
34 |
35 | usb_request_status_t usb_vendor_request_init_sweep(
36 | usb_endpoint_t* const endpoint,
37 | const usb_transfer_stage_t stage);
38 |
39 | void sweep_mode(uint32_t seq);
40 |
41 | #endif /* __USB_API_SWEEP_H__ */
42 |
--------------------------------------------------------------------------------
/firmware/hackrf_usb/usb_api_ui.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2022 Great Scott Gadgets
3 | * Copyright 2020 Mike Walters
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #include "usb_api_ui.h"
24 |
25 | #include
26 | #include
27 | #include
28 |
29 | #include
30 | #include
31 |
32 | usb_request_status_t usb_vendor_request_set_ui_enable(
33 | usb_endpoint_t* const endpoint,
34 | const usb_transfer_stage_t stage)
35 | {
36 | if (stage == USB_TRANSFER_STAGE_SETUP) {
37 | hackrf_ui_set_enable(endpoint->setup.value);
38 | usb_transfer_schedule_ack(endpoint->in);
39 | }
40 | return USB_REQUEST_STATUS_OK;
41 | }
42 |
--------------------------------------------------------------------------------
/firmware/hackrf_usb/usb_api_ui.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2022 Great Scott Gadgets
3 | * Copyright 2020 Mike Walters
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #ifndef __USB_API_UI_H__
24 | #define __USB_API_UI_H__
25 |
26 | #include
27 | #include
28 |
29 | usb_request_status_t usb_vendor_request_set_ui_enable(
30 | usb_endpoint_t* const endpoint,
31 | const usb_transfer_stage_t stage);
32 |
33 | #endif /* end of include guard: __USB_API_UI_H__ */
34 |
--------------------------------------------------------------------------------
/firmware/hackrf_usb/usb_bulk_buffer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2022 Great Scott Gadgets
3 | * Copyright 2012 Jared Boone
4 | * Copyright 2013 Benjamin Vernoux
5 | *
6 | * This file is part of HackRF.
7 | *
8 | * This program is free software; you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation; either version 2, or (at your option)
11 | * any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program; see the file COPYING. If not, write to
20 | * the Free Software Foundation, Inc., 51 Franklin Street,
21 | * Boston, MA 02110-1301, USA.
22 | */
23 |
24 | #ifndef __USB_BULK_BUFFER_H__
25 | #define __USB_BULK_BUFFER_H__
26 |
27 | #include
28 | #include
29 |
30 | #define USB_BULK_BUFFER_SIZE 0x8000
31 | #define USB_BULK_BUFFER_MASK 0x7FFF
32 |
33 | /* Address of usb_bulk_buffer is set in ldscripts. If you change the name of this
34 | * variable, it won't be where it needs to be in the processor's address space,
35 | * unless you also adjust the ldscripts.
36 | */
37 | extern uint8_t usb_bulk_buffer[USB_BULK_BUFFER_SIZE];
38 |
39 | #endif /*__USB_BULK_BUFFER_H__*/
40 |
--------------------------------------------------------------------------------
/firmware/hackrf_usb/usb_descriptor.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2022 Great Scott Gadgets
3 | * Copyright 2012 Jared Boone
4 | *
5 | * This file is part of HackRF.
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; see the file COPYING. If not, write to
19 | * the Free Software Foundation, Inc., 51 Franklin Street,
20 | * Boston, MA 02110-1301, USA.
21 | */
22 |
23 | #include
24 |
25 | extern uint8_t usb_descriptor_device[];
26 | extern uint8_t usb_descriptor_device_qualifier[];
27 | extern uint8_t usb_descriptor_configuration_full_speed[];
28 | extern uint8_t usb_descriptor_configuration_high_speed[];
29 | extern uint8_t usb_descriptor_string_languages[];
30 | extern uint8_t usb_descriptor_string_manufacturer[];
31 | extern uint8_t usb_descriptor_string_product[];
32 |
33 | #define USB_DESCRIPTOR_STRING_SERIAL_LEN 32
34 | #define USB_DESCRIPTOR_STRING_SERIAL_BUF_LEN \
35 | (USB_DESCRIPTOR_STRING_SERIAL_LEN * 2 + 2) /* UTF-16LE */
36 | extern uint8_t usb_descriptor_string_serial_number[];
37 |
38 | extern uint8_t* usb_descriptor_strings[];
39 |
40 | #define USB_WCID_VENDOR_REQ 0x19
41 | extern uint8_t wcid_string_descriptor[];
42 | extern uint8_t wcid_feature_descriptor[];
43 |
--------------------------------------------------------------------------------
/firmware/hackrf_usb/usb_device.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2022 Great Scott Gadgets
3 | * Copyright 2012 Jared Boone
4 | * Copyright 2013 Benjamin Vernoux
5 | *
6 | * This file is part of HackRF.
7 | *
8 | * This program is free software; you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation; either version 2, or (at your option)
11 | * any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program; see the file COPYING. If not, write to
20 | * the Free Software Foundation, Inc., 51 Franklin Street,
21 | * Boston, MA 02110-1301, USA.
22 | */
23 |
24 | #include "usb_device.h"
25 |
26 | #include
27 |
28 | #include "usb_descriptor.h"
29 |
30 | usb_configuration_t usb_configuration_high_speed = {
31 | .number = 1,
32 | .speed = USB_SPEED_HIGH,
33 | .descriptor = usb_descriptor_configuration_high_speed,
34 | };
35 |
36 | usb_configuration_t usb_configuration_full_speed = {
37 | .number = 1,
38 | .speed = USB_SPEED_FULL,
39 | .descriptor = usb_descriptor_configuration_full_speed,
40 | };
41 |
42 | usb_configuration_t* usb_configurations[] = {
43 | &usb_configuration_high_speed,
44 | &usb_configuration_full_speed,
45 | 0,
46 | };
47 |
48 | usb_device_t usb_device = {
49 | .descriptor = usb_descriptor_device,
50 | .descriptor_strings = usb_descriptor_strings,
51 | .qualifier_descriptor = usb_descriptor_device_qualifier,
52 | .configurations = &usb_configurations,
53 | .configuration = 0,
54 | .wcid_string_descriptor = wcid_string_descriptor,
55 | .wcid_feature_descriptor = wcid_feature_descriptor,
56 | };
57 |
--------------------------------------------------------------------------------
/firmware/hackrf_usb/usb_device.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2013 Great Scott Gadgets
3 | * Copyright 2012 Jared Boone
4 | * Copyright 2013 Benjamin Vernoux
5 | *
6 | * This file is part of HackRF.
7 | *
8 | * This program is free software; you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation; either version 2, or (at your option)
11 | * any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program; see the file COPYING. If not, write to
20 | * the Free Software Foundation, Inc., 51 Franklin Street,
21 | * Boston, MA 02110-1301, USA.
22 | */
23 |
24 | #ifndef __USB_DEVICE_H__
25 | #define __USB_DEVICE_H__
26 |
27 | #include
28 |
29 | extern usb_device_t usb_device;
30 |
31 | #endif /* end of include guard: __USB_DEVICE_H__ */
32 |
--------------------------------------------------------------------------------
/firmware/hackrf_usb/usb_endpoint.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2013 Great Scott Gadgets
3 | * Copyright 2012 Jared Boone
4 | * Copyright 2013 Benjamin Vernoux
5 | *
6 | * This file is part of HackRF.
7 | *
8 | * This program is free software; you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation; either version 2, or (at your option)
11 | * any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program; see the file COPYING. If not, write to
20 | * the Free Software Foundation, Inc., 51 Franklin Street,
21 | * Boston, MA 02110-1301, USA.
22 | */
23 |
24 | #ifndef __USB_ENDPOINT_H__
25 | #define __USB_ENDPOINT_H__
26 |
27 | #include
28 | #include
29 |
30 | extern usb_endpoint_t usb_endpoint_control_out;
31 | extern USB_DECLARE_QUEUE(usb_endpoint_control_out);
32 |
33 | extern usb_endpoint_t usb_endpoint_control_in;
34 | extern USB_DECLARE_QUEUE(usb_endpoint_control_in);
35 |
36 | extern usb_endpoint_t usb_endpoint_bulk_in;
37 | extern USB_DECLARE_QUEUE(usb_endpoint_bulk_in);
38 |
39 | extern usb_endpoint_t usb_endpoint_bulk_out;
40 | extern USB_DECLARE_QUEUE(usb_endpoint_bulk_out);
41 |
42 | #endif /* end of include guard: __USB_ENDPOINT_H__ */
43 |
--------------------------------------------------------------------------------
/firmware/tools/dumb_crc32.py:
--------------------------------------------------------------------------------
1 |
2 | class DumbCRC32(object):
3 | def __init__(self):
4 | self._remainder = 0xffffffff
5 | self._reversed_polynomial = 0xedb88320
6 | self._final_xor = 0xffffffff
7 |
8 | def update(self, data):
9 | bit_count = len(data) * 8
10 | for bit_n in range(bit_count):
11 | bit_in = data[bit_n >> 3] & (1 << (bit_n & 7))
12 | self._remainder ^= 1 if bit_in != 0 else 0
13 | bit_out = (self._remainder & 1)
14 | self._remainder >>= 1;
15 | if bit_out != 0:
16 | self._remainder ^= self._reversed_polynomial;
17 |
18 | def digest(self):
19 | return self._remainder ^ self._final_xor
20 |
21 | def hexdigest(self):
22 | return '%08x' % self.digest()
23 |
--------------------------------------------------------------------------------
/hardware/.gitignore:
--------------------------------------------------------------------------------
1 | # kicad backup files
2 | *.000
3 | *.bak
4 | *.bck
5 | $savepcb.*
6 |
7 | # gerber and drill files
8 | *.gbl
9 | *.gtl
10 | *.gbr
11 | *.gbr
12 | *.gbs
13 | *.gts
14 | *.gbr
15 | *.gbo
16 | *.gto
17 | *.gtp
18 | *.drl
19 |
20 | # other kicad generated files
21 | *.csv
22 | *.svg
23 | *.pdf
24 |
--------------------------------------------------------------------------------
/hardware/LNA915/LNA915.pro:
--------------------------------------------------------------------------------
1 | update=Sat Feb 8 14:35:27 2014
2 | version=1
3 | last_client=pcbnew
4 | [cvpcb]
5 | version=1
6 | NetIExt=net
7 | [cvpcb/libraries]
8 | EquName1=devcms
9 | [general]
10 | version=1
11 | [eeschema]
12 | version=1
13 | LibDir=../kicad
14 | NetFmtName=
15 | RptD_X=0
16 | RptD_Y=100
17 | RptLab=1
18 | LabSize=60
19 | [eeschema/libraries]
20 | LibName1=power
21 | LibName2=device
22 | LibName3=transistors
23 | LibName4=conn
24 | LibName5=linear
25 | LibName6=regul
26 | LibName7=74xx
27 | LibName8=cmos4000
28 | LibName9=adc-dac
29 | LibName10=memory
30 | LibName11=xilinx
31 | LibName12=special
32 | LibName13=microcontrollers
33 | LibName14=dsp
34 | LibName15=microchip
35 | LibName16=analog_switches
36 | LibName17=motorola
37 | LibName18=texas
38 | LibName19=intel
39 | LibName20=audio
40 | LibName21=interface
41 | LibName22=digital-audio
42 | LibName23=philips
43 | LibName24=display
44 | LibName25=cypress
45 | LibName26=siliconi
46 | LibName27=opto
47 | LibName28=atmel
48 | LibName29=contrib
49 | LibName30=valves
50 | LibName31=hackrf
51 | [pcbnew]
52 | version=1
53 | LastNetListRead=
54 | UseCmpFile=1
55 | PadDrill=" 0.600000"
56 | PadDrillOvalY=" 0.600000"
57 | PadSizeH=" 1.500000"
58 | PadSizeV=" 1.500000"
59 | PcbTextSizeV=" 1.500000"
60 | PcbTextSizeH=" 1.500000"
61 | PcbTextThickness=" 0.300000"
62 | ModuleTextSizeV=" 1.000000"
63 | ModuleTextSizeH=" 1.000000"
64 | ModuleTextSizeThickness=" 0.150000"
65 | SolderMaskClearance=" 0.000000"
66 | SolderMaskMinWidth=" 0.000000"
67 | DrawSegmentWidth=" 0.200000"
68 | BoardOutlineThickness=" 0.100000"
69 | ModuleOutlineThickness=" 0.150000"
70 | [pcbnew/libraries]
71 | LibDir=../kicad
72 | LibName1=sockets
73 | LibName2=connect
74 | LibName3=discret
75 | LibName4=pin_array
76 | LibName5=divers
77 | LibName6=smd_capacitors
78 | LibName7=smd_resistors
79 | LibName8=smd_crystal&oscillator
80 | LibName9=smd_dil
81 | LibName10=smd_transistors
82 | LibName11=libcms
83 | LibName12=display
84 | LibName13=led
85 | LibName14=dip_sockets
86 | LibName15=pga_sockets
87 | LibName16=valves
88 | LibName17=hackrf
89 |
--------------------------------------------------------------------------------
/hardware/LNA915/README:
--------------------------------------------------------------------------------
1 | Copyright 2014 Michael Ossmann
2 |
3 | These files are part of HackRF.
4 |
5 | This is a free hardware design; you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation; either version 2, or (at your option)
8 | any later version.
9 |
10 | This design is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this design; see the file COPYING. If not, write to
17 | the Free Software Foundation, Inc., 51 Franklin Street,
18 | Boston, MA 02110-1301, USA.
19 |
20 |
21 | LNA915 is a SAW filter and LNA for the 902 to 928 MHz ISM band. It is designed
22 | for in-line connection between an antenna and HackRF One and is powered by the
23 | HackRF One.
24 |
25 | hardware notes:
26 |
27 | Schematic and layout files were designed in KiCad, an open source electronic
28 | design automation package.
29 |
30 | order of copper layers:
31 | Copper 1: C1F (front)
32 | Copper 2: C2
33 | Copper 3: C3
34 | Copper 4: C1B (back)
35 |
36 | PCB description: 4 layer PCB 0.0646 in
37 | Copper 1: 1 oz copper (1.4 mil)
38 | Dielectric 1-2: 6.7 mil prepreg
39 | Copper 2: 0.5 oz copper (0.7 mil)
40 | Dielectric 2-3: 47 mil core
41 | Copper 3: 0.5 oz copper (0.7 mil)
42 | Dielectric 3-4: 6.7 mil prepreg
43 | Copper 4: 1 oz copper (1.4 mil)
44 |
45 | FR408 or similar substrate with Er=3.66 (+/- 0.1)
46 | double side solder mask green
47 | double side silkscreen white
48 | 6 mil min trace width and
49 | 6 mil min isolation
50 |
51 | PCBs of this specification are available from OSH Park.
52 |
--------------------------------------------------------------------------------
/hardware/bubblegum/bubblegum.pro:
--------------------------------------------------------------------------------
1 | update=Wed Jul 11 13:27:06 2012
2 | version=1
3 | last_client=pcbnew
4 | [cvpcb]
5 | version=1
6 | NetITyp=0
7 | NetIExt=.net
8 | PkgIExt=.pkg
9 | NetDir=
10 | LibDir=
11 | NetType=0
12 | [cvpcb/libraries]
13 | EquName1=devcms
14 | [general]
15 | version=1
16 | [eeschema]
17 | version=1
18 | LibDir=../kicad
19 | NetFmt=1
20 | HPGLSpd=20
21 | HPGLDm=15
22 | HPGLNum=1
23 | offX_A4=0
24 | offY_A4=0
25 | offX_A3=0
26 | offY_A3=0
27 | offX_A2=0
28 | offY_A2=0
29 | offX_A1=0
30 | offY_A1=0
31 | offX_A0=0
32 | offY_A0=0
33 | offX_A=0
34 | offY_A=0
35 | offX_B=0
36 | offY_B=0
37 | offX_C=0
38 | offY_C=0
39 | offX_D=0
40 | offY_D=0
41 | offX_E=0
42 | offY_E=0
43 | RptD_X=0
44 | RptD_Y=100
45 | RptLab=1
46 | LabSize=60
47 | [eeschema/libraries]
48 | LibName1=power
49 | LibName2=device
50 | LibName3=transistors
51 | LibName4=conn
52 | LibName5=linear
53 | LibName6=regul
54 | LibName7=74xx
55 | LibName8=cmos4000
56 | LibName9=adc-dac
57 | LibName10=memory
58 | LibName11=xilinx
59 | LibName12=special
60 | LibName13=microcontrollers
61 | LibName14=dsp
62 | LibName15=microchip
63 | LibName16=analog_switches
64 | LibName17=motorola
65 | LibName18=texas
66 | LibName19=intel
67 | LibName20=audio
68 | LibName21=interface
69 | LibName22=digital-audio
70 | LibName23=philips
71 | LibName24=display
72 | LibName25=cypress
73 | LibName26=siliconi
74 | LibName27=opto
75 | LibName28=atmel
76 | LibName29=contrib
77 | LibName30=valves
78 | LibName31=hackrf
79 | [pcbnew]
80 | version=1
81 | PadDrlX=0
82 | PadDimH=315
83 | PadDimV=157
84 | BoardThickness=630
85 | TxtPcbV=800
86 | TxtPcbH=600
87 | TxtModV=600
88 | TxtModH=600
89 | TxtModW=120
90 | VEgarde=100
91 | DrawLar=150
92 | EdgeLar=150
93 | TxtLar=120
94 | MSegLar=80
95 | LastNetListRead=bubblegum.net
96 | [pcbnew/libraries]
97 | LibDir=../kicad
98 | LibName1=sockets
99 | LibName2=connect
100 | LibName3=discret
101 | LibName4=pin_array
102 | LibName5=divers
103 | LibName6=libcms
104 | LibName7=display
105 | LibName8=valves
106 | LibName9=led
107 | LibName10=dip_sockets
108 | LibName11=hackrf
109 |
--------------------------------------------------------------------------------
/hardware/gsg-kicad-lib:
--------------------------------------------------------------------------------
1 | ../../gsg-kicad-lib
--------------------------------------------------------------------------------
/hardware/hackrf-one/PlasticCase_CAD/Case_With_HackRF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/hardware/hackrf-one/PlasticCase_CAD/Case_With_HackRF.png
--------------------------------------------------------------------------------
/hardware/hackrf-one/PlasticCase_CAD/HackRF_One_Case.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/hardware/hackrf-one/PlasticCase_CAD/HackRF_One_Case.png
--------------------------------------------------------------------------------
/hardware/hackrf-one/PlasticCase_CAD/README:
--------------------------------------------------------------------------------
1 | This is a case design for HackRF One following the Dangerous Prototypes Sick of
2 | Beige style:
3 |
4 | http://dangerousprototypes.com/docs/Sick_of_Beige_compatible_cases
5 |
6 | The dxf file can be opened by QCad or LibreCAD.
7 |
8 | HackRF_One_Case_With_Button_CutOuts.dxf is a version which have edge cut-outs for the buttons so that 5mm or 6mm standoffs could be used.
9 |
10 | Have fun.
11 |
12 | scateu@gmail.com
13 |
--------------------------------------------------------------------------------
/hardware/hackrf-one/README:
--------------------------------------------------------------------------------
1 | Copyright 2012, 2013, 2014 Michael Ossmann
2 |
3 | These files are part of HackRF.
4 |
5 | This is a free hardware design; you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation; either version 2, or (at your option)
8 | any later version.
9 |
10 | This design is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this design; see the file COPYING. If not, write to
17 | the Free Software Foundation, Inc., 51 Franklin Street,
18 | Boston, MA 02110-1301, USA.
19 |
20 |
21 | HackRF One is a wideband software radio transceiver with a USB interface.
22 |
23 | hardware notes:
24 |
25 | Schematic and layout files were designed in KiCad, an open source electronic
26 | design automation package.
27 |
28 | order of copper layers:
29 | Copper 1: C1F (front)
30 | Copper 2: C2
31 | Copper 3: C3
32 | Copper 4: C4B (back)
33 |
34 | PCB description: 4 layer PCB 0.062 in
35 | Copper 1 0.5 oz foil plated to approximately 0.0017 in
36 | Dielectric 1-2 0.0119 in
37 | Copper 2 1 oz foil (0.0014 in)
38 | Dielectric 2-3 0.0280 in
39 | Copper 3 1 oz foil (0.0014 in)
40 | Dielectric 3-4 0.0119 in
41 | Copper 4 0.5 oz foil plated to approximately 0.0017 in
42 |
43 | FR4 or similar substrate with Er=4.5 (+/- 0.1)
44 | double side solder mask green
45 | single side silkscreen white
46 | 6 mil min trace width and
47 | 6 mil min isolation
48 |
--------------------------------------------------------------------------------
/hardware/hackrf-one/acrylic_case/HackRF_One_Case_v2.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/hardware/hackrf-one/acrylic_case/HackRF_One_Case_v2.pdf
--------------------------------------------------------------------------------
/hardware/hackrf-one/acrylic_case/README.md:
--------------------------------------------------------------------------------
1 | ## Acrylic Case
2 |
3 | This design is licensed under the GPL-2.0 license.
4 | Documentation is licensed under the GPL-2.0 license.
5 |
6 | The vector graphic file provided in this repo was created with Inkscape.
7 |
8 | ### The BOM
9 |
10 | * 4 x 4.5 mm OD Hex Standoffs (Female-Female) / M3-0.5 x 6 mm / Aluminum
11 | * 4 x 4.5 mm OD Hex Standoffs (Female-Female) / M3-0.5 x 5 mm / Aluminum
12 | * 4 x M3-0.5 x 12 mm / Phillips Pan Head Machine Screw
13 | * 4 x M3-0.5 x 5 mm / Phillips Pan Head Machine Screw
14 |
15 | Optional:
16 | * 4 (per neighbor) x 4.5 mm OD Hex Standoffs (Male-Female) / M3-0.5 x 11 mm / Aluminum
17 |
18 | These standoffs are t### The BOM
19 |
20 | * 4 x 4.5 mm OD Hex Standoffs (Female-Female) / M3-0.5 x 6 mm / Aluminum
21 | * 4 x 4.5 mm OD Hex Standoffs (Female-Female) / M3-0.5 x 5 mm / Aluminum
22 | * 4 x M3-0.5 x 12 mm / Phillips Pan Head Machine Screw
23 | * 4 x M3-0.5 x 5 mm / Phillips Pan Head Machine Screw
24 |
25 | Optional:
26 | * 4 (per neighbor) x 4.5 mm OD Hex Standoffs (Male-Female) / M3-0.5 x 11 mm / Aluminum
27 |
28 | These standoffs are to be used if a neighbor is stacked on your HackRF One and you want your case to be stacked above that neighbor.
29 |
30 | ### Assembly Instructions
31 |
32 | Assembly instructions can be found [here.](https://www.greatscottgadgets.com/hackrf/acrylic-case/)
33 |
--------------------------------------------------------------------------------
/hardware/hackrf-one/fp-lib-table:
--------------------------------------------------------------------------------
1 | (fp_lib_table
2 | (lib (name hackrf)(type Legacy)(uri ${KIPRJMOD}/../kicad/hackrf.mod)(options "")(descr ""))
3 | (lib (name gsg-modules)(type KiCad)(uri ${KIPRJMOD}/../gsg-kicad-lib/gsg-modules.pretty)(options "")(descr ""))
4 | )
5 |
--------------------------------------------------------------------------------
/hardware/hackrf-one/hackrf-one.kicad_prl:
--------------------------------------------------------------------------------
1 | {
2 | "board": {
3 | "active_layer": 0,
4 | "active_layer_preset": "",
5 | "auto_track_width": true,
6 | "hidden_netclasses": [],
7 | "hidden_nets": [],
8 | "high_contrast_mode": 0,
9 | "net_color_mode": 1,
10 | "opacity": {
11 | "images": 0.6,
12 | "pads": 1.0,
13 | "tracks": 1.0,
14 | "vias": 1.0,
15 | "zones": 0.6
16 | },
17 | "selection_filter": {
18 | "dimensions": true,
19 | "footprints": true,
20 | "graphics": true,
21 | "keepouts": true,
22 | "lockedItems": false,
23 | "otherItems": true,
24 | "pads": true,
25 | "text": true,
26 | "tracks": true,
27 | "vias": true,
28 | "zones": true
29 | },
30 | "visible_items": [
31 | 0,
32 | 1,
33 | 2,
34 | 3,
35 | 4,
36 | 5,
37 | 8,
38 | 9,
39 | 10,
40 | 11,
41 | 13,
42 | 15,
43 | 16,
44 | 17,
45 | 18,
46 | 19,
47 | 20,
48 | 21,
49 | 22,
50 | 23,
51 | 24,
52 | 25,
53 | 26,
54 | 27,
55 | 28,
56 | 29,
57 | 30,
58 | 32,
59 | 33,
60 | 34,
61 | 35,
62 | 36,
63 | 39,
64 | 40
65 | ],
66 | "visible_layers": "000f2ff_80000005",
67 | "zone_display_mode": 0
68 | },
69 | "git": {
70 | "repo_password": "",
71 | "repo_type": "",
72 | "repo_username": "",
73 | "ssh_key": ""
74 | },
75 | "meta": {
76 | "filename": "hackrf-one.kicad_prl",
77 | "version": 3
78 | },
79 | "project": {
80 | "files": []
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/hardware/jawbreaker/README:
--------------------------------------------------------------------------------
1 | Copyright 2012 Michael Ossmann
2 |
3 | These files are part of HackRF.
4 |
5 | This is a free hardware design; you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation; either version 2, or (at your option)
8 | any later version.
9 |
10 | This design is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this design; see the file COPYING. If not, write to
17 | the Free Software Foundation, Inc., 51 Franklin Street,
18 | Boston, MA 02110-1301, USA.
19 |
20 |
21 | Jawbreaker is the first complete HackRF platform, a wideband software radio
22 | transceiver with a USB interface.
23 |
24 | hardware notes:
25 |
26 | Schematic and layout files were designed in KiCad, an open source electronic
27 | design automation package.
28 |
29 | order of copper layers:
30 | Copper 1: Front
31 | Copper 2: Inner3
32 | Copper 3: Inner2
33 | Copper 4: Back
34 |
35 | PCB description: 4 layer PCB 0.062 in
36 | Copper 1 0.5 oz foil plated to approximately 0.0017 in
37 | Dielectric 1-2 0.0119 in
38 | Copper 2 1 oz foil (0.0014 in)
39 | Dielectric 2-3 0.0280 in
40 | Copper 3 1 oz foil (0.0014 in)
41 | Dielectric 3-4 0.0119 in
42 | Copper 4 0.5 oz foil plated to approximately 0.0017 in
43 | FR4 or similar substrate with Er=4.5 (+/- 0.1)
44 | double side solder mask black
45 | double side silkscreen white
46 | 6 mil min trace width and
47 | 6 mil min isolation
48 |
--------------------------------------------------------------------------------
/hardware/jawbreaker/SoBv1_DP17298/README:
--------------------------------------------------------------------------------
1 | This is a case design for Jawbreaker following the Dangerous Prototypes Sick of
2 | Beige style:
3 |
4 | http://dangerousprototypes.com/docs/Sick_of_Beige_compatible_cases
5 |
--------------------------------------------------------------------------------
/hardware/jawbreaker/SoBv1_DP17298/SoBv1-DP17298-jawbreaker-Bottom.skp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/hardware/jawbreaker/SoBv1_DP17298/SoBv1-DP17298-jawbreaker-Bottom.skp
--------------------------------------------------------------------------------
/hardware/jawbreaker/SoBv1_DP17298/SoBv1-DP17298-jawbreaker-Bottom_laser_cutting_493.3mm_Easy.txt:
--------------------------------------------------------------------------------
1 | For file SoBv1-DP17298-jawbreaker-Bottom.svg:
2 | Laser cutting size 493.3mm => Seeed Studio Difficulty Easy (Length of Cutting line Below 60cm)
3 |
--------------------------------------------------------------------------------
/hardware/jawbreaker/SoBv1_DP17298/SoBv1-DP17298-jawbreaker-Top.skp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/hardware/jawbreaker/SoBv1_DP17298/SoBv1-DP17298-jawbreaker-Top.skp
--------------------------------------------------------------------------------
/hardware/jawbreaker/SoBv1_DP17298/SoBv1-DP17298-jawbreaker-Top_laser_cutting_1153.3mm_Normal.txt:
--------------------------------------------------------------------------------
1 | For file SoBv1-DP17298-jawbreaker-Top.svg:
2 | Laser cutting size 1153.3 mm => Seeed Studio Difficulty Normal (Length of Cutting line Between 60cm and 180cm)
3 |
4 |
--------------------------------------------------------------------------------
/hardware/jawbreaker/SoBv1_DP17298/SoBv1-DP17298-jawbreaker.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/hardware/jawbreaker/SoBv1_DP17298/SoBv1-DP17298-jawbreaker.jpg
--------------------------------------------------------------------------------
/hardware/jawbreaker/SoBv1_DP17298/jawbreaker_and_case.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/hardware/jawbreaker/SoBv1_DP17298/jawbreaker_and_case.png
--------------------------------------------------------------------------------
/hardware/jawbreaker/jawbreaker.pro:
--------------------------------------------------------------------------------
1 | update=Wed Mar 27 00:13:41 2013
2 | version=1
3 | last_client=eeschema
4 | [cvpcb]
5 | version=1
6 | NetITyp=0
7 | NetIExt=.net
8 | PkgIExt=.pkg
9 | NetDir=
10 | LibDir=
11 | NetType=0
12 | [cvpcb/libraries]
13 | EquName1=devcms
14 | [general]
15 | version=1
16 | [pcbnew]
17 | version=1
18 | PadDrlX=320
19 | PadDimH=600
20 | PadDimV=600
21 | BoardThickness=630
22 | TxtPcbV=800
23 | TxtPcbH=600
24 | TxtModV=600
25 | TxtModH=600
26 | TxtModW=120
27 | VEgarde=100
28 | DrawLar=150
29 | EdgeLar=150
30 | TxtLar=120
31 | MSegLar=150
32 | LastNetListRead=jawbreaker.net
33 | [pcbnew/libraries]
34 | LibDir=../kicad
35 | LibName1=sockets
36 | LibName2=connect
37 | LibName3=discret
38 | LibName4=pin_array
39 | LibName5=divers
40 | LibName6=libcms
41 | LibName7=display
42 | LibName8=valves
43 | LibName9=led
44 | LibName10=dip_sockets
45 | LibName11=hackrf
46 | [eeschema]
47 | version=1
48 | LibDir=../kicad
49 | NetFmtName=
50 | RptD_X=0
51 | RptD_Y=100
52 | RptLab=1
53 | LabSize=60
54 | [eeschema/libraries]
55 | LibName1=power
56 | LibName2=device
57 | LibName3=transistors
58 | LibName4=conn
59 | LibName5=linear
60 | LibName6=regul
61 | LibName7=74xx
62 | LibName8=cmos4000
63 | LibName9=adc-dac
64 | LibName10=memory
65 | LibName11=xilinx
66 | LibName12=special
67 | LibName13=microcontrollers
68 | LibName14=dsp
69 | LibName15=microchip
70 | LibName16=analog_switches
71 | LibName17=motorola
72 | LibName18=texas
73 | LibName19=intel
74 | LibName20=audio
75 | LibName21=interface
76 | LibName22=digital-audio
77 | LibName23=philips
78 | LibName24=display
79 | LibName25=cypress
80 | LibName26=siliconi
81 | LibName27=opto
82 | LibName28=atmel
83 | LibName29=contrib
84 | LibName30=valves
85 | LibName31=hackrf
86 |
--------------------------------------------------------------------------------
/hardware/jawbreaker/jawbreaker.sch:
--------------------------------------------------------------------------------
1 | EESchema Schematic File Version 2 date Sun Jun 9 23:35:01 2013
2 | LIBS:power
3 | LIBS:device
4 | LIBS:transistors
5 | LIBS:conn
6 | LIBS:linear
7 | LIBS:regul
8 | LIBS:74xx
9 | LIBS:cmos4000
10 | LIBS:adc-dac
11 | LIBS:memory
12 | LIBS:xilinx
13 | LIBS:special
14 | LIBS:microcontrollers
15 | LIBS:dsp
16 | LIBS:microchip
17 | LIBS:analog_switches
18 | LIBS:motorola
19 | LIBS:texas
20 | LIBS:intel
21 | LIBS:audio
22 | LIBS:interface
23 | LIBS:digital-audio
24 | LIBS:philips
25 | LIBS:display
26 | LIBS:cypress
27 | LIBS:siliconi
28 | LIBS:opto
29 | LIBS:atmel
30 | LIBS:contrib
31 | LIBS:valves
32 | LIBS:hackrf
33 | LIBS:jawbreaker-cache
34 | EELAYER 27 0
35 | EELAYER END
36 | $Descr User 17000 11000
37 | encoding utf-8
38 | Sheet 1 4
39 | Title "jawbreaker"
40 | Date "10 jun 2013"
41 | Rev ""
42 | Comp "Copyright 2012 Michael Ossmann"
43 | Comment1 "License: GPL v2"
44 | Comment2 ""
45 | Comment3 ""
46 | Comment4 ""
47 | $EndDescr
48 | $Sheet
49 | S 2550 3300 1050 150
50 | U 503BB638
51 | F0 "frontend" 60
52 | F1 "frontend.sch" 60
53 | $EndSheet
54 | $Sheet
55 | S 2550 2850 1050 150
56 | U 50370666
57 | F0 "baseband" 60
58 | F1 "baseband.sch" 60
59 | $EndSheet
60 | $Sheet
61 | S 2550 2400 1050 150
62 | U 5037043E
63 | F0 "mcu/usb/power" 60
64 | F1 "mcu.sch" 60
65 | $EndSheet
66 | $EndSCHEMATC
67 |
--------------------------------------------------------------------------------
/hardware/jellybean/JellyBean_TPS62410.ods:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/hardware/jellybean/JellyBean_TPS62410.ods
--------------------------------------------------------------------------------
/hardware/jellybean/JellyBean_pins.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/hardware/jellybean/JellyBean_pins.png
--------------------------------------------------------------------------------
/hardware/jellybean/README:
--------------------------------------------------------------------------------
1 | Copyright 2012 Michael Ossmann
2 |
3 | These files are part of HackRF.
4 |
5 | This is a free hardware design; you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation; either version 2, or (at your option)
8 | any later version.
9 |
10 | This design is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this design; see the file COPYING. If not, write to
17 | the Free Software Foundation, Inc., 51 Franklin Street,
18 | Boston, MA 02110-1301, USA.
19 |
20 |
21 | Jellybean is a microcontroller platform based on the LPC43xx. It is designed
22 | to control Lemondrop.
23 |
24 | hardware notes:
25 |
26 | Schematic and layout files were designed in KiCad, an open source electronic
27 | design automation package.
28 |
29 | order of copper layers:
30 | Front
31 | Inner3
32 | Inner2
33 | Back
34 |
35 | PCB description: 4 layer PCB 1.6 mm
36 | Copper 1 35 um
37 | Dielectric 1-2 0.35 mm
38 | Copper 2 18 um
39 | Dielectric 2-3 0.76 mm
40 | Copper 3 18 um
41 | Dielectric 3-4 0.35 mm
42 | Copper 4 35 um
43 | DE104iML or equivalent substrate (Er=4.42@2.4GHz TanD=0.016)
44 | double side solder mask black
45 | double side silkscreen white
46 | 6 mil min trace width and
47 | 6 mil min isolation
48 |
--------------------------------------------------------------------------------
/hardware/jellybean/jellybean.pro:
--------------------------------------------------------------------------------
1 | update=Sun Apr 15 00:13:35 2012
2 | version=1
3 | last_client=pcbnew
4 | [cvpcb]
5 | version=1
6 | NetITyp=0
7 | NetIExt=.net
8 | PkgIExt=.pkg
9 | NetDir=
10 | LibDir=
11 | NetType=0
12 | [cvpcb/libraries]
13 | EquName1=devcms
14 | [general]
15 | version=1
16 | [eeschema]
17 | version=1
18 | LibDir=../kicad
19 | NetFmt=1
20 | HPGLSpd=20
21 | HPGLDm=15
22 | HPGLNum=1
23 | offX_A4=0
24 | offY_A4=0
25 | offX_A3=0
26 | offY_A3=0
27 | offX_A2=0
28 | offY_A2=0
29 | offX_A1=0
30 | offY_A1=0
31 | offX_A0=0
32 | offY_A0=0
33 | offX_A=0
34 | offY_A=0
35 | offX_B=0
36 | offY_B=0
37 | offX_C=0
38 | offY_C=0
39 | offX_D=0
40 | offY_D=0
41 | offX_E=0
42 | offY_E=0
43 | RptD_X=0
44 | RptD_Y=100
45 | RptLab=1
46 | LabSize=60
47 | [eeschema/libraries]
48 | LibName1=power
49 | LibName2=device
50 | LibName3=transistors
51 | LibName4=conn
52 | LibName5=linear
53 | LibName6=regul
54 | LibName7=74xx
55 | LibName8=cmos4000
56 | LibName9=adc-dac
57 | LibName10=memory
58 | LibName11=xilinx
59 | LibName12=special
60 | LibName13=microcontrollers
61 | LibName14=dsp
62 | LibName15=microchip
63 | LibName16=analog_switches
64 | LibName17=motorola
65 | LibName18=texas
66 | LibName19=intel
67 | LibName20=audio
68 | LibName21=interface
69 | LibName22=digital-audio
70 | LibName23=philips
71 | LibName24=display
72 | LibName25=cypress
73 | LibName26=siliconi
74 | LibName27=opto
75 | LibName28=atmel
76 | LibName29=contrib
77 | LibName30=valves
78 | LibName31=hackrf
79 | [pcbnew]
80 | version=1
81 | PadDrlX=320
82 | PadDimH=600
83 | PadDimV=600
84 | BoardThickness=630
85 | TxtPcbV=800
86 | TxtPcbH=600
87 | TxtModV=600
88 | TxtModH=600
89 | TxtModW=120
90 | VEgarde=100
91 | DrawLar=150
92 | EdgeLar=150
93 | TxtLar=120
94 | MSegLar=150
95 | LastNetListRead=jellybean.net
96 | [pcbnew/libraries]
97 | LibDir=../kicad
98 | LibName1=sockets
99 | LibName2=connect
100 | LibName3=discret
101 | LibName4=pin_array
102 | LibName5=divers
103 | LibName6=libcms
104 | LibName7=display
105 | LibName8=valves
106 | LibName9=led
107 | LibName10=dip_sockets
108 | LibName11=hackrf
109 |
--------------------------------------------------------------------------------
/hardware/jellybean/jellybean_BOM.ods:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/hardware/jellybean/jellybean_BOM.ods
--------------------------------------------------------------------------------
/hardware/jellybean/jellybean_board_PCB_layers.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/hardware/jellybean/jellybean_board_PCB_layers.pdf
--------------------------------------------------------------------------------
/hardware/jellybean/jellybean_schematic.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjheath/hackrf/5e9241ee81040484f643ff7022e0dde317952b11/hardware/jellybean/jellybean_schematic.pdf
--------------------------------------------------------------------------------
/hardware/kicad/hackrf.dcm:
--------------------------------------------------------------------------------
1 | EESchema-DOCLIB Version 2.0
2 | #
3 | $CMP BAS70-04
4 | D BAS70 High-speed Schottky switching diodes, SOT-23
5 | K diode
6 | F https://www.diodes.com/assets/Datasheets/ds11007.pdf
7 | $ENDCMP
8 | #
9 | $CMP CONN_2_SHORTED
10 | D Symbole general de connecteur
11 | K CONN
12 | $ENDCMP
13 | #
14 | $CMP D_Limiter
15 | D PIN Limiter diode
16 | K diode PIN limiter
17 | F ~
18 | $ENDCMP
19 | #
20 | $CMP D_Limiter_DualAn
21 | D PIN Limiter diode
22 | K diode PIN limiter
23 | F ~
24 | $ENDCMP
25 | #
26 | $CMP GSG-DIODE-TVS-BI
27 | D Diode zener
28 | K DEV DIODE
29 | $ENDCMP
30 | #
31 | $CMP MGA-81563
32 | F https://docs.broadcom.com/docs/AV02-0966EN
33 | $ENDCMP
34 | #
35 | $CMP R-SHORTED
36 | D Resistor with PCB trace short
37 | K R DEV
38 | $ENDCMP
39 | #
40 | $CMP SKY13453
41 | F https://www.skyworksinc.com/-/media/SkyWorks/Documents/Products/1901-2000/SKY13453-385LF_202830G.pdf
42 | $ENDCMP
43 | #
44 | $CMP SW_PUSH_SHIELDED
45 | D Push Button with Shield
46 | K Switch
47 | $ENDCMP
48 | #
49 | $CMP TRF37B73
50 | D 6GHz, 12dB RF Gain Block, WSON-8
51 | K gain block RF
52 | F http://www.ti.com/lit/ds/symlink/trf37a73.pdf
53 | $ENDCMP
54 | #
55 | #End Doc Library
56 |
--------------------------------------------------------------------------------
/hardware/lemondrop/README:
--------------------------------------------------------------------------------
1 | Copyright 2012 Michael Ossmann
2 |
3 | These files are part of HackRF.
4 |
5 | This is a free hardware design; you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation; either version 2, or (at your option)
8 | any later version.
9 |
10 | This design is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this design; see the file COPYING. If not, write to
17 | the Free Software Foundation, Inc., 51 Franklin Street,
18 | Boston, MA 02110-1301, USA.
19 |
20 |
21 | Lemondrop is a 2.3 to 2.7 GHz wireless transceiver with a 22 Msps ADC/DAC and
22 | flexible clocking for software radio applications.
23 |
24 | hardware notes:
25 |
26 | Schematic and layout files were designed in KiCad, an open source electronic
27 | design automation package.
28 |
29 | order of copper layers:
30 | Front
31 | Inner3
32 | Inner2
33 | Back
34 |
35 | PCB description: 4 layer PCB 1.6 mm
36 | Copper 1 35 um
37 | Dielectric 1-2 0.35 mm
38 | Copper 2 18 um
39 | Dielectric 2-3 0.76 mm
40 | Copper 3 18 um
41 | Dielectric 3-4 0.35 mm
42 | Copper 4 35 um
43 | DE104iML or equivalent substrate (Er=4.42@2.4GHz TanD=0.016)
44 | double side solder mask black
45 | double side silkscreen white
46 | 6 mil min trace width and
47 | 6 mil min isolation
48 |
--------------------------------------------------------------------------------
/hardware/licorice/licorice.pro:
--------------------------------------------------------------------------------
1 | update=Fri May 18 15:00:42 2012
2 | version=1
3 | last_client=pcbnew
4 | [cvpcb]
5 | version=1
6 | NetITyp=0
7 | NetIExt=.net
8 | PkgIExt=.pkg
9 | NetDir=
10 | LibDir=
11 | NetType=0
12 | [cvpcb/libraries]
13 | EquName1=devcms
14 | [general]
15 | version=1
16 | [eeschema]
17 | version=1
18 | LibDir=../kicad
19 | NetFmt=1
20 | HPGLSpd=20
21 | HPGLDm=15
22 | HPGLNum=1
23 | offX_A4=0
24 | offY_A4=0
25 | offX_A3=0
26 | offY_A3=0
27 | offX_A2=0
28 | offY_A2=0
29 | offX_A1=0
30 | offY_A1=0
31 | offX_A0=0
32 | offY_A0=0
33 | offX_A=0
34 | offY_A=0
35 | offX_B=0
36 | offY_B=0
37 | offX_C=0
38 | offY_C=0
39 | offX_D=0
40 | offY_D=0
41 | offX_E=0
42 | offY_E=0
43 | RptD_X=0
44 | RptD_Y=100
45 | RptLab=1
46 | LabSize=60
47 | [eeschema/libraries]
48 | LibName1=power
49 | LibName2=device
50 | LibName3=transistors
51 | LibName4=conn
52 | LibName5=linear
53 | LibName6=regul
54 | LibName7=74xx
55 | LibName8=cmos4000
56 | LibName9=adc-dac
57 | LibName10=memory
58 | LibName11=xilinx
59 | LibName12=special
60 | LibName13=microcontrollers
61 | LibName14=dsp
62 | LibName15=microchip
63 | LibName16=analog_switches
64 | LibName17=motorola
65 | LibName18=texas
66 | LibName19=intel
67 | LibName20=audio
68 | LibName21=interface
69 | LibName22=digital-audio
70 | LibName23=philips
71 | LibName24=display
72 | LibName25=cypress
73 | LibName26=siliconi
74 | LibName27=opto
75 | LibName28=atmel
76 | LibName29=contrib
77 | LibName30=valves
78 | LibName31=hackrf
79 | [pcbnew]
80 | version=1
81 | PadDrlX=320
82 | PadDimH=600
83 | PadDimV=600
84 | BoardThickness=630
85 | TxtPcbV=800
86 | TxtPcbH=600
87 | TxtModV=600
88 | TxtModH=600
89 | TxtModW=120
90 | VEgarde=100
91 | DrawLar=150
92 | EdgeLar=150
93 | TxtLar=120
94 | MSegLar=150
95 | LastNetListRead=licorice.net
96 | [pcbnew/libraries]
97 | LibDir=../kicad
98 | LibName1=sockets
99 | LibName2=connect
100 | LibName3=discret
101 | LibName4=pin_array
102 | LibName5=divers
103 | LibName6=libcms
104 | LibName7=display
105 | LibName8=valves
106 | LibName9=led
107 | LibName10=dip_sockets
108 | LibName11=hackrf
109 |
--------------------------------------------------------------------------------
/hardware/lollipop/lollipop.pro:
--------------------------------------------------------------------------------
1 | update=Fri May 18 15:00:42 2012
2 | version=1
3 | last_client=pcbnew
4 | [cvpcb]
5 | version=1
6 | NetITyp=0
7 | NetIExt=.net
8 | PkgIExt=.pkg
9 | NetDir=
10 | LibDir=
11 | NetType=0
12 | [cvpcb/libraries]
13 | EquName1=devcms
14 | [general]
15 | version=1
16 | [eeschema]
17 | version=1
18 | LibDir=../kicad
19 | NetFmt=1
20 | HPGLSpd=20
21 | HPGLDm=15
22 | HPGLNum=1
23 | offX_A4=0
24 | offY_A4=0
25 | offX_A3=0
26 | offY_A3=0
27 | offX_A2=0
28 | offY_A2=0
29 | offX_A1=0
30 | offY_A1=0
31 | offX_A0=0
32 | offY_A0=0
33 | offX_A=0
34 | offY_A=0
35 | offX_B=0
36 | offY_B=0
37 | offX_C=0
38 | offY_C=0
39 | offX_D=0
40 | offY_D=0
41 | offX_E=0
42 | offY_E=0
43 | RptD_X=0
44 | RptD_Y=100
45 | RptLab=1
46 | LabSize=60
47 | [eeschema/libraries]
48 | LibName1=power
49 | LibName2=device
50 | LibName3=transistors
51 | LibName4=conn
52 | LibName5=linear
53 | LibName6=regul
54 | LibName7=74xx
55 | LibName8=cmos4000
56 | LibName9=adc-dac
57 | LibName10=memory
58 | LibName11=xilinx
59 | LibName12=special
60 | LibName13=microcontrollers
61 | LibName14=dsp
62 | LibName15=microchip
63 | LibName16=analog_switches
64 | LibName17=motorola
65 | LibName18=texas
66 | LibName19=intel
67 | LibName20=audio
68 | LibName21=interface
69 | LibName22=digital-audio
70 | LibName23=philips
71 | LibName24=display
72 | LibName25=cypress
73 | LibName26=siliconi
74 | LibName27=opto
75 | LibName28=atmel
76 | LibName29=contrib
77 | LibName30=valves
78 | LibName31=hackrf
79 | [pcbnew]
80 | version=1
81 | PadDrlX=320
82 | PadDimH=600
83 | PadDimV=600
84 | BoardThickness=630
85 | TxtPcbV=800
86 | TxtPcbH=600
87 | TxtModV=600
88 | TxtModH=600
89 | TxtModW=120
90 | VEgarde=100
91 | DrawLar=150
92 | EdgeLar=150
93 | TxtLar=120
94 | MSegLar=150
95 | LastNetListRead=lollipop.net
96 | [pcbnew/libraries]
97 | LibDir=../kicad
98 | LibName1=sockets
99 | LibName2=connect
100 | LibName3=discret
101 | LibName4=pin_array
102 | LibName5=divers
103 | LibName6=libcms
104 | LibName7=display
105 | LibName8=valves
106 | LibName9=led
107 | LibName10=dip_sockets
108 | LibName11=hackrf
109 |
--------------------------------------------------------------------------------
/hardware/marzipan/README:
--------------------------------------------------------------------------------
1 | Copyright 2012 - 2016 Great Scott Gadgets
2 |
3 | These files are part of HackRF.
4 |
5 | This is a free hardware design; you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation; either version 2, or (at your option)
8 | any later version.
9 |
10 | This design is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this design; see the file COPYING. If not, write to
17 | the Free Software Foundation, Inc., 51 Franklin Street,
18 | Boston, MA 02110-1301, USA.
19 |
20 |
21 | Marzipan is a wideband software radio transceiver capable of running Linux.
22 |
23 | hardware notes:
24 |
25 | Schematic and layout files were designed in KiCad, an open source electronic
26 | design automation package.
27 |
28 | order of copper layers:
29 | Copper 1: C1F (front)
30 | Copper 2: C2
31 | Copper 3: C3
32 | Copper 4: C4B (back)
33 |
34 | PCB description: 4 layer PCB 0.062 in
35 | Copper 1 0.5 oz foil plated to approximately 0.0017 in
36 | Dielectric 1-2 0.0119 in
37 | Copper 2 1 oz foil (0.0014 in)
38 | Dielectric 2-3 0.0280 in
39 | Copper 3 1 oz foil (0.0014 in)
40 | Dielectric 3-4 0.0119 in
41 | Copper 4 0.5 oz foil plated to approximately 0.0017 in
42 |
43 | FR4 or similar substrate with Er=4.5 (+/- 0.1)
44 | double side solder mask green
45 | single side silkscreen white
46 | 6 mil min trace width and
47 | 6 mil min isolation
48 |
--------------------------------------------------------------------------------
/hardware/marzipan/fp-lib-table:
--------------------------------------------------------------------------------
1 | (fp_lib_table
2 | (lib (name hackrf)(type Legacy)(uri ${KIPRJMOD}/../kicad/hackrf.mod)(options "")(descr ""))
3 | (lib (name gsg-modules)(type KiCad)(uri ${KIPRJMOD}/../gsg-kicad-lib/gsg-modules.pretty)(options "")(descr ""))
4 | )
5 |
--------------------------------------------------------------------------------
/hardware/marzipan/marzipan.pro:
--------------------------------------------------------------------------------
1 | update=Wed 13 Jul 2016 05:14:22 PM MDT
2 | version=1
3 | last_client=kicad
4 | [cvpcb]
5 | version=1
6 | NetITyp=0
7 | NetIExt=.net
8 | PkgIExt=.pkg
9 | NetDir=
10 | LibDir=
11 | NetType=0
12 | [cvpcb/libraries]
13 | EquName1=devcms
14 | [general]
15 | version=1
16 | [pcbnew]
17 | version=1
18 | PadDrlX=320
19 | PadDimH=600
20 | PadDimV=600
21 | BoardThickness=630
22 | TxtPcbV=800
23 | TxtPcbH=600
24 | TxtModV=600
25 | TxtModH=600
26 | TxtModW=120
27 | VEgarde=100
28 | DrawLar=150
29 | EdgeLar=150
30 | TxtLar=120
31 | MSegLar=150
32 | LastNetListRead=marzipan.net
33 | [pcbnew/libraries]
34 | LibDir=../kicad
35 | LibName1=sockets
36 | LibName2=connect
37 | LibName3=discret
38 | LibName4=pin_array
39 | LibName5=divers
40 | LibName6=libcms
41 | LibName7=display
42 | LibName8=valves
43 | LibName9=led
44 | LibName10=dip_sockets
45 | LibName11=hackrf
46 | [eeschema]
47 | version=1
48 | LibDir=../kicad
49 | [eeschema/libraries]
50 | LibName1=power
51 | LibName2=device
52 | LibName3=transistors
53 | LibName4=conn
54 | LibName5=linear
55 | LibName6=regul
56 | LibName7=74xx
57 | LibName8=cmos4000
58 | LibName9=adc-dac
59 | LibName10=memory
60 | LibName11=xilinx
61 | LibName12=microcontrollers
62 | LibName13=dsp
63 | LibName14=microchip
64 | LibName15=analog_switches
65 | LibName16=motorola
66 | LibName17=texas
67 | LibName18=intel
68 | LibName19=audio
69 | LibName20=interface
70 | LibName21=digital-audio
71 | LibName22=philips
72 | LibName23=display
73 | LibName24=cypress
74 | LibName25=siliconi
75 | LibName26=opto
76 | LibName27=atmel
77 | LibName28=contrib
78 | LibName29=valves
79 | LibName30=hackrf
80 |
--------------------------------------------------------------------------------
/hardware/marzipan/marzipan.sch:
--------------------------------------------------------------------------------
1 | EESchema Schematic File Version 2
2 | LIBS:power
3 | LIBS:device
4 | LIBS:transistors
5 | LIBS:conn
6 | LIBS:linear
7 | LIBS:regul
8 | LIBS:74xx
9 | LIBS:cmos4000
10 | LIBS:adc-dac
11 | LIBS:memory
12 | LIBS:xilinx
13 | LIBS:microcontrollers
14 | LIBS:dsp
15 | LIBS:microchip
16 | LIBS:analog_switches
17 | LIBS:motorola
18 | LIBS:texas
19 | LIBS:intel
20 | LIBS:audio
21 | LIBS:interface
22 | LIBS:digital-audio
23 | LIBS:philips
24 | LIBS:display
25 | LIBS:cypress
26 | LIBS:siliconi
27 | LIBS:opto
28 | LIBS:atmel
29 | LIBS:contrib
30 | LIBS:valves
31 | LIBS:hackrf
32 | LIBS:marzipan-cache
33 | EELAYER 25 0
34 | EELAYER END
35 | $Descr User 17000 11000
36 | encoding utf-8
37 | Sheet 1 4
38 | Title "Marzipan"
39 | Date "13 feb 2014"
40 | Rev ""
41 | Comp "Copyright 2012 - 2016 Great Scott Gadgets"
42 | Comment1 "License: GPL v2"
43 | Comment2 ""
44 | Comment3 ""
45 | Comment4 ""
46 | $EndDescr
47 | $Sheet
48 | S 2550 3300 1050 150
49 | U 503BB638
50 | F0 "frontend" 60
51 | F1 "frontend.sch" 60
52 | $EndSheet
53 | $Sheet
54 | S 2550 2850 1050 150
55 | U 50370666
56 | F0 "baseband" 60
57 | F1 "baseband.sch" 60
58 | $EndSheet
59 | $Sheet
60 | S 2550 2400 1050 150
61 | U 5037043E
62 | F0 "mcu/usb/power" 60
63 | F1 "mcu.sch" 60
64 | $EndSheet
65 | $EndSCHEMATC
66 |
--------------------------------------------------------------------------------
/hardware/neapolitan/README:
--------------------------------------------------------------------------------
1 | Copyright 2012 - 2016 Great Scott Gadgets
2 |
3 | These files are part of HackRF.
4 |
5 | This is a free hardware design; you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation; either version 2, or (at your option)
8 | any later version.
9 |
10 | This design is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this design; see the file COPYING. If not, write to
17 | the Free Software Foundation, Inc., 51 Franklin Street,
18 | Boston, MA 02110-1301, USA.
19 |
20 |
21 | Neapolitan is an add-on for HackRF One enabling full-duplex operation.
22 |
23 | hardware notes:
24 |
25 | Schematic and layout files were designed in KiCad, an open source electronic
26 | design automation package.
27 |
28 | order of copper layers:
29 | Copper 1: C1F (front)
30 | Copper 2: C2
31 | Copper 3: C3
32 | Copper 4: C4B (back)
33 |
34 | PCB description: 4 layer PCB 0.062 in
35 | Copper 1 0.5 oz foil plated to approximately 0.0017 in
36 | Dielectric 1-2 0.0119 in
37 | Copper 2 1 oz foil (0.0014 in)
38 | Dielectric 2-3 0.0280 in
39 | Copper 3 1 oz foil (0.0014 in)
40 | Dielectric 3-4 0.0119 in
41 | Copper 4 0.5 oz foil plated to approximately 0.0017 in
42 |
43 | FR4 or similar substrate with Er=4.5 (+/- 0.1)
44 | double side solder mask green
45 | single side silkscreen white
46 | 6 mil min trace width and
47 | 6 mil min isolation
48 |
--------------------------------------------------------------------------------
/hardware/neapolitan/fp-lib-table:
--------------------------------------------------------------------------------
1 | (fp_lib_table
2 | (lib (name hackrf)(type Legacy)(uri ${KIPRJMOD}/../kicad/hackrf.mod)(options "")(descr ""))
3 | (lib (name gsg-modules)(type KiCad)(uri ${KIPRJMOD}/../gsg-kicad-lib/gsg-modules.pretty)(options "")(descr ""))
4 | )
5 |
--------------------------------------------------------------------------------
/hardware/neapolitan/neapolitan.pro:
--------------------------------------------------------------------------------
1 | update=Fri 02 Sep 2016 06:05:25 PM MDT
2 | version=1
3 | last_client=kicad
4 | [cvpcb]
5 | version=1
6 | NetITyp=0
7 | NetIExt=.net
8 | PkgIExt=.pkg
9 | NetDir=
10 | LibDir=
11 | NetType=0
12 | [cvpcb/libraries]
13 | EquName1=devcms
14 | [general]
15 | version=1
16 | [pcbnew]
17 | version=1
18 | PadDrlX=320
19 | PadDimH=600
20 | PadDimV=600
21 | BoardThickness=630
22 | TxtPcbV=800
23 | TxtPcbH=600
24 | TxtModV=600
25 | TxtModH=600
26 | TxtModW=120
27 | VEgarde=100
28 | DrawLar=150
29 | EdgeLar=150
30 | TxtLar=120
31 | MSegLar=150
32 | LastNetListRead=neapolitan.net
33 | [pcbnew/libraries]
34 | LibDir=../kicad
35 | LibName1=sockets
36 | LibName2=connect
37 | LibName3=discret
38 | LibName4=pin_array
39 | LibName5=divers
40 | LibName6=libcms
41 | LibName7=display
42 | LibName8=valves
43 | LibName9=led
44 | LibName10=dip_sockets
45 | LibName11=hackrf
46 | [eeschema]
47 | version=1
48 | LibDir=../kicad;../gsg-kicad-lib
49 | [eeschema/libraries]
50 | LibName1=power
51 | LibName2=device
52 | LibName3=transistors
53 | LibName4=conn
54 | LibName5=linear
55 | LibName6=regul
56 | LibName7=74xx
57 | LibName8=cmos4000
58 | LibName9=adc-dac
59 | LibName10=memory
60 | LibName11=xilinx
61 | LibName12=microcontrollers
62 | LibName13=dsp
63 | LibName14=microchip
64 | LibName15=analog_switches
65 | LibName16=motorola
66 | LibName17=texas
67 | LibName18=intel
68 | LibName19=audio
69 | LibName20=interface
70 | LibName21=digital-audio
71 | LibName22=philips
72 | LibName23=display
73 | LibName24=cypress
74 | LibName25=siliconi
75 | LibName26=opto
76 | LibName27=atmel
77 | LibName28=contrib
78 | LibName29=valves
79 | LibName30=hackrf
80 | LibName31=gsg-symbols
81 |
--------------------------------------------------------------------------------
/hardware/neapolitan/neapolitan.sch:
--------------------------------------------------------------------------------
1 | EESchema Schematic File Version 2
2 | LIBS:power
3 | LIBS:device
4 | LIBS:transistors
5 | LIBS:conn
6 | LIBS:linear
7 | LIBS:regul
8 | LIBS:74xx
9 | LIBS:cmos4000
10 | LIBS:adc-dac
11 | LIBS:memory
12 | LIBS:xilinx
13 | LIBS:microcontrollers
14 | LIBS:dsp
15 | LIBS:microchip
16 | LIBS:analog_switches
17 | LIBS:motorola
18 | LIBS:texas
19 | LIBS:intel
20 | LIBS:audio
21 | LIBS:interface
22 | LIBS:digital-audio
23 | LIBS:philips
24 | LIBS:display
25 | LIBS:cypress
26 | LIBS:siliconi
27 | LIBS:opto
28 | LIBS:atmel
29 | LIBS:contrib
30 | LIBS:valves
31 | LIBS:hackrf
32 | LIBS:gsg-symbols
33 | LIBS:neapolitan-cache
34 | EELAYER 25 0
35 | EELAYER END
36 | $Descr User 17000 11000
37 | encoding utf-8
38 | Sheet 1 4
39 | Title "Neapolitan"
40 | Date "13 feb 2014"
41 | Rev ""
42 | Comp "Copyright 2012 - 2016 Great Scott Gadgets"
43 | Comment1 "License: GPL v2"
44 | Comment2 ""
45 | Comment3 ""
46 | Comment4 ""
47 | $EndDescr
48 | $Sheet
49 | S 2550 3300 1050 150
50 | U 503BB638
51 | F0 "frontend" 60
52 | F1 "frontend.sch" 60
53 | $EndSheet
54 | $Sheet
55 | S 2550 2850 1050 150
56 | U 50370666
57 | F0 "baseband" 60
58 | F1 "baseband.sch" 60
59 | $EndSheet
60 | $Sheet
61 | S 2550 2400 1050 150
62 | U 5037043E
63 | F0 "mcu/usb/power" 60
64 | F1 "mcu.sch" 60
65 | $EndSheet
66 | $EndSCHEMATC
67 |
--------------------------------------------------------------------------------
/hardware/operacake/README:
--------------------------------------------------------------------------------
1 | Copyright 2012 - 2016 Great Scott Gadgets
2 |
3 | These files are part of HackRF.
4 |
5 | This is a free hardware design; you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation; either version 2, or (at your option)
8 | any later version.
9 |
10 | This design is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this design; see the file COPYING. If not, write to
17 | the Free Software Foundation, Inc., 51 Franklin Street,
18 | Boston, MA 02110-1301, USA.
19 |
20 |
21 | Opera Cake is an RF switching add-on for HackRF One.
22 |
23 | hardware notes:
24 |
25 | Schematic and layout files were designed in KiCad, an open source electronic
26 | design automation package.
27 |
28 | order of copper layers:
29 | Copper 1: C1F (front)
30 | Copper 2: C2
31 | Copper 3: C3
32 | Copper 4: C4B (back)
33 |
34 | PCB description: 4 layer PCB 0.0646 in
35 | Copper 1: 1 oz copper (1.4 mil)
36 | Dielectric 1-2: 6.7 mil prepreg
37 | Copper 2: 0.5 oz copper (0.7 mil)
38 | Dielectric 2-3: 47 mil core
39 | Copper 3: 0.5 oz copper (0.7 mil)
40 | Dielectric 3-4: 6.7 mil prepreg
41 | Copper 4: 1 oz copper (1.4 mil)
42 |
43 | FR408 or similar substrate with Er=3.66 (+/- 0.1)
44 | double side solder mask green
45 | double side silkscreen white
46 | 6 mil min trace width and
47 | 6 mil min isolation
48 |
49 | PCBs of this specification are available from OSH Park.
50 |
--------------------------------------------------------------------------------
/hardware/operacake/fp-lib-table:
--------------------------------------------------------------------------------
1 | (fp_lib_table
2 | (lib (name hackrf)(type Legacy)(uri ${KIPRJMOD}/../kicad/hackrf.mod)(options "")(descr ""))
3 | (lib (name gsg-modules)(type KiCad)(uri ${KIPRJMOD}/../gsg-kicad-lib/gsg-modules.pretty)(options "")(descr ""))
4 | )
5 |
--------------------------------------------------------------------------------
/hardware/operacake/operacake.pro:
--------------------------------------------------------------------------------
1 | update=Fri 30 Sep 2016 04:09:24 PM MDT
2 | version=1
3 | last_client=kicad
4 | [cvpcb]
5 | version=1
6 | NetITyp=0
7 | NetIExt=.net
8 | PkgIExt=.pkg
9 | NetDir=
10 | LibDir=
11 | NetType=0
12 | [cvpcb/libraries]
13 | EquName1=devcms
14 | [general]
15 | version=1
16 | [pcbnew]
17 | version=1
18 | PadDrlX=320
19 | PadDimH=600
20 | PadDimV=600
21 | BoardThickness=630
22 | TxtPcbV=800
23 | TxtPcbH=600
24 | TxtModV=600
25 | TxtModH=600
26 | TxtModW=120
27 | VEgarde=100
28 | DrawLar=150
29 | EdgeLar=150
30 | TxtLar=120
31 | MSegLar=150
32 | [pcbnew/libraries]
33 | LibDir=../kicad
34 | LibName1=sockets
35 | LibName2=connect
36 | LibName3=discret
37 | LibName4=pin_array
38 | LibName5=divers
39 | LibName6=libcms
40 | LibName7=display
41 | LibName8=valves
42 | LibName9=led
43 | LibName10=dip_sockets
44 | LibName11=hackrf
45 | [eeschema]
46 | version=1
47 | LibDir=../kicad;../gsg-kicad-lib
48 | [eeschema/libraries]
49 | LibName1=gsg-symbols
50 | LibName2=hackrf
51 | LibName3=power
52 | LibName4=device
53 | LibName5=transistors
54 | LibName6=conn
55 | LibName7=linear
56 | LibName8=regul
57 | LibName9=74xx
58 | LibName10=cmos4000
59 | LibName11=adc-dac
60 | LibName12=memory
61 | LibName13=xilinx
62 | LibName14=microcontrollers
63 | LibName15=dsp
64 | LibName16=microchip
65 | LibName17=analog_switches
66 | LibName18=motorola
67 | LibName19=texas
68 | LibName20=intel
69 | LibName21=audio
70 | LibName22=interface
71 | LibName23=digital-audio
72 | LibName24=philips
73 | LibName25=display
74 | LibName26=cypress
75 | LibName27=siliconi
76 | LibName28=opto
77 | LibName29=atmel
78 | LibName30=contrib
79 | LibName31=valves
80 |
--------------------------------------------------------------------------------
/host/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #top dir cmake project for libhackrf + tools
2 |
3 | cmake_minimum_required(VERSION 2.8.12)
4 | project (HackRF C)
5 |
6 | set(CMAKE_C_FLAGS "$ENV{CFLAGS}" CACHE STRING "C Flags")
7 |
8 | add_subdirectory(libhackrf)
9 | add_subdirectory(hackrf-tools)
10 |
11 | ########################################################################
12 | # Create uninstall target
13 | ########################################################################
14 |
15 | configure_file(
16 | ${PROJECT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in
17 | ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
18 | @ONLY)
19 |
20 |
21 | add_custom_target(uninstall
22 | ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
23 | )
24 |
--------------------------------------------------------------------------------
/host/cmake/cmake_uninstall.cmake.in:
--------------------------------------------------------------------------------
1 | # http://www.vtk.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F
2 |
3 | IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
4 | MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
5 | ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
6 |
7 | FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
8 | STRING(REGEX REPLACE "\n" ";" files "${files}")
9 | FOREACH(file ${files})
10 | MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
11 | IF(EXISTS "$ENV{DESTDIR}${file}")
12 | EXEC_PROGRAM(
13 | "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
14 | OUTPUT_VARIABLE rm_out
15 | RETURN_VALUE rm_retval
16 | )
17 | IF(NOT "${rm_retval}" STREQUAL 0)
18 | MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
19 | ENDIF(NOT "${rm_retval}" STREQUAL 0)
20 | ELSEIF(IS_SYMLINK "$ENV{DESTDIR}${file}")
21 | EXEC_PROGRAM(
22 | "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
23 | OUTPUT_VARIABLE rm_out
24 | RETURN_VALUE rm_retval
25 | )
26 | IF(NOT "${rm_retval}" STREQUAL 0)
27 | MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
28 | ENDIF(NOT "${rm_retval}" STREQUAL 0)
29 | ELSE(EXISTS "$ENV{DESTDIR}${file}")
30 | MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
31 | ENDIF(EXISTS "$ENV{DESTDIR}${file}")
32 | ENDFOREACH(file)
33 |
--------------------------------------------------------------------------------
/host/cmake/modules/FindFFTW.cmake:
--------------------------------------------------------------------------------
1 | # - Find FFTW
2 | # Find the native FFTW includes and library
3 | #
4 | # FFTW_INCLUDES - where to find fftw3.h
5 | # FFTW_LIBRARIES - List of libraries when using FFTW.
6 | # FFTW_FOUND - True if FFTW found.
7 |
8 | if (FFTW_INCLUDES)
9 | # Already in cache, be silent
10 | set (FFTW_FIND_QUIETLY TRUE)
11 | endif (FFTW_INCLUDES)
12 |
13 | find_path (FFTW_INCLUDES fftw3.h)
14 |
15 | IF (WIN32)
16 | include_directories(${FFTW_INCLUDES})
17 | find_library (FFTW_LIBRARIES NAMES ${FFTW_LIBRARIES})
18 | ELSE(WIN32)
19 | find_library (FFTW_LIBRARIES NAMES fftw3f)
20 | ENDIF(WIN32)
21 |
22 |
23 |
24 |
25 | # handle the QUIETLY and REQUIRED arguments and set FFTW_FOUND to TRUE if
26 | # all listed variables are TRUE
27 | include (FindPackageHandleStandardArgs)
28 | find_package_handle_standard_args (FFTW DEFAULT_MSG FFTW_LIBRARIES FFTW_INCLUDES)
29 |
30 | mark_as_advanced (FFTW_LIBRARIES FFTW_INCLUDES)
31 |
--------------------------------------------------------------------------------
/host/cmake/modules/FindLIBHACKRF.cmake:
--------------------------------------------------------------------------------
1 | # - Try to find the libhackrf library
2 | # Once done this defines
3 | #
4 | # LIBHACKRF_FOUND - system has libhackrf
5 | # LIBHACKRF_INCLUDE_DIR - the libhackrf include directory
6 | # LIBHACKRF_LIBRARIES - Link these to use libhackrf
7 |
8 | # Copyright (c) 2013 Benjamin Vernoux
9 | #
10 |
11 |
12 | if (LIBHACKRF_INCLUDE_DIR AND LIBHACKRF_LIBRARIES)
13 |
14 | # in cache already
15 | set(LIBHACKRF_FOUND TRUE)
16 |
17 | else (LIBHACKRF_INCLUDE_DIR AND LIBHACKRF_LIBRARIES)
18 | IF (NOT WIN32)
19 | # use pkg-config to get the directories and then use these values
20 | # in the FIND_PATH() and FIND_LIBRARY() calls
21 | find_package(PkgConfig)
22 | pkg_check_modules(PC_LIBHACKRF QUIET libhackrf)
23 | ENDIF(NOT WIN32)
24 |
25 | FIND_PATH(LIBHACKRF_INCLUDE_DIR
26 | NAMES hackrf.h
27 | HINTS $ENV{LIBHACKRF_DIR}/include ${PC_LIBHACKRF_INCLUDEDIR}
28 | PATHS /usr/local/include/libhackrf /usr/include/libhackrf /usr/local/include
29 | /usr/include ${CMAKE_SOURCE_DIR}/../libhackrf/src
30 | /opt/local/include/libhackrf
31 | ${LIBHACKRF_INCLUDE_DIR}
32 | )
33 |
34 | set(libhackrf_library_names hackrf)
35 |
36 | FIND_LIBRARY(LIBHACKRF_LIBRARIES
37 | NAMES ${libhackrf_library_names}
38 | HINTS $ENV{LIBHACKRF_DIR}/lib ${PC_LIBHACKRF_LIBDIR}
39 | PATHS /usr/local/lib /usr/lib /opt/local/lib ${PC_LIBHACKRF_LIBDIR} ${PC_LIBHACKRF_LIBRARY_DIRS} ${CMAKE_SOURCE_DIR}/../libhackrf/src
40 | )
41 |
42 | if(LIBHACKRF_INCLUDE_DIR)
43 | set(CMAKE_REQUIRED_INCLUDES ${LIBHACKRF_INCLUDE_DIR})
44 | endif()
45 |
46 | if(LIBHACKRF_LIBRARIES)
47 | set(CMAKE_REQUIRED_LIBRARIES ${LIBHACKRF_LIBRARIES})
48 | endif()
49 |
50 | include(FindPackageHandleStandardArgs)
51 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBHACKRF DEFAULT_MSG LIBHACKRF_LIBRARIES LIBHACKRF_INCLUDE_DIR)
52 |
53 | MARK_AS_ADVANCED(LIBHACKRF_INCLUDE_DIR LIBHACKRF_LIBRARIES)
54 |
55 | endif (LIBHACKRF_INCLUDE_DIR AND LIBHACKRF_LIBRARIES)
--------------------------------------------------------------------------------
/host/cmake/modules/FindUSB1.cmake:
--------------------------------------------------------------------------------
1 | # - Try to find the freetype library
2 | # Once done this defines
3 | #
4 | # LIBUSB_FOUND - system has libusb
5 | # LIBUSB_INCLUDE_DIR - the libusb include directory
6 | # LIBUSB_LIBRARIES - Link these to use libusb
7 |
8 | # Copyright (c) 2006, 2008 Laurent Montel,
9 | #
10 | # Redistribution and use is allowed according to the terms of the BSD license.
11 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
12 |
13 |
14 | if (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
15 |
16 | # in cache already
17 | set(LIBUSB_FOUND TRUE)
18 |
19 | else (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
20 | IF (NOT WIN32)
21 | # use pkg-config to get the directories and then use these values
22 | # in the FIND_PATH() and FIND_LIBRARY() calls
23 | find_package(PkgConfig)
24 | pkg_check_modules(PC_LIBUSB libusb-1.0)
25 | ENDIF(NOT WIN32)
26 |
27 | set(LIBUSB_LIBRARY_NAME usb-1.0)
28 | IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
29 | set(LIBUSB_LIBRARY_NAME usb)
30 | ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
31 |
32 | FIND_PATH(LIBUSB_INCLUDE_DIR libusb.h
33 | PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS})
34 |
35 | FIND_LIBRARY(LIBUSB_LIBRARIES NAMES ${LIBUSB_LIBRARY_NAME}
36 | PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS})
37 |
38 | include(FindPackageHandleStandardArgs)
39 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUSB DEFAULT_MSG LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIR)
40 |
41 | MARK_AS_ADVANCED(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARIES)
42 |
43 | endif (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
--------------------------------------------------------------------------------
/host/cmake/set_release.cmake:
--------------------------------------------------------------------------------
1 | if(NOT DEFINED RELEASE)
2 | execute_process(
3 | COMMAND git log -n 1 --format=%h
4 | WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
5 | RESULT_VARIABLE GIT_EXIT_VALUE
6 | ERROR_QUIET
7 | OUTPUT_VARIABLE GIT_VERSION
8 | OUTPUT_STRIP_TRAILING_WHITESPACE
9 | )
10 | if (GIT_EXIT_VALUE)
11 | set(RELEASE "2024.02.1+")
12 | else (GIT_EXIT_VALUE)
13 | execute_process(
14 | COMMAND git status -s --untracked-files=no
15 | OUTPUT_VARIABLE DIRTY
16 | )
17 | if ( NOT "${DIRTY}" STREQUAL "" )
18 | set(DIRTY_FLAG "*")
19 | else()
20 | set(DIRTY_FLAG "")
21 | endif()
22 | set(RELEASE "git-${GIT_VERSION}${DIRTY_FLAG}")
23 | endif (GIT_EXIT_VALUE)
24 | endif()
25 |
--------------------------------------------------------------------------------
/host/libhackrf/53-hackrf.rules:
--------------------------------------------------------------------------------
1 | ATTR{idVendor}=="1d50", ATTR{idProduct}=="604b", SYMLINK+="hackrf-jawbreaker-%k", MODE="660", GROUP="plugdev"
2 | ATTR{idVendor}=="1d50", ATTR{idProduct}=="6089", SYMLINK+="hackrf-one-%k", MODE="660", GROUP="plugdev"
3 | ATTR{idVendor}=="1d50", ATTR{idProduct}=="cc15", SYMLINK+="rad1o-%k", MODE="660", GROUP="plugdev"
4 | ATTR{idVendor}=="1fc9", ATTR{idProduct}=="000c", SYMLINK+="nxp-dfu-%k", MODE="660", GROUP="plugdev"
5 |
--------------------------------------------------------------------------------
/host/libhackrf/53-hackrf.rules.in:
--------------------------------------------------------------------------------
1 | # HackRF Jawbreaker
2 | ATTR{idVendor}=="1d50", ATTR{idProduct}=="604b", SYMLINK+="hackrf-jawbreaker-%k", MODE="660", GROUP="@HACKRF_GROUP@"
3 | # HackRF One
4 | ATTR{idVendor}=="1d50", ATTR{idProduct}=="6089", SYMLINK+="hackrf-one-%k", MODE="660", GROUP="@HACKRF_GROUP@"
5 | # rad1o
6 | ATTR{idVendor}=="1d50", ATTR{idProduct}=="cc15", SYMLINK+="rad1o-%k", MODE="660", GROUP="@HACKRF_GROUP@"
7 | # NXP Semiconductors DFU mode (HackRF and rad1o)
8 | ATTR{idVendor}=="1fc9", ATTR{idProduct}=="000c", SYMLINK+="nxp-dfu-%k", MODE="660", GROUP="@HACKRF_GROUP@"
9 | # rad1o "full flash" mode
10 | KERNEL=="sd?", SUBSYSTEM=="block", ENV{ID_VENDOR_ID}=="1fc9", ENV{ID_MODEL_ID}=="0042", SYMLINK+="rad1o-flash-%k", MODE="660", GROUP="@HACKRF_GROUP@"
11 | # rad1o flash disk
12 | KERNEL=="sd?", SUBSYSTEM=="block", ENV{ID_VENDOR_ID}=="1fc9", ENV{ID_MODEL_ID}=="0082", SYMLINK+="rad1o-msc-%k", MODE="660", GROUP="@HACKRF_GROUP@"
13 | #
14 |
--------------------------------------------------------------------------------
/host/libhackrf/libhackrf.pc.in:
--------------------------------------------------------------------------------
1 | prefix=@prefix@
2 | exec_prefix=@exec_prefix@
3 | libdir=@libdir@
4 | includedir=@includedir@
5 |
6 | Name: HackRF Library
7 | Description: C Utility Library
8 | Version: @VERSION@
9 | Cflags: -I${includedir} -I${includedir}/libhackrf @HACKRF_PC_CFLAGS@
10 | Libs: -L${libdir} -lhackrf
11 | Libs.private: @HACKRF_PC_LIBS@
12 |
--------------------------------------------------------------------------------
/tools/add-braces.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | CMAKE='cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON'
4 |
5 | CLANG_TIDY='clang-tidy
6 | -checks=-*,readability-braces-around-statements
7 | --warnings-as-errors=-*,readability-braces-around-statements
8 | --fix-errors
9 | --format-style=file
10 | -p'
11 |
12 | BUILD=build/host
13 | mkdir -p $BUILD
14 | $CMAKE -S host -B $BUILD
15 | make -j4 -C $BUILD
16 | $CLANG_TIDY $BUILD host/libhackrf/src/*.{c,h} host/hackrf-tools/src/*.c
17 |
18 | for board in HACKRF_ONE JAWBREAKER RAD1O; do
19 | BUILD=build/firmware/$BOARD
20 | mkdir -p $BUILD
21 | $CMAKE -S firmware/hackrf_usb -B $BUILD
22 | make -j4 $BUILD
23 | if [ $BOARD == RAD1O ]; then
24 | FILES=`ls firmware/{common,hackrf_usb}/*.{c,h} | grep -v rffc5071`
25 | else
26 | FILES=`ls firmware/{common,hackrf_usb}/*.{c,h} | grep -v max2871`
27 | fi
28 | $CLANG_TIDY $BUILD \
29 | --extra-arg=-Ifirmware/common \
30 | --extra-arg=-Ifirmware/libopencm3/include \
31 | --extra-arg=-I/usr/arm-none-eabi/include \
32 | $FILES
33 | done
34 |
--------------------------------------------------------------------------------
/tools/deploy-nightly.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | PUBLICATION_BRANCH=master
3 | # set -x
4 | cd $HOME
5 | # Checkout the branch
6 | git clone --branch=$PUBLICATION_BRANCH https://${GITHUB_TOKEN}@github.com/${ARTEFACT_REPO}.git publish
7 | cd publish
8 | # Update pages
9 | cp $ARTEFACT_BASE/$BUILD_NAME.tar.xz .
10 | # Write index page
11 | cd $TRAVIS_BUILD_DIR
12 | COMMITS=`git log --oneline | awk '{print $1}'`
13 | cd $HOME/publish
14 | echo "
15 |
16 |
17 |
18 | HackRF Nightly Builds
19 |
20 |
21 | HackRF Nightly Builds
22 | " > index.html
23 |
24 | for commit in $COMMITS; do
25 | FILENAME=`find . -maxdepth 1 -name "*-$commit.tar.xz"`
26 | if [ "$FILENAME" != "" ]; then
27 | FN=${FILENAME:2}
28 | echo "$FN
" >> index.html
29 | fi
30 |
31 | done
32 |
33 | echo "
34 |
35 | " >> index.html
36 |
37 | # Commit and push latest version
38 | git add $BUILD_NAME.tar.xz index.html
39 | git config user.name "Travis"
40 | git config user.email "travis@travis-ci.org"
41 | git commit -m "Build products for $SHORT_COMMIT_HASH, built on $TRAVIS_OS_NAME, log: $TRAVIS_BUILD_WEB_URL"
42 | if [ "$?" != "0" ]; then
43 | echo "Looks like the commit failed"
44 | fi
45 | git push -fq origin $PUBLICATION_BRANCH
--------------------------------------------------------------------------------
/tools/reformat-source.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | VERSION=`clang-format --version | grep -o '[^ ]*$' | cut -d '.' -f 1`
4 | if [ "$VERSION" -ge "14" ]; then
5 | CLANG_FORMAT=clang-format
6 | elif clang-format-14 --version > /dev/null; then
7 | CLANG_FORMAT=clang-format-14
8 | else
9 | echo "clang-format version 14 or higher is required."
10 | exit 1
11 | fi
12 |
13 | $CLANG_FORMAT \
14 | -i \
15 | --style=file \
16 | host/libhackrf/src/*.{c,h} \
17 | host/hackrf-tools/src/*.c \
18 | firmware/{common,common/rad1o,hackrf_usb}/*.{c,h}
19 |
--------------------------------------------------------------------------------
/tools/sgpio_debug/create_tx_counter.py:
--------------------------------------------------------------------------------
1 | with open('tx_counter.bin', 'wb') as f:
2 | f.write(bytes(range(256))*1000)
3 |
--------------------------------------------------------------------------------
/tools/sgpio_debug/sgpio_debug_tx.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | python3 create_tx_counter.py
3 | hackrf_transfer -R -t tx_counter.bin
4 |
--------------------------------------------------------------------------------