IAR Embedded Workbench: Exporting data from Terminal I/O - iar

I'm currently working on a project in IAR Embedded Workbench, and I've run into a problem that I can't seem to figure out.
I have written a program that interacts with hardware to get information from the board to perform calculations. The calculations are correct, and are being printed out to the Terminal I/O from the program.
I would like to know if it's possible to access these calculations for use in a third-party program.
We are expanding on a previous project which utilized additional hardware to send the information to a third-party program, but at this stage, it's not exactly an option.
Does IAR Embedded Workbench store this information somewhere, or are there settings I can reconfigure to allow for exporting data?

If you use the full DLIB library, and you run the application in the C-SPY debugger, you can use 'fopen', 'fprintf' and friends to write to a file on the host machine.
This work both when using the IDE or when running in batch mode using 'cspybat'.

Related

MicroBlaze without Vitis

Has anyone managed to connect a MicroBlaze instantiated in a Xilinx FPGA to anything other than the Xilinx tools (SDK or Vitis) for download and debugging?
I'm targeting a VCU29 and have licenses from Xilinx for Vivado etc; I have already extracted the libraries, source and GCC tools and constructed a makefile that will build my applications.
I'm resigned to using Vitis to load the initial bitfile but would really like to download the code and operate the JTAG from a tool that better matches SW development flow - Eclipse with OpenOCD? Perhaps over the built-in USB->Serial->JTAG interface? I believe I'd be content with just the interface offered through GDB.
I'd really like to know if anyone has tried this with either success or failure or maybe has one of those "Why don't you just..." lateral thinking ways of solving the problem.
Yes, my team does not use Vitis or SDK to build, deploy, or connect to MicroBlazes.
If you generate your BSP and a linker script with Vitis, you can then build using mb-gcc and link with mb-ld directly. To get these into your PATH, just source the settings script that Xilinx provides with their tools in <Vitis_root>/settings64.sh.
As for loading and debugging - if you source the same script, then you will have access to xsdb. Once you have XVC running (i.e. connecting to your board with Vivado HW manager), then you can launch xsdb and inside run connect or connect -xvc-url <host>::<port> if you are running on a different host. While connected, you can run targets to identify your MicroBlaze, and then select the MicroBlaze with target 5.
While you have the MicroBlaze selected, you can load <path to elf> and run a number of debugging commands. Just run help while connected to see your options.

Need ideas for automating on-chip testing on Cortex-M4 using gdb and semihosting

I'm working on safety-critical software that requires extensive testing. The target processor, a Cortex-M4, has rich resources for the application but the unit and integration tests, if aggregated, would be much larger than the on-board FLASH/RAM. They are designed to be run from gdb while using semi-hosting to off-load the test results. What's needed is a way to automate the testing so it can be run without per-test human intervention.
The test programs run fine from Eclipse using both OpenOCD and Segger debugger front-ends. These require per-test configurations and then manual starting of the tests. There will be 30-50 test programs so this isn't really viable for continuous integration or simple batch runs.
I've been looking around for possible ways to do this. There are a few tricky bits to consider. The first is supporting the semihosting of the output. That uses the breakpoint system to have the I/O from the host. In this use, a couple of files get opened on the host computer for logs. Another issue is ending the program being tested and loading the next. The programs can take a long time to run and drop into an infinite loop when the main() is exited. And the development platform is Windows 10.
The two basic ideas I've had are to use the gdb client library from cygwin to create a custom program or to use OpenOCD. Running through multiple tests could be done inside the application or from a Makefile.
Question: is the semihosting done in the gdb client or server?
So... Looking for some suggestions or experiences in creating what I picture as a custom gdb client in Win10.

How to debug a crash of a windows c++ app on a target machine without installing debug software

