How to generate "platform.h" in a Xilinx SDK Project? - xilinx

I'm currently working on a Zynq-7000 Software project using Xilinx SDK toolchain.
I've noticed that nearly all of Xilinx's Demo projects automatically generate a "platform.h" file. However, when I start from an empty project in the SDK IDE it never generates "platform.h". This normally this would not be a problem, however, I want to cut and paste code from the "demo" project into my empty application project, and I can't do this because the "demo" projects rely on the "platform.h" header file. (I could create the demo project and delete every file from it, except platform.h, except this solution doesn't work because I need to modify the hardware away from the defaults with a custom FPGA image.)
What's the secret to get Xilinx SDK to auto-generate the "platform.h" file for an empty SDK Application?
For instance, is there an obscure checkbox that I need to click somewhere in the Board Support Package Project that says generate "platform.h"? or something like that? no idea...

It turns out that "platform.h" and "platform.c" are just normal c-code that are part of the Xilinx demo project. This code is not generated automatically generated as part of the Board Support Package. Thus, you can simply cut and paste these files into your new project without causing any problems. This is why an empty Application project doesn't contain these files.
The reason why they called it "platform.h" was just to hide the API differences between different Xilinx CPU types. Thus, the same demo code compiles on multiple platforms.
If you are like me an only using the Zynq-7000 platform, you can simply delete everything else in the platform files that's not related to Zynq-7000.

Related

27MB IPA with just GStreamer iOS Framework... how do I make much smaller?

I'm very interested in using GStreamer's iOS framework http://docs.gstreamer.com/display/GstSDK/Installing+for+iOS+development for video streaming, but when I add the framework to a blank project and add a few lines of code to take advantage of its powerful features, the final IPA is 27MB. This is just way to big to be adding to my project, what is the best way to go about stripping this down the the bare necessities as I'm sure I'm only using a small percent of the code that is included in the SDK.
Here's a pic showing the package contents of the IPA:
Thanks!
In the gst_ios_main.h you can disable all the plugins that you don't need (make sure to enable linker optimizations so that unused code is removed). If that's not enough, you can build your own stripped down version of the iOS binaries with http://cgit.freedesktop.org/gstreamer/cerbero/ (you need to remove things from the .package and .recipe files to only build what you need). Just disabling things from gst_ios_main.h should be enough in 99% of the cases though.
Note that by default you'll build applications for multiple architectures, as such the resulting application will be rather large. Depending on your use case you can drop some architectures.
On another note, gstreamer.com is providing an completely outdated version of GStreamer and is in no way related to the GStreamer project. The official website is http://gstreamer.freedesktop.org .
SDKs have their source code encapsulated away from you, the user. You get access only to header files. Thus you just can't extract some class from it because you don't have access to the implementation file.
Of course if this library is opensource you can attempt to isolate one class, but sometimes everything is so deeply connected, that it is close to impossible.

MergJSON LiveCode External for iOS standalone setup

Currently we are only testing LiveCode 7.0.4 to see how it works and if we want to even use it. In our apps we need JSON from our server and have setup the mergJSON library/External in Livecode. So far, this is working very nicely in standalone tests for both MacOS and Windows. Today I started doing some simple tests on iOS and I am having a hard time with it.
I found answers where we need to use the Copy Files section in Standalone Settings, and that we need to copy the *.lcext file for mergJSON. Also watched the youtube how-to video that had mergSettings. There are no .nib files for mergJSON. Only .so, .dylib, and .dll, and the .lcext. I tried to add the .bundle file like the video, but the app will not launch, only black screen. Are other files required for mergJSON? And where do we put them? Do they stay in the same Externals folder structure or in project folder. Also, does an IOS runtime folder need to be created like in Widows/Mac? The app runs, no errors, but no JSON results are returned. I guess I am just a little confused on the Externals setup for iOS.
Just quick notes of our environment. We have Xcode 6.2 and the iOS Sdk 8.2. Live Code is 7.0.4 GPL (just testing and learning this way for now, will purchase commercial once I learn more.) I think the mergJSON I have is 1.0.15, downloaded from mergext.com. (which appears to be offline today) I have only tested on the simulator.
Thanks for any help.
You only need to include the lcext file in the copy files section of standalone settings. No need to setup a runtime folder for iOS etc.

Validate resources and generate getter code for iOS app in Xcode

I’m looking for a tool that can validate my images and fonts in a iOS application.
Problem:
We have a lot of different images and fonts in our application. Sometimes some of those files are replaced or renamed. We don’t get compile warnings or errors just missing images scattered around the app.
I guess this is part of Objective C dynamic nature but I would really like some static check here.
Does there exist any tools that can validate content or autogenerate getter code? (preferable open source)
Thanks!
warning: Shameless self promovation ahead:
We have created a tool, IDAssetManager, (not open source, however), that creates a static interface to resources.
This tool integrates heavily with Xcode. It manages and organizes resources, and generates a class with getter code for images, font and colors.
It also comes with a Xcode plugin that allow you to preview images directly from the Xcode codeview:
The tool will also register fonts in the info.plist file.
To get the kind of validation you are looking for you will have to:
Add all images to IDAsssetManager
Use the getter code generated by the tool
Hit the refresh button on the tool.
You will now get compile warnings for all missing resources.
You can try it here: https://itunes.apple.com/us/app/idassetmanager-lite-for-xcode/id830464758?mt=12
Edit
You can see a video of the tool in action here

Turning XCode command line C++ program into a Cocoa Mac App OSX program

So I have a program that I have been developing for a while (for fun) on XCode written in C++ as a command line tool program. However I just recently had the idea to turn it into a Mac OSX application. The idea would be to use cocoa/objective-c to create the UI and keep the C++ backend. However, I don't know how to add this in to a project that has already been created as a command line program. Would I have to create a brand new project as a cocoa application and copy/paste my existing code over? Or is there a simpler way to achieve what it is I'm looking to do?
A project can contain multiple targets. You can probably do what you want by creating a target that matches the app type you want and then adding existing files as necessary to that target.

Phonegap + JQM - Phonegap.js?

I am just getting into building a basic app using JQM and Phonegap.
I am using the Phonegap Cloud Builder and so far everything is OK!
But now I want to try and use some of the phones features e.g. the camera. I have read about people doing this successfully using JQM, but the hurdle I am stumbling on involves 'phonegap.js'
As I understand, this file is created typically when a new project is created (using Eclipse of XCode etc). My 'app' is being created by hand (hence using the Cloud Builder) and therefore I have no access to phonegap.js.
All the documentation I find is old and says the files are in the zip download, but they are not. I also figured that the Cloud Builder creates this file, but no idea where it places it in relation to the index page for me to reference it.
So, how can I get hold of the phonegap.js library to use the phones camera, when I am not using an IDE (this is likely to change if there is no way to get the file without one)
Download PhoneGap here: http://phonegap.com/download/, depending on platform you are developing follow appropriate tutorial included in documentation. Ether way you will be having www folder inside your project with phonegap.js file in it. Copy your jQm web application to www and append phonegap.js file in of your index.html. Now you will be able to compile native application that can access phone resources.

Resources