I'd like to debug my SPI-sommunications (between an embedded PC and a MC9S12X, the latter as slave) .
For debugging I use a B&E BDM Multlink interface.
Is it a good idea to use FreeMaster in order to debug SPI communications, timing issues etc.?
I found very little information on how to debug a codewarrior project with FreeMaster, so I have a few questions on how to get started with FreeMaster:
Best regards
Tom
Solved! Go to Solution.
Tom,
There is a good tutorial, but it's hiding on my desk. I taught an Intro course in FreeMASTER at our Technology Forum last month (June, so 6 weeks ago now). I need to get it posted. I'll do that RSN. I'll contact you directly to get it to you ASAP. It was build on Kinetis. There are examples in the FreeMASTER installation. IN a standard install, look here for S12
C:\Program Files\Freescale\FreeMASTER Serial Communication V1.5\examples\HC12
Alternatives... depends on what you want to do, but if you want to see data real time, not for free, not from Freescale, not that I know of.
You do not need to run FreeMASTER and CodeWarrior in parallel. In fact, you can't. You build your code using CodeWarrior (or another tool). You then run it, and connect over a communication channel using FM. Typically you only have one wire down to your board. You can EITHER debug using your development tool OR talk to it with FM. Not both at the same time.
Do you need to include FM commands in your C code? Depends. For the most basic things that FM can do, no. But for anything other than the basic things, yes. For example, FM on th etarget can store data in a buffer and flush that data out to the desktop on demand. You can't do that without modifying your app on the target, and having a communication driver on the target. In which case you need to have a target-side driver that is built into your code.
BUT... FM also has a mode that communicates via OSBDM - no target driver required, and simply reads global/static variables real time. This is an almost zero-interference real time debug monitor, and no modification is required to your code. It finds the variables by reading the dwarf data created by the development tool debugger. You point to this data in the FM setup, by pointing to the appropriate file. This will vary depending on the target. I actually haven't done this on an S12, so off the top of my head, I don't know where this is. But... shouldn't be hard to figure out.
Tom,
There is a good tutorial, but it's hiding on my desk. I taught an Intro course in FreeMASTER at our Technology Forum last month (June, so 6 weeks ago now). I need to get it posted. I'll do that RSN. I'll contact you directly to get it to you ASAP. It was build on Kinetis. There are examples in the FreeMASTER installation. IN a standard install, look here for S12
C:\Program Files\Freescale\FreeMASTER Serial Communication V1.5\examples\HC12
Alternatives... depends on what you want to do, but if you want to see data real time, not for free, not from Freescale, not that I know of.
You do not need to run FreeMASTER and CodeWarrior in parallel. In fact, you can't. You build your code using CodeWarrior (or another tool). You then run it, and connect over a communication channel using FM. Typically you only have one wire down to your board. You can EITHER debug using your development tool OR talk to it with FM. Not both at the same time.
Do you need to include FM commands in your C code? Depends. For the most basic things that FM can do, no. But for anything other than the basic things, yes. For example, FM on th etarget can store data in a buffer and flush that data out to the desktop on demand. You can't do that without modifying your app on the target, and having a communication driver on the target. In which case you need to have a target-side driver that is built into your code.
BUT... FM also has a mode that communicates via OSBDM - no target driver required, and simply reads global/static variables real time. This is an almost zero-interference real time debug monitor, and no modification is required to your code. It finds the variables by reading the dwarf data created by the development tool debugger. You point to this data in the FM setup, by pointing to the appropriate file. This will vary depending on the target. I actually haven't done this on an S12, so off the top of my head, I don't know where this is. But... shouldn't be hard to figure out.
Hello Jim,
thanks for the helpful information and the FTF material. Actually, I already knew your nice power point presentation (small world :smileywink: and I've tried to apply it to my project.
It looks as if the codewarrior version for the K60 is quite a bit different from mine.
I found a presentation showing how to get it running with the S12 (didn't get a proper link, just google for : codewarrior freemaster "variables monitoring"). It seems to be working now.
Best regards
Tom
Hi Thomas,
this might at least answer some of your questions:
Tutorial: FreeMASTER Visualization and Run-Time Debugging | MCU on Eclipse
Erich