I am attempting to port a project from CodeWarrior 10 to KDS 3.0.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I am attempting to port a project from CodeWarrior 10 to KDS 3.0.

1,013 Views
jamesbehrens
Contributor I

I am attempting to port a project from CodeWarrior 10 to KDS 3.0. I have the code transferred and made all changes required to get it to compile. I am having run-time issues with the compiled code. I am not using the SDK. The 'C' startup code for CodeWarrior would disable the WatchDog timer. The KDS code does not do this. I resolved this problem by porting over the 'C' startup code from CodeWarrior that disables the WatchDog. As soon as I startup the SysTick Timer interrupt the system resets.

I looked at the generated hex file and the map file. I noticed that in the hex file the addresses of all interrupt vectors was off by one, in other words the hex file has SysTick at 0000:07E5x and the map file has it at 0000:07E4x.

Why are these addresses different ?

Could this be the source of my auto-reseting issue ?

Labels (1)
0 Kudos
2 Replies

608 Views
trytohelp
NXP Employee
NXP Employee

Hi James,

There are some posts on community which could help you.

Can I recommend to have a look to:

    https://community.freescale.com/docs/DOC-102594

    https://community.freescale.com/docs/DOC-102864


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

608 Views
jamesbehrens
Contributor I

I have figured out the answer myself. The pdfs that you suggested are useless. As I stated, I was porting from CodeWarrior 10 to KDS 3.0. After fixing all the coding differences I ran into a runtime problem. The code kept restarting. In comparing the C startup file provided by KDS and CodeWarrior I found that CodeWarrior was turning off the WatchDog and setting the Interrupt Vector Table address, KDS was not doing this. I copied the relevant CodeWarrior code to the SystemInit() function in the system_MK20D7.c file. This disabled the WatchDog, but left me with the problem of the code restarting whenever the an interrupt was generated. I finally figured out that the problem was with the line of code that was attempting to re-locate the Vector table address. Although the code appears to work for CodeWarrior it is totally bogus fro KDS. Removing the line solved the problem. After renaming all my interrupt handlers to the KDS naming convention everything now works as it should.

0 Kudos