diff --git a/doc/guide/advanced.rst b/doc/guide/advanced.rst index ff4f871..f717151 100644 --- a/doc/guide/advanced.rst +++ b/doc/guide/advanced.rst @@ -43,7 +43,7 @@ Automatic file type detection bypass ==================================== Default behavior is to use file extension to determine file parser. -To avoid this mecanism ``--file-type type`` must be used. +To avoid this mechanism ``--file-type type`` must be used. FT231/FT232 bitbang mode and pins configuration =============================================== diff --git a/doc/guide/first-steps.rst b/doc/guide/first-steps.rst index acec7b5..5586db5 100644 --- a/doc/guide/first-steps.rst +++ b/doc/guide/first-steps.rst @@ -6,7 +6,7 @@ First steps with openFPGALoader Install ======= -Packages are available for Linux distributionsm, Windows (MSYS2) and macOS: +Packages are available for Linux distributions, Windows (MSYS2) and macOS: * *Arch Linux*: ``sudo pacman -S openfpgaloader`` diff --git a/doc/guide/install.rst b/doc/guide/install.rst index 7507811..262c3b6 100644 --- a/doc/guide/install.rst +++ b/doc/guide/install.rst @@ -41,6 +41,7 @@ This application uses ``libftdi1``, so this library must be installed (and, depe .. code-block:: bash sudo apt install \ + git \ libftdi1-2 \ libftdi1-dev \ libhidapi-hidraw0 \ @@ -92,7 +93,7 @@ If you don't want this option, use: -DENABLE_LIBGPIOD=OFF -Additionnaly you have to install ``libgpiod`` +Additionaly you have to install ``libgpiod`` To build the app: @@ -137,7 +138,7 @@ After that you need to unplug and replug your device. ``usermod`` is used to add ``$USER`` as a member of ``plugdev`` group. However this update is not taken into account immediately: it's required to logout from current session and login again. - Check, by using ``id $USER``, if ``plugdev`` is mentionned after ``groups=``. + Check, by using ``id $USER``, if ``plugdev`` is mentioned after ``groups=``. An alternate (and temporary) solution is to use ``sudo - $USER`` to have your user seen as a member of ``plugdev`` group (works only for the current terminal). @@ -150,7 +151,7 @@ openFPGALoader is available as a `Homebrew `__ formula: brew install openfpgaloader -Alternatively, if you want to build it from hand: +Alternatively, if you want to build it by hand: .. code-block:: bash diff --git a/doc/vendors/intel.rst b/doc/vendors/intel.rst index d693c10..205af77 100644 --- a/doc/vendors/intel.rst +++ b/doc/vendors/intel.rst @@ -30,7 +30,7 @@ SVF and RBF files are supported. quartus_cpf --option=bitstream_compression=off -c project_name.sof project_name.rbf .. WARNING:: - As mentionned in ``cyclone`` handbooks, real-time decompression is not supported by FPGA in JTAG mode. + As mentioned in ``cyclone`` handbooks, real-time decompression is not supported by FPGA in JTAG mode. Keep in mind to disable this option. file load: diff --git a/doc/vendors/xilinx.rst b/doc/vendors/xilinx.rst index ff63dbd..41c3bbe 100644 --- a/doc/vendors/xilinx.rst +++ b/doc/vendors/xilinx.rst @@ -60,7 +60,7 @@ SPI flash .. NOTE:: ``.bit``, ``.bin``, and ``.mcs`` are supported for FLASH. -``.mcs`` must be generated through vivado with a tcl script like: +``.mcs`` must be generated through Vivado with a tcl script like: .. code-block:: tcl @@ -94,5 +94,5 @@ File load: .. NOTE:: ``--fpga-part`` is only required if this information is not provided at ``board.hpp`` level or if the board is not officially supported. - device/packagee format is something like xc7a35tcsg324 (arty model). + device/package format is something like xc7a35tcsg324 (arty model). See :ghsrc:`src/board.hpp `, or :ghsrc:`spiOverJtag ` directory for examples. diff --git a/src/board.hpp b/src/board.hpp index 90d1b05..793838b 100644 --- a/src/board.hpp +++ b/src/board.hpp @@ -68,7 +68,7 @@ enum { }; /*! - * \brief a board has a target cable and optionnally a pin configuration + * \brief a board has a target cable and optionally a pin configuration * (bitbang mode) */ typedef struct { diff --git a/src/cable.hpp b/src/cable.hpp index a7c8e8c..47bd05f 100644 --- a/src/cable.hpp +++ b/src/cable.hpp @@ -50,7 +50,7 @@ enum ftdi_if { }; /*! - * \brief cable caracteristics + * \brief cable characteristics */ struct cable_t { communication_type type; /*! see enum communication_type */ diff --git a/src/ch552_jtag.cpp b/src/ch552_jtag.cpp index af04365..99d8a3b 100644 --- a/src/ch552_jtag.cpp +++ b/src/ch552_jtag.cpp @@ -181,7 +181,7 @@ int CH552_jtag::writeTDI(uint8_t *tdi, uint8_t *tdo, uint32_t len, bool last) */ int tx_buff_size = mpsse_get_buffer_size(); int real_len = (last) ? len - 1 : len; // if its a buffer in a big send send len - // else supress last bit -> with TMS + // else suppress last bit -> with TMS int nb_byte = real_len >> 3; // number of byte to send int nb_bit = (real_len & 0x07); // residual bits int xfer = tx_buff_size - 7; // 2 byte for opcode and size 2 time @@ -286,7 +286,7 @@ int CH552_jtag::writeTDI(uint8_t *tdi, uint8_t *tdo, uint32_t len, bool last) unsigned char last_bit = (tdi) ? *tx_ptr : 0; - /* next: serie of bit to send: inconditionnaly write AND read + /* next: serie of bit to send: unconditionally write AND read */ if (nb_bit != 0) { display("%s read/write %d bit\n", __func__, nb_bit); diff --git a/src/cmsisDAP.hpp b/src/cmsisDAP.hpp index 1a4e207..5535740 100644 --- a/src/cmsisDAP.hpp +++ b/src/cmsisDAP.hpp @@ -18,7 +18,7 @@ class CmsisDAP: public JtagInterface { public: /*! - * \brief contructor: open device with vid/pid if != 0 + * \brief constructor: open device with vid/pid if != 0 * else search for a compatible device * \param[in] vid: vendor id * \param[in] pid: product id @@ -79,13 +79,13 @@ class CmsisDAP: public JtagInterface { private: /*! * \brief connect device in JTAG mode - * \return 1 if success <= 0 otherwhise + * \return 1 if success <= 0 otherwise */ int dapConnect(); /*! * \brief disconnect device - * \return 1 if success <= 0 otherwhise + * \return 1 if success <= 0 otherwise */ int dapDisconnect(); int dapResetTarget(); diff --git a/src/colognechip.cpp b/src/colognechip.cpp index 4214df8..67a053d 100644 --- a/src/colognechip.cpp +++ b/src/colognechip.cpp @@ -82,7 +82,7 @@ void CologneChip::reset() } /** - * Obtain CFG_DONE and CFG_FAILED signals. Configuration is successfull iff + * Obtain CFG_DONE and CFG_FAILED signals. Configuration is successful if * CFG_DONE=true and CFG_FAILED=false. */ bool CologneChip::cfgDone() @@ -99,7 +99,7 @@ bool CologneChip::cfgDone() } /** - * Prints information if configuration was successfull. + * Prints information if configuration was successful. */ void CologneChip::waitCfgDone() { diff --git a/src/cxxopts.hpp b/src/cxxopts.hpp index 098617b..9040da9 100644 --- a/src/cxxopts.hpp +++ b/src/cxxopts.hpp @@ -731,7 +731,7 @@ namespace cxxopts } // The fallback parser. It uses the stringstream parser to parse all types - // that have not been overloaded explicitly. It has to be placed in the + // that have not been overloaded explicitly. It has to be placed in the // source code before all other more specialized templates. template void diff --git a/src/dfu.hpp b/src/dfu.hpp index 4538361..149dd79 100644 --- a/src/dfu.hpp +++ b/src/dfu.hpp @@ -235,7 +235,7 @@ class DFU { int dev_idx; /**< device index in dfu_dev */ uint16_t _vid; /**< device Vendor ID */ uint16_t _pid; /**< device Product ID */ - int16_t _altsetting; /**< device altesetting */ + int16_t _altsetting; /**< device altsetting */ struct libusb_context *usb_ctx; /**< usb context */ libusb_device_handle * dev_handle; /**< current device handle */ int curr_intf; /**< device interface to use */ diff --git a/src/dfuFileParser.hpp b/src/dfuFileParser.hpp index 8351f6e..a998ad2 100644 --- a/src/dfuFileParser.hpp +++ b/src/dfuFileParser.hpp @@ -25,12 +25,12 @@ class DFUFileParser: public ConfigBitstreamParser { DFUFileParser(const std::string &filename, bool verbose); /*! * \brief read full content of the file, fill the buffer - * \return EXIT_SUCCESS is file is fully read, EXIT_FAILURE otherwhise + * \return EXIT_SUCCESS is file is fully read, EXIT_FAILURE otherwise */ int parse() override; /*! * \brief read DFU suffix content of the file, fill _hdr structure - * \return EXIT_SUCCESS if suffix is fully read, EXIT_FAILURE otherwhise + * \return EXIT_SUCCESS if suffix is fully read, EXIT_FAILURE otherwise */ int parseHeader(); /*! diff --git a/src/dirtyJtag.cpp b/src/dirtyJtag.cpp index fb70131..f25ce26 100644 --- a/src/dirtyJtag.cpp +++ b/src/dirtyJtag.cpp @@ -44,7 +44,7 @@ enum CommandModifier { struct version_specific { - uint8_t no_read; // command modifer for xfer no read + uint8_t no_read; // command modifier for xfer no read uint16_t max_bits; // max bit count that can be transferred }; diff --git a/src/efinixHexParser.hpp b/src/efinixHexParser.hpp index b233c2e..6cf0f03 100644 --- a/src/efinixHexParser.hpp +++ b/src/efinixHexParser.hpp @@ -25,7 +25,7 @@ class EfinixHexParser: public ConfigBitstreamParser { EfinixHexParser(const std::string &filename); /*! * \brief read full content of the file, fill the buffer - * \return EXIT_SUCCESS is file is fully read, EXIT_FAILURE otherwhise + * \return EXIT_SUCCESS is file is fully read, EXIT_FAILURE otherwise */ int parse() override; }; diff --git a/src/epcq2.cpp b/src/epcq2.cpp index 5b5198d..0a8453b 100644 --- a/src/epcq2.cpp +++ b/src/epcq2.cpp @@ -133,7 +133,7 @@ int EPCQ::erase_sector(char start_sector, char nb_sectors) } #endif -/* write must be do by 256bytes. Before writting next 256bytes we must +/* write must be do by 256bytes. Before writing next 256bytes we must * wait for WIP goes low */ @@ -185,7 +185,7 @@ void EPCQ::program(unsigned int start_offset, string filename, bool reverse) nb_read = fread(rd_buffer, 1, 256, fd); if (nb_read == 0) { - printf("problem dans le read du fichier source\n"); + printf("problem reading the source file\n"); break; } buffer[1] = (offset >> 16) & 0xff; @@ -262,14 +262,14 @@ void EPCQ::read_id() _spi->spi_put(0x9F, NULL, rx_buf, 3); _device_id = rx_buf[2]; if (_verbose) - printf("device id 0x%x attendu 0x15\n", _device_id); + printf("device id 0x%x expected 0x15\n", _device_id); /* read EPCQ silicon id */ //tx_buf[0] = 0xAB; /* 3 dummy_byte + 1 byte*/ _spi->spi_put(0xAB, NULL, rx_buf, 4); _silicon_id = rx_buf[3]; if (_verbose) - printf("silicon id 0x%x attendu 0x14\n", _silicon_id); + printf("silicon id 0x%x expected 0x14\n", _silicon_id); } EPCQ::EPCQ(SPIInterface *spi, int8_t verbose):SPIFlash(spi, verbose) diff --git a/src/epcq2.hpp b/src/epcq2.hpp index f11e78e..4597353 100644 --- a/src/epcq2.hpp +++ b/src/epcq2.hpp @@ -17,7 +17,7 @@ class EPCQ: public SPIFlash { void read_id() override; - //void program(unsigned int start_offet, string filename, bool reverse=true); + //void program(unsigned int start_offset, string filename, bool reverse=true); //int erase_sector(char start_sector, char nb_sectors); //void dumpflash(char *dest_file, int size); diff --git a/src/feaparser.cpp b/src/feaparser.cpp index 627804c..56ea6bf 100644 --- a/src/feaparser.cpp +++ b/src/feaparser.cpp @@ -24,7 +24,7 @@ # define FEA_I2C_DG_FIL_EN (1 << 0) /* I2C deglitch filter enable for Primary I2C Port 0=Disabled (Default), 1=Enabled */ # define FEA_FLASH_PROT_SEC_SEL (0x7 << 1) /* Flash Protection Sector Selection */ # define FEA_MY_ASSP_EN (1 << 4) /* MY_ASSP Enabled 0=Disabled (Default), 1=Enabled */ -# define FEA_PROG_PERSIST (1 << 5) /* PROGRAMN Persistence 0=Enabled (Default), 1=Disabled */ +# define FEA_PROG_PERSIST (1 << 5) /* PROGRAM Persistence 0=Enabled (Default), 1=Disabled */ # define FEA_INITN_PERSIST (1 << 6) /* INITN Persistence 0=Disabled (Default), 1=Enabled */ # define FEA_DONE_PERSIST (1 << 7) /* DONE Persistence 0=Disabled (Default), 1=Enabled */ # define FEA_JTAG_PERSIST (1 << 8) /* JTAG Port Persistence 0=Enabled (Default), 1=Disabled */ @@ -73,7 +73,7 @@ FeaParser::FeaParser(string filename, bool verbose): _featuresRow[i] = 0; } -/* fill a vector with consecutive lines, begining with 0 or 1, until EOF +/* fill a vector with consecutive lines, beginning with 0 or 1, until EOF * \brief read a line with '\r''\n' or '\n' termination * check if last char is '\r' * \return a vector of lines without [\r]\n diff --git a/src/fsparser.cpp b/src/fsparser.cpp index 624c25f..07b3fd1 100644 --- a/src/fsparser.cpp +++ b/src/fsparser.cpp @@ -52,7 +52,7 @@ int FsParser::parseHeader() if (buffer[buffer.size()-1] == '\r') buffer.pop_back(); - /* store each line in dedicated buffer for futur use + /* store each line in dedicated buffer for future use */ _lstRawData.push_back(buffer); diff --git a/src/ftdiJtagMPSSE.cpp b/src/ftdiJtagMPSSE.cpp index dd28a7d..58c477b 100644 --- a/src/ftdiJtagMPSSE.cpp +++ b/src/ftdiJtagMPSSE.cpp @@ -217,7 +217,7 @@ int FtdiJtagMPSSE::writeTDI(uint8_t *tdi, uint8_t *tdo, uint32_t len, bool last) */ int tx_buff_size = mpsse_get_buffer_size(); int real_len = (last) ? len - 1 : len; // if its a buffer in a big send send len - // else supress last bit -> with TMS + // else suppress last bit -> with TMS int nb_byte = real_len >> 3; // number of byte to send int nb_bit = (real_len & 0x07); // residual bits int xfer = tx_buff_size - 3; diff --git a/src/ftdispi.cpp b/src/ftdispi.cpp index 5da3621..4b086bb 100644 --- a/src/ftdispi.cpp +++ b/src/ftdispi.cpp @@ -239,7 +239,7 @@ int FtdiSpi::spi_put(uint8_t cmd, uint8_t *tx, uint8_t *rx, uint32_t len) if (tx != NULL) memcpy(jtx+1, tx, len); - /* send first alreay stored cmd, + /* send first already stored cmd, * in the same time store each byte * to next */ diff --git a/src/fx2_ll.cpp b/src/fx2_ll.cpp index 9f3164f..0ac0c6d 100644 --- a/src/fx2_ll.cpp +++ b/src/fx2_ll.cpp @@ -50,7 +50,7 @@ FX2_ll::FX2_ll(uint16_t uninit_vid, uint16_t uninit_pid, } /* try to open an already init device - * since fx2 may be not immediatly ready + * since fx2 may be not immediately ready * retry with a delay */ int timeout = 100; diff --git a/src/ihexParser.cpp b/src/ihexParser.cpp index 2bc1ff1..e4d032c 100644 --- a/src/ihexParser.cpp +++ b/src/ihexParser.cpp @@ -25,7 +25,7 @@ using namespace std; * 01 -> end of file * 02 -> extended addr * 03 -> start segment addr record - * 04 -> extented linear addr record + * 04 -> extended linear addr record * 05 -> start linear addr record */ diff --git a/src/jedParser.cpp b/src/jedParser.cpp index 67ec04e..c3f19eb 100644 --- a/src/jedParser.cpp +++ b/src/jedParser.cpp @@ -42,7 +42,7 @@ JedParser::JedParser(string filename, bool verbose): } /*! - * \brief read a line with '\r''\n' or '\n' terminaison + * \brief read a line with '\r''\n' or '\n' termination * check if last char is '\r' * \return the line without [\r]\n */