Bullseye for EDK Based Application - code-coverage

Is there any way to integrate EDK2 based application to come into Bulls Eye Code Coverage tool? The executable will be having .efi extension, and it open's only in EFI shell. I believe, i also need to develop an driver to capture the coverage data into external disk for analysis, as the application will be valid only in the EFI Shell(BIOS).
So, does anyone have any idea, on how it can be done, for overall EFI Applications?
Thanks,
Pramod

These are the steps I took to integrate Bullseye into EDK2 (after installing Bullseye following the instruction on the website):
Use the /run/libcov-printf.c and replace the "printf" with "AsciiPrint".
Copy all the files from /run/ to your EDK $WORKSPACE
Create library .inf file and add libcov-printf.c to its [Source] section
Add library instance to your platform .dsc file (MdeModulePkg.dsc probably)
Add library reference to your application .inf file under [LibraryClass]
Add cov_dumpData() in your application source code (usually at its exit point).
compile using EDK2 build
You'll end up with an efi binary that you can run on your target and get the measurements once the application reaches its exit point.
The output data can be redirected to a file (using the > directive inside EDK2 shell) and then be processed by covpost to be merged into the cov file created in the build process.

Well I don't know how EFI works. However bullseye coverage support the customization. When I worked for the embedded system. I created open/read/write functions to write the coverage data not to the file but to the serial cable and I created the host application to interprete the data sent from serial cable and save them into cov file. I'm not sure if this works on your case well. However you can start from the following link.
http://www.bullseye.com/help/env-embedded.html

Related

How does AOSP build system produce .rsp files and how to get them?

According to How does AOSP 9.0 build system link the executable? and What does # mean in this clang command in AOSP build log? , when linking a module, AOSP seems to produce a .rsp file that contains all the obj files that the module need,and pass the file name as a parameter to the link command, for example:
prebuilts/clang/host/linux-x86/clang-4691093/bin/clang++ /OpenSource/Build/Android/9.0.0_r30/soong/.intermediates/bionic/libc/crtbegin_so/android_x86_64_core/crtbegin_so.o #/OpenSource/Build/Android/9.0.0_r30/soong/.intermediates/frameworks/base/libs/hwui/libhwui/android_x86_64_core_shared/libhwui.so.rsp ......
But the .rsp files seems to be removed after build.
The question is, how are these file generated and how to get these files? This may require to learn and modify the build scripts which is out of reach for me.
There maybe the answer for you, read the ninja build manual , in that manual .rsp file mentioned.
https://ninja-build.org/manual.html
the following is info that I copy out.
rspfile, rspfile_content
if present (both), Ninja will use a response file for the given command, i.e. write the selected string (rspfile_content) to the given file (rspfile) before calling the command and delete the file after successful execution of the command.
This is particularly useful on Windows OS, where the maximal length of a command line is limited and response files must be used instead.

Unable to run 'tcl' file on Vivado 2016.4 version

I am trying to run a .tcl file originally configured for 2014.4 on 2016.4 version of Vivado. However I am getting the following error:
while executing
"create_bd_cell -type ip -vlnv xilinx.com:ip:mig mig_0 "
(procedure "create_root_design" line 111)
invoked from within
"create_root_design """
(file "all.tcl" line 405)
The tcl file uses the part 'xcku040-ffva1156-2' and tries to access the IP 'mig' which I believe is renamed/changed on later versions. Is there any workaround for this?
Steps I have done till now:
Changed the version number to 2016.4
tried replacing target boards.
tried on the same board with an alternate IP for mig.
tried on both 2016.4 and 2015.4 versions
None of these have worked so far
Attaching the '.tcl' file for reference : all.tcl
Since with every version upgrade of the Vivado Design Suite, parts are renamed or removed, it is not possible to run a .tcl file meant for an earlier version in newer releases. So I ran the above query on Xilinx Community Forums and found a workaround:
Run this script on the previous version(2014 in this case), generate the design and then open the same design using the next major release(2015 version). The 2015 version will automatically suggest upgrades to the discontinued/renamed IPs. Repeat the same to get to 2016 version. That's the only way to get this done. Also have to keep checking if the core functionality of the IP is the same after automated upgrades by Vivado Design Suite.

vxWorks 6.9 Driver Development

