Detect ASF version at compile time - atmel

I want to be able to print in the console the ASF version that the microcontroller uses automatically.
Is there such a function or definition that provides the ASF version?

I haven't found any definition anywhere in the code. However, in the project file, there is the version:
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.30.1" />
As the project file is an XML file, you could write a script that gets the version and store it in an header file. This script should be launched pre build.

Related

Detect incomplete translation files in Qt

I want to be able to detect if translations are missing for any language during my release build.
I'm using CMake to build the application and CMake is also running lupdate and lrelease. In this process I would like to display a warning if some translations are missing in the TS files. As far as I can see lupdate and lrelease does not allow detection of missing translations, I have checked the output when running the commands with -help option. According to the Qt docs:
Both lupdate and lrelease may be used with TS translation source files
which are incomplete. Missing translations will be replaced with the
native language phrases at runtime.
This is very fine, but I would really like some indication that the files are incomplete.
Any ideas?

%TIMESTAMP% in WinSCP scripting is not resolved

I have script that will download the files from SFTP server to Windows using execute command in SSIS with winscp.exe as my executable. But I need the datetime stamp from the previous date in my file.
option batch abort
option confirm off
open sftp://username:password#10.10.20.20/ -hostkey="ssh-rsa XXXX-XXXX-XXXX"
get "/app/informatica/infaadm/9.5.1/server/infa_shared/BID/testing.csv" "D:\SSIS_Test\testing_%TIMESTAMP%.csv"
close
But when I ran the execute command only testing_%TIMESTAMP%.csv is generated in the target folder.
Your syntax is correct.
If the file is indeed downloaded to a file named testing_%TIMESTAMP%.csv, it must be because you are using a version of WinSCP that does not support the %TIMESTAMP% syntax.
I.e. a version older than 5.6.2.
Download the most recent version.
this work for me:
%TIMESTAMP#yyyymmddhhnnss%
I hope help you.

Run Java applet from web on local

How can I run Java applet from web on local (Windows 7)?
I downloaded file A.jar.pack.gz from web. This file I unpacked by unpack200.exe and after running unpacking jar there is this: Error: Invalid or corrupt jarfile C:\...
If you have installed the jdk then
You can extract the jar file through the following command :
step 1: jar xvf jarfilename
and then
step 2: create any text or html file and make the following entry:
<applet code="className" archive="jarname" height="any number" width="anynumber">
</applet>
the classname can be found when you have extracted the jar through the step 1
step 3: appletviewer filename
and yes ofcourse for the above commands to work you must set the path till jdk\bin
If a java program is written to be an applet, it will assume that it has all the support structure of an external applet player, browser, etc. It therefore generally won't be able to run on its own as a Java program.
Vijay's solution could work, as might opening your new HTML snippet in a browser. The only way to get it to run with nothing but Java would be to rewrite bits of the program to provide a stand alone interface, or contact the original developers asking whether they'd be willing to do so.

installing Autolit library

I am writing robot tests for web testing using Google's Robot Framework with SeleniumLibrary (a test library) , one of my test involves uploading a file from the desktop by clicking on a"Browse" button on the webpage and using the windows file explorer window that pops up to navigate to and select the file ( providing a text path to file is disabled on the website for security reasons.) I have tried digging around but found little on automating this Windows File Explorer action , is there a way I can do this ?
After downloading the AutoIt library and trying to install it is asking for wincom32./python window extensions.And i am trying to install it is giving some error like
Building pywin32 2.7.217.0
Trace-back (most recent call last):
File "setup.py", line1944, in <module>
""" % dirs).split(),
File "setup.py", line 603, in __init__
if os.path.isfile(os.path.join(sdk_dir, "include", "activdbg.h")):
File"C:\Python27\lib\ntpath.py", line 96 in join
assert len(path) > 0
TypeError: object of type 'NoneType' has no len()
Below is a quick step to step guide to install autoit for robotframework in Windows (as what versions work with what in python is a pain):
First you will need a 32 bit python as autoit will not install for windows 64bit. I have used:
Python 2.6
Then from http://sourceforge.net/projects/pywin32/files/pywin32/Build%20217/
Download the windows installer so for python 2.6 it will be:
pywin32-217.win32-py2.6.exe
Now on the command prompt go to the location of where you downloaded the autoit files ex:
- cd C:\Development\Downloaded files\AutoItLibrary-1.1
and then type
- python setup.py install
If successful you will see lines in the cmd line such as:
Generating...
Importing module
running install
running build
running build_py
creating build
creating build\lib
creating build\lib\AutoItLibrary
copying src\AutoItLibrary\Counter.py -> build\lib\AutoItLibrary
copying src\AutoItLibrary\Logger.py -> build\lib\AutoItLibrary
copying src\AutoItLibrary\__init__.py -> build\lib\AutoItLibrary
running install_lib
copying build\lib\AutoItLibrary\Counter.py -> C:\Python26\Lib\site- packages\AutoItLibrary
copying build\lib\AutoItLibrary\Logger.py -> C:\Python26\Lib\site-
Now run the test
C:\RobotFramework\Extensions\AutoItLibrary\tests
Note: Ensure you have the environment variables set correctly:i.e.
- c:\python26 for python
- c:\python26\scripts for pybot
You can now run your robotframework tests by creating an exe and calling
- Run C:\RobotFramework\Seans Autoit Files\FF_FileUpload.exe
To find how to create the autoit exe visit the autoit website.
Are you attempting to install the pywin32 extensions from source? There are windows installers for all flavours of windows so I would recommend you install using an installer.
(one other thing, google did not make robot framework. It was Nokia Siemens networks...)
Use the Keyword 'Choose File'. No need for AutoIT Lib
Name: Choose File
Source: Selenium2Library
Arguments: [ locator | file_path ]
Inputs the file_path into file input field found by identifier.
This keyword is most often used to input files into upload forms. The file specified with file_path must be available on the same host where the Selenium Server is running.
Example: Choose File my_upload_field C:\Automation\sample.csv
"Choose File" worked in my case. Please note that in my case this made robot write the file path into the input field which was otherwise not editable manually.

Eclipse Plugin- How to execute UNIX command from eclipse plugin?

I am writing an eclipse plugin that will take input of a file name, pass that to a UNIX command and get the output back (The command is to get file path of entered file name from CVS repository). My basic plugin code is under development, but I am not finding any info on how can I execute UNIX commands from eclipse. Any pointers would be helpful.
Runtime.exec(...) from the Java standard library should do what you need to execute UNIX shell commands that are in your path of the user that is executing eclipse. If you want to call UNIX C libraries API you can use the JNA library.

Resources