I've created an app with a C++ backend and a HTML-based frontend. I've also created a setup file by using Inno setup including all the needed DLLs and other files. I've tested in several different machines, virtual and real ones, in order to check its consistency. I've also given it to different people as well to test it.
In one of these cases, however, the app crashed. I also have created a C++ logger, but unfortunately didn't give any additional valuable info.
I assumed that it may have to do with Windows permission issues, so I created different C++ executables by changing the manifest file in Visual Studio, but no luck.
As far as I know, in order to deal with these kind of situations, one either uses the remote debugger of Visual Studio on the host machine, or use Windbg on the target machine, but these two ways require either network access to the target machine or knowledge of Windows debugging from the end user.
I'd like to know what one can do if there is no network access and the end user is not capable of debugging even by following instructions. Is there a way, either by C++ or through Windows, to generate a crash dump file that can be used afterwards for debugging?

Mingw windowsXP application corefile (.dmp) debugging tool

For an application written on C++ and compiled/built on mingw, I am facing issues in core file analysis. I have my application built/run on XP machine.
How do we save core file generated in the test bed of Windows XP? The application is delivered to user/test engineer and if the "users" gets the crash - how to save the crash file and send it across?
Can you suggest the best available debugger for this kind of set-up? I did go through Windbg32, coredumper.exe etc - but these depends on specific VC generated symbol file. And mingw used application cannot be used in lieu with Wingdb32.
Is there any specific compilation flag I need to use on mingw during application building - so that I can read all symbols from the core file - during the analysis.
Thanks in advance for advice. Any link on these material also would help a lot.

Apply VST audio effect/plugin to audio-file

This is my first question after leeching over here for some time.. So spare me.
I need to apply the iZotope Vinyl VST effect to some audio files via CLI or C++ (so language doesn't really matter), it has to work on a Mac or on a Unix based system. I've researched all over the webs and can't find any working solution.
I've tried using MissWatson, a command line utility, this works but my result audio files are silent...
./MissWatson -plugin=Vinyl -input-file="/Users/Sjaq/Desktop/test.wav" -output-file="/Users/Sjaq/Downloads/MissWatson-v1.0-mac/res.wav" -parameter=1:0.6,2:0.6,11:0.4
Then I tried using the Steinberg VST SDK by creating a host application, starting from the vstvalidator provided by the SDK. But when I try to load the VST I get this error:
2010-12-01 16:57:40.774 vstvalidator[4654:903] Error loading /Library/Audio/Plug-Ins/VST/Vinyl.vst/Contents/MacOS/Vinyl: dlopen(/Library/Audio/Plug-Ins/VST/Vinyl.vst/Contents/MacOS/Vinyl, 262): no suitable image found. Did find:
/Library/Audio/Plug-Ins/VST/Vinyl.vst/Contents/MacOS/Vinyl: no matching architecture in universal wrapper
And I don't know what to do. I'm pretty new to C++ and and made a few apps without any issues, but this time I've hit a dead end.
I've read about pyvst but it seems to need a DLL for the VST so that didn't work either.
I'm the author of MissWatson, and as you probably noticed on the webpage, I unfortunately was required to close-source the code, so I can't really ask you for more diagnostic information, since I wouldn't be able to patch MissWatson if it's a bug there. However, I would recommend running MissWatson with the -verbose switch and perhaps logging that output to file if that floods your terminal. You might find something in that output which helps you to diagnose the problem.
Anyways, as for the error in your VST host, I have a feeling that you are compiling your app as a 64-bit executable and trying to load a 32-bit plugin. Since hardly any VST/AU plugins (and also sequencers, for that matter) have made the leap to 64-bit, you'd be better off just compiling your app as a 32-bit x86 binary.
By default, the "debug" configuration in Xcode only builds your app for the native architecture of your machine to save time during compilation. I would advise that you disable this feature in your project's build settings and always build with the architectures you plan to ship with. This will prevent weird cross-architecture types of errors like the one you saw above.
Edit: I have since started a new command-line VST host to replace MissWatson which is called MrsWatson. You should try using this tool instead.
Perhaps you can port the source code of this open source vst host to match your platforms?
http://www.hermannseib.com/english/vsthost.htm
Scroll down to the bottom of the page.
Hope it helps.