Need simulator of 8051 with a 'c' compiler? - hardware

Is there any simulator of 8051 which comes with 'c' compiler so that i can compile our c code and able to view the result ?

sdcc is a commonly used C compiler for the 8051 and googling 8051 simulator results in several simulator tools.

For a good c compiler use Keil C51. It is an excellent compiler which a huge device database to select from!
You can use keil to generate a Hex file (in the Intel hex file format). You can then load the hex file into Edsim to simulate your design and see the output!

one of the best complier+simulator is keil C51.Just download it use trial version that is sufficient for beginner programming .It support both assembly language as well as embedded C.
So it is best for you .Again it having debugger which is used for checking your code in machine level.
Another simulator is there for you ISIS professional which is best among all the simulator I used till date.It provide circuit simulator which having a lot of peripheral library for easy design of circuit.And you can load your code to this for see the real time behavior of your circuit with your code .Just google it to find out more about ISIS professional.Again free version is sufficient for starting Embedded C.It also support virtual devices like volt meter,oscilloscope,signal generator....
So I think this is best for starting embedded study.But use keil debugger for better knowing behavior of your code in machine level.

Related

STM32 Embedded GUI Library porting for F4 Discovery

I'm trying to use the STM32 Embedded GUI Library with STM32F4 Discovery Board.
Has anyone already done a porting of this library on the discovery?
Otherwise, how can I try to port it and what is the "weight" in terms of work of such a porting? (I'm new in programming embedded devices)
I used Littlev Grapics Library (free, open source) on STM32 discovery. Maybe you will like it too.
http://www.gl.littlev.hu/blog/8/embedded-gui-on-stm32-discovery-board-with-littlev-graphics-library
It comes with a working project to download to STM32 Disocvery.
Maybe you want to take a look at µGFX: https://ugfx.io
It comes with a ton of optional features and built-in drivers. Your hardware setup is already supported.
You might also consider STemWin, it is already supported on STM32F4. In either case the biggest porting effort will probably be in supporting your specific display hardware.
This link will help to implement STemWin on STM32F4.. Link to blog..
It can be easily ported if the drivers for LCD and Touch are properly configured.

C two platform compiling

I want to run some C code targeted to run on a unique PIC micro based hardware setup in a PC windows environment as well. The objective is to emulate multiple instances of the hardware without the actual hardware. I expect to have to write the code upfront to account for this and to create low level functions in C or C# that emulate each of the PIC functions.
Does anyone know an environment that can support this?
What you're looking for is a microcontroller simulator. The simulator will run on the PC and execute the PIC code. In order to e.g. generate interrupts / simulate serial data / whatever you'll need to either configure the simulator settings or write a few custom function.
Your target code (for the PIC itself) shouldn't need to be aware of what environment it's running on.
Here's a few links, but you're best off searching for some variant of "PIC microcontroller simulator" or "microchip PIC simulator".
http://sourceforge.net/projects/gpsim/
http://sourceforge.net/projects/picsim/
I'm not sure that this question is about an instruction simulator. It seems to me that it is simply about the technique called "dual targeting". I've asked a similar question on StackOverflow before, please see: Prototyping and simulating embedded software on Windows . Recently, I've also made a blog post about dual targeting and rapid prototyping on Windows here: http://embeddedgurus.com/state-space/2013/04/dual-targeting-and-agile-prototyping-of-embedded-software-on-windows/ .
So, while the links should provide the answer to the original question, I'd like to add that the 8-bit PIC is probably no programmable in C++. In fact, it is so baroque that even C compilers for this "architecture" must cut many corners.

Starter questions on microcontroller programming development tools

I was recently assigned a micro-controller programming task. I will need to program on MKL05Z32VFM4 device.
I was reading some programming tutorials on Microchip Technology's MPLAB IDE X, because that seems to have the most information, but looks like that IDE is only for Microchip products.
What development tools should I choose for MKL05Z32VFM4? Are there a generic IDE and simulator environment? Are there some tutorials for me to start to look at?
I apologize for a basic question. I am a decent general software developer, but I am very new to this area.
(this post will be partly useless if you plan to use some commercial toolchain like Keil, IAR or sth like that)
For ARM Cortex devices you have quite a lot of options available (; If you're in a mood for a bit of automatic translation you could check my website - I wrote a tutorial about (open source) toolchain for ARM - http://www.freddiechopin.info/pl/artykuly/35-arm/59-arm-toolchain-tutorial - unfortunately it's not translated to English, so you'll have to use google translate. There are also some other resources that you might find useful, especially my template/example projects for such toolchain (in Download). If you ever used Eclipse, Makefile and GCC this whole subject should be easy for you. Most of example projects will be close to what you need, but you should probably check example for STM32 (any) - which is a Cortex-M3, and the example for LPC1114 - which is a Cortex-M0.
As for the simulator, I personally think they're not worth the trouble, recent GCC toolchains disable it anyway, as it's only instruction simulator, you won't be able to easily simulate peripherals. If you want to simulate instructions just write your code for PC as it will work the same way (; If you need to check something on the real hardware you can use GDB and JTAG. As long as it's not some extremely expensive proprietary design (you can - again - check my website for other options) the tools are almost free - OpenOCD (GDB Server) is open-source, and you can buy a FTx232 based JTAG (the most popular kind for OpenOCD) starting at ~30$.
Big commercial toolchains sometimes have simulators with peripherals simulation, but these cost a few thousand € / year (;
Google around for "ARM Cortex" with keywords like: toolchain, gcc, openocd, debugging, jtag etc. to find some articles - there's a lot of it in the network.
Your question is really general, so pretty hard to answer, as we don't know what tools are you going to use, are you planing to use some external libraries, what type of work are you going to do with these devices etc.
From my experience contact with embedded world is often a huge shock for developers of PC software. It mostly works the same, but because resources are constrained you really should do things differently. You don't have "+infinity" of RAM, you should usually try to fit a lot of things in ROM and so on. And of course there's only C and C++, but in C++ you shouldn't use some of it's features (exceptions, RTTI, iostreams, parts of STL, ...), dynamic allocation of memory is not a good idea generally (with the chip you mentioned - 4kB of RAM - it's out of question in my opinion).
The chip you mentioned is really tiny, so it will probably be a bigger shock (;
Try to ask some specific question and give some more details about your project so we could give more detailed answers (;
That's a Cortex-M0 device. You can find lots of information online. You can start at arm.com. As far as toolchains go, gcc and clang are both free and support ARM and will work fine. You can get ARM's tools too, if that's what you're into. JTAG for debugging is going to cost you - most people use ARM's in-house RealView debugger or Trace32 from Lauterbach. I've also used the BDI3000 from Abatron.
It looks like a Freescale MCU. Freescale's IDE of choice is CodeWarrior.
A good place to start is the part manufacturer's site, generally they will have tools or links to recommended third parties as well as application notes and libraries. Start at the Freescale Kinetis KL0 series "Software & Tools" page.
Freescale's own CodeWarrior tool is Eclipse based.

Compiling Objective-C app for Linux (API coverage)

I might be asking something strange here, but I'm unsure where to begin. The thing is that I am considering writing a command line tool on a Mac using Obj-C and the Foundation classes.
But there is a very big risk that I would like to be able to compile it for different Linux distributions to run as a server app in the future.
I understand that it is not a problem in itself to compile Objective-C for Linux, but what I don't understand is the API coverage.
As I have understood it so far I can use GNUStep to compile for linux, but is there a good way for me to get an overview of the API coverage? What I mean is, if I use a class that has been added to the Foundation framework in OSX Lion lets say, how big is the risk of that not being available in GNUStep at that time?
I hope I am asking a question that you guys can understand, basically I want to avoid writing an app that can theoretically be compiled for linux, but not in practice because of missing classes etc.
Thanks!
An opinion: The risk is fairly high. GNU Step is an open source project and dependant on its volunteers to keep it up to date. OS X Lion has a small number of additions to Foundation and AppKit.
Your best option if you want it for *nix in the future will be to write it in generic C/C++ and then thinly wrap it in an NSTask if you want a GUI.
You should be able to check if the API's you're using are available by consulting the GNUStep base API docs.
You may want to target GNUStep as your base if compatibillity is a big concern. Compiling for mac should then be rather trivial, compared to moving the code the other way. Of course you always have the option of helping inplement whatever is missing from GNUStep too.

Arm Board Bring Up

Can anybody tell me where I can find information related to How to Bringup any arm board? I am looking for an overview as I am novice in ARM related stuffs. Any link/document will do ...It will be gr8 help if i can look for a case-study
any arm based board can be considered..I am looking for just a case study...simple in few steps??
Every single ARM "board" will be different. Read the datasheet for the ARM chip you have, that should have a section near the start about booting. Also, read the datasheet about your board, as it made have flash/boot loaders on there. If there are no loaders on the board, you'll have to either set the jumpers for the ARM (if that type supoprts it) to read from external rom, or JTAG the initial boot code into it.
Basically: Read the datasheets. Programming a device like an ARM isn't your usual compile/run stratergy like most software, especially not in the first stage.
edit:
If you don't even have a board yet, try going for this one:
http://beagleboard.org/
It has and ARM on it (as well as a decent GPU).
Check the DLP-2232PB-G evaluation kit from FTDI. Looks great for newbies trying to get into microcontrollers, and it comes with everything you need. It's a PIC controller - not an ARM controller, but the easiest starting point that I've seen... and same basic methods of development.
I would start with any documentation the IC manufacturer may have on "getting started".
http://free-electrons.com/doc/porting-kernel.odp
This link gives a good overview of the bringup of the board with a CPU for which the linux support package is available.
Linux sources in arch/arm have mach-* which are cpus supported by Linux Kernel.
With in the mach-* dir, there are some board specific files that are board specific BSPs.
You can take the process elucidated in this article and try using in your case.
Check out the ok6410-h at http://www.arm9board.net/sel/prddetail.aspx?id=348&pid=200
Quit a nice kicking-start kit coming with everyting you would ever need: documentations, source code, example programs.
recommendable for both newbies and experienced.