Jump to content
  • 0

Build error for CMOD A7 tutorial


BeamPower

Question


Hello,

I'm a first time user of Digilent CMOD A7 board.
PC set up as foillows:
  Windows 10 Pro (64-bit)
  Vivado v2016.4 (64-bit)
    SW Build 1733598 on Wed Dec 14 22:35:39 MST 2016
    IP Build 1731160 on Wed Dec 14 23:47:21 MST 2016
  SDK Release Version: 2016.4

I am following the tutorial: Cmod A7 - Getting Started with Microblaze
I got to step 10. Creating New Application Project in SDK
Actually 10.2
I selected the Hello World template, but when I click on Finish I get an error:

  mb-gcc.exe - Application Error
  The application was unable to start correctly (0xc0000142). Click OK to close the application.

Inside the debug window are the following lines. Maybe these will point to a possible error?

  make all
  Building file: ../src/helloworld.c
  Invoking: MicroBlaze gcc compiler
  mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -MT"src/helloworld.o" -I../../Hello_world2_bsp/microblaze_0/include -mlittle-endian -mcpu=v10.0 -mxl-soft-mul -Wl,--no-relax -MMD -MP     -MF"src/helloworld.d" -MT"src/helloworld.o" -o "src/helloworld.o" "../src/helloworld.c"
  make: *** [src/helloworld.o] Error -1073741502

I moved on to the part where I run the program in debug mode on the CMOD A7, but I get no "Hello World"  response on the serial terminal.

Also, in step 11 it says:

Make sure that the Cmod A7 is turned on and connected to the host PC via both the JTAG USB port and the UART USB port.

How do I know that these are connected properly?
When I unplug and plug in the CMOD A7 USB cord, I see the following activity on my Device Manager.

USB plug out
  Intel USB 3.0 eXtensible Host Controller
  USB Composite Device
  USB Root Hub

USB plug in
  Intel USB 3.0 eXtensible Host Controller
  USB Composite Device
  USB Composite Device
  USB Root Hub
  USB Serial Converter A
  USB Serial Converter B

And under ports, a single USB Serial Port appears.

USB Serial Port (COM6)

Should I see two ports listed here?
One for the JTAG and one for the USB?

Do these signal pass through the same cable?
Or do I need a second cable?
If a second cable is needed, how do I plug it in to the board?
The only other connectors are the PMOD connector and the 48-pin DIP connector on the bottom of the board.

 

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

BeamPower,

As Digilent supplies the demo they should also supply the assistance. Digilent and I have very different views as to what makes for a good product demo project....

If you look in the Project Vault I've supplied a few alternative demo projects for the CMOD-A7. I should point out that at least one of them requires a TTL serial UART/USB cable or breakout board because I've found that the on-board UART has issues. Fortunately, these alternate USB UART products aren't very expensive. Look at Adafruit and SparkFun to find a few varieties. I recommend that everyone ought to have at least one... and the nice thing about them is that, if you have HDL code for a UART, you can make any 2 IO pins be a UART. And Vivado hardware Manager doesn't think that it owns the interface and OSs don't detach the USB port after 30 minutes.

Link to comment
Share on other sites

In Windows 7 if I leave the Vivado Hardware Manager open after configuration and try to use the USB UART for an extended amount of time the USB device will disconnect. I've even had this happen when Vivado has been terminated. This seem to be a particular issue with Digilent boards having a similar JTAG/UART interface design.

Link to comment
Share on other sites

@BeamPower,

If your CModA7 is anything like my Arty (and, were I Digilent, I would re-use circuit designs), then what you are seeing is correct.  The FTDI chip creates two ports, but a driver on your system quietly suppresses one port and leaves you with a serial port that you can use.  The suppressed port is then used b Xilinx and Digilent tools to create a JTAG port that you can use for loading your device.

As for the problem you are seeing, it looks like either 1) there's a bug in your C code for the microblaze, or 2) the microblaze compiler isn't properly installed on your system.  I can't tell from what you are showing above.  Is there any more information you can provide?

Dan

Link to comment
Share on other sites

D@n,

