Link order for ksdk

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

Link order for ksdk

661件の閲覧回数
rajbatra
Contributor IV

I was doing a project file cleanup on KDS 3.0.0 where I moved the lib_mqx.a and other static libraries over to the libraries section of the build settings (turns out that environmental variables aren't obeyed in the miscellaneous section but are in the library section).

 

Normally the static libraries are linked first... E.g. -lmqx -lksdk_platform... then -lc -lgcc, etc.

 

When I moved them over to the libs section, I inadvertently changed the order -lc -lgcc ... -lmqx

 

This changed the binary output size and caused my application to crash with console error:

 

assertion "fd == 0" failed: file "../Firmware/K64F/BSP/init_bsp.c", line 144, function: _bsp_nio_stdio_install

 

 

 

By moving mqx to the front, everything worked fine. Likely, two functions have same name and linker grabbed first one.

 

Anyway, thought I'd share to save anyone else the headache if they run into this.

 

Thanks,

-Raj

ラベル(1)
0 件の賞賛
返信
0 返答(返信)