PRU firmware may be written in C code, or in assembly code, or can be a combination of both in a single example.
Refer for in detail reference:
To get started, follow along the empty example project included in the SDK at <sdk>/examples/pru_io/empty/, documentation at: Empty Project.
The following APIs are available for R5F core to initialize, manage and control PRU core. Refer PRUICSS for more details.
PRUICSS_init(), PRUICSS_deinit()PRUICSS_init() needs to be called before calling any other APIsPRUICSS_open(), PRUICSS_close()PRUICSS_open() function creates the handle for a PRUICSS instance. This handle is required for calling other APIsPRUICSS_close() is used for deleting the handlePRUICSS_intcInit()PRUICSS_initMemory(), PRUICSS_writeMemory(), PRUICSS_readMemory()PRUICSS_registerIrqHandler() : This function registers an Interrupt Handler for an eventPRUICSS_sendEvent() : This function generates an INTC eventPRUICSS_waitEvent() : This function waits for a system event to happenPRUICSS_clearEvent() : This function clears an INTC eventPRUICSS_sendWaitClearEvent() : This function generates an INTC event, waits for INTC event and clears an INTC eventPRUICSS_getVersion() : Get PRUICSS version number from ICSSCFG_REVID registerPRUICSS_readEfuse() : Read the state of efuse bits from ICSSG_HWDIS_REG registerPRUICSS_getAttrs() : Return PRUICSS attributes like base addresses of different modules, their sizes, etc.PRUICSS_setIepClkSrc() : Configure the source of the IEP clock to be either IEP CLK as the source or ICSSGn_CORE_CLKPRUICSS_controlIepCounter() : Enable/Disable the counter in IEP modulePRUICSS_setIepCounterIncrementValue() : Set the default increment value for counter in IEP modulePRUICSS_setConstantTblEntry() : Update the constant table for specified constant table entry which have write permissionsPRUICSS_setGpMuxSelect() : Set the GP Mux Select mode (GP/EnDat/MII/SD) for a specific PRUPRUICSS_setGpiMode() : Sets the GPI mode for a specific PRUPRUICSS_setSaMuxMode() : Set the G_MUX_EN mux field in ICSSG_SA_MX_REG registerPRUICSS_configureCycleCounter() : Enable/Disable the PRU Cycle Counter for a corePRUICSS_setIcssCfgMiiMode() : Set the MII mode (MII/RGMII/SGMII) in MII_G_RT_ICSS_G_CFG registerPRUICSS_setIcssCfgTxFifo() : Configure the TX FIFO (L1/L2) to be used