You write: "The FTDI chip creates two ports, but a driver on your system quietly suppresses one port and leaves you with a serial port that you can use".

I've used the FTDI driver libraries and I take issue with that argument.

The same FTDI USB device is used for both programming and as a UART and has two enumerations in the OS, one for the JTAG and one for the UART. It's not always easy to tell from Windows Hardware Manager which is which. There are some open source utilities that are a bit better at this. CMOD-A7 users should not have worry about things at this level (once they have figured out which UART port is the correct one). Both interfaces should be available ( assuming that your configured FPGA and a working UART interface ) when needed.

FTDI has done some really stupid things to fight vendors of counterfeit "FTDI" components. They've released drivers designed to brick chips determined to be counterfeit and they've released released drivers that will create a multitude of non-existent enumerations making a headache for the user. I'm sure that neither of these relates to your problem but vendors using FTDI devices and people using products using FTDI devices should be aware.

Link to comment
Share on other sites

Hi @BeamPower,

First off, welcome to the forum!  Looking into your error I found a Xilinx forum thread here that discusses it being mismatched DLLs on windows and how to fix it. If that does not fix your issue I would look a this Xilinx forum thread here that talks about the gcc compiler being installed incorrectly. You can look at the folders paths in the forum thread to find where to look and see if any of the files are empty. 

cheers,

Jon

Link to comment
Share on other sites

Being a sucker for shiny, new products, I installed Vivado 2017.1 which includes SDK 2017.1
Does this count for making sure gcc was installed properly?
The only luck I had was to prove that the error is reproduced in the new installation.
Oh, I did check for zero sized files in both my 2016.4 and 2017.1 installations. There are none.
I also looked at the thread regarding the DLLs. There seems to be no resolution there.

Here's the output from my console:

make all

Building file: ../src/helloworld.c

Invoking: MicroBlaze gcc compiler

mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -MT"src/helloworld.o" -I../../hello_world_bsp/microblaze_0/include -mlittle-endian -mcpu=v10.0 -mxl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/helloworld.d" -MT"src/helloworld.o" -o "src/helloworld.o" "../src/helloworld.c"

make: *** [src/helloworld.o] Error -1073741502

 

On the error line it says it's a C/C++ Problem. How can it be a problem with 3 lines of code?
 

Description         Resource        Path       Location       Type
make: *** [src/helloworld.o]    Error -1073741502    hello_world    C/C++ Problem

 

 

Link to comment
Share on other sites

Thanks Dan, I'll give that a try tomorrow on my work laptop.
I went to my desktop PC at home and got good results.
Interesting to see there are three builds in that make file.
On my work laptop, the first build was unable to start,
.

22:37:39 **** Build of configuration Debug for project HelloWorld ****
make all
'Building file: ../src/helloworld.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -MT"src/helloworld.o" -I../../HelloWorld_bsp/microblaze_0/include -mlittle-endian -mcpu=v10.0 -mxl-soft-mul -Wl,--no-relax -MMD -MP -MF"src/helloworld.d" -MT"src/helloworld.o" -o "src/helloworld.o" "../src/helloworld.c"
'Finished building: ../src/helloworld.c'
' '
'Building file: ../src/platform.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -MT"src/platform.o" -I../../HelloWorld_bsp/microblaze_0/include -mlittle-endian -mcpu=v10.0 -mxl-soft-mul -Wl,--no-relax -MMD -MP -MF"src/platform.d" -MT"src/platform.o" -o "src/platform.o" "../src/platform.c"
'Finished building: ../src/platform.c'
' '
'Building target: HelloWorld.elf'
'Invoking: MicroBlaze gcc linker'
mb-gcc -Wl,-T -Wl,../src/lscript.ld -L../../HelloWorld_bsp/microblaze_0/lib -mlittle-endian -mcpu=v10.0 -mxl-soft-mul -Wl,--no-relax -o "HelloWorld.elf"  ./src/helloworld.o ./src/platform.o   -Wl,--start-group,-lxil,-lgcc,-lc,--end-group
'Finished building target: HelloWorld.elf'
' '
'Invoking: MicroBlaze Print Size'
mb-size HelloWorld.elf  |tee "HelloWorld.elf.size"
   text        data         bss         dec         hex     filename
   2916         292        3128        6336        18c0     HelloWorld.elf
