Giter Site home page Giter Site logo

windycitysdr / cypress-fx3-sdk-linux Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nickdademo/cypress-fx3-sdk-linux

0.0 3.0 0.0 53.96 MB

Cypress FX3S SDK v1.3.1 configured to build from the firmware sources. Eclipse integration of device flashing also included.

C++ 32.54% C 55.96% Assembly 0.65% Makefile 0.16% Shell 0.27% Perl 0.77% Scala 0.35% JavaScript 3.31% Ruby 2.15% PHP 1.23% Objective-C 2.31% Python 0.19% Logos 0.04% XC 0.04% CSS 0.02% Groovy 0.01%

cypress-fx3-sdk-linux's Introduction

cypress-fx3-sdk-linux

##1. Install Eclipse & Eclipse C/C++ Development Tools $ sudo apt-get install eclipse eclipse-cdt

##2. Install GNU ARM Eclipse Plug-in The recommended way to install this plug-in is to use the Eclipse standard install/update mechanism:

  1. Start Eclipse (from Terminal):
    $ eclipse &
  2. Eclipse menu: Help->Install New Software
  3. In the Install window, click the "Add..." button (for future updates, you will be able to select the URL from the dropdown)
  4. Fill in Location: http://gnuarmeclipse.sourceforge.net/updates
  5. Click the "OK" button
  6. Normally the main window should list a group named "GNU ARM C/C++ Cross Development Tools" - expand it.
  7. Select "GNU ARM C/C++ Development Support"
  8. Click the Next button
  9. Accept the unsigned plug-in and install

Note: As we saved the update site URL in Step 3, further updates are greatly simplified via: Help->Check For Updates

##3. Setup Eclipse

  1. Add the following lines to the end of ~/.bashrc using a text editor (so Eclipse knows where our project and toolchain will be located):
    export FX3_INSTALL_PATH=$HOME/workspace/cypress-fx3-sdk-linux
    export PATH="$PATH:$FX3_INSTALL_PATH/util/arm-2011.03/bin"
    export ARMGCC_INSTALL_PATH=$FX3_INSTALL_PATH/util/arm-2011.03
    export ARMGCC_VERSION=4.5.2
  2. Start Eclipse (from a fresh instance of Terminal):
    $ eclipse &
  3. Use the default workspace path when prompted (i.e. ~/workspace)
  4. Clone this repository to the Eclipse workspace folder:
    $ cd ~/workspace
    $ git clone https://github.com/nickdademo/cypress-fx3-sdk-linux.git
  5. Compile the included elf2img tool:
    $ cd ~/workspace/cypress-fx3-sdk-linux/util/elf2img
    $ gcc elf2img.c -o elf2img -Wall
  6. Import the projects you require into Eclipse: File->Import->General->Existing Project into Workspace - select cypress-fx3-sdk-linux/firmware as the root directory.
    Note 1: Ensure you DO NOT import the cyu3lpp project.
    Note 2: Import CyStorBootWriter if you will be writing firmware to FX3S Storage Port 0.
  7. Also import the following TWO (2) projects located in the "FX3_SDK_1_3_1_SRC" folder in the top-level directory:
    boot_fw
    sdk
  8. Build the entire project workspace: Project->Build All

##4. Flashing ###A. Flashing the Device (using CyUSB Suite for Linux)

  1. Install dependencies:
    $ sudo apt-get install libqt4-dev qt4-qmake libusb-1.0-0-dev
  2. Compile and install CyUSB Suite and Cypress USB library:
    $ cd ~/workspace/cypress-fx3-sdk-linux/util/cyusb_linux_1.0.4/
    $ sudo ./install.sh
  3. Restart system
  4. Run CyUSB Suite for Linux with the following command in Terminal:
    $ cyusb_linux

###B. Flashing the Device (using Cypress command line tools through Eclipse)

  1. Install dependencies:
    $ sudo apt-get install libusb-1.0-0-dev g++
  2. Compile and install Cypress USB library (if not already installed in Step 4A):
    $ cd ~/workspace/cypress-fx3-sdk-linux/util/cyusb_linux_1.0.4/
    $ sudo ./install_lib.sh
  3. Compile cyusb_linux_1.0.4 command-line tools:
    $ cd ~/workspace/cypress-fx3-sdk-linux/util/cyusb_linux_1.0.4/src/
    $ make
  4. Compile cyfwstorprog tool (for flashing to SD/eMMC):
    $ cd ~/workspace/cypress-fx3-sdk-linux/util/cyfwstorprog_linux/
    $ make
  5. Make cyfwstorprog tool run WITHOUT a sudo password prompt in Eclipse:
    $ sudo gedit /etc/sudoers
    Add the following to the end of the sudoers file (replace YOUR_USERNAME with your own and ensure the path to the tool is correct):
    YOUR_USERNAME ALL = (ALL) ALL
    YOUR_USERNAME ALL = (root) NOPASSWD: /home/YOUR_USERNAME/workspace/cypress-fx3-sdk-linux/util/cyfwstorprog_linux/cyfwstorprog
  6. Create a .launches directory in the Eclipse workspace:
    $ mkdir -p ~/workspace/.metadata/.plugins/org.eclipse.debug.core/.launches
  7. Copy Eclipse launch files to appropriate folder:
    $ cp ~/workspace/cypress-fx3-sdk-linux/util/eclipse_launches/*.launch ~/workspace/.metadata/.plugins/org.eclipse.debug.core/.launches/
  8. Restart system
  9. Start Eclipse and program the FX3 using the External Tools menu! (Note: You may have to add the launches as favourites via "Organize Favourites" to make them visible).

IMPORTANT: The CyStorBootWriter project must be compiled and flashed to the FX3S RAM before attempting to use the cyfwstorprog tool to write firmware to the SD/eMMC.

The source for the cyfwstorprog tool can be found at https://github.com/nickdademo/cyfwstorprog_linux

##Notes

Eclipse Build Configurations

Fx3BootAppGcc:
Debug: Optimization level = OPTIMIZE MOST (O3)
Release: Optimization level = OPTIMIZE MORE (O2)

boot_fw:
Default: Optimization level = OPTIMIZE (O1)

sdk:
Debug: Optimization level = NONE (O0)
Release: Optimization level = OPTIMIZE (O1)

All other projects:
Debug: Optimization level = NONE (O0)
Release: Optimization level = OPTIMIZE MORE (O2)

Project Dependencies

In order for required libraries (.a files) to exist when they are required during building of certain projects, the build order of Eclipse projects is set via the "Project References" project option:
Fx3BootAppGcc: References "boot_fw"
boot_fw: No references
sdk: No references
All other projects: References "sdk"

cypress-fx3-sdk-linux's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.