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.
In our PRU EtherCAT development, we are following the approach of the SDK example program "ethercat_slave_beckhoff_ssc_demo."
We load the EtherCAT firmware code from R5FSS to PRU-ICSSG.
(EtherCAT firmware path: ${MCU_PLUS_SDK_PATH}/source/industrial_comms/ethercat_slave/icss_fwhal/firmware/g_v1.3/)
However, with this method, it seems that ecat_frame_handler_bin.h and ecat_host_interface_bin.h occupy MSRAM.
Due to memory space considerations, we hope to place the const array in XIP.
For example:
Since the EtherCAT firmware code has already been packaged as .ilb, attempting to do this proved unsuccessful.
Is there a method to place the const array in XIP?
Best Regards
Hi,
So the firmware is not loaded from library for ethercat_slave_beckhoff_ssc_demo but from C:\ti\ind_comms_sdk_am243x_09_00_00_03\source\industrial_comms\ethercat_slave\icss_fwhal\tiescbsp.c
volatile uint32_t *pru_frame_proc = (uint32_t *)FrameProc; volatile uint32_t *pru_host_proc = (uint32_t *)HostProc; volatile uint32_t pru_frame_proc_len = sizeof(FrameProc); volatile uint32_t pru_host_proc_len = sizeof(HostProc);
bsp_init() { /* PRU firmwares are loaded as header files in application */ PRUICSS_writeMemory(pruIcssHandle, PRUICSS_IRAM_PRU(0) , 0, (uint32_t *) pru_frame_proc, pru_frame_proc_len); PRUICSS_writeMemory(pruIcssHandle, PRUICSS_IRAM_PRU(1) , 0, (uint32_t *) pru_host_proc, pru_host_proc_len); }
Instead, you can also read from flash and write to corresponding PRUICSS_IRAM_PRU(x)
Regards,
Aaron
Hi Aaron,
Instead, you can also read from flash and write to corresponding PRUICSS_IRAM_PRU(x)
How can I read from flash and write to corresponding PRUICSS_IRAM_PRU(x) ?
Best Regards
Hi Chen,
Sorry for the delay in response. We will look into this and get back to you by mid next week.
Regards,
Aaron
Hi Chen,
Please refer to this particular page for the APIs: https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/09_01_00_41/exports/docs/api_guide_am243x/group__BOARD__FLASH__MODULE.html#ga688fd20ef668ce16b8fd86fbb85a69c1
Once the firmware is read from the provided offset using the above API, you should do a PRU memory write to the PRUICSS_IRAM_PRU for the corresponding firmwares.
Regards,
Aaron