Good morning
I want to call ROM functions and I applied the example from Technical Reference Manual but the linker return errors.
I use Compiler version TI v5.0.1
With this command line:
Compiler:
--code_state=32 --abi=ti_arm9_abi -me -g --include_path="C:/ti/ccsv5/tools/compiler/arm_5.0.1/include" --include_path="C:/SDK/lib" --include_path="C:/SDK/platform/omap4/board/pandaboardes" --include_path="C:/SDK/platform/omap4" --rtti --gcc --diag_warning=225 --display_error_number -k
Linker:
--code_state=32 --abi=ti_arm9_abi -me -g --rtti --gcc --diag_warning=225 --display_error_number -k -z --stack_size=0x800 -m"SDK_Probe_OMAP4.map" --heap_size=0x800 -i"C:/ti/ccsv5/tools/compiler/arm_5.0.1/lib" -i"C:/SDK_Probe_OMAP4" -i"C:/ti/ccsv5/tools/compiler/arm_5.0.1/include" --reread_libs --warn_sections --display_error_number --ram_model
Return :
**** Build of configuration Debug for project SDK_Probe_OMAP4 ****
"C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all
'Building file: ../main.c'
'Invoking: ARM Compiler'
"C:/ti/ccsv5/tools/compiler/arm_5.0.1/bin/armcl" --code_state=32 --abi=ti_arm9_abi -me -g --include_path="C:/ti/ccsv5/tools/compiler/arm_5.0.1/include" --include_path="C:/SDK/lib" --include_path="C:/SDK/platform/omap4/board/pandaboardes" --include_path="C:/SDK/platform/omap4" --rtti --gcc --diag_warning=225 --display_error_number -k --preproc_with_compile --preproc_dependency="main.pp" "../main.c"
"main.asm", ERROR! at line 111: [E0004] Illegal operand
LDR r12, #0x101
"main.asm", ERROR! at line 112: [E0002] Illegal mnemonic specified
SMC 0x1
2 Assembly Errors, No Assembly Warnings
Errors in Source - Assembler Aborted
>> Compilation failure
gmake: *** [main.obj] Error 1
gmake: Target `all' not remade because of errors.
**** Build Finished ****
I use this function for example:
__asm(" .sect \".text:hlos_cache_clean_invalidate_range\"\n"
" .clink\n"
" .global hlos_cache_clean_invalidate_range\n"
"hlos_cache_clean_invalidate_range:\n"
" PUSH {R1-R12, LR}\n"
" LDR r12, #0x101\n"
" SMC 0x1\n"
" PUSH {R1-R12, PC}\n"
" bx lr");
or:
void hlos_cache_clean_invalidate_range()
{
asm(" PUSH {R1-R12, LR}\n\t"
" LDR r12, #0x101\n\t"
" SMC 0x1\n\t"
" PUSH {R1-R12, PC}");
}
How to call ROM functions?
I want to enable and use the PL310 cache controller.
Thank you very much.