MCore + GCC

Hello All,

I am working on a project based on the MCore MCU, and am having a roug time getting a basic test program working correctly. The actual device tha I am working with is the O-Navi Phoenix AX which has an embedded MMC2114. am using a gcc 4.3.0 cross compiler under cygwin to build, and the PE Micr CableMC and ProgMCZ to flash the chip. I compiled newlib along with gcc but am excluding it for now with the -nostdlib and -nostartfiles gcc flags The code I am working with is hosted a

formatting link
under trunk/AP_Test.

Included in the kit with this device is some example code which wa clearly written for CodeWarrior, so I had to adapt it to build under gcc. have gotten the example program to build and run correctly on the hardware however there are still problems as I cannot get a simpler program to wor correctly. Starting from the example program, if I modify main to simpl print a "hello world" to uart without modifying any of the other code, thi works as expected. However, when I remove the other functions so there i just the main (and the device/serial setup code) which prints to uart - seemingly more simple program - it does not work!

I cannot think of what could cause this problem or how to approac debugging it. If anyone has any pointers or suggestions, I would greatl appreciate it. Please let me know if I can provide any more information.

Thanks, Nick Hebner

Reply to
Loading thread data ...

The most obvious thing to try is to start with a working program, then remove small parts incrementally until it stops working - that could give you a clue as to where the problem lies.

I'm curious as to why you are using the MCore in the first place. It's not really a mainstream core - my distributors and Freescale representatives advised against it when we looked at the MCore several years ago.

Reply to
David Brown



MMC2114. I




gcc. I









I have tried incrementally removing pieces, but there does not seem to b any pattern. It seems that if there is a bunch of extra code, it works, i there is none, it does not. I cannot even imagine why this might be.

I was leery about using the MCore from the start of this project when was doing research and realizing that this chip was basically defunct Unfortunately, the PhoenixAX device was our only option in terms of price and now I know why. It is turning out to be a nightmare especially becaus we cannot afford any sort of ONCE hardware which would really help Basically the only debugging tool that we have at this point is printing t uart, which is much less than ideal.

The only other thing that I can think is maybe the chip is hitting a exception, so I will try adding identifying handlers. Any other ideas woul be much appreciated.

Thanks, Nick Hebner The only other thing that I can think to do is

Reply to

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.