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.

请教一个关于PRU编译器的问题

Other Parts Discussed in Thread: AM3359

请问PRU的编译器有支持COFF格式输出的吗?有的话,是哪个版本呢?谢谢!

  • 没有,只有elf格式输出。
  • 这样子的话,如果我把PRU工程输出的.out格式的可执行文件转换成一个.obj文件,那么这个ELF格式的.obj文件,能够和我的COFF格式的.out文件相链接吗?

    我是参考技术文档的以下说明做的:

    12.3 Linking with an ARM Executable
    The hexpru tool can be used to convert a PRU executable into an ARM object file that can be linked in
    with an ARM project. The PRU code and data are converted to ARM data. The ARM application can
    reference symbols in the PRU file. This is useful for bare metal projects that are not running a high level
    operating system like Linux.
    The files for this example are provided in the PRU compiler's "example" directory. The resulting
    executable exposes the shared_buf and local_data symbols.
    clpru -o3 test.c -z AM3359_PRU.cmd -o pru.out
    To convert the executable to an ARM object file, use the PRU_to_ARM.cmd file as follows:
    hexpru pru.out -o pru.obj PRU_to_ARM.cmd
    The resulting pru.obj file can be linked with the dummy ARM application as follows:
    armcl arm.c pru0.obj -z dummy_ARM.cmd -o arm.out