Can I debug a program in Verifone Verix OS? - verifone

Is it possible to debug a program created for Verix OX directly on a Verifone terminal? If this is not possible, is there an emulator for Verix OS?

It's possible with RVD but pretty hard and hardly convenient. The description is in the SDK documentation (programming tools reference manual).

Related

Debugger for debugging my OS

I want a debugger to debug my OS. At many places i am not being able to figure out what is wrong. So is there any debugger which can debug operating systems? can i do it with gdb?
You will need to use a solution which emulates another computer on your computer - essentially, a virtual machine. The most obvious ones which come to mind instantly are VirtualBox and VMware, but those weren't designed with debugging the machine and/or the OS.
What you're looking for is either Bochs or QEMU. Both (as far as I remember) can be integrated with gdb in order to set breakpoints and analyze the execution of your code. You might also want to read this OSdev.org article.
I primarily use Bochs for testing my OS projects. It includes a helpful debugger (bochsdbg).

Simulating Circuits and Programming Micro-controllers over Linux

I'm about to go through a Micro-Controller project which controls a robotic arm. My problem is that # MS Windows there are MikroElectronica (IDE: MicroC) compile .c to Hex put the hex in Proteus and simulate. Then using a special (PCB) Kit with CD (carries windows software) I would put the microchip and install the hex file or what ever.
First all the respect to Ms but I just hate it! I adore Ubuntu/linux and open-source I need from the experts to tell me in "Steps" how to do the previously mentioned in linux with minimal complications.
The Electrical and Mechanical Engineers along with me always brag about Ms is easy. I want to show them how Computer Science guy uses open-source technology and how strong and reliable it is.
Please help !
You wish to demonstrate the power of Linux by trying to run products designed for another operating system on it? Chances are those tools may work in Wine.
Or maybe you can use Hi-Tech C as a compiler and try gEDA for simulation. It is also possible to compile Microchip C30 on Linux if you are working on 16-bit PIC:s. In any case, this may not be as easy as using the out-of the-box Windows tools. It will be more educational, nevertheless.
If you can be flexible and opt for AVR then you will have free GCC compiler and programming tools. All open source and Linux/Mac friendly. More info at www.avrfreaks.com.
Here is a compiler, linker and simulator tutorial for PIC on linux. Here is one that uses SDCC c compiler. Google throws out lots of websites when you search for linux pic.
From my side, I cross-compile and program Microchip dsPIC from Linux but it is not really straightforward. Here are the big steps
First I built the C30 toolchain from Microchip sources (you need to apply a few patches on the given sources for it to compile).
Once you have the toolchain binaries, you will need to have the specific Microchip MCU resources. Those are coming with the C30 installation on a win32. I copied those files from the Windows installation folder onto my linux filesystem.
Here you should be able to compile and link some C & ASM code to a hex file through command line.
Second step, I wanted to build my projects within the Eclipse IDE. To do that we "just" had to write a couple makefiles to call our new C30 toolchain.
Third step, program the .hex onto your microchip MCU. Two ways to do it. If you have a Pickit2, Microchip provides a command line tool to play with it. I personally have an ICD2 programmer. I use the command line tool provided in the Piklab project.
Now I don't have any facility to debug with my ICD2 under Linux.
Now Microchip provides an alternative IDE with "Mplab X" which is based on Netbeans (sick) and should work under Linux and MacOS. But this project seemed to be yet under development, I don't know if it is really usable.

what software should i use when i want to study c

