emfries

Members
  • Content Count

    6
  • Joined

  • Last visited

About emfries

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. emfries

    scanf timeout on ARTY

    I've set up my ARTY board to read and write strings via a UART connection to a computer. The computer makes a serial connection with ARTY. In the SKD, I use scanf to read an input to the UART line and save it as a string on ARTY. This works, but scanf will hang forever until input is provided. Is there a way to make scanf timeout? If not, is there a way (using scanf or some other feature) to check for input to the UART line and not hang if there isn't input, and then if there is input read it? For example, I'd want the loop in the following pseudocode to run at ~1s per loop, instead of hanging if there is no input to the UART line: while True: sleep one second if there is input to the UART line: read the input from the UART line and save to a string do something Thanks!
  2. Hi @jpeyron, Happy holidays and sorry for the extremely long delay in getting back to you. I had some unrelated technical issues with my computer that put me out of commission for a few weeks. Add in the holiday season and I didn't work on this for a while. I think I have solved the problem. I upgraded from Vivado 2017.2 to 2017.4 and I can now store my code in the SPI Flash. Thanks for all the help!
  3. Hello @jpeyron, I still can't get it to run on pressing PROG, but have some updates. A few changes: I noticed in your board diagram that the AXI Uartlite was connected to AXI Interconnect in port M01_AXI, and AXI Quad SPI is connected to M00_AXI. I had mine in the opposite order, so I switched the order of mine. I don't think this makes any difference but wanted to eliminate whatever differences I could find. I remade the VHDL wrapper and told Vivado not to autoupdate the wrapper I uncommented the VERBOSE definition (step 1.6, https://reference.digilentinc.com/learn/programmable-logic/tutorials/htsspisf/start) to see if I could get error/any messages. I removed the JP1 jumper so it was not shorted, and pressed PROG. This wiped the FPGA and turned the DONE LED off. Then, from the SDK and with the JP1 jumper still removed, I programmed the FPGA with hello_world.elf and ran System Debugger. I got the following output (in line 3, the hex value counted up from 00000000 to 00000103, and then the lines 4 and 5 were printed): SREC SPI Bootloader Loading SREC image from flash @ address: 00300000 Bootloader: Processed (0x)00000103 S-records Executing program starting at address: 00000000 Hello World At this point I hoped that all I needed to do was "prime the pump", so I reattached the JP1 jumper, pressed PROG to program the FPGA from the SPI, and... nothing. Then I went back to the SDK and ran System Debugger, and got the following output: SREC SPI Bootloader Loading SREC image from flash @ address: 00300000 ERROR in SREC line: 00000001SREC line is corrupted I repeated this process and got the same results. With the JP1 jumper attached, I then unplugged the Arty and plugged it back in and established a new serial connection. When I press PROG nothing happens (other than the DONE LED flashing off and back on). When I go back to the SDK, do NOT program the FPGA, and run System Debugger from the SDK I get the same error message as above. I tried the solution that the OP of this thread said worked for him, but I still get the same error message. Any thoughts on this? Thanks for all the help.
  4. Hi @jpeyron, That worked! Thanks for the help! I'll work on porting this solution to my existing project. I do have one additional question... Now when I unplug my Arty board and plug it back in, the DONE LED lights up. Then in the SDK I have to manually run "System Debugger using Debug_Hello_World.elf on Local" in order to get "Hello World" printed to my terminal. Is there a way to have my program run without manually starting it from the SDK? My goal is to plug in the Arty, establish a serial connection, and have Arty start listening for serial input, all without using Vivado or the SDK. Thanks again!
  5. Hi @jpeyron, Sorry for the delay in getting back to you. I think that I've made some progress. However, the matter is still not completely resolved. First, I think I figured out what the QSpi mode jumper is. It's the jumper on JP1, right? So when I want to program to QSPI Flash I should have the jumper installed. Second, I think I got *something* to be programmed to the QSPI flash but I'm not sure how to run it, or there is some other problem. When compressing my bitstream in "How To Store Your SDK Project in SPI Flash", during step 0.3 I added in steps 2.6 and 2.7 from "Arty Programing Guide" before selecting OK until the windows are closed. Then I finished out the "SPI Flash" tutorial. Third, the results. Now when I press the PROD button with JP1 installed, the DONE LED goes dark for < 1 second and then lights up again. When I press PROD with JP1 removed, the DONE LED turns and stays dark. Then when I reinstall JP1 and press PROD, the DONE LED turns on and stays on. However, nothing gets printed to my PuTTY terminal (I am trying to do Hello World). When I run my SDK Hello World over JTAG it works fine. Any ideas on what could be causing this? Thanks,
  6. Hello, I tried posting this on the Xilinx forums but got no response. These forums look more active and friendly so hopefully somebody can help me. I am really stuck. I am trying to follow along with the "How To Store Your SDK Project in SPI Flash" tutorial (https://reference.digilentinc.com/learn/programmable-logic/tutorials/htsspisf/start), but I cannot get it to work. I am using an Artix-7 35T Arty FPGA Evaluation Kit. I am running Vivado v2017.2 (64-bit) and SDK v2017.2 on a Windows 10 machine. First, I created a simple "Hello World" program by following the steps in the "Arty - Getting Started With Microblaze" tutorial ( https://reference.digilentinc.com/learn/programmable-logic/tutorials/arty-getting-started-with-microblaze/start). The only deviation from the instructions that I made was that after adding the MIG to the board, I added an AXI Quad SPI, with enabled port SPI_0, and then ran "Run Connection Automation". When I ran my C program on the Arty board it worked fine, and printed "Hello World" to my PuTTY terminal. I've attached my board file as both .bd and .png. Second, I tried store this "Hello World" program to the Arty's SPI Flash using the "How To Store Your SKD Project in SPI Flash" tutorial. But, it did not work. I'll walk you through what I did because there are a few things that I am confused about. Unless otherwise noted I followed the instructions exactly. Before step 0: I don't know what the QSpi mode jumper setting is referring to, so I didn't do anything. Step 1.3: I compressed my bitstream so I left FLASH_IMAGE_BASEADDR as 0xF8000000, like I found it. Steps 2.1 and 2.2: I used my "Hello World" app that I created by following the "Arty - Getting Started with Microblaze" tutorial. I couldn't place the sections into mig_7series_0 because that wasn't an option, so instead I used mig_7series_0_memaddr. Step 4.1: I used offset 0xF8000000 because that is what I used in Step 1.3. One other thing: the test says to use Arty flash type mt25ql128-spi-x1_x2_x4 (which I do), but the image of the "Program Flash Memory" window shows them using Arty flash type n25ql128-spi-x1_x2_x4. Step 5: it doesn't work. Does anyone have any suggestions? Is the SPI Flash some sort of external hardware that I need to plug into the Arty? Thanks in advance. design_1.bd