I know there are simulators available with the Keil, IAR, and CodeSourcery toolchains, but what about CodeWarrior?
Do Freescale have any plans to integrate a simulator with CodeWarrior?
In the meantime, I’m sure it is possible to use some generic tools like GDB, QEMU, OVPsim, etc., but there could be quite a bit of work involved, and they would probably only support the core, no peripherals. Has anyone done it?
This is not an instruction simulator but simulates the peripherals. It allows real Kinetis C code to be executed to control these and hooks the Ethernet controller up to the PC's NIC and Kinetis UARTs up to COM ports so that the PC acts as a Kinetis device (in the network or via the COM ports).
Also timers, ADC, memory etc. are simulated so that the complete Kinetis project runs (approx.) in real-time on the PC.
The GDB, IAR, Keil simulators are mainly instruction set simulators and are very useful for testing things like start-up code but not a great deal more can be done usefully. The uTasker Kinetis simulator can handle complete project simulation/testing and make real development work much more efficient.
When you say "It allows real Kinetis C code to be executed", I presume you mean only code that addresses certain peripherals?
e.g. If my exisiting application uses the MQX RTOS, how much porting will I have to do to get it to run on uTasker?
It is (probably) not possible to use MQX with the simulator since:
- its kernel is assembler coded and will not be able to run on a PC without converting to i586 compatible assembler (I have done this for a 68000 kernel so that it works on a PC but it can be a big job - also I had luck since there was some reference i386 kernel code available that helped a lot)
- the peripheral register used are not in the correct form to allow direct code simulation
- its drivers have no simulation hooks built in to them, which means they would all have to be modified
- probably other reasons which are not immediately obvious
It would be possible to build a simulator of this nature for that environment but it would not be a trivial job.
What I meant with "real Kinetis C code" was that the (same) code run on the simulator can be cross compiled to run on HW with the same (99.9%) results - one doesn't simulate with different code or have to maintain a simulation project seperately from the productive project.
The simulator avoids the need for the tedious download/debug cycles and allows VisualStudio C++ debugging efficiency to be obtained (automatic stack integrity checking, modification and continue, freezing TCP/IP when using WireShark simulation input, etc.). The libraries in the uTasker project and the OS conform to the requirements and the application code (using the tasks) automatically works (when a few rules are respected). The project code is designed for simplicity, efficiency and small foot print (USB, TFT, FAT32, TCP/IP FTP, TELNET, Web server and quite a lot more will run happily in less that 32k RAM and less than 100k FLASH) and projects can often make use of the smaller chips and get by with the special edition of CW10.1 (or GCC since target debugging is quite rare).
I think that MXQ will require more powerful debuggers (eg. professional CW or others with task awareness) to be able to improve development and debug efficiency. Some of these will of course have instruction simulation and some may also emulate simple peripheral operations but I don't think that this will be of major development aid once a project gets past the first simple "learning-to-walk" steps.
I am not sure exactly what you meant with the amount of porting required and I may have misunderstood it. If you were referring to moving an existing project based on MQX (rather than simulating MQX project with the uTasker simulator) to the uTasker environment it will depend on what you actually use and whether it is (presently) available in the uTasker project (see the development page for latest information: http://www.utasker.com/forum/index.php?topic=1252.0).Most projects can be moved quite simply - experience with Coldire V2 project is that more than 95% of project can be simply moved as long as they don't rely on any special properties of the original solution. This often results in faster operation and much smaller memory requirements.
The project is available to every one so you may like to run it on your PC and/or board - the tutorial takes about 20 minutes to work though - the Kirin3 can be used since it is very similar: http://www.utasker.com/docs/M5223X/uTaskerV1-4_M522XX.PDF and you will then probably have a feel for whether it is worth looking into more deeply.
P.S. There are also some videos showing the project in operation - on HW and in the simulator:
- Eg on Kirin3 - http://www.youtube.com/watch?v=AdtRyQ-2IrE
Search YouTube for "uTasker" to find some other flavours too (they are all more or less compatible)