Specify Memory Location for Comms Driver

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

Specify Memory Location for Comms Driver

跳至解决方案
985 次查看
jimfell
Contributor III

I'd like to specify a memory location for a USB driver.  I've compiled the Freescale USB stack (v4.0.2) as a library, and I'd like to specify the memory location, so that the driver can be shared between main code and the boot loader.  What's the best way to do this?  I imagine that there would have to be a mechanism to map functions to the appropriate call address.

标签 (1)
0 项奖励
回复
1 解答
896 次查看
BlackNight
NXP Employee
NXP Employee

You need to do this with the linker file. Basically marking the functions in the source file with an attribute (segment name), and then place the functions into a memory area in the linker file.

The syntax is somewhat different from compiler to compiler (and linker to linker).

Hope this helps,

Erich

在原帖中查看解决方案

0 项奖励
回复
1 回复
897 次查看
BlackNight
NXP Employee
NXP Employee

You need to do this with the linker file. Basically marking the functions in the source file with an attribute (segment name), and then place the functions into a memory area in the linker file.

The syntax is somewhat different from compiler to compiler (and linker to linker).

Hope this helps,

Erich

0 项奖励
回复