i want to write code use notepad and compile the c code use cmd on windows (like java),
what software should i use ,
gcc for windows
cygwin
Turbo C
gvim
thanks
An excellent option for Windows is the Visual C++ Express Edition (which is free). This is a full IDE, compiler, and debugger and is a great way to get started.
GCC is also a good option if for some reason you wish to avoid an IDE. I wouldn't recommend this for a beginner, though.
Please don't use Turbo C, it's very old and you will have problems with it.
Cygwin is a popular linux environment for Windows.
Gvim is an editor and (in my opinion) has a very high learning curve. You could use Notepad++ or Code::Blocks to develop your code in.
mingw is also a good option to start with.
IMO you should avoid IDEs: a beginner needs to actually see and feel the whole process of compiling by invoking the compiler from a terminal, not by simply pressing some keys and bang! Also most of the IDEs have code completion facilities which is not good for beginners (especially for C). So I would go with vim (or gvim) and cygwin.
PS: Give Linux a try, you might actually like it; then vim and gcc.
Use cygwin. It's just about the only way to get a C environment on Windows that's both modern (i.e. not 16-bit, DOS-based) and conformant to the standards, and with it you get a fairly-complete POSIX environment, which allows you to actually do interesting things with C.
The classics would be Cygwin and MSYS/MinGW.
Cygwin provides a Linux API compatibility layer and includes a package manager which provides access to many well-known Linux applications (ie batteries included).
MSYS/MinGW only provides a minimal userland to get the GNU build system working.
Both come with their own shell environment, but can be used from Windows' command line as well.
Binaries created with Cygwin-gcc won't work without cygwin1.dll, but you get all the benefits of a mostly-POSIX environment. You can also use Cygwin's MinGW package for cross-compilation and thus create stand-alone binaries.
Other solutions are possible: Currently, I'm using the MinGW compiler together with the Cygwin userland from the Windows command line...
I think cygwin itself named as gcc for windows.
also gvim is not a compiler , It is a very nice and powerful tool for code editing.Also you can try emacs and kwrite
Some suggestions from my side:
In windows, you need to install a third party software to try all programming stuffs(c,c++ etc) ,Most of the times it is having GUI implementations and you didn't get any exact idea behind the code execution flow.also the command prompt of windows not at all efficient as linux shell.
But if you install a good linux distro (ubuntu/fedora/cent os/debian/pardus/suse/arch linux),all default compilers,debuggers and editors are installed within the OS and you can try the basic and all advanced programs by just opening the terminal(shell).Also the shell is a more powerful tool and you can enjoy all kind of automation comamnds(I mean scripting).
Also: for your added information, most of the embedded programmers in the industry prefer command line execution unlike GUI implementation because it is too fast than GUI.

Compiling a GTK+ application for windows from linux

I'm new to linux and have been learning gtk+ the past couple of days, and was wondering how you would go about compiling an application to run on windows instead of linux (ubuntu). I found this while doing a quick search but my knowledge of linux is non-existent at the moment so not sure how to proceed with the tutorial. Are there any alternative methods to do this?.
I've only compiled on Windows and used Cygwin to test 'nix versions (before going right into a 'nix OS and compiling), but looks like this might get you started.
Compiling in other OS does not make sense while you can't disribute your binary without testing it on the target platform.
Then why not to compile on the same platform?

How to start debugging?

I have learned C and I would like to start to improve open source software. I would like to hack away one irritating bug in GTK+. To see the bug I need to use Gedit.
How can I download the sources of GTK+ and gedit and compile both of them so that I can see where the bug is? And I have never used any debugger in Linux so is there somewhere a tutorial for that?
You can get information about downloading and compiling of gedit here:
http://projects.gnome.org/gedit/developers.html
My Debugger of choice is GDB:
http://www.gnu.org/software/gdb/
GDB is a console application that may be hard to handle for a beginner. Try an IDE like Eclipse that provides a GUI to GDB.
Almost all Linux debuggers are front-ends for or adaptations of the gdb debugger. You should therefore learn how to use this first, preferably by starting on
small programs of your own construction, not giant FOSS codebases. The gdb manual,
available from here is actually a pretty good tutorial.
The information on building and installing GTK+ should be here:
http://www.gtk.org/development.html
The sources should be here:
http://www.gtk.org/download-linux.html
You can check out gdb:
http://www.gnu.org/software/gdb/ That's a pretty standard linux debugger. I would spend time with it on something simple first, or get an IDE that uses it. Learning gdb can be worth the time though.
gdb is a dinosaur which should long since have been made extinct. Debugging is one area where (gasp!) Windows beats Unix. Having got that off my chest, I advise you to start with the Data Display Debugger (DDD) graphical front end to gdb. Yes, the GUI is quaint, but you will be far more productive, quicker, than if you start with gdb.
Also don't overlook valgrind for finding and diagnosing memory errors. The KDE project actually mandates use of valgrind; I'm not sure about Gnome.
It is possible that you won't see the bug if you download the latest gedit and gtk+ sources. It might be fixed in the latest sources or the latest sources might be different enough to not trigger your bug.
What Linux distribution are you running?
First of all I'd suggest consulting your distribution's bug database to see if someone has filed a similar bug. If you don't find anything, I'd suggest using your distribution's tools to obtain the source that corresponds to the binary that you have installed on your sytem (e.g. apt-get source libgtk-2.0 on Debian or Ubuntu).
Also, your distribution might also make a debug package available (e.g. libgtk2.0-0-dbg on Debian) which will let you run a debugger on the binary that you already have without requiring the source. While this is no substitute for having the sources, it can be useful for running valgrind or making sense out of a core file.

Resources