JTAG flashing problems
NewHome › Forums › OSSC, OSSC Pro and DExx-vd isl › OSSC – DIY & Repair Support › JTAG flashing problems
- This topic has 9 replies, 4 voices, and was last updated February 27, 2018 at 10:51 PM by renegadeandy.
-
AuthorPosts
-
December 31, 2017 at 6:31 PM #18275
Hi all,
I have bought a USB Blaster (this one to be precise https://www.amazon.co.uk/gp/product/B00DQ6Y196/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1)
1/I turn on my OSSC, so it is on the screen which displays the test signal / version of the software.
2/Plug in the JTAG connector, and open the programmer in Quartus Prime Free Edition 17.1
3/I select the USB Blaster from the hardware screen, and click the start button.In the system console output I see:
209060 Started Programmer operation at Sun Dec 31 17:16:57 2017
209040 Can’t access JTAG chain
209012 Operation Failed
209061 Ended Programmer operation at Sun Dec 31 17:17:27 2017This happens repeatedly, it looks like a 30 seconds timeout is happening, not sure why.
I have checked JTAG bins 2+4 and get 2.5v across them on the OSSC board when powered.
What else could be causing this, I have looked at the quartus article on the Can’t access JTAG Chain error, but it has not helped me debug why this is occurring.
Many thanks!
January 1, 2018 at 1:54 AM #18281As far as i know (and experienced first hand):
Some (or maybe most) USB-Blaster compatible programmers and USB-Blaster clones have problems working with the latest Quartus Prime versions… sometimes resulting in the programmer not working correctly with the accompanied driver or even in a bluescreens after installing the driver that came with Quartus Prime.I did manage to get the most stable results with the fairly old Quartus Prime version 13.1.0 build 162 and its driver:
So i would suggest to give this version a try.
January 1, 2018 at 12:21 PM #18287Hi,
As far as I can see this version of Quartus Prime is just the Signal Tap Logic Analyzer, is that the equivalent of the Quartus Prime Lite Edition 17.1 I had downloaded?
I am also running this under Ubuntu, so I could try an older version there I suppose.
January 1, 2018 at 12:25 PM #18288When it didn’t work for you – did you get the same error I did?
January 1, 2018 at 3:52 PM #18289As far as I can see this version of Quartus Prime is just the Signal Tap Logic Analyzer, is that the equivalent of the Quartus Prime Lite Edition 17.1 I had downloaded?
It is. The installer contains Quartus SignalTap (quartus_stpw.exe) and the Quartus Programmer software (quartus_pgmw.exe). You can find the USB-Blaster drivers under the qprogrammer\drivers subfolder of your installation folder.
When it didn’t work for you – did you get the same error I did?
It happened with my first OSSC 1.5 build – so it’s been a while and i don’t remember the exact error code. I only remember trying different (newer) versions, since some versions always gave me an “Can’t access JTAG chain” error message, some resulting in a bluscreen while trying to flash the firmware and others would not recognize my USB-Blaster clone (because the included driver could not initialize properly).
I thought that it could be a problem with my system, so i tried flashing the firmware with an older PC. But since it only had Windows XP installed i had to find an even older version of the programmer software, which would run under XP. That’s why i ended up with v13.1… and it worked like a treat.
Then i thought by myself: maybe the software is the problem and not my system. So i installed v13.1 on my new system too and it also worked. After that i tried to use the older driver with a new programmer software version… but this always resulted in an error message. So i stayed with v13.1 since it worked as it should.January 6, 2018 at 9:50 PM #18379Hi,
Ok thanks for your help – got the JTAG working.
Now my question is…..if i make a change in say software/sys_controller/ossc/av_controller.c, what steps do I need to do to compile this change into the firmware which I will flash to my device?
I have done:
1/Make coding change
2/Go into Quartus Prime and select Start Compilation
3/Compilation completes, open programmer and flashDoing this — I do not see my coding change taking place. I feel like perhaps I need to compile the C software. I have seen there is a makefile in the software dir, however when I run make on this, I get the following error – suggesting that Quartus Prime does indeed handle the compilation of the c source….any thoughts?
———
make
Info: Building ../sys_controller_bsp/
make –no-print-directory -C ../sys_controller_bsp/
Makefile not up to date.
../../sys.sopcinfo has been modified since the BSP was generated.Generate the BSP to update the Makefile, and then build again.
To generate from Eclipse:
1. Right-click the BSP project.
2. In the Nios II Menu, click Generate BSP.To generate from the command line:
nios2-bsp-generate-files –settings=<settings file> –bsp-dir=<target bsp files directory>make[1]: *** [public.mk] Error 1
make: *** [../sys_controller_bsp/-recurs-make-lib] Error 2
—————January 10, 2018 at 3:16 PM #18462Quartus Prime does not handle c compilation. You can use the Eclipse tools for building the firmware or any other c project management tool. marqs85 e.g. uses Codelite and provides workspaces for that.
Interaction workflow between hardware and software is:
– hardware provides NIOS2 softcore and BRAM for the program
– program is initialized with content which has to be generated with nios2eds tools (default location is software/sys_controller/mem_init/sys_onchip_memory2_0.hex) <- this is needed to see your changes if you reinitialize the FPGA
– in runtime you can download new NIOS2 programs (default location is software/sys_controller/sys_controller.elf) to the NIOS2 core with nios2-download -g –accept-bad-sysid sys_controller.elfSome links regarding this:
https://github.com/marqs85/ossc/issues/2
https://github.com/marqs85/ossc#building-software-imageFebruary 26, 2018 at 7:51 PM #19609Thanks for your help borti, moving forward now.
I am now almost getting the project compiled by using the codelite workspace. Near the end of the makefile, it tries to run:
#ifneq ($(DISABLE_STACKREPORT),1) # @bash -c "$(STACKREPORT) $@" #endif
(Note i had to comment it out). If left uncommented, I get :
"/usr/bin/bash: nios2-stackreport: command not found"
The /intelFPGA_lite/17.1/nios2eds/bin/ directory with file nios2-stackreport is on my path, but maybe appears to be a perl script, perl is also on my path! Any ideas?
February 27, 2018 at 1:14 AM #19624Is “…/nios2eds/bin” as part of $PATH in your bash environment?
February 27, 2018 at 10:51 PM #19665Yes…!
-
AuthorPosts
- You must be logged in to reply to this topic.