{"id":457,"date":"2011-07-02T10:45:08","date_gmt":"2011-07-02T15:45:08","guid":{"rendered":"http:\/\/bardagjy.com\/?p=457"},"modified":"2011-07-12T17:31:50","modified_gmt":"2011-07-12T22:31:50","slug":"cypress-fx2-on-osx","status":"publish","type":"post","link":"https:\/\/bardagjy.com\/?p=457","title":{"rendered":"Cypress FX2 on OSX"},"content":{"rendered":"<p>Getting <a href=\"http:\/\/www.circuitben.net\/node\/34\">Ben&#8217;s<\/a> (derivative of <a href=\"http:\/\/oscar.dcarr.org\/ssrp\/index.php\">David&#8217;s<\/a>) SSRP to work under OSX with modern GNU radio libraries, and have a few notes.<\/p>\n<p>To build firmware for FX2 chips &#8211; which are 8051 cores, you need SDCC. I got it from MacPorts.<br \/>\n<code><br \/>\nsudo port install sdcc<br \/>\n<\/code><\/p>\n<p>To program FX2 parts on Linux, use fxload, a part of the Linux hotplug project. This unfortunately does not exist under OSX. Thankfully, it was ported to OSX as part of <a href=\"https:\/\/github.com\/nall\/nexys2-osx\">Nall&#8217;s nexys2-osx project<\/a> on github, a project that I&#8217;ll be revisiting while I am getting my FPGA stuff up and running. <\/p>\n<p>The fxload-osx project built nicely with the xcodebuild command in the fxload-osx directory. The binaries are hiding in build\/Release. I then softlinked the binary to \/usr\/local\/bin &#8211; because aliased commands do not appear in non-interactive shells such as the environment that Makefiles use.<br \/>\n<code><br \/>\ngit clone https:\/\/github.com\/nall\/nexys2-osx.git<br \/>\ncd nexys2-osx<br \/>\nxcodebuild<br \/>\nln -s build\/Release\/fxload-osx \/usr\/local\/bin\/fxload<br \/>\n<\/code><\/p>\n<p>To check how the device has enumerated to the operating system, use the built in utility, system_profiler with the flag SPUSBDataType. Cypress parts default to: Product ID 0x8613 and Vendor ID 0x04b4.<br \/>\n<code><br \/>\nsystem_profiler SPUSBDataType<br \/>\n<\/code> <\/p>\n<p>To flash the firmware without programming the eeprom, one can simply use the fxload utility (where your firmware is fw.ihx).<br \/>\n<code><br \/>\nfxload -v -t fx2 -D 04b4:8613 -I fw.ihx<br \/>\n<\/code> <\/p>\n<p>Now, here&#8217;s where it gets weird&#8230; To put the firmware in an eeprom attached to the FX2, one needs a &#8220;second stage loader&#8221; to flash the eeprom. The Linux Hotplug Project thankfully distributes a second stage loader as a3load.hex, and Linear distributes a second stage loader Vend_Ax.hex. I have not successfully flashed attached eeprom under osx. When I get it working, I&#8217;ll report back.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Getting Ben&#8217;s (derivative of David&#8217;s) SSRP to work under OSX with modern GNU radio libraries, and have a few notes. To build firmware for FX2 chips &#8211; which are 8051 cores, you need SDCC. I got it from MacPorts. sudo port install sdcc To program FX2 parts on Linux, use fxload, a part of the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":465,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[8,19],"tags":[40,21,41,42],"_links":{"self":[{"href":"https:\/\/bardagjy.com\/index.php?rest_route=\/wp\/v2\/posts\/457"}],"collection":[{"href":"https:\/\/bardagjy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bardagjy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bardagjy.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bardagjy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=457"}],"version-history":[{"count":10,"href":"https:\/\/bardagjy.com\/index.php?rest_route=\/wp\/v2\/posts\/457\/revisions"}],"predecessor-version":[{"id":467,"href":"https:\/\/bardagjy.com\/index.php?rest_route=\/wp\/v2\/posts\/457\/revisions\/467"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bardagjy.com\/index.php?rest_route=\/wp\/v2\/media\/465"}],"wp:attachment":[{"href":"https:\/\/bardagjy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bardagjy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bardagjy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}