Target = Blackfin DSP Is there a way to "force" C compiler/linker to produce code that references C code data variables not by their absolute address, but rather by their offset from the beggining of the corresponding data section. Something like : b0 = start_address_of_data_section; i0 = offset_for_temp; r0 = b0 + i0; //r0 holds address of temp instead of : r0.l = temp; r0.h = temp; //r0 holds address of temp thanks, dubi
Visual DSP compiler/linker Q
Started by ●December 16, 2003
Reply by ●December 17, 20032003-12-17
dubravko wrote:> Target = Blackfin DSP > Is there a way to "force" C compiler/linker to produce code that references > C code data variables not by their absolute address, but rather by their > offset from the beggining of the corresponding data section.Version 3.1 of VisualDSP includes support for C-like struct datatype for assembler. This supports named offseted indirect access via DAG pointers of the kind i0 = MyStruct; r0 = dm(offsetof(MyStruct, temp1), i0); where temp1 is a member variable of MyStruct. Look up the exact syntax for definition and declaration of structs in the manual. Regards, Andor