title: Connecting SmartFusion board to a Mac or Linux
body: <p>I am currently trying to connect my smartfusion to my Mac computer.  I have hooked up an FTDI chip to the SmartFusion and connected it via USB to my computer.  I was under the impression that I could just open a file descriptor in the <code>/dev</code> directory and read and write to it to send messages.  Is this not the case?  I have tried going into the <code>/dev</code> directory but I cannot seem to be able to execute <code>cat</code> on either of the devices that have the string <code>usb</code> in them.  I get garbage when I execute <code>cat</code> on one of them and get nothing on the other.</p>
  
  <p>I tried using screen with the following command</p>
  
  <pre><code>screen &lt;name_with_usb in /dev&gt; 9600
  </code></pre>
  
  <p>but that outputted garbage as well</p>
  
  <p>I have also tried to write the following C++ program that uses the FTDI drivers to try and open a connection with the FTDI chip.  I installed these drivers using the command below</p>
  
  <pre><code>brew install libftdi
  </code></pre>
  
  <p>And this is the program</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;ftdi.h&gt;
  using namespace std;
  
  int main() {
  
      struct ftdi_context ftdi;
      ftdi_init(&amp;ftdi);
      if (ftdi_usb_open(&amp;ftdi, 0x0403, 0x6001) &lt; 0) {
          cerr &lt;&lt; "Can't open FTDI device\n";
          return -1;
      }
  
  
      cout &lt;&lt; "Hello World" &lt;&lt; endl;
  
      return 0;
  }
  </code></pre>
  
  <p>Compiled with the following command </p>
  
  <pre><code>g++ -std=c++14 -I /usr/local/Cellar/libftdi/1.2/include/libftdi1/ -L /usr/local/Cellar/libftdi/1.2/lib/ -l ftdi1 reader_test.cpp -o reader
  </code></pre>
  
  <p><em>NOTE</em> I am constantly sending strings over UART to the FTDI chip that is connected to my laptop.</p>
  
  <p>If someone has any suggestion that could be helpful I would be really grateful!  I require this as soon as possible!</p>