PRU固件编译成数组,有两个数组:xxx_image0[ ],xxxx_image1[ ],image0为程序,装载到PRU IAR,image1是什么,要装载到哪里?_XY2_100.hex
PRU固件编译成数组,有两个数组:xxx_image0[ ],xxxx_image1[ ],image0为程序,装载到PRU IAR,image1是什么,要装载到哪里?_XY2_100.hex
您好
我们需要时间为您调查,请等待我们的回复。
由于公共假期,回复有所延迟,带来不便还请谅解
您好
我们需要时间为您调查,请等待我们的回复。
由于公共假期,回复有所延迟,带来不便还请谅解
您可以在下一个
https://github.com/TexasInstruments/mcupsdk-core/blob/next/examples/pru_io/empty/empty_example.c
gPruIcss0Handle = PRUICSS_open(CONFIG_PRU_ICSS0);
status = PRUICSS_initMemory(gPruIcss0Handle, PRUICSS_DATARAM(PRUICSS_PRU0));
DebugP_assert(status != 0);
status = PRUICSS_initMemory(gPruIcss0Handle, PRUICSS_DATARAM(PRUICSS_PRU1));
DebugP_assert(status != 0);
status = PRUICSS_loadFirmware(gPruIcss0Handle, PRUICSS_PRU0, PRU0Firmware_0, sizeof(PRU0Firmware_0));
DebugP_assert(SystemP_SUCCESS == status);
status = PRUICSS_loadFirmware(gPruIcss0Handle, PRUICSS_PRU1, PRU1Firmware_0, sizeof(PRU1Firmware_0));
DebugP_assert(SystemP_SUCCESS == status);
#if defined(SOC_AM64X) || defined(SOC_AM243X)
status = PRUICSS_loadFirmware(gPruIcss0Handle, PRUICSS_RTU_PRU0, RTUPRU0Firmware_0, sizeof(RTUPRU0Firmware_0));
DebugP_assert(SystemP_SUCCESS == status);
status = PRUICSS_loadFirmware(gPruIcss0Handle, PRUICSS_RTU_PRU1, RTUPRU1Firmware_0, sizeof(RTUPRU1Firmware_0));
DebugP_assert(SystemP_SUCCESS == status);
status = PRUICSS_loadFirmware(gPruIcss0Handle, PRUICSS_TX_PRU0, TXPRU0Firmware_0, sizeof(TXPRU0Firmware_0));
DebugP_assert(SystemP_SUCCESS == status);
status = PRUICSS_loadFirmware(gPruIcss0Handle, PRUICSS_TX_PRU1, TXPRU1Firmware_0, sizeof(TXPRU1Firmware_0));
DebugP_assert(SystemP_SUCCESS == status);
#endif
我的问题是:PRU 程序编译后,生成了两个数组,xxx_image0[ ]为程序,PRUICSS_loadFirmware()至IAR,问题是:1)xxx_image1[ ] 是什么?2)应PRUICSS_loadFirmware()到哪里?
您需要根据固件的链接程序命令文件(使用memcpy)手动将_XY2_100_IMAGE_1加载到PRU DMEM或SMEM,因为PRUICSS_loadFirmware不支持加载数据部分,而只支持将PRU指令加载到IMEM
另一个选项是通过lbbo/sbbo从PRU固件初始化DMEM,而不依赖于代码中已初始化的变量。 如果您共享用于生成此信息的PRU固件,我们可能会提供一些提示
您可以使用PRUICSS_writeMemoryAPI写入DMEM。
正如PRUICSS_loadFirmware文档中提到的,它还执行其他操作,例如在写入IMEM之前禁用核心,然后重置它。