Problem running code generated with CodeWarrior

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Problem running code generated with CodeWarrior

ソリューションへジャンプ
1,234件の閲覧回数
pierreschmidt
Contributor III

Hello, I modified a project initially written for windriver diab compiler to work with Codewarrior.

 

I then ran the project with the help of cw_icdppcnexus but experienced a problem after startup when the PC goes to the main function: The PC gets 000000h which makes execution continue at a location where there is no executable code

 

So I had a look at the assembly instructions equivalency and compared the original Windriver executable file with the CodeWarrior one. Here is the result:

 

2650_2650.jpgSans titre.jpg

The window on top is the Codewarrior generated code, the second is from Windriver.

 

Codewarrior generates some extra instructions which make the PC go to 00000h due to SE_BLR instruction (LR is 00000h). After that the code looks very similar for both compilers. Is there a way to disable the generation of those extra instructions?? (does not actually know what those instructions do)

 

Thanks a lot

 

P.SCHMIDT

ラベル(1)
0 件の賞賛
返信
1 解決策
1,042件の閲覧回数
pierreschmidt
Contributor III

I solved this problem. It was in fact due to bad memory mapping

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,043件の閲覧回数
pierreschmidt
Contributor III

I solved this problem. It was in fact due to bad memory mapping

0 件の賞賛
返信
1,042件の閲覧回数
luciantodor
Contributor I

I have the same problem and I cannot find the correct configuration for the memory mapping.

Please, can you help me with the memory mappgig?

Thanks!

Here is my memory section from the linker:

 

MEMORY

{

     /* Interrupt Service Routines */

     flash_rchw : org = 0x00000000, LENGTH = 0x8

     flash_vec : org = 0x20000, LENGTH = 0xD00

     

     /* 1MB Internal Flash */

     int_flash : org = 0x20D00, LENGTH = 1M - 0x20D00

     

     /* 80K Internal SRAM */

     int_sram : org = 0x40000000, LENGTH = 80k

     stack : org = 0x00200000, len = 0x0200

}

0 件の賞賛
返信