I am dipping my toes in VxWorks driver development. My problem is that in my Kernel Configuration settings, I can search for my driver-component, but it is always greyed out and will not let me include it. When I right click it and select "check" it says "Undefined reference mydriver.o"
I read through the vxBus driver developer documentation and decided that I would test out the development flow by taking an already-existing/functioning driver and simply modify the file-name/function-name/print strings. I copied and modified the existing *.c, *.h, *.cdf, *.dc, *.dr as appropriate.
I also played around with putting the driver source files in the target/3rdparty directory as done for the "wrsample" driver.
I also tried to just throw in the correct #define statement in my config.h file to try and force the driver to be instantiated, but no luck.
Can anyone provide any help? It seems like I need to pre-build the driver source to generate a *.o file, but I'm not sure how to do this. I could not find a *.o file for the existing-driver that I modified...
Figured it out on my own. I did have to create a makefile and compile the source (in advance...before utilizing the driver in vxWorks). I used the makefile that was auto generated for my WindRiver Tornado as a template to create my driver makefile. I then created a batch file that calls the vxWorks make.
The reason that there was no object file for the existing driver is because the objects get added to the driver library (*.a) and not just a *.o.
All driver files exist in the target/3rdparty directory, but I did have to copy the *.cdf, and the *.h files into other directories to get it to work. I made this a step in my batch file.

Error while running pub deploy: Cannot read link

I'm trying to run pub deploy command in my Dart project, but it always ends with this error: "Pub deploy failed, [1] Cannot read link". No more information outputs into console.
I tried to run it in basic Dart browser project (the one with text reversing), but same error occurred again.
Did anyone have same problem? Any ideas how to fix it?
I have the same issue.
In my case, the Dart project is stored in NTFS hard drive (I share it with Windows OS) and Dart deploy (run from Eclipse) runs on Ubuntu.
Simply move the Dart project to Ubuntu hard drive then things come back to normal.
GS
This is probably a problem with the packages symlinks. If you delete them and run pub install it should work again.
According to dart-sdk/lib/io/link.dart:
On the Windows platform, the link will be created as a Junction
On other platforms, the posix symlink() call is used to make a symbolic link
On Linux platforms, storing Dart project in NTFS drive causes Pub to fail. Because posix symlink() is used on NTFS partition and doesn't create a valid NTFS junction point.
The solution is to move the project folder to a partition that uses posix symlinks natively, such as one formatted to ext4.

Compiling an .SWF using Action Script Files

This may be somewhat trivial, but I am attempting to work on an Action Script / Flash project and need to make some changes to it and attempt to rebuild the .SWF file associated with it.
The project itself is fairly straightforward and is available on github here It is jwagener's recorder.js, which consists of several Action Script files and a single compiled .SWF file.
I am not terribly familiar with the build process for Action Scripts and I am sure that I have all of the necessary tools (Flash Builder, Adobe Flash Professional etc.) but I am not sure about how to go about it.
I've attempted to simply create a new ActionScript project and add all of the necessary ActionScript files from his repository, but upon building the .SWF it didn't function at all and lacked all of the External Interface elements that I need to use.
Any ideas, walk-throughs, or tutorials that would point me in the right direction would be extraordinarily helpful.
The project you want to compile actually includes a Make file.
MXMLC = "/Applications/Adobe Flash Builder 4.5/sdks/4.5.0/bin/mxmlc"
build:
$(MXMLC) -debug=false -static-link-runtime-shared-libraries=true -optimize=true -o recorder.swf -file-specs flash/FlashRecorder.as
clean:
rm recorder.swf
It looks setup for osx, but you get the idea.
If you only need to do minor changes and could do without an IDE that shows error/warnings/etc. you can do this:
Download the FlexSDK
Setup an environment variable so you can access the mxmlc compiler from anywhere on your system
Navigate to your project and compile from the command line
Step 1 is trivial.
Step 2 depends on your os a bit. On Windows should be something like My Computer > Properties > Advanced > Environment variables (I remember this is on XP, should still be somewhere on the Computer Properties properties on Windows 7) and add to the PATH variable the location of the FlexSDK's bin folder. On unix you should add something like this to either ~/.profile or ~/.bash_profile : export PATH=/your/path/to/FlexSDK/bin:$PATH
At this you should be able to run mxmlc -version from the command line
Step 3 means navigating to the project and running:
mxmlc -warnings=false -debug=false -static-link-runtime-shared-libraries=true -optimize=true -o recorder.swf -file-specs flash/FlashRecorder.as
So that's the command line option in a nutshell.
If you have a bit more editing to do you can use an IDE.
If you're on Windows I warmly recommend FlashDevelop: it's fast/lightweight/free/opensource. It downloads the sdk and setups everything for you.
If you're on OSX you can use FDT 5 Free or a trial version of Flash Builder(60 days by default) or setup TextMate with the actionscript 3 bundle.

Resources