Trying to build -AsRomLib

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

Trying to build -AsRomLib

1,161 Views
Giox79
Contributor I

Good morning,

I have a problem related to building a ROM library for a HCS08 device.

I modified a code that worked fine as a complete SW (generating an executable).

 

Then I commented the

 

void main()

 

method and selected the

 

-AsRomLib

 

linker option.

 

Afterwards, I inserted in my code the lines of code:


    #include <startup.h>
    struct _tagStartup _startupData; /* for linker */


Finally, I had to modify the default .prm file specifying the code section that will be used outside of the lib (I had to do this since my lib use the ansi lib and generated many error without this trick).

 

In the prm I wrote:

 

ENTRIES
    file1.obj:*
    file2.obj:*
    file3.obj:*
END

 

However I have a problem: while building the lib I get the message:


Object _Startup not found    Circuito_1_asRomLib        line 0    C/C++ Problem

 

I tried modifying the ENTRIES adding also the line

 

    _startupData

 

but I'm not able to solve this problem.

 

I tried searching the web and the "HC(S)08/RS08 and HC(S)12 Build Tools Utilities Manual" provided by freescale, but I'm not able to solve this problem.

 

Is there someone that can help me?

Any idea will be appreciated.

If I forgot to specify some useful info, please le me know.

Giovanni

Labels (1)
0 Kudos
Reply
2 Replies

851 Views
CrasyCat
Specialist III

Hello

 

You should remove the line

    VECTOR 0 _Startup

from your .prm file.

 

Is there any other reference to _Startup in the .prm file?

 

CrasyCat

0 Kudos
Reply

851 Views
Giox79
Contributor I

You was right, your trick fixed the problem.

Now I will try using the lib.

 

Thanks for your help, I'm sorry for the stupid question, but I missed checking this file.

Have a nice day,

Giovanni

 

0 Kudos
Reply