This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[OMAP3503] Assembler

Hi...I have an OMAP 3503 EVM that came with CodeSourcery G++. Can I use assembly code in CodeSourcery G++? If yes please tell me how. ( can i use #asm ...<code> ...#endasm? or there is another way). I want to use the board for DSP using assemly code. I am a beginner.....[:)]

  • Radu Blanaru said:
    Can I use assembly code in CodeSourcery G++?

    I think you will find your answer within arm-2007q3\share\doc\arm-2007q3-51-arm-none-linux-gnueabi\pdf\gcc\gcc.pdf which describes the usage of the GCC compiler included with the CodeSourcery toolset, it seems that you can insert assembly statements into the C by using asm(someassemblyinstruction); calls.

    Radu Blanaru said:
    I want to use the board for DSP using assemly code.

    Since you mention DSP, note that the CodeSourcery toolset is for the ARM not the C64x+ DSP side, for the C64x+ DSP you would be using the TI code generation tools (CGT) set which comes with the OMAP3 DVDSDK, for example dvsdk_3_00_00_29\cg6x_6_0_16_1. For inserting assembly with the C64x+ you would also do so with an asm();, this is discussed in section 6.7 of SPRU187.

    Radu Blanaru said:
    I am a beginner.....Smile

    Just a bit of advice, using assembly from C code can get very complicated very quickly. In general if you are programming in C I would actually suggest avoiding using such asm() calls and instead start with just plain C and then move to using intrinsics if you need to access specific optimized instructions, and if you truly need total assembly level optimization it would probably be best to do that in a seperate assembly function in a seperate file.