what is the command/statement (like some preprocessor directive or #pragma statement ) to store a variable/array at a particular address in the external RAM FOR bf548
You can use the RESOLVE() command in your LDF to force the placement of a variable. You simply write RESOLVE(symbol_name, address). Your LDF will already contain one RESOLVE command, to place the 'START' symbol. Add your RESOLVE() command just after this.
The Linker Manual contains further information on the RESOLVE() command which is available from VisualDSP++ HELP accessible via the Help file menu within VisualDSP++, at the following location:
Help > Contents > Manuals > Software Tool Manuals > Linker and Utilities Manual > 3 Linker Description File > LDF Keywords, Commands, and Operators > LDF Commands > RESOLVE()
Thanks for your reply.I have a query that(i am working on a customized BF548 based board having 64MB RAM), when i run the mass storage example on it, and use the on board external RAM for mass storage , then is there any method to force the storage of files(when the board is conncetd to PC via USB it is enumerated as a mass storage device and i am able to copy/delete/modify the files in it) on the RAM starting from a particular memory address in RAM.
The placement of the files once they are copied to your device is determined by the File System, not the Linker. The advice above will help control Link-time placement of functions and static/global data at link time, but not control the dynamic allocation of memory within the file system at run time.
This follow-up question looks to overlap with the question you have asked in several places on the EngineerZone: determining where fileData exists within your FAT partition after being copied from the host PC. I think your question at the link below is more complete, so I would ask that you continue any further discussion on this topic here:
BF548 mass storage app(usin the RAM for mass storage)
thanks for your reply.Surely i can continue the discussion at the link that you have reffered however , there is no reply on that link so i am posting a question here
in the vdsp ++5 documents at the location Blackfin/docs/drivers/pid/ramdisk on the page 5 in section
2.2Assigning Memory fora RAM disk
it is said that the whole pages of RAM can be allocated usin the keyword RESERVE(RamDiskHeap = 0x02800000(any memory address present in the RAM we can give), RamDiskHeap_length=8M) however using this directive in my code i were not able to allocate the memory from the specified address(in the RAM ) for my mass storage example (using the on board external RAM as mass storage).It would be helpful if yo9u can please provide some insight on this issue.
Does this fail at build time or at runtime? Are you able to provide an example project that demonstrates the behaviour? e.g. is it reproducible with an otherwise-unmodified Mass Storage example with the LDF changes you mention?
the code does not fail to compile/run but the (file copied in )mass storage does not starts from the address that i give in the RESERVE directive .
Are you able to provide a project that reproduces this behaviour, together with steps to reproduce and observe the problem? e.g. how are you verifying/detecting where the file has been written to?
Thanks for your response.I am verifying the the place (where the file is written) by looking at the external RAM(the addresses that pertain to external RAM are taken from the .ldf file) in the Blackfin memory window in Visual DSP IDE,then i match the contents of the file (from original file in the pc) from the starting address til the end of the file.
I wanted to point out that I recently needed to do something similar. Here is what I did: 1. added `RESOLVE(_[VARIABLE_NAME], [SDRAM_ADDRESS])` to my .ldf file. Note that the variable name must be prefixed with a "_".2. added `#pragma symbolic_refT_UINT16 [VARIABLE_NAME] = [MY_VALUE];` to one of my .c files. This worked like a charm! -Matt
Retrieving data ...