Allocating Variables in Absolute RAM or ROM Locations Using ImageCraft ‘C’ Compiler - KBA203832
Anonymous
Not applicable
Nov 03, 2015
10:27 PM
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Nov 03, 2015
10:27 PM
Version: **
Translation - Japanese: ImageCraft 'C'コンパイラを使用した絶対RAMまたはROMの場所への変数の割り当て - KBA203832 - Community Translated (JA)
Question:
How do I allocate an absolute RAM or R0M address in PSoC® 1 using ImageCraft ‘C’ compiler?
Answer:
Use the syntax shown below to declare the variable at absolute RAM and ROM locations.
#pragma abs_address: //declaration of variables to be located in ROM address #pragma end_abs_address #pragma ram_abs_address //declaration of variables to be located in RAM address #pragma end_abs_address
Example:
Make sure that the ROM location is not overlapping with the user code and that the address is valid for the particular device.
#pragma abs_address:0x500 WORD waRomBuffer[10]; //waRomBeffer is located at the ROM address=0x500 #pragma end_abs_address #pragma ram_abs_address 0xE0 WORD waRamBuffer[10]; //waRamBuffer is located at the Ram address of 0xE0 #pragma end_abs_address
Labels
Rate this article:
Contributors
-
This widget could not be displayed.Anonymous