Image file generation for Coldfire Processor

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

Image file generation for Coldfire Processor

699 Views
preetuabraham
Contributor III

Hi,

 I am trying to migrate a legacy Metrowerks Code warrior project for MC5485 Cold fire processor to Code warrior 10.x .

I was able to generate the s-record file without any changes to the code, but when the image file is loaded to target it is not turning on for flash image(s-record file). There were some assembly .s files in the legacy project ,I am not sure whether in the Code warrior 10.x for Cold processor it recognizes. Also would like to know any particular settings are there

Labels (1)
0 Kudos
3 Replies

496 Views
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Preetu Abraham

This problem seams to be related to libraries and Assembly function used of both version.

MSL libraries were replaced by the EWL libraries in new releases of code warrior, so if you change to a new CodeWarrior version, you need to tell the project to used the correct libraries in the compiler settings. Parameter calling convention and Assembly function declarations and definitions affects the assembly functions and codes in your projects, so you need to change them to the new convention.

There are too many version from 5.2 to 10.6.4, so my recommendation is that you first change from 5.2 to 7.2 (that is a big step in compiler version), and then change from 7.2 to 10.x.

5.2 and 7.2 are classic version of CodeWarrior IDE, and 10.x is a eclipse based version, please check the following guides of porting a project and tell me if you have any question about them.

Porting to 7.2 please pay attention to Assembly Function Declarations and Definitions section, this could be your problem in your projects that have assably code.
Porting to 10.4 This is the main change from a classic project to a eclipse based IDE.


Hope this information helps you
Best Regards
Jorge Alcala

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

496 Views
preetuabraham
Contributor III

HI Jorge

 The assembly language instructions are as per the below snippet in our project and to use declspec identifier as mentioned in the attachment ,these are not functions declarations or function definitions .Plus in the warnings I am not getting anything related to “register abi”. But there are warning like since our assembly files are .s. If as per the attachment whether move.l  #__MBAR,D0 should be removed

 

Linker command file warning at line 63. Updating the linker command file should be considered. File "mcf548x_lo.s" not found; assuming that "mcf548x_lo_s.obj" file was meant.            CDSS_A380_New_Certified                                       C/C++ Problem

Linker command file warning at line 61. Updating the linker command file should be considered. File "vectors.s" not found; assuming that "vectors_s.obj" file was meant.   CDSS_A380_New_Certified                                       C/C++ Problem

Linker command file warning at line 65. Updating the linker command file should be considered. File "sysinit.c" not found; assuming that "sysinit_c.obj" file was meant.     CDSS_A380_New_Certified                                       C/C++ Problem

Linker command file warning at line 64. Updating the linker command file should be considered. File "mcf5xxx.s" not found; assuming that "mcf5xxx_s.obj" file was meant. CDSS_A380_New_Certified                                       C/C++ Problem

Linker command file warning at line 76. Updating the linker command file should be considered. File "vectors.s" not found; assuming that "vectors_s.obj" file was meant.   CDSS_A380_New_Certified                                       C/C++ Problem

 

Sample code snippet in one of our .s files

 

#define __MBAR ___MBAR

asm_startmeup:

_asm_startmeup:

       

        /* Initialize MBAR */

        move.l  #__MBAR,D0

        movec   D0,MBAR

       

        /* Initialize RAMBAR0 - locate it on the data bus*/

        move.l  #__CORE_SRAM0,D0

        add.l   #0x21,D0

        movec   D0,RAMBAR0

 

        /* Initialize RAMBAR1 - locate it on the data bus*/

        move.l  #__CORE_SRAM1,D0

        add.l   #0x21,D0

        movec   D0,RAMBAR1

 

        /* Point Stack Pointer into Core SRAM temporarily */

        move.l  #__CORE_SRAM1,D0

        add.l   #__CORE_SRAM1_SIZE,D0

        move.l  D0,SP

 

        /* Initialize mcf548x periphs, etc */

        jsr             _mcf548x_init

 

        /* Relocate Stack Pointer */

        move.l  #__SP_INIT,SP

 

        /* Jump to the main process */

        jsr             _main

       

        bra             .

        nop

        nop

        /*halt*/

0 Kudos

496 Views
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Preetu

Please check the following link:

https://community.nxp.com/message/865163 

Best Regards

Jorge Alcala

0 Kudos