|
|||||||||||
Technical Support Support Resources
Product Information |
C51: Reserving Code SpaceQUESTIONHow do I reserve code space so the compiler and linker will automatically split my program between code space from 0x0000 to 0x1FFF and 0x8000 to 0xFFFF? ANSWERThere are a number of ways you can use the C51 compiler and linker to avoid using sections of the CODE space. The easiest way is to declare an array in CODE that resides at the desired address. For example, to exclude the CODE space from 0x2000 to 0x7FFF, the following code will work.
Note that the array "dummy" is 6000 characters (bytes) long and starts at 0x2000 in the CODE space. The XDATA pointer, "dummy2", is used to avoid compiler and linker warnings. If you omit it, the linker will probably complain that nothing uses the dummy array. MORE INFORMATION
Last Reviewed: Thursday, February 25, 2021 | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.