MC9S12DG256 project Migration

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

MC9S12DG256 project Migration

1,952 Views
SUDHEESHK
Contributor I

Hi Everyone,

We are currently maintaining a legacy project built on the MC9S12DG256 MCU using the Cosmic compiler toolchain. As part of an upgrade initiative, we now have a requirement to migrate the entire project to a modern, Eclipse‑based CodeWarrior environment.

Before we begin the migration, I’m looking for guidance or best practices from anyone who has performed a similar transition. Specifically, I would appreciate insights on:

  1. Supported versions:
    Which is the latest Eclipse‑based CodeWarrior version that fully supports MC9S12DG256?

  2. Migration process:

    • Is there any automated or semi‑automated way to import Cosmic projects into CodeWarrior?
    • Any known compatibility issues with linker files, compiler differences, or memory models?
  3. Toolchain differences:
    Key considerations when moving from Cosmic to the CodeWarrior (Freescale/NXP) compiler, especially regarding:

    • Inline assembly syntax
    • Startup code and vector tables
    • Banked vs. non‑banked memory models
    • Optimizer behavior
  4. Recommended approach:
    Should we migrate module-by-module, or recreate a fresh CodeWarrior project and port code manually?

  5. Pitfalls to avoid:
    Any common issues others have faced during migration would be very helpful.

If anyone has documentation links, migration guides, or example projects, that would be greatly appreciated as well.

Thanks in advance for your support!

0 Kudos
Reply
6 Replies

1,814 Views
SUDHEESHK
Contributor I

Thanks for the clarification, Daniel.

As per my understanding, when we migrate a code from Cosmic to CodeWarrior, the main issue is going to come up with non-ANCI keywords. Do you have any document as a guide while doing this migration?

 

 

0 Kudos
Reply

1,810 Views
danielmartynek
NXP TechSupport
NXP TechSupport

There is this technical note specifically for that.

https://www.nxp.com/docs/en/application-note/TN234.pdf

 

0 Kudos
Reply

1,371 Views
SUDHEESHK
Contributor I

Thanks for your reply, Daniel.

I have gone through the cosmic source code, and I found it was using an OSEK RTOS. Here my doubt is, if I want to use it in newly created CodeWarrior project, can I use the generated files from previous project? if not, I have seen an option to add OSEK support during project creation in CodeWarrior, will it help? OSEK is part of CodeWarrior, or should we use external libraries for it?

Thanks

0 Kudos
Reply

1,935 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @SUDHEESHK,

There is no NXP eclipse IDE for MC9S12DG256.

The latest NXP IDE that supports the MCU series is CW5.2 (Windows 10 compatible), or CW5.1 (Windows 7).

https://www.nxp.com/design/design-center/software/development-software/codewarrior-development-tools...

 

Regards,

Daniel

0 Kudos
Reply

1,917 Views
SUDHEESHK
Contributor I

Hi @danielmartynek 

Thanks for the quick reply. Can this 5.2 version run win11 machine?

-Thanks

 

0 Kudos
Reply

1,818 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @SUDHEESHK,

It is not officially supported, so functionality cannot be guaranteed.

 

Regards,

Daniel

0 Kudos
Reply