Why ROM_LIB haven't linked or burned into .s19 file?

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

Why ROM_LIB haven't linked or burned into .s19 file?

ソリューションへジャンプ
915件の閲覧回数
pamis
Contributor II

Hi

     I'm  working with bootloader, because of runtime library instead(eg. switch case, byte shift finally translate into _CASE_CHECKED_CODE, _BSHL...). I must separate APP and bootloader with rom library(normal library can't allocate address). Now, i create a bootloader rom library and link with app code, but there is no data in .s19 file..., help! Help! HELP!!!

 

snippet from project.map file:

*********************************************************************************************

SECTION-ALLOCATION SECTION

Section Name             Size  Type     From       To       Segment

---------------------------------------------------------------------------------------------

.init                                   49     R     0xC000     0xC030   ROM_C000

.startData                        10     R     0xC031     0xC03A   ROM_C000

.text                                  24     R     0xC03B     0xC052   ROM_C000

.copy                                2     R     0xC053     0xC054   ROM_C000

.stack                              256   R/W     0x3800     0x38FF   RAM

...

Summary of section sizes per section type:

READ_ONLY (R):          57 (dec:       87)

READ_WRITE (R/W):   100 (dec:      256)

NO_INIT (N/I):                 DE (dec:      222)

*********************************************************************************************

VECTOR-ALLOCATION SECTION

    Address     InitValue   InitFunction

---------------------------------------------------------------------------------------------

     0xFFFE        0xC029   _Startup

*********************************************************************************************

OBJECT-ALLOCATION SECTION

     Name               Module                 Addr   hSize   dSize     Ref    Section   RLIB

---------------------------------------------------------------------------------------------          

MODULE:                 -- rom.lib --

- PROCEDURES:

     UpdateEvent_AppPFlash           F577     46B    1131       1                 @

     MakeCrc_Tbl                                 FA73      45      69       1                 @

     CalcCrc_u16_Val                         FAB8      32      50       0                 @

- VARIABLES:

 

 

Thanks and regards

ラベル(1)
0 件の賞賛
返信
1 解決策
765件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

To create .lib file, you need follow the steps below.(please also refer the attached mylib project)

  1. Create one project with wizard.(I use NE64 as target chip)
  2. change the file name main.c as the lib name (in sample is mylib.c)
  3. define the lib functions in mylib.c
  4. add header file mylib.h in the project, and declare the prototype of the lib functions in it.
  5. add “#include mylib.h” in  mylib.c
  6. delete the following files from the project: start12.c, datepage.c, *.prm, MC9S12NE64.h, MC9S12NE64.c, ansibi.lib.c
  7. Press ALT+F7, in “Target Setting”, select “Libmaker for HC12” as Linker in the second droplist. In “Libmaker for HC12”, name your Library Filename.(the sample use mylib.lib), Click OK to close this window.
  8. Compile again. In “bin” folder of the lib project, you could find the lib file named “mylib.lib”
  • import “mylib.lib” and “mylib.h” in your current project
  • add “#include "mylib.h"”in the main.c file
  • then you can use the lib functions in your current project code.

please refer this to create your lib file. Hope this helps.


Have a great day,
Jennie Zhang

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

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
766件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

To create .lib file, you need follow the steps below.(please also refer the attached mylib project)

  1. Create one project with wizard.(I use NE64 as target chip)
  2. change the file name main.c as the lib name (in sample is mylib.c)
  3. define the lib functions in mylib.c
  4. add header file mylib.h in the project, and declare the prototype of the lib functions in it.
  5. add “#include mylib.h” in  mylib.c
  6. delete the following files from the project: start12.c, datepage.c, *.prm, MC9S12NE64.h, MC9S12NE64.c, ansibi.lib.c
  7. Press ALT+F7, in “Target Setting”, select “Libmaker for HC12” as Linker in the second droplist. In “Libmaker for HC12”, name your Library Filename.(the sample use mylib.lib), Click OK to close this window.
  8. Compile again. In “bin” folder of the lib project, you could find the lib file named “mylib.lib”
  • import “mylib.lib” and “mylib.h” in your current project
  • add “#include "mylib.h"”in the main.c file
  • then you can use the lib functions in your current project code.

please refer this to create your lib file. Hope this helps.


Have a great day,
Jennie Zhang

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

0 件の賞賛
返信
765件の閲覧回数
pamis
Contributor II

Thank you for your reply.

    I used normal library instead of ROM library.

Thanks and regards

0 件の賞賛
返信
765件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

You are welcome!

Best Regards,

Jennie

0 件の賞賛
返信
765件の閲覧回数
pamis
Contributor II

Upload my test project !

0 件の賞賛
返信