'Finished building: HelloWorld.elf.size'
' '

22:37:41 Build Finished (took 2s.286ms)


I see a very subtle difference between the two.
The one that failed had two extra settings:

-ffunction-sections -fdata-sections

Would that make any difference?

 

Link to comment
Share on other sites

Hi @BeamPower,

This might be relevant: https://smallshire.org.uk/sufficientlysmall/2013/10/31/arduino-avr-gcc-eclipse-and-windows-8-1/

Open the Xilinx Software Command Line Tool for your SDK version from the Start menu. Cd into your SDK project's Debug or Release folder and try running make clean and make from there. See if it errors out. The link above describes a similar issue with the Windows build of GNU make. In any case, this is a Xilinx tool issue.

Link to comment
Share on other sites

22 hours ago, D@n said:

@BeamPower,

On that same command line, what answer does "which mb-gcc" give you?

Equivalently, can you find a mb-gcc file on your computer anywhere?

Dan

Hello Dan,
I typed in which mb-gcc on the Tcl command line and got this result.
Does this mean I have no mb-gcc?
Or at least no path to mb-gcc?
I will check for it's existence anywhere on the PC.

which mb-gcc
WARNING: [Common 17-259] Unknown Tcl command 'which mb-gcc' sending command to the OS shell for execution. It is recommended to use 'exec' to send the command to the OS shell.
C:\WinAVR-20100110\utils\bin\which.EXE: no mb-gcc in (C:/Xilinx/Vivado/2016.4/bin;C:/Xilinx/Vivado/2016.4/lib/win64.o;C:/Xilinx/Vivado/2016.4/tps/win64/jre/bin/server;C:/Xilinx/Vivado/2016.4/tps/win64/jre/bin;C:/Xilinx/SDK/2016.4/bin;C:/Xilinx/Vivado/2016.4/ids_lite/ISE/bin/nt64;C:/Xilinx/Vivado/2016.4/ids_lite/ISE/lib/nt64;C:/Xilinx/Vivado_HLS/2016.4/bin;C:\WinAVR-20100110\bin;C:\WinAVR-20100110\utils\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Python\WinPython-64bit-2.7.12.2Zero\python-2.7.12.amd64;C:\Program Files\MATLAB\R2016b\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\doxygen\bin;C:\Users\User\AppData\Local\Microsoft\WindowsApps;C:\Program Files\CMake\bin)

I found several instances of mb-gcc on the drive.
The one closest to Vivado 2016.4 is here:
    C:\Xilinx\SDK\2016.4\gnu\microblaze\nt\bin
How do I correct the path to get me there?

 

Link to comment
Share on other sites

This path is 709 characters long!

C:/Xilinx/Vivado/2016.4/bin;C:/Xilinx/Vivado/2016.4/lib/win64.o;C:/Xilinx/Vivado/2016.4/tps/win64/jre/bin/server;C:/Xilinx/Vivado/2016.4/tps/win64/jre/bin;C:/Xilinx/SDK/2016.4/bin;C:/Xilinx/Vivado/2016.4/ids_lite/ISE/bin/nt64;C:/Xilinx/Vivado/2016.4/ids_lite/ISE/lib/nt64;C:/Xilinx/Vivado_HLS/2016.4/bin;C:\WinAVR-20100110\bin;C:\WinAVR-20100110\utils\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Python\WinPython-64bit-2.7.12.2Zero\python-2.7.12.amd64;C:\Program Files\MATLAB\R2016b\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\doxygen\bin;C:\Users\User\AppData\Local\Microsoft\WindowsApps;C:\Program Files\CMake\bin

Is this path local to Xilinx?

Or is it the Windows path?

I am running Windows 10.

In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters. A local path is structured in the following order: drive letter, colon, backslash, name components separated by backslashes, and a terminating null character.

MATLAB is installed on this PC. I remember when installing MATLAB, the 260 character limit was removed.

I have also read there are ways to hack the registry to remove the 260 character limit.


 


 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...