Specify Memory Location for Comms Driver

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

Specify Memory Location for Comms Driver

Jump to solution
438 Views
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.

Labels (1)
0 Kudos
1 Solution
349 Views
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

View solution in original post

0 Kudos
1 Reply
350 Views
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 Kudos