We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
It's somewhat like look-up table of assembly. I defined an array in header file of C program like this: unsigned char code volt_2_freq[5]= { 100, 200, 300, 400, 500 }; Can I put it in a specific address of code memory ? I use Phillip LPC900 series MCU and want to set security bits of "MOVC disable" in certain program memory blocks which the array can't be put in. Does keyword "_at_" work ? Thanks~
willy
instead of _AT_ I have all XDATA in an ASM module like (extract)
;;//////////////////////////////////////////////////////////////////// ;; ;; FILE: SLVXDATA.A51 ;; ;; Copyright TwinVision N.A., 2006 ;; ;; Xdata buffers (in assembler to force sequence and XendOfMem define) $NOMOD51 ;$INCLUDE (sdefs.h) ;$INCLUDE (msstruct.inc) PUBLIC GCXSinBuf PUBLIC GCXSouBuf ..... ?XD?xdataf SEGMENT XDATA RSEG ?XD?xdataf ...... ;; --- these located as early as possible for the sake of the speed of internal RAM ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; the next 5 buffers MUST be kept in the current order and contiguous GCX1_2Buf0: ds 01000h ;byte per dot 256 cols, 4 rows GCX1_4Buf0: ds 01000h GCX1_8Buf0: ds 01000h ....
then my .h file define all XDATA as extern
Erik