newaetech / naeusb

USB library for ChipWhisperer devices
Apache License 2.0
15 stars 3 forks source link

naeusb

USB library and build system for ChipWhisperer devices

Also includes other shared driver code (usart_driver, fpga_program code, etc.)

Building

To build, navigate to the directory above this one (i.e. cd ..) and run make.

The makefile supports multiple jobs (-j flag) and supports the following options:

Programming

Running make program will attempt to erase and program the device with the newly built firmware.

Using the build system

  1. Add this repository as a submodule in the project's firmware directory
  2. Create a makefile in your project's firmware directory with the following lines:
    1. TARGET = <X>, where <X> is your target's name (e.g. ChipWhisperer-Husky)
    2. SRC += <SRCFILES> where <SRCFILES> are your custom source files (e.g. main.c, others)
    3. SRC += <NAEUSBFILES> where <NAEUSBFILES> are any source files you need from this directory
    4. LINKERFILE = <LINKERFILE> where <LINKERFILE> is the linker file you need to use
    5. OPT=<X> where <X> is the optimization level
    6. include naeusb/makefile.cw
  3. Add a target entry for your target in makefile.cw
  4. If you need to need to add a new HAL, create a new folder and put the files in there
  5. The following files are required to be in the project's firmware directory
    1. conf_board.h
    2. conf_clock.h
    3. conf_sleepmgr.h
    4. conf_uart_serial.h
    5. conf_usb.h
    6. naeusb_board_config.h

REQ_SAM3U_CFG

wValue & 0xFF:

  1. 0xFx: Device specific config
  2. 0x4x: MPSSE config