Greenhills programming target through command line only - arm

Hi I was wondering if greenhills provided any kind of utility to allow for downloading a .elf to a target through a ghs probe through the command line only.

Your question is not very specific, but given that you are using one of the Green Hills probes, you can use the mpadmin utility:
mpadmin -update <IP-addr_of_your-probe | -usb> firmware.frm

Related

seeing output of C code in Xcode on mac

I'm using Xcode to write C code. Firstly, it took me for ages to figure out that I need to go to Product->Edit Scheme->Select Executable in order to run C executables.
I have a lot of source files and each one has a main so is there any way to run C source files by just selecting them from left-hand pane and pressing Run? Is there a simpler workflow?
Add new target and select the source file which you need and assign to this target and run.

gnuplot won't work - sh gnuplot: command not found

I am trying to use gnuplot directly from my C application under MacOSX in combination with Xcode. I downloaded the appropriate source files gnuplot_i.h and gnuplot_i.c (from here, version gnuplot_i-2.11) and included the header file. This all compiles just fine. I also checked if I had the newest version installed, which I appear to have:
[mycomputer:projectfolder]Me $ brew upgrade gnuplot
Error: gnuplot 5.0.3 already installed
In my application I just tried to use a simple example from the Documentation page (this one). The output is simply
sh: gnuplot: command not found
gnuplot_ctrl * g = gnuplot_init();
gnuplot_cmd(g, "set terminal png"); /* this outputs "sh: gnuplot: command not found" */
gnuplot_cmd(g, "set output \"/Users/Me/.../log/sine.png\"");
gnuplot_plot_equation(g, "sin(x)", "Sine wave");
gnuplot_close(g);
Does anyone have an idea, what could be the cause of the problem? I never used gnuplot before but I would love to. Right now I always need to write to a file and plot using MATLAB...
I already read some posts here and this one might have a solution, but I am not sure how to replace the path in gnuplot_cmd() or if that's possible in the first place.
Does it have something to do with the fact that I am not on a Linux machine?
Thanks in advance :)
edit gnuplot is installed here:
[mycomputer:projectfolder]Me$ brew ls gnuplot
/usr/local/Cellar/gnuplot/5.0.3/bin/gnuplot
/usr/local/Cellar/gnuplot/5.0.3/libexec/gnuplot/5.0/gnuplot_x11
/usr/local/Cellar/gnuplot/5.0.3/share/gnuplot/ (36 files)
/usr/local/Cellar/gnuplot/5.0.3/share/man/ (2 files)

Merge C program and VHDL bitstream via "make" (i.e. using a Makefile)

I am trying to test the VHDL AVR8 soft processor found on Gadget Factory on a Digilent Nexys II (Spartan 3E) Development board. The project includes a Makefile for compiling a C (or other) software program and merging it with the FPGA bitstream so there is no need to resynthesize the HDL with every iteration of the software.
When I execute 'make' I get the following error associated with data2mem:
Merging Verilog Mem file with Xilinx bitstream: main.bit
data2mem -bm bin/top_avr_core_v8_bd.bmm -bt bin/top_avr_core_v8.bit -bd main.mem -o b main.bit
process_begin: CreateProcess(NULL, data2mem -bm bin/top_avr_core_v8_bd.bmm -bt bin/top_avr_core_v8.bit -bd main.mem -o b main.bit, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [main.bit] Error 2
I am executing 'make' in the same directory containing the VHDL project files, and I even have a blank 'main.bit' file in the directory.
Does anyone have any ideas about what's going on here? Does my blank 'main.bit' file need to be formatted a certain way or placed in a different location?
The following is a link to my Makefile:
Makefile
Other information to note: I'm new to using Makefiles in general, let alone for the specific purpose of merging software with an FPGA bitstream file. Also, I am attempting this on a Windows 7 machine in command prompt.
Thanks in advance.
Edit: Here's a link to the AVR8 soft processor on Gadget Factory, and here's the AVR8 source.
Offhand I'd say make cannot invoke the data2mem program. Do you have such a program on your system? Is the directory containing it in your PATH variable? Does it run properly? For example, can you type in that command line yourself at the command prompt and have it work properly?
When you say a "blank" main.bit, I assume you mean a "fully populated except for the memory that I want to put the program into" main.bit... otherwise nothings going to work!
It sounds like you do not have data2mem on your path - are you sure you are running your makefile from a command window/shell which includes the xilinx paths?
On Windows, there is a specific icon for this. Alternatively you can open any old command prompt and run the settings32.bat (or settings64.bat) file from within the Xilinx install folder to get set up. Or on linux, you can source the appropriate .sh/.csh file in your shell.

C code to print the USB content

I am working in a UEFI environment and working with C code. To run a simple UEFI command I have to do it through C as shown below:
swprintf(
run_cmd,
wcslen(L"idrac1:\\Tools\\TCP_Recieve.efi")+wcslen(ipAddress)+1,
L"idrac1:\\Tools\\TCP_Recieve.efi %ls",
ipAddress
);
I need to know how to print the contents of the Pen Drive which is connected to my server using C code. I need something similar to 'ls' or 'dir' but for UEFI. Please help me with this.
The UEFI Shell source is available, which contains the source code for the ls command. It should give you enough information for what you need.
Download The EDKII UEFI Shell source.
Locate \ShellPkg\Library\UefiShellLevel2CommandsLib\Ls.c.

draw call graph for C source codes using cppDepend

I have a problem with using cppDepend tool. I have a source code which is written in C language and I need to draw Its dependency or call graph. cppDepend's compiler's source code extension is set to c;cpp;cxx;cc but when I want to open source codes in C, the file chooser box only let me to choose source codes in C++.
What should I do????
In Linux? Why don't you use other options? Hast to be cppDepend? Look at cflow, callgrind (my favorite), or even gperf (which outputs a callgraph in graph form!)

Resources