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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
753 次查看
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 解答
603 次查看
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 回复数
604 次查看
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 项奖励
回复
603 次查看
pamis
Contributor II

Thank you for your reply.

    I used normal library instead of ROM library.

Thanks and regards

0 项奖励
回复
603 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

You are welcome!

Best Regards,

Jennie

0 项奖励
回复
603 次查看
pamis
Contributor II

Upload my test project !

0 项奖励
回复