KansaiRobot
KansaiRobot

Reputation: 9922

IAR Embedded Workbench. Where is __iar_program_start?

In the code for a STM8 application there is a line

extern void __iar_program_start(void);

now I've searched and this function is nowhere to be found. What is this and where is located??

Upvotes: 2

Views: 6737

Answers (2)

mryldz
mryldz

Reputation: 105

These function may generate for C version of code, cause this type of instruction you can find in assembly.

__iar_program_start:
        LDW     X, #CSTACK$$Limit-1     ; Set stackpointer
        LDW     SP, X

Upvotes: 1

Eyal B
Eyal B

Reputation: 31

Found it in a module called cstartup_M.o inside a library which is part of the IAR tool installation.

In my case, the library is called rt7M_tl.a, but it probably depends on your target CPU.

Upvotes: 3

Related Questions