ApplicationReportSPRA806-December20011AnEasyWayofCreatingaC-callableAssemblyFunctionfortheTMS320C28xDSPToddAndersonDigitalSignalProcessingSolutionsABSTRACTC-callableassemblyroutinesrequireanunderstandingofparameter-passingconventionsandenvironmentsexpectedbytheCcompiler.ThisapplicationreportprovidesinstructionsandsuggestionstoconfiguretheCcompilertoassistwiththeseissues.Contents1Introduction2.........................................................................2CreatingaC-CallableAssemblyFunction3.............................................2.1SettingUpaFunctionPrototypeinC3................................................2.2SettingUpaCall3.................................................................2.3CreatingtheFunctioninC3.........................................................2.4CompilingtheCFileThatContainsYourFunction4....................................2.4.1Step-by-StepCompilerOptions4..............................................2.4.2Step-by-StepLinkerOptions8.................................................2.5ViewingtheResultingInterlistedFileforthe“shell”10...................................2.6Creatinga.asmFileWithCodeFromtheInterlistedFunction13.........................2.7DefiningtheFunctionPrototypeasExternal14.........................................2.8AddingtheAssemblyFiletotheCodeComposerStudioProject15.......................3Conclusion15.........................................................................ListofFiguresFigure1RecommendedFlowforCreatingApplicationsinaCEnvironment2......................Figure2SettingUpaCFunctionCalled“Slope”4..............................................Figure3BasicCompilerOptions5............................................................Figure4FeedbackCompilerOptions6........................................................Figure5FilesCompilerOptions7............................................................Figure6AssemblyCompilerOptions8........................................................Figure...