diff --git a/.github/workflows/ccs_build.yml b/.github/workflows/ccs_build.yml index 1f74b5efb..a1c7daf63 100644 --- a/.github/workflows/ccs_build.yml +++ b/.github/workflows/ccs_build.yml @@ -249,6 +249,25 @@ jobs: CCS_NODE = $(CCS_PATH)/tools/node/node EOF + - name: Build project libraries + # Some projects (for example pru_i2s) link a library that the CCS + # project does not build. Build these first with the makefiles, the + # same way a user runs "make libs" before building in CCS. + # Projects without a library for this device do nothing. + run: | + DEVICE="${{ matrix.device }}" + if [ -z "${{ matrix.mcu_plus_sdk }}" ]; then + echo "No MCU+ SDK for ${DEVICE}, skipping library build" + exit 0 + fi + ARM_CGT_PATH="$HOME/ti/ccs_20.3.1/ccs/tools/compiler/ti-cgt-armllvm_4.0.3.LTS" + [ -d "${ARM_CGT_PATH}" ] || ARM_CGT_PATH="$HOME/ti/ti-cgt-armllvm_4.0.3.LTS" + make libs DEVICE="${DEVICE}" \ + BUILD_MCUPLUS=y \ + PROFILE=release \ + MCU_PLUS_SDK_PATH="$HOME/ti/${{ matrix.mcu_plus_sdk }}" \ + CGT_TI_ARM_CLANG_PATH="${ARM_CGT_PATH}" + - name: Patch metadata for SysConfig version # Temporarily encodes the SysConfig version into OpenPRU's package.tirex.json # and product.json so CCS selects the correct SysConfig version when diff --git a/README.md b/README.md index 0dac3e852..ec48697fa 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,12 @@ Makefiles can be used to: For detailed steps on how to use makefiles, run ```make help``` from the root folder of the `open-pru` repository. +Some projects build a library that the project then links, for example the +`pru_i2s` driver library. `make` builds these libraries first. They can also be +built or cleaned on their own with `make libs` and `make libs-clean`. +`make clean` does not remove them. Run `make libs` again after changing the +library source code. + ### Building With CCS - Import the project into CCS. For steps to create a new PRU project in CCS, diff --git a/examples/makefile b/examples/makefile index 085d41f99..580cff6a8 100644 --- a/examples/makefile +++ b/examples/makefile @@ -6,10 +6,25 @@ SUBDIRS := \ LCD_interface logic_scope pru_emif pru_eqep pru_i2s spi_loopback \ fir multicore_scheduler rpmsg_echo_linux +# projects that build a library of their own. Only these get "libs" and "libs-clean" +LIBS_SUBDIRS := pru_i2s + # "make" or "make all" builds projects that match $(DEVICE) set in imports.mak all: ARGUMENTS = all all: $(SUBDIRS) +# "make libs" builds the libraries of the projects in LIBS_SUBDIRS +libs: $(addprefix libs-,$(LIBS_SUBDIRS)) + +# "make libs-clean" cleans the libraries of the projects in LIBS_SUBDIRS +libs-clean: $(addprefix libs-clean-,$(LIBS_SUBDIRS)) + +$(addprefix libs-,$(LIBS_SUBDIRS)): + $(MAKE) -C $(patsubst libs-%,%,$@) libs + +$(addprefix libs-clean-,$(LIBS_SUBDIRS)): + $(MAKE) -C $(patsubst libs-clean-%,%,$@) libs-clean + pru: ARGUMENTS = pru pru: $(SUBDIRS) @@ -23,4 +38,5 @@ clean: $(SUBDIRS) $(SUBDIRS): $(MAKE) -C $@ $(ARGUMENTS) -.PHONY: all clean pru host $(SUBDIRS) +.PHONY: all clean pru host libs libs-clean $(SUBDIRS) \ + $(addprefix libs-,$(LIBS_SUBDIRS)) $(addprefix libs-clean-,$(LIBS_SUBDIRS)) diff --git a/examples/pru_i2s/README.md b/examples/pru_i2s/README.md index 2a946495d..acf0d339a 100644 --- a/examples/pru_i2s/README.md +++ b/examples/pru_i2s/README.md @@ -42,7 +42,7 @@ This ensures continuous and efficient data transmission/reception with minimal l | Processor | Hardware | Software | |-----------|----------|----------| -| AM263x | Control Card (TMDSCNCD263) + HSECDOCK | MCU+ SDK AM263x 11.0, CCS 21.0.1, SysConfig 1.28.1, PRU CGT 2.3.3 | +| AM263x | Control Card (TMDSCNCD263) + HSECDOCK | OpenPRU 2026.02, MCU+ SDK AM263x 11.0, CCS 21.0.1, SysConfig 1.28.1, PRU CGT 2.3.3 | | AM261x | LaunchPad LP-AM261 REV A | MCU+ SDK AM261x 11.0, CCS 21.0.1, SysConfig 1.28.1, PRU CGT 2.3.3 | --- @@ -162,12 +162,10 @@ pru_i2s/ ├── README.md # This file ├── makefile # Top-level makefile ├── firmware/ # PRU firmware source code -│ ├── include/ # Shared firmware headers -│ ├── I2S/ # I2S protocol implementation +│ ├── i2s/ # I2S protocol implementation │ │ ├── pru_i2s_main.asm # Main firmware logic │ │ ├── fw_regs.asm # Register definitions │ │ ├── linker.cmd # Linker script -│ │ ├── icss_pru_i2s_fw.h # Firmware register map │ │ ├── pru_i2s_interface.h # Interface definitions │ │ ├── pru_i2s_regs.h # Hardware registers │ │ ├── pru0_tx/ # TX firmware builds @@ -176,22 +174,29 @@ pru_i2s/ │ │ └── pru1_rx/ # RX firmware builds │ │ ├── am261x-lp/ │ │ └── am263x-cc/ -│ └── TDM4/ # TDM4 protocol (parallel structure) -│ └── (same as I2S) -├── driver/ # PRU I2S driver implementation -│ └── pru_i2s_drv.c # Driver source (~2400 lines) -├── include/ # Driver public headers -│ ├── pru_i2s_drv.h # Driver API (~1000+ lines) -│ └── pru_i2s_pruss_intc_mapping.h # INTC definitions +│ ├── tdm4/ # TDM4 protocol (parallel structure) +│ ├── am261x-lp/ # Generated firmware array headers for AM261x (build output) +│ │ ├── pru_i2s_pru0_array.h, pru_i2s_pru1_array.h +│ │ └── pru_i2s_tdm4_pru0_array.h, pru_i2s_tdm4_pru1_array.h +│ └── am263x-cc/ # Generated firmware array headers for AM263x (build output) +│ └── (same files as am261x-lp) ├── pru_i2s_app/ # R5F host application │ ├── board/ # Board support files │ │ ├── ioexp_tca6416.c # IO expander driver │ │ └── ioexp_tca6416.h │ ├── pru_i2s_diagnostic.c # Main application +│ ├── pru_i2s_app_config.c/.h # Application configuration (PRUI2S_applyAppConfig) │ ├── data.h # Test data │ ├── am261x-lp/r5fss0-0_freertos/ │ └── am263x-cc/r5fss0-0_freertos/ +├── lib/ # Driver library (build output of make libs, not checked in) └── images/ # Documentation images + +source/i2s/ # I2S driver library source, outside of this example +├── pru_i2s_drv.c/.h # Driver +├── pru_i2s_config.h # Driver configuration +├── icss_pru_i2s_fw.h # Firmware register layout shared with the PRU firmware +└── makefile # Builds the library, run through make libs in this example ``` --- @@ -204,35 +209,53 @@ pru_i2s/ - Set `DEVICE` environment variable in `imports.mak` - Ensure CCS utils are in PATH (for gmake on Windows) -**Build all firmware and application:** -```bash -cd /path/to/open-pru -make DEVICE=am261x # Build for AM261x -make DEVICE=am263x # Build for AM263x -``` - -**Build only firmware:** +**Build the driver library first, then the firmware and application.** +Run both commands for the device you are building for, in this order: ```bash cd examples/pru_i2s -make DEVICE=am261x # Builds 4 firmware variants (I2S + TDM4, PRU0 + PRU1) + +# AM261x +make DEVICE=am261x libs # 1. Build the driver library +make DEVICE=am261x # 2. Build the firmware and application + +# AM263x +make DEVICE=am263x libs # 1. Build the driver library +make DEVICE=am263x # 2. Build the firmware and application ``` +The driver library is built separately from the application. `make` in this +directory does **not** build the library. The application only links the +existing library, and stops with an error if the library is missing. Run +`make libs` first on a fresh clone, and again after any change to the driver +source in `source/i2s/`. Library files are not checked in. Running `make` from +the root of the repository builds the library first, so the two steps are not +needed there. + +Use `make libs PROFILE=debug` to build the debug library for a debug build of the +application. The default is `release`, set `PROFILE` in `imports.mak`. + **Clean:** ```bash -make DEVICE=am261x clean +make DEVICE=am261x clean # Clean the firmware and application +make DEVICE=am261x libs-clean # Clean the driver library ``` +`clean` does not remove the driver library. Use `libs-clean` for that. + **What gets built:** - 4 PRU firmware binaries per device (I2S PRU0 TX, I2S PRU1 RX, TDM4 PRU0 TX, TDM4 PRU1 RX) -- Firmware header arrays (`.h` files for embedding in application) -- R5F application binary (`.out` and `.appimage`) +- Firmware header arrays (`.h` files) copied into `firmware//` (`firmware/am261x-lp/` or `firmware/am263x-cc/`). Each board has its own copy, so building for one board does not overwrite the headers of the other +- PRU I2S driver library (`lib/pru_i2s..r5f.ti-arm-clang..lib`), built by `make libs` from the driver source in `source/i2s/` +- R5F application binary (`.out` and `.mcelf`) + +**Note:** The PRU firmware makefiles use `pru_rules.mak` (silicon version `-v3`) and place all build artifacts in a `ti-pru-cgt/generated/` subdirectory. The driver source is in `source/i2s/`, and its library output belongs to this example in `examples/pru_i2s/lib/`. ### Building with Code Composer Studio **Import Firmware Projects:** 1. Open CCS 2. Project → Import CCS Projects -3. Navigate to `examples/pru_i2s/firmware/I2S/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/` +3. Navigate to `examples/pru_i2s/firmware/i2s/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/` 4. Select `example.projectspec` 5. Click Finish 6. Repeat for other firmware variants (pru1_rx, TDM4, etc.) @@ -242,8 +265,9 @@ make DEVICE=am261x clean 2. Import `example.projectspec` **Build Order:** -1. Build PRU firmware first (generates header arrays) -2. Build R5F application (includes firmware headers) +1. Build the driver library (`make DEVICE= libs` in `examples/pru_i2s`). CCS does not build it. Rebuild it after any change to `source/i2s/`. Build `PROFILE=debug` for the Debug configuration, the default is `release` +2. Build PRU firmware (generates header arrays) +3. Build R5F application (includes firmware headers, links the driver library from `examples/pru_i2s/lib/`) **Debug Configuration:** Refer to MCU+ SDK documentation: @@ -265,7 +289,7 @@ The R5F application initializes PRU-ICSSG, downloads firmware to PRU cores, and │ (pru_i2s_diagnostic.c) │ ├─────────────────────────────┤ │ PRU I2S Driver │ -│ (pru_i2s_drv.c) │ +│ (source/i2s/pru_i2s_drv.c)│ ├─────────────────────────────┤ │ MCU+ SDK Drivers │ │ (PRUICSS, GPIO, etc.) │ @@ -302,17 +326,20 @@ The R5F application uses SysConfig to configure PRUICSS: **Initialization:** ```c +PRUICSS_intcInit() // Initialize the PRU-ICSS INTC (MCU+ SDK, called by the application before PRUI2S_init) PRUI2S_init() // Read firmware config, update driver tables PRUI2S_getInitCfg() // Get buffer sizes, sampling freq, slot width PRUI2S_paramsInit() // Set default parameters -PRUI2S_open() // Clear IMEM/DMEM, init INTC, download firmware -PRUI2S_pruGpioPadConfig() // Configure I2S signal pins -PRUI2S_initPpBufs() // Initialize ping-pong buffers +PRUI2S_open() // Clear IMEM/DMEM, download firmware, initialize the ping-pong buffers ``` +The I2S signal pins are configured by SysConfig, the driver does not configure them. +The driver library (`source/i2s/`) does not contain the application configuration +(`PRUI2S_applyAppConfig()`). It is part of the example, in +`pru_i2s_app/pru_i2s_app_config.c`. + **Interrupt Management:** ```c -PRUICSS_intcSetSysEvtChMap() // Map system events to channels PRUI2S_enableInt() // Enable TX/RX interrupts PRUI2S_disableInt() // Disable interrupts PRUI2S_clearInt() // Clear interrupt flags @@ -361,11 +388,11 @@ Interrupts trigger on: - **Clobbers**: `r0`–`r29` (all working registers used); flags modified - **Preserved**: none (`main` uses full PRU register context; no registers guaranteed preserved across the loop) - **Clock assumption**: PRU at 200 MHz; BCLK/FSYNC derived externally -- **Notes**: See `firmware/I2S/pru_i2s_regs.h` for register-to-symbol mapping (`tx_buffer_address`, `rx_buffer_address`, `fs_counter`, etc.). +- **Notes**: See `firmware/i2s/pru_i2s_regs.h` for register-to-symbol mapping (`tx_buffer_address`, `rx_buffer_address`, `fs_counter`, etc.). ### Firmware Configuration -Configurable parameters in `firmware/I2S/pru_i2s_interface.h` or `firmware/TDM4/pru_i2s_interface.h`: +Configurable parameters in `firmware/i2s/pru_i2s_interface.h` or `firmware/tdm4/pru_i2s_interface.h`: ```c // Bytes per channel @@ -382,7 +409,7 @@ Configurable parameters in `firmware/I2S/pru_i2s_interface.h` or `firmware/TDM4/ #### FW Register Map -`fw_regs.asm` (`firmware/I2S/` and `firmware/TDM4/`) lays out a fixed-layout status/config struct at DMEM offset 0 of each PRU core, shared between the firmware and the R5F driver (`icss_pru_i2s_fw.h` defines the same offsets on the C side). This is the entire handshake surface between the R5F and the PRU — the driver reads/writes these fields directly via `HW_RD/WR_REG*`, there is no other channel. `PRUI2S_getPruFwImageInfo()` (during driver init, before the PRU core is even running) only ever reads the capability/interrupt fields (`NUM_TX_I2S`, `NUM_RX_I2S`, `SAMP_FREQ`, the three `*_ICSS_INTC_SYS_EVT` fields) out of the firmware image — it never reads the buffer address/size fields. +`fw_regs.asm` (`firmware/i2s/` and `firmware/tdm4/`) lays out a fixed-layout status/config struct at DMEM offset 0 of each PRU core, shared between the firmware and the R5F driver (`icss_pru_i2s_fw.h` defines the same offsets on the C side). This is the entire handshake surface between the R5F and the PRU — the driver reads/writes these fields directly via `HW_RD/WR_REG*`, there is no other channel. `PRUI2S_getPruFwImageInfo()` (during driver init, before the PRU core is even running) only ever reads the capability/interrupt fields (`NUM_TX_I2S`, `NUM_RX_I2S`, `SAMP_FREQ`, the three `*_ICSS_INTC_SYS_EVT` fields) out of the firmware image — it never reads the buffer address/size fields. | Offset | Size | Field | Direction | Description | |--------|------|-------|-----------|--------------| diff --git a/examples/pru_i2s/firmware/I2S/icss_pru_i2s_fw.h b/examples/pru_i2s/firmware/I2S/icss_pru_i2s_fw.h deleted file mode 100644 index 4d172dcb2..000000000 --- a/examples/pru_i2s/firmware/I2S/icss_pru_i2s_fw.h +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright (C) 2025 Texas Instruments Incorporated - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * Neither the name of Texas Instruments Incorporated nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _ICSS_pru_i2s_FW_H_ -#define _ICSS_pru_i2s_FW_H_ - -/* - Firmware registers -*/ - -/* FW register base address */ -#define ICSS_PRUI2S_FW_REG_BASE ( 0x0000 ) - -/* FW register sizes (in bytes) */ -#define FW_REG_NUM_TX_I2S_SZ ( 1 ) -#define FW_REG_NUM_RX_I2S_SZ ( 1 ) -#define FW_REG_SAMP_FREQ_SZ ( 1 ) -#define FW_REG_BITS_PER_SLOT_SZ ( 1 ) -#define FW_REG_TX_PING_PONG_BUF_ADDR_SZ ( 4 ) -#define FW_REG_PING_PONG_BUF_SZ_SZ ( 2 ) -#define FW_REG_I2S_ICSS_INTC_SYS_EVT_SZ ( 1 ) -#define FW_REG_I2S_ERR_ICSS_INTC_SYS_EVT_SZ ( 1 ) -#define FW_REG_I2S_PIN_NUM_SZ ( 1 ) - -/* FW register offsets from base (in bytes) */ -#define FW_REG_NUM_TX_I2S_OFFSET ( 0x00 ) -#define FW_REG_NUM_RX_I2S_OFFSET ( 0x01 ) -#define FW_REG_SAMP_FREQ_OFFSET ( 0x02 ) -#define FW_REG_BITS_PER_SLOT_OFFSET ( 0x03 ) -#define FW_REG_TX_PING_PONG_BUF_ADDR_OFFSET ( 0x04 ) -#define FW_REG_PING_PONG_BUF_SZ_OFFSET ( 0x08 ) -#define FW_REG_I2S_TX_ICSS_INTC_SYS_EVT_OFFSET ( 0x0A ) -#define FW_REG_I2S_RX_ICSS_INTC_SYS_EVT_OFFSET ( 0x0B ) -#define FW_REG_I2S_ERR_ICSS_INTC_SYS_EVT_OFFSET ( 0x0C ) -#define FW_REG_I2S_PIN_NUM_BCLK_OFFSET ( 0x0D ) -#define FW_REG_I2S_PIN_NUM_FSYNC_OFFSET ( 0x0E ) -#define FW_REG_I2S_PIN_NUM_TX0_OFFSET ( 0x0F ) -#define FW_REG_I2S_PIN_NUM_TX1_OFFSET ( 0x10 ) -#define FW_REG_I2S_PIN_NUM_TX2_OFFSET ( 0x11 ) -#define FW_REG_I2S_PIN_NUM_RX0_OFFSET ( 0x12 ) -#define FW_REG_I2S_PIN_NUM_RX1_OFFSET ( 0x13 ) -#define FW_REG_RX_PING_PONG_BUF_ADDR_OFFSET ( 0x14 ) -#define FW_REG_TX_PING_PONG_SEL_OFFSET ( 0x18 ) -#define FW_REG_RX_PING_PONG_SEL_OFFSET ( 0x19 ) -#define FW_REG_TX_PING_PONG_STAT_OFFSET ( 0x1A ) -#define FW_REG_RX_PING_PONG_STAT_OFFSET ( 0x1B ) -#define FW_REG_ERR_STAT_OFFSET ( 0x1C ) - -/* FW register addresses */ -#define FW_REG_NUM_TX_I2S ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_NUM_TX_I2S_OFFSET ) -#define FW_REG_NUM_RX_I2S ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_NUM_RX_I2S_OFFSET ) -#define FW_REG_SAMP_FREQ ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_SAMP_FREQ_OFFSET ) -#define FW_REG_BITS_PER_SLOT ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_BITS_PER_SLOT_OFFSET ) -#define FW_REG_TX_PING_PONG_BUF_ADDR ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_TX_PING_PONG_BUF_ADDR_OFFSET ) -#define FW_REG_PING_PONG_BUF_SZ ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_PING_PONG_BUF_SZ_OFFSET ) -#define FW_REG_I2S_TX_ICSS_INTC_SYS_EVT ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_I2S_TX_ICSS_INTC_SYS_EVT_OFFSET ) -#define FW_REG_I2S_RX_ICSS_INTC_SYS_EVT ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_I2S_RX_ICSS_INTC_SYS_EVT_OFFSET ) -#define FW_REG_I2S_ERR_ICSS_INTC_SYS_EVT ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_I2S_ERR_ICSS_INTC_SYS_EVT_OFFSET ) -#define FW_REG_I2S_PIN_NUM_BCLK ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_I2S_PIN_NUM_BCLK_OFFSET ) -#define FW_REG_I2S_PIN_NUM_FSYNC ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_I2S_PIN_NUM_FSYNC_OFFSET ) -#define FW_REG_I2S_PIN_NUM_TX0 ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_I2S_PIN_NUM_TX0_OFFSET ) -#define FW_REG_I2S_PIN_NUM_TX1 ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_I2S_PIN_NUM_TX1_OFFSET ) -#define FW_REG_I2S_PIN_NUM_TX2 ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_I2S_PIN_NUM_TX2_OFFSET ) -#define FW_REG_I2S_PIN_NUM_RX0 ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_I2S_PIN_NUM_RX0_OFFSET ) -#define FW_REG_I2S_PIN_NUM_RX1 ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_I2S_PIN_NUM_RX1_OFFSET ) -#define FW_REG_RX_PING_PONG_BUF_ADDR ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_RX_PING_PONG_BUF_ADDR_OFFSET ) -#define FW_REG_TX_PING_PONG_SEL ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_TX_PING_PONG_SEL_OFFSET ) -#define FW_REG_RX_PING_PONG_SEL ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_RX_PING_PONG_SEL_OFFSET ) -#define FW_REG_TX_PING_PONG_STAT ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_TX_PING_PONG_STAT_OFFSET ) -#define FW_REG_RX_PING_PONG_STAT ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_RX_PING_PONG_STAT_OFFSET ) -#define FW_REG_ERR_STAT ( ICSS_PRUI2S_FW_REG_BASE + FW_REG_ERR_STAT_OFFSET ) - -/* - Firmware register bit fields -*/ - -/* NUM_TX_I2S */ -#define BF_NUM_TX_I2S_MASK ( 0x3 ) -#define NUM_TX_I2S_BF_NUM_TX_I2S_SHIFT ( 0 ) -#define NUM_TX_I2S_BF_NUM_TX_I2S_MASK ( BF_NUM_TX_I2S_MASK << NUM_TX_I2S_BF_NUM_TX_I2S_SHIFT ) - -/* NUM_RX_I2S */ -#define BF_NUM_RX_I2S_MASK ( 0x3 ) -#define NUM_TX_I2S_BF_NUM_RX_I2S_SHIFT ( 0 ) -#define NUM_TX_I2S_BF_NUM_RX_I2S_MASK ( BF_NUM_RX_I2S_MASK << NUM_TX_I2S_BF_NUM_RX_I2S_SHIFT ) - -/* FW_REG_SAMP_FREQ */ -#define BF_SAMP_FREQ_MASK ( 0xFF ) -#define SAMP_FREQ_BF_SAMP_FREQ_SHIFT ( 0 ) -#define SAMP_FREQ_BF_SAMP_FREQ_MASK ( BF_SAMP_FREQ_MASK << SAMP_FREQ_BF_SAMP_FREQ_SHIFT ) - -/* FW_REG_BITS_PER_SLOT */ -#define BF_BITS_PER_SLOT_MASK ( 0x1F ) -#define BITS_PER_SLOT_BF_BITS_PER_SLOT_SHIFT ( 0 ) -#define BITS_PER_SLOT_BF_BITS_PER_SLOT_MASK ( BF_BITS_PER_SLOT_MASK << BITS_PER_SLOT_BF_BITS_PER_SLOT_SHIFT ) - -/* FW_REG_TX_PING_PONG_BUF_ADDR */ -#define BF_TX_BUF_PING_PONG_BUF_ADDR_MASK ( 0xFFFFFFFF ) -#define TX_BUF_PING_PONG_BUF_ADDR_BF_TX_BUF_PING_PONG_BUF_ADDR_SHIFT \ - ( 0 ) -#define TX_BUF_PING_PONG_BUF_ADDR_BF_TX_BUF_PING_PONG_BUF_ADDR_MASK \ - ( BF_TX_BUF_PING_PONG_BUF_ADDR_MASK << TX_BUF_PING_PONG_BUF_ADDR_BF_TX_BUF_PING_PONG_BUF_ADDR_SHIFT ) - -/* FW_REG_PING_PONG_BUF_SZ */ -#define BF_PING_PONG_BUF_SZ_MASK ( 0xFFFF ) -#define TX_PING_PONG_BUF_SZ_BF_PING_PONG_BUF_SZ_SHIFT \ - ( 0 ) -#define TX_PING_PONG_BUF_SZ_BF_PING_PONG_BUF_SZ_MASK \ - ( BF_PING_PONG_BUF_SZ_MASK << TX_PING_PONG_BUF_SZ_BF_PING_PONG_BUF_SZ_SHIFT ) - -/* FW_REG_I2S_ICSS_INTC_SYS_EVT */ -#define BF_I2S_ICSS_INTC_SYS_EVT_MASK ( 0xFF ) -#define I2S_ICSS_INTC_SYS_EVT_BF_I2S_ICSS_INTC_SYS_EVT_SHIFT \ - ( 0 ) -#define I2S_ICSS_INTC_SYS_EVT_BF_I2S_ICSS_INTC_SYS_EVT_MASK \ - ( BF_I2S_ICSS_INTC_SYS_EVT_MASK << I2S_ICSS_INTC_SYS_EVT_BF_I2S_ICSS_INTC_SYS_EVT_SHIFT ) - -/* FW_REG_I2S_ERR_ICSS_INTC_SYS_EVT */ -#define BF_I2S_ERR_ICSS_INTC_SYS_EVT_MASK ( 0xFF ) -#define I2S_ERR_ICSS_INTC_SYS_EVT_BF_I2S_ERR_ICSS_INTC_SYS_EVT_SHIFT \ - ( 0 ) -#define I2S_ERR_ICSS_INTC_SYS_EVT_BF_I2S_ERR_ICSS_INTC_SYS_EVT_MASK \ - ( BF_I2S_ERR_ICSS_INTC_SYS_EVT_MASK << I2S_ERR_ICSS_INTC_SYS_EVT_BF_I2S_ERR_ICSS_INTC_SYS_EVT_SHIFT ) - -/* FW_REG_I2S_PIN_NUM_ */ -#define BF_I2S_PIN_NUM_MASK ( 0xFF ) -#define I2S_PIN_NUM_BF_I2S_PIN_NUM_SHIFT ( 0 ) -#define I2S_PIN_NUM_BF_I2S_PIN_NUM_MASK ( BF_I2S_PIN_NUM_MASK << I2S_PIN_NUM_BF_I2S_PIN_NUM_SHIFT ) - -/* FW_REG_TX_PING_PONG_SEL */ -#define BF_TX_PING_PONG_SEL_MASK ( 0x1 ) -#define TX_PING_PONG_SEL_BF_TX_PING_PONG_SEL_SHIFT ( 0 ) -#define TX_PING_PONG_SEL_BF_TX_PING_PONG_SEL_MASK ( BF_TX_PING_PONG_SEL_MASK << TX_PING_PONG_SEL_BF_TX_PING_PONG_SEL_SHIFT) - -/* FW_REG_RX_PING_PONG_SEL */ -#define BF_RX_PING_PONG_SEL_MASK ( 0x1 ) -#define RX_PING_PONG_SEL_BF_RX_PING_PONG_SEL_SHIFT ( 0 ) -#define RX_PING_PONG_SEL_BF_RX_PING_PONG_SEL_MASK ( BF_RX_PING_PONG_SEL_MASK << RX_PING_PONG_SEL_BF_RX_PING_PONG_SEL_SHIFT) - -/* FW_REG_TX_PING_PONG_STAT */ -#define BF_TX_PING_PONG_STAT_MASK ( 0x1 ) -#define TX_PING_PONG_STAT_BF_TX_PING_STAT_SHIFT ( 0 ) -#define TX_PING_PONG_STAT_BF_TX_PONG_STAT_SHIFT ( 1 ) -#define TX_PING_PONG_STAT_BF_TX_PING_STAT_MASK ( BF_TX_PING_PONG_STAT_MASK << TX_PING_PONG_STAT_BF_TX_PING_STAT_SHIFT ) -#define TX_PING_PONG_STAT_BF_TX_PONG_STAT_MASK ( BF_TX_PING_PONG_STAT_MASK << TX_PING_PONG_STAT_BF_TX_PONG_STAT_SHIFT ) - -/* FW_REG_RX_PING_PONG_STAT */ -#define BF_RX_PING_PONG_STAT_MASK ( 0x1 ) -#define RX_PING_PONG_STAT_BF_RX_PING_STAT_SHIFT ( 0 ) -#define RX_PING_PONG_STAT_BF_RX_PONG_STAT_SHIFT ( 1 ) -#define RX_PING_PONG_STAT_BF_RX_PING_STAT_MASK ( BF_RX_PING_PONG_STAT_MASK << RX_PING_PONG_STAT_BF_RX_PING_STAT_SHIFT ) -#define RX_PING_PONG_STAT_BF_RX_PONG_STAT_MASK ( BF_RX_PING_PONG_STAT_MASK << RX_PING_PONG_STAT_BF_RX_PONG_STAT_SHIFT ) - -/* FW_REG_ERR_STAT */ -#define BF_OVR_ERR_STAT_MASK ( 0x1 ) -#define BF_UND_ERR_STAT_MASK ( 0x1 ) -#define BF_FSYNC_ERR_STAT_MASK ( 0x1 ) -#define ERR_STAT_BF_OVR_ERR_STAT_SHIFT ( 0 ) -#define ERR_STAT_BF_UND_ERR_STAT_SHIFT ( 1 ) -#define ERR_STAT_BF_FSYNC_ERR_STAT_SHIFT ( 2 ) -#define ERR_STAT_BF_BF_OVR_ERR_STAT_MASK ( BF_OVR_ERR_STAT_MASK << ERR_STAT_BF_OVR_ERR_STAT_SHIFT ) -#define ERR_STAT_BF_BF_UND_ERR_STAT_MASK ( BF_UND_ERR_STAT_MASK << ERR_STAT_BF_UND_ERR_STAT_SHIFT ) -#define ERR_STAT_BF_BF_FSYNC_ERR_STAT_MASK ( BF_FSYNC_ERR_STAT_MASK << ERR_STAT_BF_FSYNC_ERR_STAT_SHIFT ) - -#define PING_PONG_SEL_PING ( 0 ) -#define PING_PONG_SEL_PONG ( 1 ) - -#endif /* _ICSS_PRUI2S_FW_H_ */ diff --git a/examples/pru_i2s/firmware/I2S/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/makefile b/examples/pru_i2s/firmware/I2S/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/makefile deleted file mode 100644 index 9de227832..000000000 --- a/examples/pru_i2s/firmware/I2S/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/makefile +++ /dev/null @@ -1,91 +0,0 @@ -################################################################################ -# PRU I2S - I2S Protocol - PRU0 TX - AM261x-LP -################################################################################ -# Build firmware for PRU I2S transmit (TX) using I2S protocol - -export OPEN_PRU_PATH?=$(abspath ../../../../../../../..) -include $(OPEN_PRU_PATH)/imports.mak - -CG_TOOL_ROOT := $(CGT_TI_PRU_PATH) -GEN_DIR := . - -# Add inputs and outputs from these tool invocations to the build variables -CMD_SRCS += \ - linker.cmd \ - -ASM_SRCS += \ - pru_i2s_main.asm \ - fw_regs.asm \ - -OBJS += \ - pru_i2s_main.obj \ - fw_regs.obj \ - -ASM_DEPS += \ - pru_i2s_main.d \ - fw_regs.d \ - -OBJDIR := . - -FILES_PATH_common = \ - .. \ - ../../.. \ - ../../../.. \ - ../../../../.. \ - -FILES_PATH := $(FILES_PATH_common) - -vpath %.asm $(FILES_PATH) -vpath %.obj $(OBJDIR) -vpath %.cmd $(FILES_PATH) - - -# Add inputs and outputs from these tool invocations to the build variables -EXE_OUTPUTS += \ -pru_i2s_pru0_array_am261x-lp_icssm0-pru0_fw_ti-pru-cgt.out \ - -EXE_OUTPUTS__QUOTED += \ -"pru_i2s_pru0_array_am261x-lp_icssm0-pru0_fw_ti-pru-cgt.out" \ - -BIN_OUTPUTS += \ -pru_i2s_pru0_array_am261x-lp_icssm0-pru0_fw_ti-pru-cgt.hex \ - -BIN_OUTPUTS__QUOTED += \ -"pru_i2s_pru0_array_am261x-lp_icssm0-pru0_fw_ti-pru-cgt.hex" \ - -# All Target -all: $(OBJS) $(CMD_SRCS) - @$(MAKE) --no-print-directory -Onone "pru_i2s_pru0_array_am261x-lp_icssm0-pru0_fw_ti-pru-cgt.out" - -# Each subdirectory must supply rules for building sources it contributes -$(OBJDIR)/%.obj %.obj: %.asm - @echo 'Building file: "$^"' - @echo 'Invoking: PRU Compiler' - "$(CGT_TI_PRU_PATH)/bin/clpru" -DPRU0 -DSLICE0 -v4 --define=SOC_AM261X --define=PRU0 --define=I2S_TX --define=NUMBER_OF_TX_3 --define=I2S_TX_DETECT_UNDERFLOW --include_path="${CG_TOOL_ROOT}/include" --include_path="${MCU_PLUS_SDK_PATH}/source" --include_path="${OPEN_PRU_PATH}/source" --include_path="${OPEN_PRU_PATH}/examples/pru_i2s/firmware/include" --include_path="${OPEN_PRU_PATH}/examples/pru_i2s/firmware/I2S" --define=_DEBUG_=1 -g --diag_warning=225 --diag_wrap=off --display_error_number --endian=little --preproc_with_compile --preproc_dependency="$(basename $( ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/I2S/pru_i2s_pru0_array.h - -$(RM) pru_i2s_pru0_array.h - -@echo ' ' - -.PHONY: all clean diff --git a/examples/pru_i2s/firmware/I2S/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/makefile b/examples/pru_i2s/firmware/I2S/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/makefile deleted file mode 100644 index 93bf4bb34..000000000 --- a/examples/pru_i2s/firmware/I2S/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/makefile +++ /dev/null @@ -1,90 +0,0 @@ -################################################################################ -# PRU I2S Firmware Makefile -################################################################################ -# Required input arguments : -# Build firmware for PRU I2S Use this input argument to include files from external paths - -export OPEN_PRU_PATH?=$(abspath ../../../../../../../..) -include $(OPEN_PRU_PATH)/imports.mak -CG_TOOL_ROOT := $(CGT_TI_PRU_PATH) - -# Add inputs and outputs from these tool invocations to the build variables -CMD_SRCS += \ - linker.cmd \ - -ASM_SRCS += \ - pru_i2s_main.asm \ - fw_regs.asm \ - -OBJS += \ - pru_i2s_main.obj \ - fw_regs.obj \ - -ASM_DEPS += \ - pru_i2s_main.d \ - fw_regs.d \ - -OBJDIR := . - -FILES_PATH_common = \ - .. \ - ../../.. \ - ../../../.. \ - ../../../../.. \ - -FILES_PATH := $(FILES_PATH_common) - -vpath %.asm $(FILES_PATH) -vpath %.obj $(OBJDIR) -vpath %.cmd $(FILES_PATH) - - -# Add inputs and outputs from these tool invocations to the build variables -EXE_OUTPUTS += \ -pru_i2s_pru0_array_am263x-cc_icssm0-pru0_fw_ti-pru-cgt.out \ - -EXE_OUTPUTS__QUOTED += \ -"pru_i2s_pru0_array_am263x-cc_icssm0-pru0_fw_ti-pru-cgt.out" \ - -BIN_OUTPUTS += \ -pru_i2s_pru0_array_am263x-cc_icssm0-pru0_fw_ti-pru-cgt.hex \ - -BIN_OUTPUTS__QUOTED += \ -"pru_i2s_pru0_array_am263x-cc_icssm0-pru0_fw_ti-pru-cgt.hex" \ - -# All Target -all: $(OBJS) $(CMD_SRCS) - @$(MAKE) --no-print-directory -Onone "pru_i2s_pru0_array_am263x-cc_icssm0-pru0_fw_ti-pru-cgt.out" - -# Each subdirectory must supply rules for building sources it contributes -$(OBJDIR)/%.obj %.obj: %.asm - @echo 'Building file: "$^"' - @echo 'Invoking: PRU Compiler' - "$(CGT_TI_PRU_PATH)/bin/clpru" -DPRU0 -DSLICE0 -v4 --define=SOC_AM263X --define=PRU0 --define=I2S_TX --define=NUMBER_OF_TX_3 --define=I2S_TX_DETECT_UNDERFLOW --include_path="${CG_TOOL_ROOT}/include" --include_path="${MCU_PLUS_SDK_PATH}/source" --include_path="${OPEN_PRU_PATH}/source" --include_path="${OPEN_PRU_PATH}/examples/pru_i2s/firmware/include" --include_path="${OPEN_PRU_PATH}/examples/pru_i2s/firmware/I2S" --define=_DEBUG_=1 -g --diag_warning=225 --diag_wrap=off --display_error_number --endian=little --preproc_with_compile --preproc_dependency="$(basename $( ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/I2S/pru_i2s_pru0_array.h - -$(RM) pru_i2s_pru0_array.h - -@echo ' ' - -.PHONY: all clean diff --git a/examples/pru_i2s/firmware/I2S/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/makefile b/examples/pru_i2s/firmware/I2S/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/makefile deleted file mode 100644 index 9afcd4155..000000000 --- a/examples/pru_i2s/firmware/I2S/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/makefile +++ /dev/null @@ -1,90 +0,0 @@ -################################################################################ -# PRU I2S Firmware Makefile -################################################################################ -# Required input arguments : -# Build firmware for PRU I2S Use this input argument to include files from external paths - -export OPEN_PRU_PATH?=$(abspath ../../../../../../../..) -include $(OPEN_PRU_PATH)/imports.mak -CG_TOOL_ROOT := $(CGT_TI_PRU_PATH) - -# Add inputs and outputs from these tool invocations to the build variables -CMD_SRCS += \ - linker.cmd \ - -ASM_SRCS += \ - pru_i2s_main.asm \ - fw_regs.asm \ - -OBJS += \ - pru_i2s_main.obj \ - fw_regs.obj \ - -ASM_DEPS += \ - pru_i2s_main.d \ - fw_regs.d \ - -OBJDIR := . - -FILES_PATH_common = \ - .. \ - ../../.. \ - ../../../.. \ - ../../../../.. \ - -FILES_PATH := $(FILES_PATH_common) - -vpath %.asm $(FILES_PATH) -vpath %.obj $(OBJDIR) -vpath %.cmd $(FILES_PATH) - - -# Add inputs and outputs from these tool invocations to the build variables -EXE_OUTPUTS += \ -pru_i2s_pru1_array_am261x-lp_icssm0-pru1_fw_ti-pru-cgt.out \ - -EXE_OUTPUTS__QUOTED += \ -"pru_i2s_pru1_array_am261x-lp_icssm0-pru1_fw_ti-pru-cgt.out" \ - -BIN_OUTPUTS += \ -pru_i2s_pru1_array_am261x-lp_icssm0-pru1_fw_ti-pru-cgt.hex \ - -BIN_OUTPUTS__QUOTED += \ -"pru_i2s_pru1_array_am261x-lp_icssm0-pru1_fw_ti-pru-cgt.hex" \ - -# All Target -all: $(OBJS) $(CMD_SRCS) - @$(MAKE) --no-print-directory -Onone "pru_i2s_pru1_array_am261x-lp_icssm0-pru1_fw_ti-pru-cgt.out" - -# Each subdirectory must supply rules for building sources it contributes -$(OBJDIR)/%.obj %.obj: %.asm - @echo 'Building file: "$^"' - @echo 'Invoking: PRU Compiler' - "$(CGT_TI_PRU_PATH)/bin/clpru" -DPRU1 -DSLICE1 -v4 --define=SOC_AM261X --define=PRU1 --define=I2S_RX --define=I2S_RX_DETECT_OVERFLOW --include_path="${CG_TOOL_ROOT}/include" --include_path="${MCU_PLUS_SDK_PATH}/source" --include_path="${OPEN_PRU_PATH}/source" --include_path="${OPEN_PRU_PATH}/examples/pru_i2s/firmware/include" --include_path="${OPEN_PRU_PATH}/examples/pru_i2s/firmware/I2S" --define=_DEBUG_=1 -g --diag_warning=225 --diag_wrap=off --display_error_number --endian=little --preproc_with_compile --preproc_dependency="$(basename $( ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/I2S/pru_i2s_pru1_array.h - -$(RM) pru_i2s_pru1_array.h - -@echo ' ' - -.PHONY: all clean diff --git a/examples/pru_i2s/firmware/I2S/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/makefile b/examples/pru_i2s/firmware/I2S/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/makefile deleted file mode 100644 index 3cb6008c5..000000000 --- a/examples/pru_i2s/firmware/I2S/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/makefile +++ /dev/null @@ -1,90 +0,0 @@ -################################################################################ -# PRU I2S Firmware Makefile -################################################################################ -# Required input arguments : -# Build firmware for PRU I2S Use this input argument to include files from external paths - -export OPEN_PRU_PATH?=$(abspath ../../../../../../../..) -include $(OPEN_PRU_PATH)/imports.mak -CG_TOOL_ROOT := $(CGT_TI_PRU_PATH) - -# Add inputs and outputs from these tool invocations to the build variables -CMD_SRCS += \ - linker.cmd \ - -ASM_SRCS += \ - pru_i2s_main.asm \ - fw_regs.asm \ - -OBJS += \ - pru_i2s_main.obj \ - fw_regs.obj \ - -ASM_DEPS += \ - pru_i2s_main.d \ - fw_regs.d \ - -OBJDIR := . - -FILES_PATH_common = \ - .. \ - ../../.. \ - ../../../.. \ - ../../../../.. \ - -FILES_PATH := $(FILES_PATH_common) - -vpath %.asm $(FILES_PATH) -vpath %.obj $(OBJDIR) -vpath %.cmd $(FILES_PATH) - - -# Add inputs and outputs from these tool invocations to the build variables -EXE_OUTPUTS += \ -pru_i2s_pru1_array_am263x-cc_icssm0-pru1_fw_ti-pru-cgt.out \ - -EXE_OUTPUTS__QUOTED += \ -"pru_i2s_pru1_array_am263x-cc_icssm0-pru1_fw_ti-pru-cgt.out" \ - -BIN_OUTPUTS += \ -pru_i2s_pru1_array_am263x-cc_icssm0-pru1_fw_ti-pru-cgt.hex \ - -BIN_OUTPUTS__QUOTED += \ -"pru_i2s_pru1_array_am263x-cc_icssm0-pru1_fw_ti-pru-cgt.hex" \ - -# All Target -all: $(OBJS) $(CMD_SRCS) - @$(MAKE) --no-print-directory -Onone "pru_i2s_pru1_array_am263x-cc_icssm0-pru1_fw_ti-pru-cgt.out" - -# Each subdirectory must supply rules for building sources it contributes -$(OBJDIR)/%.obj %.obj: %.asm - @echo 'Building file: "$^"' - @echo 'Invoking: PRU Compiler' - "$(CGT_TI_PRU_PATH)/bin/clpru" -DPRU1 -DSLICE1 -v4 --define=SOC_AM263X --define=PRU1 --define=I2S_RX --define=I2S_RX_DETECT_OVERFLOW --include_path="${CG_TOOL_ROOT}/include" --include_path="${MCU_PLUS_SDK_PATH}/source" --include_path="${OPEN_PRU_PATH}/source" --include_path="${OPEN_PRU_PATH}/examples/pru_i2s/firmware/include" --include_path="${OPEN_PRU_PATH}/examples/pru_i2s/firmware/I2S" --define=_DEBUG_=1 -g --diag_warning=225 --diag_wrap=off --display_error_number --endian=little --preproc_with_compile --preproc_dependency="$(basename $( ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/I2S/pru_i2s_pru1_array.h - -$(RM) pru_i2s_pru1_array.h - -@echo ' ' - -.PHONY: all clean diff --git a/examples/pru_i2s/firmware/I2S/pru_i2s_pru0_array.h b/examples/pru_i2s/firmware/I2S/pru_i2s_pru0_array.h deleted file mode 100644 index bf92fe82d..000000000 --- a/examples/pru_i2s/firmware/I2S/pru_i2s_pru0_array.h +++ /dev/null @@ -1,155 +0,0 @@ -const uint32_t pru_prupru_i2s0_image_0_0[] = { -0x0b015b5b, -0x51005b0c, -0x240000e4, -0x240000f7, -0x240000ea, -0x240004f7, -0xf1003782, -0x240008f7, -0xf100178a, -0x00eae2e1, -0xe1002284, -0x0104e2e2, -0x66e1e2fe, -0x2effbf80, -0x240002eb, -0x24001af9, -0x240002f7, -0xe1001917, -0x240001f7, -0xe1011917, -0x2400015a, -0x2400017a, -0x24001f1a, -0x240004f7, -0xf1003780, -0x10e0e0e2, -0x240008f7, -0xf100178a, -0x0b01eaea, -0x00eae0e1, -0x10e1e1e3, -0xf100a084, -0x010ce0e0, -0xd106ff00, -0xd101ff00, -0xc901ff00, -0xd101ff00, -0xd106ff00, -0xc906ff00, -0x10ebfffc, -0x51001619, -0x511e160b, -0x511f160f, -0x511d1611, -0x01011616, -0x2400007b, -0x71013602, -0x21005500, -0x24000036, -0x0b01fcfc, -0x6856fc40, -0x21005500, -0x0b01fcfc, -0x6856fc3d, -0x15015656, -0x01011616, -0x21005500, -0x01013636, -0x24000016, -0x21005500, -0xf100a097, -0x010ce0e0, -0x01011616, -0x21005500, -0x21002800, -0x50e1e003, -0x01011616, -0x21005500, -0x51015a03, -0x10e2e2e0, -0x21004800, -0x10e3e3e0, -0x00eae0e1, -0x15015a5a, -0x240018f9, -0xe100195a, -0xf102191b, -0x69005a04, -0xc9011b22, -0x1d001b1b, -0x21005300, -0xc9001b1f, -0x1d011b1b, -0x2400017b, -0x01011616, -0xd106ff00, -0x69017b03, -0xe102191b, -0x2400229f, -0x0a1ae4e7, -0x0a1ae5e8, -0x0a1ae6e9, -0x1101e7e7, -0x1101e8e8, -0x1101e9e9, -0x0902e7e7, -0x0903e8e8, -0x0905e9e9, -0x12e8e7e7, -0x12e9e7e7, -0x10e7e7fe, -0x51001a03, -0x05011a1a, -0x21006c00, -0x24001f1a, -0x10f7f7e4, -0x10f8f8e5, -0x10f9f9e6, -0x21002600, -0x21002600, -0x1f005b5b, -0x21007300, -0x1f015b5b, -0x21007300, -0x1f025b5b, -0x24001cf9, -0xe100195b, -0x2400249f, -0x21000000}; - -const uint8_t pru_prupru_i2s0_image_0_1[] = { -0x03, -0x00, -0x30, -0x20, -0x00, -0x00, -0x01, -0x00, -0x08, -0x01, -0x12, -0x13, -0x14, -0x06, -0x01, -0x02, -0x03, -0x05, -0x00, -0x04, -0x00, -0x01, -0x01, -0x00, -0x00, -0x00, -0x02, -0x01, -0x00, -0x00, -0x00, -0x00}; - diff --git a/examples/pru_i2s/firmware/I2S/pru_i2s_pru1_array.h b/examples/pru_i2s/firmware/I2S/pru_i2s_pru1_array.h deleted file mode 100644 index 256234b95..000000000 --- a/examples/pru_i2s/firmware/I2S/pru_i2s_pru1_array.h +++ /dev/null @@ -1,142 +0,0 @@ -const uint32_t pru_prupru_i2s1_image_0_0[] = { -0x2effbf80, -0x240002e7, -0x240004e8, -0x240008e9, -0x24001af9, -0x240002f7, -0xe1001917, -0x240001f7, -0xe1011917, -0x2400015a, -0x2400017a, -0x24001f1a, -0x240019eb, -0x24001bec, -0x240008f7, -0xf100178a, -0x0b01eaea, -0x10eaeaf1, -0x0501f1f1, -0x240014f7, -0xf100378d, -0x10ededef, -0x2400203a, -0x00f1edee, -0x10eeeef0, -0x0101f0f0, -0xd100ff00, -0xd101ff00, -0xc901ff00, -0xd101ff00, -0xd100ff00, -0xc900ff00, -0x10e7fffc, -0x10e8fff2, -0x10e9fff3, -0x60edee16, -0x5100161e, -0x511e160a, -0x511f160e, -0x511d1610, -0x01011616, -0x71013602, -0x21004500, -0x24000036, -0x0b01fcfc, -0x6856fc38, -0x21004500, -0x0b01fcfc, -0x6856fc35, -0x15015656, -0x01011616, -0x21004500, -0x01013636, -0x24000016, -0x21004500, -0x01011616, -0x21004500, -0x51017a03, -0x10efefed, -0x21003d00, -0x10f0f0ed, -0x00f1edee, -0x15017a7a, -0xe1000b7a, -0x2400017b, -0x21002800, -0x01011616, -0x21004500, -0x01011616, -0xd100ff00, -0x69017b0b, -0x2400007b, -0xf1000c3b, -0x69007a04, -0xd1013b17, -0x1f003b3b, -0x21004f00, -0xd1003b14, -0x1f013b3b, -0xe1000c3b, -0x2400269f, -0x21005200, -0x51203a08, -0x0b02f2f2, -0x0b03f3f3, -0x083af2f2, -0x083af3f3, -0x12f2f4f4, -0x12f3f5f5, -0x51003a03, -0x05013a3a, -0x21001f00, -0xe1006d94, -0x0108eded, -0x2eff8792, -0x24001f3a, -0x21001f00, -0x1f005b5b, -0x21006600, -0x1f015b5b, -0x21006600, -0x1f025b5b, -0x24001cf9, -0xe100195b, -0x2400279f, -0x21000000}; - -const uint8_t pru_prupru_i2s1_image_0_1[] = { -0x00, -0x02, -0x30, -0x20, -0x00, -0x02, -0x01, -0x00, -0x00, -0x01, -0x15, -0x16, -0x17, -0x00, -0x01, -0x04, -0x05, -0x06, -0x02, -0x03, -0x00, -0x03, -0x01, -0x00, -0x00, -0x00, -0x02, -0x01, -0x00, -0x00, -0x00, -0x00}; - diff --git a/examples/pru_i2s/firmware/TDM4/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/makefile b/examples/pru_i2s/firmware/TDM4/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/makefile deleted file mode 100644 index 6766072fe..000000000 --- a/examples/pru_i2s/firmware/TDM4/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/makefile +++ /dev/null @@ -1,90 +0,0 @@ -################################################################################ -# PRU I2S Firmware Makefile -################################################################################ -# Required input arguments : -# Build firmware for PRU I2S Use this input argument to include files from external paths - -export OPEN_PRU_PATH?=$(abspath ../../../../../../../..) -include $(OPEN_PRU_PATH)/imports.mak -CG_TOOL_ROOT := $(CGT_TI_PRU_PATH) - -# Add inputs and outputs from these tool invocations to the build variables -CMD_SRCS += \ - linker.cmd \ - -ASM_SRCS += \ - pru_i2s_main.asm \ - fw_regs.asm \ - -OBJS += \ - pru_i2s_main.obj \ - fw_regs.obj \ - -ASM_DEPS += \ - pru_i2s_main.d \ - fw_regs.d \ - -OBJDIR := . - -FILES_PATH_common = \ - .. \ - ../../.. \ - ../../../.. \ - ../../../../.. \ - -FILES_PATH := $(FILES_PATH_common) - -vpath %.asm $(FILES_PATH) -vpath %.obj $(OBJDIR) -vpath %.cmd $(FILES_PATH) - - -# Add inputs and outputs from these tool invocations to the build variables -EXE_OUTPUTS += \ -pru_i2s_tdm4_pru0_array_am261x-lp_icssm0-pru0_fw_ti-pru-cgt.out \ - -EXE_OUTPUTS__QUOTED += \ -"pru_i2s_tdm4_pru0_array_am261x-lp_icssm0-pru0_fw_ti-pru-cgt.out" \ - -BIN_OUTPUTS += \ -pru_i2s_tdm4_pru0_array_am261x-lp_icssm0-pru0_fw_ti-pru-cgt.hex \ - -BIN_OUTPUTS__QUOTED += \ -"pru_i2s_tdm4_pru0_array_am261x-lp_icssm0-pru0_fw_ti-pru-cgt.hex" \ - -# All Target -all: $(OBJS) $(CMD_SRCS) - @$(MAKE) --no-print-directory -Onone "pru_i2s_tdm4_pru0_array_am261x-lp_icssm0-pru0_fw_ti-pru-cgt.out" - -# Each subdirectory must supply rules for building sources it contributes -$(OBJDIR)/%.obj %.obj: %.asm - @echo 'Building file: "$^"' - @echo 'Invoking: PRU Compiler' - "$(CGT_TI_PRU_PATH)/bin/clpru" -DPRU0 -DSLICE0 -v4 --define=SOC_AM261X --define=PRU0 --define=I2S_TX --define=NUMBER_OF_TX_3 --define=I2S_TX_DETECT_UNDERFLOW --include_path="${CG_TOOL_ROOT}/include" --include_path="${MCU_PLUS_SDK_PATH}/source" --include_path="${OPEN_PRU_PATH}/source" --include_path="${OPEN_PRU_PATH}/examples/pru_i2s/firmware/include" --include_path="${OPEN_PRU_PATH}/examples/pru_i2s/firmware/TDM4" --define=_DEBUG_=1 -g --diag_warning=225 --diag_wrap=off --display_error_number --endian=little --preproc_with_compile --preproc_dependency="$(basename $( ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/TDM4/pru_i2s_tdm4_pru0_array.h - -$(RM) pru_i2s_tdm4_pru0_array.h - -@echo ' ' - -.PHONY: all clean diff --git a/examples/pru_i2s/firmware/TDM4/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/makefile b/examples/pru_i2s/firmware/TDM4/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/makefile deleted file mode 100644 index ff7a441ce..000000000 --- a/examples/pru_i2s/firmware/TDM4/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/makefile +++ /dev/null @@ -1,90 +0,0 @@ -################################################################################ -# PRU I2S Firmware Makefile -################################################################################ -# Required input arguments : -# Build firmware for PRU I2S Use this input argument to include files from external paths - -export OPEN_PRU_PATH?=$(abspath ../../../../../../../..) -include $(OPEN_PRU_PATH)/imports.mak -CG_TOOL_ROOT := $(CGT_TI_PRU_PATH) - -# Add inputs and outputs from these tool invocations to the build variables -CMD_SRCS += \ - linker.cmd \ - -ASM_SRCS += \ - pru_i2s_main.asm \ - fw_regs.asm \ - -OBJS += \ - pru_i2s_main.obj \ - fw_regs.obj \ - -ASM_DEPS += \ - pru_i2s_main.d \ - fw_regs.d \ - -OBJDIR := . - -FILES_PATH_common = \ - .. \ - ../../.. \ - ../../../.. \ - ../../../../.. \ - -FILES_PATH := $(FILES_PATH_common) - -vpath %.asm $(FILES_PATH) -vpath %.obj $(OBJDIR) -vpath %.cmd $(FILES_PATH) - - -# Add inputs and outputs from these tool invocations to the build variables -EXE_OUTPUTS += \ -pru_i2s_tdm4_pru0_array_am263x-cc_icssm0-pru0_fw_ti-pru-cgt.out \ - -EXE_OUTPUTS__QUOTED += \ -"pru_i2s_tdm4_pru0_array_am263x-cc_icssm0-pru0_fw_ti-pru-cgt.out" \ - -BIN_OUTPUTS += \ -pru_i2s_tdm4_pru0_array_am263x-cc_icssm0-pru0_fw_ti-pru-cgt.hex \ - -BIN_OUTPUTS__QUOTED += \ -"pru_i2s_tdm4_pru0_array_am263x-cc_icssm0-pru0_fw_ti-pru-cgt.hex" \ - -# All Target -all: $(OBJS) $(CMD_SRCS) - @$(MAKE) --no-print-directory -Onone "pru_i2s_tdm4_pru0_array_am263x-cc_icssm0-pru0_fw_ti-pru-cgt.out" - -# Each subdirectory must supply rules for building sources it contributes -$(OBJDIR)/%.obj %.obj: %.asm - @echo 'Building file: "$^"' - @echo 'Invoking: PRU Compiler' - "$(CGT_TI_PRU_PATH)/bin/clpru" -DPRU0 -DSLICE0 -v4 --define=SOC_AM263X --define=PRU0 --define=I2S_TX --define=NUMBER_OF_TX_3 --define=I2S_TX_DETECT_UNDERFLOW --include_path="${CG_TOOL_ROOT}/include" --include_path="${MCU_PLUS_SDK_PATH}/source" --include_path="${OPEN_PRU_PATH}/source" --include_path="${OPEN_PRU_PATH}/examples/pru_i2s/firmware/include" --include_path="${OPEN_PRU_PATH}/examples/pru_i2s/firmware/TDM4" --define=_DEBUG_=1 -g --diag_warning=225 --diag_wrap=off --display_error_number --endian=little --preproc_with_compile --preproc_dependency="$(basename $( ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/TDM4/pru_i2s_tdm4_pru0_array.h - -$(RM) pru_i2s_tdm4_pru0_array.h - -@echo ' ' - -.PHONY: all clean diff --git a/examples/pru_i2s/firmware/TDM4/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/makefile b/examples/pru_i2s/firmware/TDM4/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/makefile deleted file mode 100644 index 833d03b6c..000000000 --- a/examples/pru_i2s/firmware/TDM4/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/makefile +++ /dev/null @@ -1,90 +0,0 @@ -################################################################################ -# PRU I2S Firmware Makefile -################################################################################ -# Required input arguments : -# Build firmware for PRU I2S Use this input argument to include files from external paths - -export OPEN_PRU_PATH?=$(abspath ../../../../../../../..) -include $(OPEN_PRU_PATH)/imports.mak -CG_TOOL_ROOT := $(CGT_TI_PRU_PATH) - -# Add inputs and outputs from these tool invocations to the build variables -CMD_SRCS += \ - linker.cmd \ - -ASM_SRCS += \ - pru_i2s_main.asm \ - fw_regs.asm \ - -OBJS += \ - pru_i2s_main.obj \ - fw_regs.obj \ - -ASM_DEPS += \ - pru_i2s_main.d \ - fw_regs.d \ - -OBJDIR := . - -FILES_PATH_common = \ - .. \ - ../../.. \ - ../../../.. \ - ../../../../.. \ - -FILES_PATH := $(FILES_PATH_common) - -vpath %.asm $(FILES_PATH) -vpath %.obj $(OBJDIR) -vpath %.cmd $(FILES_PATH) - - -# Add inputs and outputs from these tool invocations to the build variables -EXE_OUTPUTS += \ -pru_i2s_tdm4_pru1_array_am261x-lp_icssm0-pru1_fw_ti-pru-cgt.out \ - -EXE_OUTPUTS__QUOTED += \ -"pru_i2s_tdm4_pru1_array_am261x-lp_icssm0-pru1_fw_ti-pru-cgt.out" \ - -BIN_OUTPUTS += \ -pru_i2s_tdm4_pru1_array_am261x-lp_icssm0-pru1_fw_ti-pru-cgt.hex \ - -BIN_OUTPUTS__QUOTED += \ -"pru_i2s_tdm4_pru1_array_am261x-lp_icssm0-pru1_fw_ti-pru-cgt.hex" \ - -# All Target -all: $(OBJS) $(CMD_SRCS) - @$(MAKE) --no-print-directory -Onone "pru_i2s_tdm4_pru1_array_am261x-lp_icssm0-pru1_fw_ti-pru-cgt.out" - -# Each subdirectory must supply rules for building sources it contributes -$(OBJDIR)/%.obj %.obj: %.asm - @echo 'Building file: "$^"' - @echo 'Invoking: PRU Compiler' - "$(CGT_TI_PRU_PATH)/bin/clpru" -DPRU1 -DSLICE1 -v4 --define=SOC_AM261X --define=PRU1 --define=I2S_RX --define=I2S_RX_DETECT_OVERFLOW --include_path="${CG_TOOL_ROOT}/include" --include_path="${MCU_PLUS_SDK_PATH}/source" --include_path="${OPEN_PRU_PATH}/source" --include_path="${OPEN_PRU_PATH}/examples/pru_i2s/firmware/include" --include_path="${OPEN_PRU_PATH}/examples/pru_i2s/firmware/TDM4" --define=_DEBUG_=1 -g --diag_warning=225 --diag_wrap=off --display_error_number --endian=little --preproc_with_compile --preproc_dependency="$(basename $( ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/TDM4/pru_i2s_tdm4_pru1_array.h - -$(RM) pru_i2s_tdm4_pru1_array.h - -@echo ' ' - -.PHONY: all clean diff --git a/examples/pru_i2s/firmware/TDM4/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/makefile b/examples/pru_i2s/firmware/TDM4/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/makefile deleted file mode 100644 index b8df9d69f..000000000 --- a/examples/pru_i2s/firmware/TDM4/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/makefile +++ /dev/null @@ -1,90 +0,0 @@ -################################################################################ -# PRU I2S Firmware Makefile -################################################################################ -# Required input arguments : -# Build firmware for PRU I2S Use this input argument to include files from external paths - -export OPEN_PRU_PATH?=$(abspath ../../../../../../../..) -include $(OPEN_PRU_PATH)/imports.mak -CG_TOOL_ROOT := $(CGT_TI_PRU_PATH) - -# Add inputs and outputs from these tool invocations to the build variables -CMD_SRCS += \ - linker.cmd \ - -ASM_SRCS += \ - pru_i2s_main.asm \ - fw_regs.asm \ - -OBJS += \ - pru_i2s_main.obj \ - fw_regs.obj \ - -ASM_DEPS += \ - pru_i2s_main.d \ - fw_regs.d \ - -OBJDIR := . - -FILES_PATH_common = \ - .. \ - ../../.. \ - ../../../.. \ - ../../../../.. \ - -FILES_PATH := $(FILES_PATH_common) - -vpath %.asm $(FILES_PATH) -vpath %.obj $(OBJDIR) -vpath %.cmd $(FILES_PATH) - - -# Add inputs and outputs from these tool invocations to the build variables -EXE_OUTPUTS += \ -pru_i2s_tdm4_pru1_array_am263x-cc_icssm0-pru1_fw_ti-pru-cgt.out \ - -EXE_OUTPUTS__QUOTED += \ -"pru_i2s_tdm4_pru1_array_am263x-cc_icssm0-pru1_fw_ti-pru-cgt.out" \ - -BIN_OUTPUTS += \ -pru_i2s_tdm4_pru1_array_am263x-cc_icssm0-pru1_fw_ti-pru-cgt.hex \ - -BIN_OUTPUTS__QUOTED += \ -"pru_i2s_tdm4_pru1_array_am263x-cc_icssm0-pru1_fw_ti-pru-cgt.hex" \ - -# All Target -all: $(OBJS) $(CMD_SRCS) - @$(MAKE) --no-print-directory -Onone "pru_i2s_tdm4_pru1_array_am263x-cc_icssm0-pru1_fw_ti-pru-cgt.out" - -# Each subdirectory must supply rules for building sources it contributes -$(OBJDIR)/%.obj %.obj: %.asm - @echo 'Building file: "$^"' - @echo 'Invoking: PRU Compiler' - "$(CGT_TI_PRU_PATH)/bin/clpru" -DPRU1 -DSLICE1 -v4 --define=SOC_AM263X --define=PRU1 --define=I2S_RX --define=I2S_RX_DETECT_OVERFLOW --include_path="${CG_TOOL_ROOT}/include" --include_path="${MCU_PLUS_SDK_PATH}/source" --include_path="${OPEN_PRU_PATH}/source" --include_path="${OPEN_PRU_PATH}/examples/pru_i2s/firmware/include" --include_path="${OPEN_PRU_PATH}/examples/pru_i2s/firmware/TDM4" --define=_DEBUG_=1 -g --diag_warning=225 --diag_wrap=off --display_error_number --endian=little --preproc_with_compile --preproc_dependency="$(basename $( ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/TDM4/pru_i2s_tdm4_pru1_array.h - -$(RM) pru_i2s_tdm4_pru1_array.h - -@echo ' ' - -.PHONY: all clean diff --git a/examples/pru_i2s/firmware/TDM4/pru_i2s_tdm4_pru0_array.h b/examples/pru_i2s/firmware/TDM4/pru_i2s_tdm4_pru0_array.h deleted file mode 100644 index 43d2025f1..000000000 --- a/examples/pru_i2s/firmware/TDM4/pru_i2s_tdm4_pru0_array.h +++ /dev/null @@ -1,159 +0,0 @@ -const uint32_t pru_prupru_i2s0_image_0_0[] = { -0x91002b80, -0x1308e0e0, -0x81002b80, -0x0b015b5b, -0x51005b0c, -0x240000e4, -0x240000f7, -0x240000ea, -0x240004f7, -0xf1003782, -0x240008f7, -0xf100178a, -0x00eae2e1, -0xe1002284, -0x0104e2e2, -0x66e1e2fe, -0x2effbf80, -0x240002eb, -0x24001af9, -0x240002f7, -0xe1001917, -0x240001f7, -0xe1011917, -0x2400015a, -0x2400017a, -0x24000f1a, -0x2400011d, -0x0a1ae4e7, -0x1101e7e7, -0x0902e7e7, -0x240004f7, -0xf1003780, -0x10e0e0e2, -0x240008f7, -0xf100178a, -0x0b01eaea, -0x00eae0e1, -0x10e1e1e3, -0xf1000084, -0x0102e0e0, -0x01011d1d, -0xd106ff00, -0xd101ff00, -0xc901ff00, -0xd101ff00, -0x79000002, -0xc906ff00, -0x10ebfffc, -0x51001617, -0x510e160a, -0x510f160c, -0x510d160e, -0x01011616, -0x2400007b, -0x71013602, -0x21005b00, -0x24000036, -0x0b01fcfc, -0x21005b00, -0x0b01fcfc, -0x01011616, -0x21005b00, -0x01013636, -0x24000016, -0x21005b00, -0xf1000097, -0x49061d02, -0x0102e0e0, -0x01011616, -0x21005b00, -0x21003000, -0x50e1e003, -0x01011616, -0x21005b00, -0x51015a03, -0x10e2e2e0, -0x21004e00, -0x10e3e3e0, -0x00eae0e1, -0x15015a5a, -0x240018f9, -0xe100195a, -0xf102191b, -0x69005a04, -0xc9011b20, -0x1d001b1b, -0x21005900, -0xc9001b1d, -0x1d011b1b, -0x2400017b, -0x01011616, -0x10e7e7fe, -0xd106ff00, -0x69017b03, -0xe102191b, -0x2400229f, -0x51001a03, -0x05011a1a, -0x21006d00, -0x24000f1a, -0x71061d04, -0x240000c4, -0x24000084, -0x79000002, -0x10f7f7e4, -0x69061d03, -0x2400011d, -0x79000002, -0x01011d1d, -0x0a1ae4e7, -0x1101e7e7, -0x0902e7e7, -0x21002e00, -0x21002e00, -0x1f005b5b, -0x21007700, -0x1f015b5b, -0x21007700, -0x1f025b5b, -0x24001cf9, -0xe100195b, -0x2400249f, -0x21000000}; - -const uint8_t pru_prupru_i2s0_image_0_1[] = { -0x03, -0x00, -0x30, -0x20, -0x00, -0x00, -0x01, -0x00, -0x08, -0x01, -0x12, -0x13, -0x14, -0x06, -0x01, -0x02, -0x03, -0x05, -0x00, -0x04, -0x00, -0x01, -0x01, -0x00, -0x00, -0x00, -0x02, -0x01, -0x00, -0x00, -0x00, -0x00}; - diff --git a/examples/pru_i2s/firmware/TDM4/pru_i2s_tdm4_pru1_array.h b/examples/pru_i2s/firmware/TDM4/pru_i2s_tdm4_pru1_array.h deleted file mode 100644 index e9502160e..000000000 --- a/examples/pru_i2s/firmware/TDM4/pru_i2s_tdm4_pru1_array.h +++ /dev/null @@ -1,152 +0,0 @@ -const uint32_t pru_prupru_i2s1_image_0_0[] = { -0x91002b80, -0x1308e0e0, -0x81002b80, -0x2effbf80, -0x240002e7, -0x240004e8, -0x240008e9, -0x24001af9, -0x240002f7, -0xe1001917, -0x240001f7, -0xe1011917, -0x2400015a, -0x2400017a, -0x24000f1a, -0x2400011d, -0x240019eb, -0x24001bec, -0x240008f7, -0xf100178a, -0x0b01eaea, -0x10eaeaf1, -0x0501f1f1, -0x240014f7, -0xf100378d, -0x10ededef, -0x24000f3a, -0x00f1edee, -0x10eeeef0, -0x0101f0f0, -0xd100ff00, -0xd101ff00, -0xc901ff00, -0xd101ff00, -0x79000002, -0xc900ff00, -0x31090002, -0x0100e0e0, -0x10e7fffc, -0x10e8fff2, -0x10e9fff3, -0x60edee13, -0x5100161b, -0x510e1609, -0x510f160b, -0x510d160d, -0x01011616, -0x71013602, -0x21004800, -0x24000036, -0x0b01fcfc, -0x21004800, -0x0b01fcfc, -0x01011616, -0x21004800, -0x01013636, -0x24000016, -0x21004800, -0x01011616, -0x21004800, -0x51017a03, -0x10efefed, -0x21004000, -0x10f0f0ed, -0x00f1edee, -0x15017a7a, -0xe1000b7a, -0x2400017b, -0x21002e00, -0x01011616, -0x21004800, -0x01011616, -0xd100ff00, -0x69017b0b, -0x2400007b, -0xf1000c3b, -0x69007a04, -0xd1013b1e, -0x1f003b3b, -0x21005200, -0xd1003b1b, -0x1f013b3b, -0xe1000c3b, -0x2400269f, -0x21005500, -0x0b02f2f2, -0x0b03f3f3, -0x083af2f2, -0x083af3f3, -0x12f2f4f4, -0x12f3f5f5, -0x51003a03, -0x05013a3a, -0x21002300, -0x69061d04, -0x10e7fffc, -0x0b01fcfc, -0x5100fc0e, -0x49061d03, -0xe1000d94, -0x0102eded, -0x01011d1d, -0x71061d02, -0x2400011d, -0x2eff8792, -0x24000f3a, -0x21002300, -0x1f005b5b, -0x21007000, -0x1f015b5b, -0x21007000, -0x1f025b5b, -0x24001cf9, -0xe100195b, -0x2400279f, -0x21000000}; - -const uint8_t pru_prupru_i2s1_image_0_1[] = { -0x00, -0x02, -0x30, -0x20, -0x00, -0x02, -0x01, -0x00, -0x00, -0x01, -0x15, -0x16, -0x17, -0x00, -0x01, -0x04, -0x05, -0x06, -0x02, -0x03, -0x00, -0x03, -0x01, -0x00, -0x00, -0x00, -0x02, -0x01, -0x00, -0x00, -0x00, -0x00}; - diff --git a/examples/pru_i2s/firmware/I2S/fw_regs.asm b/examples/pru_i2s/firmware/i2s/fw_regs.asm similarity index 100% rename from examples/pru_i2s/firmware/I2S/fw_regs.asm rename to examples/pru_i2s/firmware/i2s/fw_regs.asm diff --git a/examples/pru_i2s/firmware/I2S/linker.cmd b/examples/pru_i2s/firmware/i2s/linker.cmd similarity index 100% rename from examples/pru_i2s/firmware/I2S/linker.cmd rename to examples/pru_i2s/firmware/i2s/linker.cmd diff --git a/examples/pru_i2s/firmware/I2S/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/example.projectspec b/examples/pru_i2s/firmware/i2s/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/example.projectspec similarity index 76% rename from examples/pru_i2s/firmware/I2S/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/example.projectspec rename to examples/pru_i2s/firmware/i2s/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/example.projectspec index bf3634dd2..f79082788 100644 --- a/examples/pru_i2s/firmware/I2S/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/example.projectspec +++ b/examples/pru_i2s/firmware/i2s/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/example.projectspec @@ -32,11 +32,11 @@ -I${CG_TOOL_ROOT}/include -I${MCU_PLUS_SDK_PATH}/source -I${OPEN_PRU_PATH}/source - -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/include - -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/I2S + -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/i2s + -I${OPEN_PRU_PATH}/source/i2s -DPRU0 -DSLICE0 - -v4 + -v3 -DSOC_AM261X -DPRU0 -DI2S_TX @@ -52,7 +52,7 @@ " postBuildStep=" - $(CG_TOOL_ROOT)/bin/hexpru --diag_wrap=off --array --array:name_prefix=pru_prupru_i2s0_image_0 -o pru_i2s_pru0_array.h pru_i2s_pru0_array_am261x-lp_icssm0-pru0_fw_ti-pru-cgt.out;if ${CCS_HOST_OS} == linux cat ${OPEN_PRU_PATH}/source/firmware/pru_load_bin_copyright.h pru_i2s_pru0_array.h > ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/I2S/pru_i2s_pru0_array.h;if ${CCS_HOST_OS} == linux rm pru_i2s_pru0_array.h;if ${CCS_HOST_OS} == win32 $(CCS_INSTALL_DIR)/utils/cygwin/cat ${OPEN_PRU_PATH}/source/firmware/pru_load_bin_copyright.h pru_i2s_pru0_array.h > ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/I2S/pru_i2s_pru0_array.h;if ${CCS_HOST_OS} == win32 $(CCS_INSTALL_DIR)/utils/cygwin/rm pru_i2s_pru0_array.h; + $(CG_TOOL_ROOT)/bin/hexpru --diag_wrap=off --array --array:name_prefix=pru_prupru_i2s0_image_0 -o ../pru_i2s_pru0_array.h pru_i2s_pru0_array_am261x-lp_icssm0-pru0_fw_ti-pru-cgt.out " description="A Pru I2s Pru0 Array FW project"> @@ -83,7 +83,7 @@ - + diff --git a/examples/pru_i2s/firmware/i2s/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/makefile b/examples/pru_i2s/firmware/i2s/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/makefile new file mode 100644 index 000000000..516cfb178 --- /dev/null +++ b/examples/pru_i2s/firmware/i2s/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/makefile @@ -0,0 +1,42 @@ +################################################################################ +# PRU I2S - I2S Protocol - PRU0 TX - AM261x-LP +################################################################################ + +export OPEN_PRU_PATH?=$(abspath ../../../../../../../..) +include $(OPEN_PRU_PATH)/imports.mak + +# Define build outputs +OUTPUT_NAME := pru_i2s_am261x-lp_icssm0-pru0_fw + +# MCU+ projects: rename & move hex array output +MCU_HEX_NAME := pru_i2s_pru0_array.h +HEX_ARRAY_PREFIX := pru_prupru_i2s0_image_0 +MCU_HEX_PATH := $(OPEN_PRU_PATH)/examples/pru_i2s/firmware/am261x-lp/$(MCU_HEX_NAME) + +# which directories to search for assembly & C source files? +FILES_PATH := ../../../../ + +# Linker command file +COMMAND_FILES := linker.cmd + +# Silicon version (3: PRUSS, PRU-ICSS; 4: PRU_ICSSG) +PRU_VERSION := 3 +EXPECTED_DEVICE := am261x + + + +# pru_rules.mak has shared settings for all PRU/RTU/TX_PRU core makefiles +include $(OPEN_PRU_PATH)/pru_rules.mak + +# Additional include paths for I2S firmware headers +INCLUDE += --include_path=$(OPEN_PRU_PATH)/examples/pru_i2s/firmware/i2s +INCLUDE += --include_path=$(OPEN_PRU_PATH)/source/i2s + +# Defines: PRU0, I2S Tx, 3 Tx channels, underflow detection +DFLAGS := \ + -DPRU0 -DSLICE0 \ + --define=SOC_AM261X \ + --define=PRU0 \ + --define=I2S_TX \ + --define=NUMBER_OF_TX_3 \ + --define=I2S_TX_DETECT_UNDERFLOW diff --git a/examples/pru_i2s/firmware/I2S/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/makefile_projectspec b/examples/pru_i2s/firmware/i2s/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/makefile_projectspec similarity index 100% rename from examples/pru_i2s/firmware/I2S/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/makefile_projectspec rename to examples/pru_i2s/firmware/i2s/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/makefile_projectspec diff --git a/examples/pru_i2s/firmware/I2S/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/example.projectspec b/examples/pru_i2s/firmware/i2s/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/example.projectspec similarity index 76% rename from examples/pru_i2s/firmware/I2S/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/example.projectspec rename to examples/pru_i2s/firmware/i2s/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/example.projectspec index db2e6562d..741cabef8 100644 --- a/examples/pru_i2s/firmware/I2S/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/example.projectspec +++ b/examples/pru_i2s/firmware/i2s/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/example.projectspec @@ -32,11 +32,11 @@ -I${CG_TOOL_ROOT}/include -I${MCU_PLUS_SDK_PATH}/source -I${OPEN_PRU_PATH}/source - -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/include - -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/I2S + -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/i2s + -I${OPEN_PRU_PATH}/source/i2s -DPRU0 -DSLICE0 - -v4 + -v3 -DSOC_AM263X -DPRU0 -DI2S_TX @@ -52,7 +52,7 @@ " postBuildStep=" - $(CG_TOOL_ROOT)/bin/hexpru --diag_wrap=off --array --array:name_prefix=pru_prupru_i2s0_image_0 -o pru_i2s_pru0_array.h pru_i2s_pru0_array_am263x-cc_icssm0-pru0_fw_ti-pru-cgt.out;if ${CCS_HOST_OS} == linux cat ${OPEN_PRU_PATH}/source/firmware/pru_load_bin_copyright.h pru_i2s_pru0_array.h > ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/I2S/pru_i2s_pru0_array.h;if ${CCS_HOST_OS} == linux rm pru_i2s_pru0_array.h;if ${CCS_HOST_OS} == win32 $(CCS_INSTALL_DIR)/utils/cygwin/cat ${OPEN_PRU_PATH}/source/firmware/pru_load_bin_copyright.h pru_i2s_pru0_array.h > ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/I2S/pru_i2s_pru0_array.h;if ${CCS_HOST_OS} == win32 $(CCS_INSTALL_DIR)/utils/cygwin/rm pru_i2s_pru0_array.h; + $(CG_TOOL_ROOT)/bin/hexpru --diag_wrap=off --array --array:name_prefix=pru_prupru_i2s0_image_0 -o ../pru_i2s_pru0_array.h pru_i2s_pru0_array_am263x-cc_icssm0-pru0_fw_ti-pru-cgt.out " description="A Pru I2s Pru0 Array FW project"> @@ -83,7 +83,7 @@ - + diff --git a/examples/pru_i2s/firmware/i2s/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/makefile b/examples/pru_i2s/firmware/i2s/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/makefile new file mode 100644 index 000000000..75db5ad86 --- /dev/null +++ b/examples/pru_i2s/firmware/i2s/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/makefile @@ -0,0 +1,41 @@ +################################################################################ +# PRU I2S - I2S Protocol - PRU0 TX - AM263x-CC +################################################################################ + +export OPEN_PRU_PATH?=$(abspath ../../../../../../../..) +include $(OPEN_PRU_PATH)/imports.mak + +# Define build outputs +OUTPUT_NAME := pru_i2s_am263x-cc_icssm0-pru0_fw + +# MCU+ projects: rename & move hex array output +MCU_HEX_NAME := pru_i2s_pru0_array.h +HEX_ARRAY_PREFIX := pru_prupru_i2s0_image_0 +MCU_HEX_PATH := $(OPEN_PRU_PATH)/examples/pru_i2s/firmware/am263x-cc/$(MCU_HEX_NAME) + +# which directories to search for assembly & C source files? +FILES_PATH := ../../../../ + +# Linker command file +COMMAND_FILES := linker.cmd + +# Silicon version (3: PRUSS, PRU-ICSS; 4: PRU_ICSSG) +PRU_VERSION := 3 +EXPECTED_DEVICE := am263x + + +# pru_rules.mak has shared settings for all PRU/RTU/TX_PRU core makefiles +include $(OPEN_PRU_PATH)/pru_rules.mak + +# Additional include paths for I2S firmware headers +INCLUDE += --include_path=$(OPEN_PRU_PATH)/examples/pru_i2s/firmware/i2s +INCLUDE += --include_path=$(OPEN_PRU_PATH)/source/i2s + +# Defines: PRU0, I2S Tx, 3 Tx channels, underflow detection +DFLAGS := \ + -DPRU0 -DSLICE0 \ + --define=SOC_AM263X \ + --define=PRU0 \ + --define=I2S_TX \ + --define=NUMBER_OF_TX_3 \ + --define=I2S_TX_DETECT_UNDERFLOW diff --git a/examples/pru_i2s/firmware/I2S/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/makefile_projectspec b/examples/pru_i2s/firmware/i2s/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/makefile_projectspec similarity index 100% rename from examples/pru_i2s/firmware/I2S/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/makefile_projectspec rename to examples/pru_i2s/firmware/i2s/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/makefile_projectspec diff --git a/examples/pru_i2s/firmware/I2S/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/example.projectspec b/examples/pru_i2s/firmware/i2s/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/example.projectspec similarity index 76% rename from examples/pru_i2s/firmware/I2S/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/example.projectspec rename to examples/pru_i2s/firmware/i2s/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/example.projectspec index 7648e0ce1..aa98380b5 100644 --- a/examples/pru_i2s/firmware/I2S/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/example.projectspec +++ b/examples/pru_i2s/firmware/i2s/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/example.projectspec @@ -32,11 +32,11 @@ -I${CG_TOOL_ROOT}/include -I${MCU_PLUS_SDK_PATH}/source -I${OPEN_PRU_PATH}/source - -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/include - -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/I2S + -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/i2s + -I${OPEN_PRU_PATH}/source/i2s -DPRU1 -DSLICE1 - -v4 + -v3 -DSOC_AM261X -DPRU1 -DI2S_RX @@ -51,7 +51,7 @@ " postBuildStep=" - $(CG_TOOL_ROOT)/bin/hexpru --diag_wrap=off --array --array:name_prefix=pru_prupru_i2s1_image_0 -o pru_i2s_pru1_array.h pru_i2s_pru1_array_am261x-lp_icssm0-pru1_fw_ti-pru-cgt.out;if ${CCS_HOST_OS} == linux cat ${OPEN_PRU_PATH}/source/firmware/pru_load_bin_copyright.h pru_i2s_pru1_array.h > ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/I2S/pru_i2s_pru1_array.h;if ${CCS_HOST_OS} == linux rm pru_i2s_pru1_array.h;if ${CCS_HOST_OS} == win32 $(CCS_INSTALL_DIR)/utils/cygwin/cat ${OPEN_PRU_PATH}/source/firmware/pru_load_bin_copyright.h pru_i2s_pru1_array.h > ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/I2S/pru_i2s_pru1_array.h;if ${CCS_HOST_OS} == win32 $(CCS_INSTALL_DIR)/utils/cygwin/rm pru_i2s_pru1_array.h; + $(CG_TOOL_ROOT)/bin/hexpru --diag_wrap=off --array --array:name_prefix=pru_prupru_i2s1_image_0 -o ../pru_i2s_pru1_array.h pru_i2s_pru1_array_am261x-lp_icssm0-pru1_fw_ti-pru-cgt.out " description="A Pru I2s Pru1 Array FW project"> @@ -82,7 +82,7 @@ - + diff --git a/examples/pru_i2s/firmware/i2s/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/makefile b/examples/pru_i2s/firmware/i2s/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/makefile new file mode 100644 index 000000000..cbf283e04 --- /dev/null +++ b/examples/pru_i2s/firmware/i2s/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/makefile @@ -0,0 +1,40 @@ +################################################################################ +# PRU I2S - I2S Protocol - PRU1 RX - AM261x-LP +################################################################################ + +export OPEN_PRU_PATH?=$(abspath ../../../../../../../..) +include $(OPEN_PRU_PATH)/imports.mak + +# Define build outputs +OUTPUT_NAME := pru_i2s_am261x-lp_icssm0-pru1_fw + +# MCU+ projects: rename & move hex array output +MCU_HEX_NAME := pru_i2s_pru1_array.h +HEX_ARRAY_PREFIX := pru_prupru_i2s1_image_0 +MCU_HEX_PATH := $(OPEN_PRU_PATH)/examples/pru_i2s/firmware/am261x-lp/$(MCU_HEX_NAME) + +# which directories to search for assembly & C source files? +FILES_PATH := ../../../../ + +# Linker command file +COMMAND_FILES := linker.cmd + +# Silicon version (3: PRUSS, PRU-ICSS; 4: PRU_ICSSG) +PRU_VERSION := 3 +EXPECTED_DEVICE := am261x + + +# pru_rules.mak has shared settings for all PRU/RTU/TX_PRU core makefiles +include $(OPEN_PRU_PATH)/pru_rules.mak + +# Additional include paths for I2S firmware headers +INCLUDE += --include_path=$(OPEN_PRU_PATH)/examples/pru_i2s/firmware/i2s +INCLUDE += --include_path=$(OPEN_PRU_PATH)/source/i2s + +# Defines: PRU1, I2S Rx, overflow detection +DFLAGS := \ + -DPRU1 -DSLICE1 \ + --define=SOC_AM261X \ + --define=PRU1 \ + --define=I2S_RX \ + --define=I2S_RX_DETECT_OVERFLOW diff --git a/examples/pru_i2s/firmware/I2S/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/makefile_projectspec b/examples/pru_i2s/firmware/i2s/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/makefile_projectspec similarity index 100% rename from examples/pru_i2s/firmware/I2S/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/makefile_projectspec rename to examples/pru_i2s/firmware/i2s/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/makefile_projectspec diff --git a/examples/pru_i2s/firmware/I2S/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/example.projectspec b/examples/pru_i2s/firmware/i2s/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/example.projectspec similarity index 76% rename from examples/pru_i2s/firmware/I2S/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/example.projectspec rename to examples/pru_i2s/firmware/i2s/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/example.projectspec index 274f091e9..8133a3867 100644 --- a/examples/pru_i2s/firmware/I2S/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/example.projectspec +++ b/examples/pru_i2s/firmware/i2s/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/example.projectspec @@ -32,11 +32,11 @@ -I${CG_TOOL_ROOT}/include -I${MCU_PLUS_SDK_PATH}/source -I${OPEN_PRU_PATH}/source - -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/include - -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/I2S + -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/i2s + -I${OPEN_PRU_PATH}/source/i2s -DPRU1 -DSLICE1 - -v4 + -v3 -DSOC_AM263X -DPRU1 -DI2S_RX @@ -51,7 +51,7 @@ " postBuildStep=" - $(CG_TOOL_ROOT)/bin/hexpru --diag_wrap=off --array --array:name_prefix=pru_prupru_i2s1_image_0 -o pru_i2s_pru1_array.h pru_i2s_pru1_array_am263x-cc_icssm0-pru1_fw_ti-pru-cgt.out;if ${CCS_HOST_OS} == linux cat ${OPEN_PRU_PATH}/source/firmware/pru_load_bin_copyright.h pru_i2s_pru1_array.h > ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/I2S/pru_i2s_pru1_array.h;if ${CCS_HOST_OS} == linux rm pru_i2s_pru1_array.h;if ${CCS_HOST_OS} == win32 $(CCS_INSTALL_DIR)/utils/cygwin/cat ${OPEN_PRU_PATH}/source/firmware/pru_load_bin_copyright.h pru_i2s_pru1_array.h > ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/I2S/pru_i2s_pru1_array.h;if ${CCS_HOST_OS} == win32 $(CCS_INSTALL_DIR)/utils/cygwin/rm pru_i2s_pru1_array.h; + $(CG_TOOL_ROOT)/bin/hexpru --diag_wrap=off --array --array:name_prefix=pru_prupru_i2s1_image_0 -o ../pru_i2s_pru1_array.h pru_i2s_pru1_array_am263x-cc_icssm0-pru1_fw_ti-pru-cgt.out " description="A Pru I2s Pru1 Array FW project"> @@ -82,7 +82,7 @@ - + diff --git a/examples/pru_i2s/firmware/i2s/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/makefile b/examples/pru_i2s/firmware/i2s/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/makefile new file mode 100644 index 000000000..9b014f039 --- /dev/null +++ b/examples/pru_i2s/firmware/i2s/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/makefile @@ -0,0 +1,40 @@ +################################################################################ +# PRU I2S - I2S Protocol - PRU1 RX - AM263x-CC +################################################################################ + +export OPEN_PRU_PATH?=$(abspath ../../../../../../../..) +include $(OPEN_PRU_PATH)/imports.mak + +# Define build outputs +OUTPUT_NAME := pru_i2s_am263x-cc_icssm0-pru1_fw + +# MCU+ projects: rename & move hex array output +MCU_HEX_NAME := pru_i2s_pru1_array.h +HEX_ARRAY_PREFIX := pru_prupru_i2s1_image_0 +MCU_HEX_PATH := $(OPEN_PRU_PATH)/examples/pru_i2s/firmware/am263x-cc/$(MCU_HEX_NAME) + +# which directories to search for assembly & C source files? +FILES_PATH := ../../../../ + +# Linker command file +COMMAND_FILES := linker.cmd + +# Silicon version (3: PRUSS, PRU-ICSS; 4: PRU_ICSSG) +PRU_VERSION := 3 +EXPECTED_DEVICE := am263x + + +# pru_rules.mak has shared settings for all PRU/RTU/TX_PRU core makefiles +include $(OPEN_PRU_PATH)/pru_rules.mak + +# Additional include paths for I2S firmware headers +INCLUDE += --include_path=$(OPEN_PRU_PATH)/examples/pru_i2s/firmware/i2s +INCLUDE += --include_path=$(OPEN_PRU_PATH)/source/i2s + +# Defines: PRU1, I2S Rx, overflow detection +DFLAGS := \ + -DPRU1 -DSLICE1 \ + --define=SOC_AM263X \ + --define=PRU1 \ + --define=I2S_RX \ + --define=I2S_RX_DETECT_OVERFLOW diff --git a/examples/pru_i2s/firmware/I2S/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/makefile_projectspec b/examples/pru_i2s/firmware/i2s/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/makefile_projectspec similarity index 100% rename from examples/pru_i2s/firmware/I2S/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/makefile_projectspec rename to examples/pru_i2s/firmware/i2s/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/makefile_projectspec diff --git a/examples/pru_i2s/firmware/I2S/pru_i2s_interface.h b/examples/pru_i2s/firmware/i2s/pru_i2s_interface.h similarity index 100% rename from examples/pru_i2s/firmware/I2S/pru_i2s_interface.h rename to examples/pru_i2s/firmware/i2s/pru_i2s_interface.h diff --git a/examples/pru_i2s/firmware/I2S/pru_i2s_main.asm b/examples/pru_i2s/firmware/i2s/pru_i2s_main.asm similarity index 100% rename from examples/pru_i2s/firmware/I2S/pru_i2s_main.asm rename to examples/pru_i2s/firmware/i2s/pru_i2s_main.asm diff --git a/examples/pru_i2s/firmware/I2S/pru_i2s_regs.h b/examples/pru_i2s/firmware/i2s/pru_i2s_regs.h similarity index 100% rename from examples/pru_i2s/firmware/I2S/pru_i2s_regs.h rename to examples/pru_i2s/firmware/i2s/pru_i2s_regs.h diff --git a/examples/pru_i2s/firmware/TDM4/fw_regs.asm b/examples/pru_i2s/firmware/tdm4/fw_regs.asm similarity index 100% rename from examples/pru_i2s/firmware/TDM4/fw_regs.asm rename to examples/pru_i2s/firmware/tdm4/fw_regs.asm diff --git a/examples/pru_i2s/firmware/TDM4/linker.cmd b/examples/pru_i2s/firmware/tdm4/linker.cmd similarity index 100% rename from examples/pru_i2s/firmware/TDM4/linker.cmd rename to examples/pru_i2s/firmware/tdm4/linker.cmd diff --git a/examples/pru_i2s/firmware/TDM4/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/example.projectspec b/examples/pru_i2s/firmware/tdm4/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/example.projectspec similarity index 75% rename from examples/pru_i2s/firmware/TDM4/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/example.projectspec rename to examples/pru_i2s/firmware/tdm4/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/example.projectspec index 7af03b2f8..6a5a082cb 100644 --- a/examples/pru_i2s/firmware/TDM4/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/example.projectspec +++ b/examples/pru_i2s/firmware/tdm4/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/example.projectspec @@ -32,11 +32,11 @@ -I${CG_TOOL_ROOT}/include -I${MCU_PLUS_SDK_PATH}/source -I${OPEN_PRU_PATH}/source - -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/include - -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/TDM4 + -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/tdm4 + -I${OPEN_PRU_PATH}/source/i2s -DPRU0 -DSLICE0 - -v4 + -v3 -DSOC_AM261X -DPRU0 -DI2S_TX @@ -52,7 +52,7 @@ " postBuildStep=" - $(CG_TOOL_ROOT)/bin/hexpru --diag_wrap=off --array --array:name_prefix=pru_prupru_i2s0_image_0 -o pru_i2s_tdm4_pru0_array.h pru_i2s_tdm4_pru0_array_am261x-lp_icssm0-pru0_fw_ti-pru-cgt.out;if ${CCS_HOST_OS} == linux cat ${OPEN_PRU_PATH}/source/firmware/pru_load_bin_copyright.h pru_i2s_tdm4_pru0_array.h > ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/TDM4/pru_i2s_tdm4_pru0_array.h;if ${CCS_HOST_OS} == linux rm pru_i2s_tdm4_pru0_array.h;if ${CCS_HOST_OS} == win32 $(CCS_INSTALL_DIR)/utils/cygwin/cat ${OPEN_PRU_PATH}/source/firmware/pru_load_bin_copyright.h pru_i2s_tdm4_pru0_array.h > ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/TDM4/pru_i2s_tdm4_pru0_array.h;if ${CCS_HOST_OS} == win32 $(CCS_INSTALL_DIR)/utils/cygwin/rm pru_i2s_tdm4_pru0_array.h; + $(CG_TOOL_ROOT)/bin/hexpru --diag_wrap=off --array --array:name_prefix=pru_prupru_i2s0_image_0 -o ../pru_i2s_tdm4_pru0_array.h pru_i2s_tdm4_pru0_array_am261x-lp_icssm0-pru0_fw_ti-pru-cgt.out " description="A Pru I2s Tdm4 Pru0 Array FW project"> @@ -81,7 +81,7 @@ - + diff --git a/examples/pru_i2s/firmware/tdm4/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/makefile b/examples/pru_i2s/firmware/tdm4/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/makefile new file mode 100644 index 000000000..d6f4b30c8 --- /dev/null +++ b/examples/pru_i2s/firmware/tdm4/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/makefile @@ -0,0 +1,41 @@ +################################################################################ +# PRU I2S - TDM4 Protocol - PRU0 TX - AM261x-LP +################################################################################ + +export OPEN_PRU_PATH?=$(abspath ../../../../../../../..) +include $(OPEN_PRU_PATH)/imports.mak + +# Define build outputs +OUTPUT_NAME := pru_i2s_tdm4_am261x-lp_icssm0-pru0_fw + +# MCU+ projects: rename & move hex array output +MCU_HEX_NAME := pru_i2s_tdm4_pru0_array.h +HEX_ARRAY_PREFIX := pru_prupru_i2s0_image_0 +MCU_HEX_PATH := $(OPEN_PRU_PATH)/examples/pru_i2s/firmware/am261x-lp/$(MCU_HEX_NAME) + +# which directories to search for assembly & C source files? +FILES_PATH := ../../../../ + +# Linker command file +COMMAND_FILES := linker.cmd + +# Silicon version (3: PRUSS, PRU-ICSS; 4: PRU_ICSSG) +PRU_VERSION := 3 +EXPECTED_DEVICE := am261x + + +# pru_rules.mak has shared settings for all PRU/RTU/TX_PRU core makefiles +include $(OPEN_PRU_PATH)/pru_rules.mak + +# Additional include paths for TDM4 firmware headers +INCLUDE += --include_path=$(OPEN_PRU_PATH)/examples/pru_i2s/firmware/tdm4 +INCLUDE += --include_path=$(OPEN_PRU_PATH)/source/i2s + +# Defines: PRU0, I2S Tx, 3 Tx channels, underflow detection +DFLAGS := \ + -DPRU0 -DSLICE0 \ + --define=SOC_AM261X \ + --define=PRU0 \ + --define=I2S_TX \ + --define=NUMBER_OF_TX_3 \ + --define=I2S_TX_DETECT_UNDERFLOW diff --git a/examples/pru_i2s/firmware/TDM4/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/makefile_projectspec b/examples/pru_i2s/firmware/tdm4/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/makefile_projectspec similarity index 100% rename from examples/pru_i2s/firmware/TDM4/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/makefile_projectspec rename to examples/pru_i2s/firmware/tdm4/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt/makefile_projectspec diff --git a/examples/pru_i2s/firmware/TDM4/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/example.projectspec b/examples/pru_i2s/firmware/tdm4/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/example.projectspec similarity index 75% rename from examples/pru_i2s/firmware/TDM4/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/example.projectspec rename to examples/pru_i2s/firmware/tdm4/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/example.projectspec index 4a3c3f4a2..ede88b7ce 100644 --- a/examples/pru_i2s/firmware/TDM4/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/example.projectspec +++ b/examples/pru_i2s/firmware/tdm4/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/example.projectspec @@ -32,11 +32,11 @@ -I${CG_TOOL_ROOT}/include -I${MCU_PLUS_SDK_PATH}/source -I${OPEN_PRU_PATH}/source - -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/include - -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/TDM4 + -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/tdm4 + -I${OPEN_PRU_PATH}/source/i2s -DPRU0 -DSLICE0 - -v4 + -v3 -DSOC_AM263X -DPRU0 -DI2S_TX @@ -52,7 +52,7 @@ " postBuildStep=" - $(CG_TOOL_ROOT)/bin/hexpru --diag_wrap=off --array --array:name_prefix=pru_prupru_i2s0_image_0 -o pru_i2s_tdm4_pru0_array.h pru_i2s_tdm4_pru0_array_am263x-cc_icssm0-pru0_fw_ti-pru-cgt.out;if ${CCS_HOST_OS} == linux cat ${OPEN_PRU_PATH}/source/firmware/pru_load_bin_copyright.h pru_i2s_tdm4_pru0_array.h > ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/TDM4/pru_i2s_tdm4_pru0_array.h;if ${CCS_HOST_OS} == linux rm pru_i2s_tdm4_pru0_array.h;if ${CCS_HOST_OS} == win32 $(CCS_INSTALL_DIR)/utils/cygwin/cat ${OPEN_PRU_PATH}/source/firmware/pru_load_bin_copyright.h pru_i2s_tdm4_pru0_array.h > ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/TDM4/pru_i2s_tdm4_pru0_array.h;if ${CCS_HOST_OS} == win32 $(CCS_INSTALL_DIR)/utils/cygwin/rm pru_i2s_tdm4_pru0_array.h; + $(CG_TOOL_ROOT)/bin/hexpru --diag_wrap=off --array --array:name_prefix=pru_prupru_i2s0_image_0 -o ../pru_i2s_tdm4_pru0_array.h pru_i2s_tdm4_pru0_array_am263x-cc_icssm0-pru0_fw_ti-pru-cgt.out " description="A Pru I2s Tdm4 Pru0 Array FW project"> @@ -81,7 +81,7 @@ - + diff --git a/examples/pru_i2s/firmware/tdm4/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/makefile b/examples/pru_i2s/firmware/tdm4/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/makefile new file mode 100644 index 000000000..01673223a --- /dev/null +++ b/examples/pru_i2s/firmware/tdm4/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/makefile @@ -0,0 +1,41 @@ +################################################################################ +# PRU I2S - TDM4 Protocol - PRU0 TX - AM263x-CC +################################################################################ + +export OPEN_PRU_PATH?=$(abspath ../../../../../../../..) +include $(OPEN_PRU_PATH)/imports.mak + +# Define build outputs +OUTPUT_NAME := pru_i2s_tdm4_am263x-cc_icssm0-pru0_fw + +# MCU+ projects: rename & move hex array output +MCU_HEX_NAME := pru_i2s_tdm4_pru0_array.h +HEX_ARRAY_PREFIX := pru_prupru_i2s0_image_0 +MCU_HEX_PATH := $(OPEN_PRU_PATH)/examples/pru_i2s/firmware/am263x-cc/$(MCU_HEX_NAME) + +# which directories to search for assembly & C source files? +FILES_PATH := ../../../../ + +# Linker command file +COMMAND_FILES := linker.cmd + +# Silicon version (3: PRUSS, PRU-ICSS; 4: PRU_ICSSG) +PRU_VERSION := 3 +EXPECTED_DEVICE := am263x + + +# pru_rules.mak has shared settings for all PRU/RTU/TX_PRU core makefiles +include $(OPEN_PRU_PATH)/pru_rules.mak + +# Additional include paths for TDM4 firmware headers +INCLUDE += --include_path=$(OPEN_PRU_PATH)/examples/pru_i2s/firmware/tdm4 +INCLUDE += --include_path=$(OPEN_PRU_PATH)/source/i2s + +# Defines: PRU0, I2S Tx, 3 Tx channels, underflow detection +DFLAGS := \ + -DPRU0 -DSLICE0 \ + --define=SOC_AM263X \ + --define=PRU0 \ + --define=I2S_TX \ + --define=NUMBER_OF_TX_3 \ + --define=I2S_TX_DETECT_UNDERFLOW diff --git a/examples/pru_i2s/firmware/TDM4/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/makefile_projectspec b/examples/pru_i2s/firmware/tdm4/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/makefile_projectspec similarity index 100% rename from examples/pru_i2s/firmware/TDM4/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/makefile_projectspec rename to examples/pru_i2s/firmware/tdm4/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt/makefile_projectspec diff --git a/examples/pru_i2s/firmware/TDM4/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/example.projectspec b/examples/pru_i2s/firmware/tdm4/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/example.projectspec similarity index 75% rename from examples/pru_i2s/firmware/TDM4/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/example.projectspec rename to examples/pru_i2s/firmware/tdm4/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/example.projectspec index 0d479e719..3433f964a 100644 --- a/examples/pru_i2s/firmware/TDM4/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/example.projectspec +++ b/examples/pru_i2s/firmware/tdm4/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/example.projectspec @@ -32,11 +32,11 @@ -I${CG_TOOL_ROOT}/include -I${MCU_PLUS_SDK_PATH}/source -I${OPEN_PRU_PATH}/source - -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/include - -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/TDM4 + -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/tdm4 + -I${OPEN_PRU_PATH}/source/i2s -DPRU1 -DSLICE1 - -v4 + -v3 -DSOC_AM261X -DPRU1 -DI2S_RX @@ -51,7 +51,7 @@ " postBuildStep=" - $(CG_TOOL_ROOT)/bin/hexpru --diag_wrap=off --array --array:name_prefix=pru_prupru_i2s1_image_0 -o pru_i2s_tdm4_pru1_array.h pru_i2s_tdm4_pru1_array_am261x-lp_icssm0-pru1_fw_ti-pru-cgt.out;if ${CCS_HOST_OS} == linux cat ${OPEN_PRU_PATH}/source/firmware/pru_load_bin_copyright.h pru_i2s_tdm4_pru1_array.h > ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/TDM4/pru_i2s_tdm4_pru1_array.h;if ${CCS_HOST_OS} == linux rm pru_i2s_tdm4_pru1_array.h;if ${CCS_HOST_OS} == win32 $(CCS_INSTALL_DIR)/utils/cygwin/cat ${OPEN_PRU_PATH}/source/firmware/pru_load_bin_copyright.h pru_i2s_tdm4_pru1_array.h > ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/TDM4/pru_i2s_tdm4_pru1_array.h;if ${CCS_HOST_OS} == win32 $(CCS_INSTALL_DIR)/utils/cygwin/rm pru_i2s_tdm4_pru1_array.h; + $(CG_TOOL_ROOT)/bin/hexpru --diag_wrap=off --array --array:name_prefix=pru_prupru_i2s1_image_0 -o ../pru_i2s_tdm4_pru1_array.h pru_i2s_tdm4_pru1_array_am261x-lp_icssm0-pru1_fw_ti-pru-cgt.out " description="A Pru I2s Tdm4 Pru1 Array FW project"> @@ -80,7 +80,7 @@ - + diff --git a/examples/pru_i2s/firmware/tdm4/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/makefile b/examples/pru_i2s/firmware/tdm4/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/makefile new file mode 100644 index 000000000..b9e90fb62 --- /dev/null +++ b/examples/pru_i2s/firmware/tdm4/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/makefile @@ -0,0 +1,40 @@ +################################################################################ +# PRU I2S - TDM4 Protocol - PRU1 RX - AM261x-LP +################################################################################ + +export OPEN_PRU_PATH?=$(abspath ../../../../../../../..) +include $(OPEN_PRU_PATH)/imports.mak + +# Define build outputs +OUTPUT_NAME := pru_i2s_tdm4_am261x-lp_icssm0-pru1_fw + +# MCU+ projects: rename & move hex array output +MCU_HEX_NAME := pru_i2s_tdm4_pru1_array.h +HEX_ARRAY_PREFIX := pru_prupru_i2s1_image_0 +MCU_HEX_PATH := $(OPEN_PRU_PATH)/examples/pru_i2s/firmware/am261x-lp/$(MCU_HEX_NAME) + +# which directories to search for assembly & C source files? +FILES_PATH := ../../../../ + +# Linker command file +COMMAND_FILES := linker.cmd + +# Silicon version (3: PRUSS, PRU-ICSS; 4: PRU_ICSSG) +PRU_VERSION := 3 +EXPECTED_DEVICE := am261x + + +# pru_rules.mak has shared settings for all PRU/RTU/TX_PRU core makefiles +include $(OPEN_PRU_PATH)/pru_rules.mak + +# Additional include paths for TDM4 firmware headers +INCLUDE += --include_path=$(OPEN_PRU_PATH)/examples/pru_i2s/firmware/tdm4 +INCLUDE += --include_path=$(OPEN_PRU_PATH)/source/i2s + +# Defines: PRU1, I2S Rx, overflow detection +DFLAGS := \ + -DPRU1 -DSLICE1 \ + --define=SOC_AM261X \ + --define=PRU1 \ + --define=I2S_RX \ + --define=I2S_RX_DETECT_OVERFLOW diff --git a/examples/pru_i2s/firmware/TDM4/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/makefile_projectspec b/examples/pru_i2s/firmware/tdm4/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/makefile_projectspec similarity index 100% rename from examples/pru_i2s/firmware/TDM4/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/makefile_projectspec rename to examples/pru_i2s/firmware/tdm4/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt/makefile_projectspec diff --git a/examples/pru_i2s/firmware/TDM4/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/example.projectspec b/examples/pru_i2s/firmware/tdm4/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/example.projectspec similarity index 75% rename from examples/pru_i2s/firmware/TDM4/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/example.projectspec rename to examples/pru_i2s/firmware/tdm4/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/example.projectspec index a855f7fe6..caf478571 100644 --- a/examples/pru_i2s/firmware/TDM4/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/example.projectspec +++ b/examples/pru_i2s/firmware/tdm4/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/example.projectspec @@ -32,11 +32,11 @@ -I${CG_TOOL_ROOT}/include -I${MCU_PLUS_SDK_PATH}/source -I${OPEN_PRU_PATH}/source - -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/include - -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/TDM4 + -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/tdm4 + -I${OPEN_PRU_PATH}/source/i2s -DPRU1 -DSLICE1 - -v4 + -v3 -DSOC_AM263X -DPRU1 -DI2S_RX @@ -51,7 +51,7 @@ " postBuildStep=" - $(CG_TOOL_ROOT)/bin/hexpru --diag_wrap=off --array --array:name_prefix=pru_prupru_i2s1_image_0 -o pru_i2s_tdm4_pru1_array.h pru_i2s_tdm4_pru1_array_am263x-cc_icssm0-pru1_fw_ti-pru-cgt.out;if ${CCS_HOST_OS} == linux cat ${OPEN_PRU_PATH}/source/firmware/pru_load_bin_copyright.h pru_i2s_tdm4_pru1_array.h > ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/TDM4/pru_i2s_tdm4_pru1_array.h;if ${CCS_HOST_OS} == linux rm pru_i2s_tdm4_pru1_array.h;if ${CCS_HOST_OS} == win32 $(CCS_INSTALL_DIR)/utils/cygwin/cat ${OPEN_PRU_PATH}/source/firmware/pru_load_bin_copyright.h pru_i2s_tdm4_pru1_array.h > ${OPEN_PRU_PATH}/examples/pru_i2s/firmware/TDM4/pru_i2s_tdm4_pru1_array.h;if ${CCS_HOST_OS} == win32 $(CCS_INSTALL_DIR)/utils/cygwin/rm pru_i2s_tdm4_pru1_array.h; + $(CG_TOOL_ROOT)/bin/hexpru --diag_wrap=off --array --array:name_prefix=pru_prupru_i2s1_image_0 -o ../pru_i2s_tdm4_pru1_array.h pru_i2s_tdm4_pru1_array_am263x-cc_icssm0-pru1_fw_ti-pru-cgt.out " description="A Pru I2s Tdm4 Pru1 Array FW project"> @@ -80,7 +80,7 @@ - + diff --git a/examples/pru_i2s/firmware/tdm4/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/makefile b/examples/pru_i2s/firmware/tdm4/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/makefile new file mode 100644 index 000000000..215a8ae95 --- /dev/null +++ b/examples/pru_i2s/firmware/tdm4/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/makefile @@ -0,0 +1,40 @@ +################################################################################ +# PRU I2S - TDM4 Protocol - PRU1 RX - AM263x-CC +################################################################################ + +export OPEN_PRU_PATH?=$(abspath ../../../../../../../..) +include $(OPEN_PRU_PATH)/imports.mak + +# Define build outputs +OUTPUT_NAME := pru_i2s_tdm4_am263x-cc_icssm0-pru1_fw + +# MCU+ projects: rename & move hex array output +MCU_HEX_NAME := pru_i2s_tdm4_pru1_array.h +HEX_ARRAY_PREFIX := pru_prupru_i2s1_image_0 +MCU_HEX_PATH := $(OPEN_PRU_PATH)/examples/pru_i2s/firmware/am263x-cc/$(MCU_HEX_NAME) + +# which directories to search for assembly & C source files? +FILES_PATH := ../../../../ + +# Linker command file +COMMAND_FILES := linker.cmd + +# Silicon version (3: PRUSS, PRU-ICSS; 4: PRU_ICSSG) +PRU_VERSION := 3 +EXPECTED_DEVICE := am263x + + +# pru_rules.mak has shared settings for all PRU/RTU/TX_PRU core makefiles +include $(OPEN_PRU_PATH)/pru_rules.mak + +# Additional include paths for TDM4 firmware headers +INCLUDE += --include_path=$(OPEN_PRU_PATH)/examples/pru_i2s/firmware/tdm4 +INCLUDE += --include_path=$(OPEN_PRU_PATH)/source/i2s + +# Defines: PRU1, I2S Rx, overflow detection +DFLAGS := \ + -DPRU1 -DSLICE1 \ + --define=SOC_AM263X \ + --define=PRU1 \ + --define=I2S_RX \ + --define=I2S_RX_DETECT_OVERFLOW diff --git a/examples/pru_i2s/firmware/TDM4/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/makefile_projectspec b/examples/pru_i2s/firmware/tdm4/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/makefile_projectspec similarity index 100% rename from examples/pru_i2s/firmware/TDM4/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/makefile_projectspec rename to examples/pru_i2s/firmware/tdm4/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt/makefile_projectspec diff --git a/examples/pru_i2s/firmware/TDM4/pru_i2s_interface.h b/examples/pru_i2s/firmware/tdm4/pru_i2s_interface.h similarity index 100% rename from examples/pru_i2s/firmware/TDM4/pru_i2s_interface.h rename to examples/pru_i2s/firmware/tdm4/pru_i2s_interface.h diff --git a/examples/pru_i2s/firmware/TDM4/pru_i2s_main.asm b/examples/pru_i2s/firmware/tdm4/pru_i2s_main.asm similarity index 100% rename from examples/pru_i2s/firmware/TDM4/pru_i2s_main.asm rename to examples/pru_i2s/firmware/tdm4/pru_i2s_main.asm diff --git a/examples/pru_i2s/firmware/TDM4/pru_i2s_regs.h b/examples/pru_i2s/firmware/tdm4/pru_i2s_regs.h similarity index 100% rename from examples/pru_i2s/firmware/TDM4/pru_i2s_regs.h rename to examples/pru_i2s/firmware/tdm4/pru_i2s_regs.h diff --git a/examples/pru_i2s/makefile b/examples/pru_i2s/makefile index 5e06563a2..24d1ee47c 100644 --- a/examples/pru_i2s/makefile +++ b/examples/pru_i2s/makefile @@ -1,50 +1,5 @@ include ../../imports.mak -####################### -# Library build tools # -####################### -ifeq ($(CG_TOOL_ROOT),) - CC=$(CGT_TI_ARM_CLANG_PATH)/bin/tiarmclang - AR=$(CGT_TI_ARM_CLANG_PATH)/bin/tiarmar -else - CC=$(CG_TOOL_ROOT)/bin/tiarmclang - AR=$(CG_TOOL_ROOT)/bin/tiarmar -endif - -CFLAGS_OPT_debug := -O0 -CFLAGS_OPT_release := -Os -CFLAGS_OPT := $(CFLAGS_OPT_$(PROFILE)) - -CFLAGS_AM261X := -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mthumb -Wall -Werror -g -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function $(CFLAGS_OPT) -CFLAGS_AM263X := -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mthumb -Wall -Werror -g -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function $(CFLAGS_OPT) - -INCLUDES_AM261X := \ - -I$(MCU_PLUS_SDK_PATH)/source \ - -I$(OPEN_PRU_PATH)/source \ - -I$(MCU_PLUS_SDK_PATH)/source/kernel/freertos/FreeRTOS-Kernel/include \ - -I$(MCU_PLUS_SDK_PATH)/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F \ - -I$(MCU_PLUS_SDK_PATH)/source/kernel/freertos/config/am261x/r5f \ - -I./include \ - -I./firmware \ - -I. \ - -I.. \ - -I$(OPEN_PRU_PATH)/examples - -INCLUDES_AM263X := \ - -I$(MCU_PLUS_SDK_PATH)/source \ - -I$(OPEN_PRU_PATH)/source \ - -I$(MCU_PLUS_SDK_PATH)/source/kernel/freertos/FreeRTOS-Kernel/include \ - -I$(MCU_PLUS_SDK_PATH)/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F \ - -I$(MCU_PLUS_SDK_PATH)/source/kernel/freertos/config/am263x/r5f \ - -I./include \ - -I./firmware \ - -I. \ - -I.. \ - -I$(OPEN_PRU_PATH)/examples - -DEFINES_AM261X := -DSOC_AM261X -DOS_FREERTOS -DEFINES_AM263X := -DSOC_AM263X -DOS_FREERTOS - ####################### # project information # ####################### @@ -55,6 +10,8 @@ SUPPORTED_PROCESSORS := am261x am263x # Profile used when naming the built pru_i2s driver library, must match the # ConfigName the R5F application makefiles link against (see PROFILE there). PROFILE?=release +# The driver library is built from source/i2s, its output belongs to this project +LIB_DIR := $(CURDIR)/lib # Does the PRU code have dependencies outside of the open-pru repo? PRU_DEPENDENCIES := mcuplus # Use NON_PRU_DEPENDENCIES to select which makefiles to call for non-PRU cores @@ -106,24 +63,34 @@ endif # Make and clean commands # ########################### -# "make pru" builds PRU firmware for all supported devices +ifeq ($(BUILD_PROJECT),y) +# "make" or "make all" builds PRU firmware then host code for $(DEVICE) +all: MESSAGE = "Building $(PROJECT_NAME) for $(DEVICE)" +all: pre_build_message + $(MAKE) host + +# "make pru" builds only PRU firmware for $(DEVICE) pru: ARGUMENTS_PRU = all -pru: ARGUMENTS_MCUPLUS = all pru: MESSAGE = "Building $(PROJECT_NAME) PRU firmware" -pru: pre_build_message $(SUPPORTED_PROCESSORS) +pru: pre_build_message $(DEVICE) -# "make host" builds host (R5F/ARM) code for specified DEVICE -host: ARGUMENTS_PRU = pru -host: ARGUMENTS_MCUPLUS = all +# "make host" builds PRU firmware, then host (R5F) code for $(DEVICE). The steps +# are recipe lines so they stay in order under "make -j": the host code includes +# the PRU firmware headers. The host code links the driver library, which is not +# built here: run "make libs" first. host: MESSAGE = "Building $(PROJECT_NAME) host code for $(DEVICE)" -host: pre_build_message $(DEVICE_NON_PRU) +host: pre_build_message + $(MAKE) pru + $(MAKE) $(DEVICE_NON_PRU) ARGUMENTS_MCUPLUS=all -ifeq ($(BUILD_PROJECT),y) -# "make" or "make all" builds projects that match $(DEVICE) set in imports.mak -all: ARGUMENTS_PRU = all -all: ARGUMENTS_MCUPLUS = $(ARGUMENTS_PRU) -all: MESSAGE = "Building $(PROJECT_NAME) for $(DEVICE)" -all: pre_build_message $(DEVICE) $(DEVICE_NON_PRU) +# "make libs" builds the driver library for $(DEVICE) into $(LIB_DIR) +libs: MESSAGE = "Building $(PROJECT_NAME) driver library for $(DEVICE)" +libs: pre_build_message build_lib_$(DEVICE) + +# "make libs-clean" removes the driver library, "make clean" does not +libs-clean: MESSAGE = "Cleaning $(PROJECT_NAME) driver library" +libs-clean: pre_build_message + $(MAKE) -C ../../source/i2s clean GEN_DIR=$(LIB_DIR) # "make clean" cleans projects that match $(DEVICE) set in imports.mak clean: ARGUMENTS_PRU = clean @@ -133,7 +100,7 @@ clean: pre_build_message $(DEVICE) $(DEVICE_NON_PRU) else # if a prebuild check failed, print message and exit -all clean: pre_build_message +all clean pru host libs libs-clean: pre_build_message endif pre_build_message: @@ -147,48 +114,34 @@ pre_build_message: # PRU firmware should be built before any RTOS code that includes it am261x: # am261x-lp - I2S protocol - $(MAKE) -C firmware/I2S/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt $(ARGUMENTS_PRU) - $(MAKE) -C firmware/I2S/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt $(ARGUMENTS_PRU) + $(MAKE) -C firmware/i2s/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt $(ARGUMENTS_PRU) + $(MAKE) -C firmware/i2s/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt $(ARGUMENTS_PRU) # am261x-lp - TDM4 protocol - $(MAKE) -C firmware/TDM4/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt $(ARGUMENTS_PRU) - $(MAKE) -C firmware/TDM4/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt $(ARGUMENTS_PRU) + $(MAKE) -C firmware/tdm4/pru0_tx/am261x-lp/icssm0-pru0_fw/ti-pru-cgt $(ARGUMENTS_PRU) + $(MAKE) -C firmware/tdm4/pru1_rx/am261x-lp/icssm0-pru1_fw/ti-pru-cgt $(ARGUMENTS_PRU) -am261x_mcuplus: build_lib_am261x +am261x_mcuplus: # am261x-lp - R5F application $(MAKE) -C pru_i2s_app/am261x-lp/r5fss0-0_freertos/ti-arm-clang $(ARGUMENTS_MCUPLUS) build_lib_am261x: -# am261x-lp - Build driver library (always rebuild by removing old lib and objects first) - $(RM) lib/pru_i2s.am261x.r5f.ti-arm-clang.*.lib lib/pru_i2s_*_am261x.obj - $(MKDIR) lib - @echo "Building pru_i2s library for am261x..." - $(CC) -c $(CFLAGS_AM261X) $(INCLUDES_AM261X) $(DEFINES_AM261X) -o lib/pru_i2s_drv_am261x.obj driver/pru_i2s_drv.c - $(CC) -c $(CFLAGS_AM261X) $(INCLUDES_AM261X) $(DEFINES_AM261X) -o lib/pru_i2s_app_config_am261x.obj pru_i2s_app/pru_i2s_app_config.c - $(AR) rc lib/pru_i2s.am261x.r5f.ti-arm-clang.$(PROFILE).lib lib/pru_i2s_drv_am261x.obj lib/pru_i2s_app_config_am261x.obj - $(RM) lib/pru_i2s_*_am261x.obj - @echo "Library build complete." +# am261x-lp - Build driver library + $(MAKE) -C ../../source/i2s build_am261x PROFILE=$(PROFILE) GEN_DIR=$(LIB_DIR) am263x: # am263x-cc - I2S protocol - $(MAKE) -C firmware/I2S/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt $(ARGUMENTS_PRU) - $(MAKE) -C firmware/I2S/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt $(ARGUMENTS_PRU) + $(MAKE) -C firmware/i2s/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt $(ARGUMENTS_PRU) + $(MAKE) -C firmware/i2s/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt $(ARGUMENTS_PRU) # am263x-cc - TDM4 protocol - $(MAKE) -C firmware/TDM4/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt $(ARGUMENTS_PRU) - $(MAKE) -C firmware/TDM4/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt $(ARGUMENTS_PRU) + $(MAKE) -C firmware/tdm4/pru0_tx/am263x-cc/icssm0-pru0_fw/ti-pru-cgt $(ARGUMENTS_PRU) + $(MAKE) -C firmware/tdm4/pru1_rx/am263x-cc/icssm0-pru1_fw/ti-pru-cgt $(ARGUMENTS_PRU) -am263x_mcuplus: build_lib_am263x +am263x_mcuplus: # am263x-cc - R5F application $(MAKE) -C pru_i2s_app/am263x-cc/r5fss0-0_freertos/ti-arm-clang $(ARGUMENTS_MCUPLUS) build_lib_am263x: -# am263x-cc - Build driver library (always rebuild by removing old lib and objects first) - $(RM) lib/pru_i2s.am263x.r5f.ti-arm-clang.*.lib lib/pru_i2s_*_am263x.obj - $(MKDIR) lib - @echo "Building pru_i2s library for am263x..." - $(CC) -c $(CFLAGS_AM263X) $(INCLUDES_AM263X) $(DEFINES_AM263X) -o lib/pru_i2s_drv_am263x.obj driver/pru_i2s_drv.c - $(CC) -c $(CFLAGS_AM263X) $(INCLUDES_AM263X) $(DEFINES_AM263X) -o lib/pru_i2s_app_config_am263x.obj pru_i2s_app/pru_i2s_app_config.c - $(AR) rc lib/pru_i2s.am263x.r5f.ti-arm-clang.$(PROFILE).lib lib/pru_i2s_drv_am263x.obj lib/pru_i2s_app_config_am263x.obj - $(RM) lib/pru_i2s_*_am263x.obj - @echo "Library build complete." - -.PHONY: all clean pru host pre_build_message $(DEVICE) $(DEVICE_NON_PRU) $(SUPPORTED_PROCESSORS) +# am263x-cc - Build driver library + $(MAKE) -C ../../source/i2s build_am263x PROFILE=$(PROFILE) GEN_DIR=$(LIB_DIR) + +.PHONY: all clean pru host libs libs-clean pre_build_message build_lib_am261x build_lib_am263x $(DEVICE) $(DEVICE_NON_PRU) $(SUPPORTED_PROCESSORS) diff --git a/examples/pru_i2s/pru_i2s_app/am261x-lp/r5fss0-0_freertos/ti-arm-clang/example.projectspec b/examples/pru_i2s/pru_i2s_app/am261x-lp/r5fss0-0_freertos/ti-arm-clang/example.projectspec index 3123056d8..38fd02b06 100644 --- a/examples/pru_i2s/pru_i2s_app/am261x-lp/r5fss0-0_freertos/ti-arm-clang/example.projectspec +++ b/examples/pru_i2s/pru_i2s_app/am261x-lp/r5fss0-0_freertos/ti-arm-clang/example.projectspec @@ -32,8 +32,13 @@ -I${CG_TOOL_ROOT}/include/c -I${MCU_PLUS_SDK_PATH}/source -I${OPEN_PRU_PATH}/source - -I${OPEN_PRU_PATH}/examples/pru_i2s/include + -I${OPEN_PRU_PATH}/source/i2s + -I${WORKSPACE_LOC}/pru_i2s_tdm4_pru0_array_am261x-lp_icssm0-pru0_fw_ti-pru-cgt + -I${WORKSPACE_LOC}/pru_i2s_tdm4_pru1_array_am261x-lp_icssm0-pru1_fw_ti-pru-cgt + -I${WORKSPACE_LOC}/pru_i2s_pru0_array_am261x-lp_icssm0-pru0_fw_ti-pru-cgt + -I${WORKSPACE_LOC}/pru_i2s_pru1_array_am261x-lp_icssm0-pru1_fw_ti-pru-cgt -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware + -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/am261x-lp -I${OPEN_PRU_PATH}/examples/pru_i2s/pru_i2s_app -I${MCU_PLUS_SDK_PATH}/source/kernel/freertos/FreeRTOS-Kernel/include -I${MCU_PLUS_SDK_PATH}/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F @@ -55,9 +60,6 @@ linkerBuildOptions=" -i${MCU_PLUS_SDK_PATH}/source/kernel/freertos/lib -i${MCU_PLUS_SDK_PATH}/source/drivers/lib - -i${OPEN_PRU_PATH}/examples/pru_i2s/include - -i${OPEN_PRU_PATH}/examples/pru_i2s/firmware - -i${OPEN_PRU_PATH}/examples/pru_i2s/pru_i2s_app -i${MCU_PLUS_SDK_PATH}/source/board/lib -i${MCU_PLUS_SDK_PATH}/source/pru_io/lib -i${OPEN_PRU_PATH}/examples/pru_i2s/lib @@ -68,8 +70,6 @@ --reread_libs " - preBuildStep="$(MAKE) -C ${OPEN_PRU_PATH}/examples/pru_i2s build_lib_am261x CG_TOOL_ROOT=${CG_TOOL_ROOT} MCU_PLUS_SDK_PATH=${MCU_PLUS_SDK_PATH} OPEN_PRU_PATH=${OPEN_PRU_PATH}" - postBuildStep="$(MAKE) -C ${CCS_PROJECT_DIR} -f makefile_ccs_bootimage_gen OUTNAME=${BuildArtifactFileBaseName} PROFILE=${ConfigName} MCU_PLUS_SDK_PATH=${MCU_PLUS_SDK_PATH} OPEN_PRU_PATH=${OPEN_PRU_PATH} CG_TOOL_ROOT=${CG_TOOL_ROOT} CCS_INSTALL_DIR=${CCS_INSTALL_DIR} CCS_IDE_MODE=${CCS_IDE_MODE} DEVICE=am261x" enableSysConfigTool="true" @@ -107,6 +107,8 @@ > + + diff --git a/examples/pru_i2s/pru_i2s_app/am261x-lp/r5fss0-0_freertos/ti-arm-clang/makefile b/examples/pru_i2s/pru_i2s_app/am261x-lp/r5fss0-0_freertos/ti-arm-clang/makefile index 1c2cae5bb..bbaa15697 100644 --- a/examples/pru_i2s/pru_i2s_app/am261x-lp/r5fss0-0_freertos/ti-arm-clang/makefile +++ b/examples/pru_i2s/pru_i2s_app/am261x-lp/r5fss0-0_freertos/ti-arm-clang/makefile @@ -58,8 +58,9 @@ INCLUDES_common := \ -I${CG_TOOL_ROOT}/include/c \ -I${MCU_PLUS_SDK_PATH}/source \ -I${OPEN_PRU_PATH}/source \ - -I${OPEN_PRU_PATH}/examples/pru_i2s/include \ + -I${OPEN_PRU_PATH}/source/i2s \ -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware \ + -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/am261x-lp \ -I${OPEN_PRU_PATH}/examples/pru_i2s/pru_i2s_app \ -I${MCU_PLUS_SDK_PATH}/source/kernel/freertos/FreeRTOS-Kernel/include \ -I${MCU_PLUS_SDK_PATH}/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F \ @@ -177,10 +178,7 @@ $(OBJDIR)/%.obj %.obj: %.S @echo Compiling: am261x:r5fss0-0:freertos:ti-arm-clang $(LIBNAME): $< $(CC) -c $(CFLAGS) -o $(OBJDIR)/$@ $< -all: build_lib_if_needed $(TARGETS) - -build_lib_if_needed: - @echo "Library is built by parent makefile" +all: $(TARGETS) SYSCFG_GEN_FILES=generated/ti_drivers_config.c generated/ti_drivers_config.h SYSCFG_GEN_FILES+=generated/ti_drivers_open_close.c generated/ti_drivers_open_close.h @@ -197,10 +195,16 @@ else SYSTEM_COMMAND := $(OBJS) $(LNK_FILES) $(LIBS_NAME) endif -# Library is built by parent makefile (top-level pru_i2s/makefile) +# The driver library is not built with the application. It is found through +# LIBS_PATH_NAME, this rule only runs when the library has not been built. pru_i2s.am261x.r5f.ti-arm-clang.$(PROFILE).lib: - @echo "Building library via parent makefile..." - $(MAKE) -C ../../../.. build_lib_am261x + @echo "ERROR: $@ not found. Build the libraries first: run 'make libs' in examples/pru_i2s" + @exit 1 + +# Firmware array headers are generated by PRU firmware build (make pru). +# The catch-all pattern suppresses "No rule to make target" errors from -MMD +# dependency tracking regardless of path separator (forward vs back slash). +%.h: ; FORCE: diff --git a/examples/pru_i2s/pru_i2s_app/am263x-cc/r5fss0-0_freertos/ti-arm-clang/example.projectspec b/examples/pru_i2s/pru_i2s_app/am263x-cc/r5fss0-0_freertos/ti-arm-clang/example.projectspec index 4f2d60f10..92cad59df 100644 --- a/examples/pru_i2s/pru_i2s_app/am263x-cc/r5fss0-0_freertos/ti-arm-clang/example.projectspec +++ b/examples/pru_i2s/pru_i2s_app/am263x-cc/r5fss0-0_freertos/ti-arm-clang/example.projectspec @@ -32,8 +32,13 @@ -I${CG_TOOL_ROOT}/include/c -I${MCU_PLUS_SDK_PATH}/source -I${OPEN_PRU_PATH}/source - -I${OPEN_PRU_PATH}/examples/pru_i2s/include + -I${OPEN_PRU_PATH}/source/i2s + -I${WORKSPACE_LOC}/pru_i2s_tdm4_pru0_array_am263x-cc_icssm0-pru0_fw_ti-pru-cgt + -I${WORKSPACE_LOC}/pru_i2s_tdm4_pru1_array_am263x-cc_icssm0-pru1_fw_ti-pru-cgt + -I${WORKSPACE_LOC}/pru_i2s_pru0_array_am263x-cc_icssm0-pru0_fw_ti-pru-cgt + -I${WORKSPACE_LOC}/pru_i2s_pru1_array_am263x-cc_icssm0-pru1_fw_ti-pru-cgt -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware + -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/am263x-cc -I${OPEN_PRU_PATH}/examples/pru_i2s/pru_i2s_app -I${MCU_PLUS_SDK_PATH}/source/kernel/freertos/FreeRTOS-Kernel/include -I${MCU_PLUS_SDK_PATH}/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F @@ -65,8 +70,6 @@ --reread_libs " - preBuildStep="$(MAKE) -C ${OPEN_PRU_PATH}/examples/pru_i2s build_lib_am263x CG_TOOL_ROOT=${CG_TOOL_ROOT} MCU_PLUS_SDK_PATH=${MCU_PLUS_SDK_PATH} OPEN_PRU_PATH=${OPEN_PRU_PATH}" - postBuildStep="$(MAKE) -C ${CCS_PROJECT_DIR} -f makefile_ccs_bootimage_gen OUTNAME=${BuildArtifactFileBaseName} PROFILE=${ConfigName} MCU_PLUS_SDK_PATH=${MCU_PLUS_SDK_PATH} OPEN_PRU_PATH=${OPEN_PRU_PATH} CG_TOOL_ROOT=${CG_TOOL_ROOT} CCS_INSTALL_DIR=${CCS_INSTALL_DIR} CCS_IDE_MODE=${CCS_IDE_MODE} DEVICE=am263x" enableSysConfigTool="true" @@ -104,6 +107,8 @@ > + + diff --git a/examples/pru_i2s/pru_i2s_app/am263x-cc/r5fss0-0_freertos/ti-arm-clang/makefile b/examples/pru_i2s/pru_i2s_app/am263x-cc/r5fss0-0_freertos/ti-arm-clang/makefile index f56972cc6..40382d808 100644 --- a/examples/pru_i2s/pru_i2s_app/am263x-cc/r5fss0-0_freertos/ti-arm-clang/makefile +++ b/examples/pru_i2s/pru_i2s_app/am263x-cc/r5fss0-0_freertos/ti-arm-clang/makefile @@ -60,8 +60,9 @@ INCLUDES_common := \ -I${CG_TOOL_ROOT}/include/c \ -I${MCU_PLUS_SDK_PATH}/source \ -I${OPEN_PRU_PATH}/source \ - -I${OPEN_PRU_PATH}/examples/pru_i2s/include \ + -I${OPEN_PRU_PATH}/source/i2s \ -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware \ + -I${OPEN_PRU_PATH}/examples/pru_i2s/firmware/am263x-cc \ -I${OPEN_PRU_PATH}/examples/pru_i2s/pru_i2s_app \ -I${MCU_PLUS_SDK_PATH}/source/kernel/freertos/FreeRTOS-Kernel/include \ -I${MCU_PLUS_SDK_PATH}/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F \ @@ -179,10 +180,7 @@ $(OBJDIR)/%.obj %.obj: %.S @echo Compiling: am263x:r5fss0-0:freertos:ti-arm-clang $(LIBNAME): $< $(CC) -c $(CFLAGS) -o $(OBJDIR)/$@ $< -all: build_lib_if_needed $(TARGETS) - -build_lib_if_needed: - @echo "Library is built by parent makefile" +all: $(TARGETS) SYSCFG_GEN_FILES=generated/ti_drivers_config.c generated/ti_drivers_config.h SYSCFG_GEN_FILES+=generated/ti_drivers_open_close.c generated/ti_drivers_open_close.h @@ -199,10 +197,16 @@ else SYSTEM_COMMAND := $(OBJS) $(LNK_FILES) $(LIBS_NAME) endif -# Library is built by parent makefile (top-level pru_i2s/makefile) +# The driver library is not built with the application. It is found through +# LIBS_PATH_NAME, this rule only runs when the library has not been built. pru_i2s.am263x.r5f.ti-arm-clang.$(PROFILE).lib: - @echo "Building library via parent makefile..." - $(MAKE) -C ../../../.. build_lib_am263x + @echo "ERROR: $@ not found. Build the libraries first: run 'make libs' in examples/pru_i2s" + @exit 1 + +# Firmware array headers are generated by PRU firmware build (make pru). +# The catch-all pattern suppresses "No rule to make target" errors from -MMD +# dependency tracking regardless of path separator (forward vs back slash). +%.h: ; FORCE: diff --git a/examples/pru_i2s/pru_i2s_app/pru_i2s_app_config.c b/examples/pru_i2s/pru_i2s_app/pru_i2s_app_config.c index 9b32a8490..a4df87481 100644 --- a/examples/pru_i2s/pru_i2s_app/pru_i2s_app_config.c +++ b/examples/pru_i2s/pru_i2s_app/pru_i2s_app_config.c @@ -86,6 +86,11 @@ static const PRUI2S_UserConfig gPruI2sAppConfig[PRU_I2S_NUM_CONFIG] = * It must be called before PRUI2S_init(). * * \return 0 on success, negative error code on failure + * + * Pseudocode: + * - For each configuration entry in the table: + * * Apply instance settings; stop and return error if any fails + * - Return success if all applied */ int32_t PRUI2S_applyAppConfig(void) { diff --git a/examples/pru_i2s/pru_i2s_app/pru_i2s_diagnostic.c b/examples/pru_i2s/pru_i2s_app/pru_i2s_diagnostic.c index 3fa0612f3..95eeb73d5 100644 --- a/examples/pru_i2s/pru_i2s_app/pru_i2s_diagnostic.c +++ b/examples/pru_i2s/pru_i2s_app/pru_i2s_diagnostic.c @@ -157,18 +157,18 @@ #if (CONFIG_I2S0_MODE == TDM_MODE) /* TDM Mode firmware */ #if defined(CONFIG_PRU_I2S0_ENABLED) && (CONFIG_PRU_I2S0_ENABLED == 1) - #include "TDM4/pru_i2s_tdm4_pru0_array.h" /* PRU0 TDM firmware */ + #include "pru_i2s_tdm4_pru0_array.h" /* PRU0 TDM firmware */ #endif #if defined(CONFIG_PRU_I2S1_ENABLED) && (CONFIG_PRU_I2S1_ENABLED == 1) - #include "TDM4/pru_i2s_tdm4_pru1_array.h" /* PRU1 TDM firmware */ + #include "pru_i2s_tdm4_pru1_array.h" /* PRU1 TDM firmware */ #endif #else /* I2S Mode firmware */ #if defined(CONFIG_PRU_I2S0_ENABLED) && (CONFIG_PRU_I2S0_ENABLED == 1) - #include "I2S/pru_i2s_pru0_array.h" /* PRU0 I2S firmware */ + #include "pru_i2s_pru0_array.h" /* PRU0 I2S firmware */ #endif #if defined(CONFIG_PRU_I2S1_ENABLED) && (CONFIG_PRU_I2S1_ENABLED == 1) - #include "I2S/pru_i2s_pru1_array.h" /* PRU1 I2S firmware */ + #include "pru_i2s_pru1_array.h" /* PRU1 I2S firmware */ #endif #endif diff --git a/makefile b/makefile index ba943d8c5..61a2f7939 100644 --- a/makefile +++ b/makefile @@ -3,12 +3,23 @@ include imports.mak SUBDIRS := source academy examples # "make" or "make all" builds projects that match $(DEVICE) set in imports.mak -# this also builds all libraries in the source directory +# this also builds all libraries in the source directory and the project +# libraries ("make libs") all: $(MAKE) -C source + $(MAKE) libs $(MAKE) pru $(MAKE) host +# "make libs" builds the libraries owned by projects (for example pru_i2s) +# the projects link these libraries, but "make pru" and "make host" do not build them +libs: + $(MAKE) -C examples libs + +# "make libs-clean" cleans the libraries owned by projects. "make clean" does not +libs-clean: + $(MAKE) -C examples libs-clean + # "make pru" builds PRU firmware for all projects matching $(DEVICE) pru: ARGUMENTS := pru pru: academy examples @@ -59,12 +70,20 @@ help: @echo "$(MAKE) -s pru // build only PRU firmware for all projects" @echo "$(MAKE) -s host // build only host code for all projects" @echo "$(MAKE) -s clean // clean all projects that match DEVICE" + @echo "$(MAKE) -s libs // build only the libraries owned by projects" + @echo "$(MAKE) -s libs-clean // clean only the libraries owned by projects" @echo @echo "The overall build targets also build & clean all libraries in the" @echo "source/ directory" @echo - @echo "Note: make pru and make host assume source/ libraries are already" - @echo "built. Run make first on a fresh clone to build everything in order." + @echo "Libraries owned by a project (for example the pru_i2s driver library)" + @echo "are built by make and make libs. make clean does not remove them, use" + @echo "make libs-clean. Rebuild them with make libs after changing the library" + @echo "source code." + @echo + @echo "Note: make pru and make host assume source/ libraries and project" + @echo "libraries are already built. Run make first on a fresh clone to build" + @echo "everything in order." @echo @echo "Build a single project:" @echo "=======================" @@ -90,4 +109,4 @@ help: @echo "the PRU firmware." @echo -.PHONY: all clean pru host help academy examples source +.PHONY: all clean pru host libs libs-clean help academy examples source diff --git a/pru_rules.mak b/pru_rules.mak index d1e583bfa..3fc12e960 100644 --- a/pru_rules.mak +++ b/pru_rules.mak @@ -163,6 +163,7 @@ post-build: -$(CAT) $(OPEN_PRU_PATH)/source/firmware/pru_load_bin_copyright.h $(TARGET_HEX) > $(TARGET_HEX).temp -$(MOVE) $(TARGET_HEX).temp $(TARGET_HEX) ifeq ($(BUILD_MCUPLUS),y) + -$(MKDIR) $(dir $(MCU_HEX_PATH)) -$(COPY) $(TARGET_HEX) $(MCU_HEX_PATH) endif @echo ' ' diff --git a/examples/pru_i2s/firmware/TDM4/icss_pru_i2s_fw.h b/source/i2s/icss_pru_i2s_fw.h similarity index 100% rename from examples/pru_i2s/firmware/TDM4/icss_pru_i2s_fw.h rename to source/i2s/icss_pru_i2s_fw.h diff --git a/source/i2s/makefile b/source/i2s/makefile new file mode 100644 index 000000000..8bebd7c72 --- /dev/null +++ b/source/i2s/makefile @@ -0,0 +1,87 @@ +export OPEN_PRU_PATH?=$(abspath ../..) +include $(OPEN_PRU_PATH)/imports.mak + +####################### +# Library build tools # +####################### +ifeq ($(CG_TOOL_ROOT),) + CC=$(CGT_TI_ARM_CLANG_PATH)/bin/tiarmclang + AR=$(CGT_TI_ARM_CLANG_PATH)/bin/tiarmar +else + CC=$(CG_TOOL_ROOT)/bin/tiarmclang + AR=$(CG_TOOL_ROOT)/bin/tiarmar +endif + +# Debug: no optimization (-O0) for faster compile/debug; Release: size-optimized (-Os) +CFLAGS_OPT_debug := -O0 +CFLAGS_OPT_release := -Os +CFLAGS_OPT := $(CFLAGS_OPT_$(PROFILE)) + +CFLAGS_common := \ + -mcpu=cortex-r5 \ + -mfloat-abi=hard \ + -mfpu=vfpv3-d16 \ + -mthumb \ + -Wall \ + -Werror \ + -g \ + -Wno-gnu-variable-sized-type-not-at-end \ + -Wno-unused-function \ + $(CFLAGS_OPT) + +INCLUDES_common := \ + -I$(MCU_PLUS_SDK_PATH)/source \ + -I$(OPEN_PRU_PATH)/source \ + -I$(OPEN_PRU_PATH)/source/i2s \ + -I$(MCU_PLUS_SDK_PATH)/source/kernel/freertos/FreeRTOS-Kernel/include \ + -I$(MCU_PLUS_SDK_PATH)/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F + +# Library profile (debug or release), lowercase to match the MCU+ SDK library names +PROFILE?=release +# Output directory. The project that owns the library overrides this on the +# command line, see examples/pru_i2s/makefile +GEN_DIR ?= $(OPEN_PRU_PATH)/source/i2s/lib + +# Only build if MCU+ SDK is available +ifeq ($(BUILD_MCUPLUS),y) + +all: build_am261x build_am263x + +build_am261x: + $(MKDIR) $(GEN_DIR) + @echo "Building pru_i2s library for am261x..." + $(CC) -c $(CFLAGS_common) \ + $(INCLUDES_common) \ + -I$(MCU_PLUS_SDK_PATH)/source/kernel/freertos/config/am261x/r5f \ + -DSOC_AM261X -DOS_FREERTOS \ + -o $(GEN_DIR)/pru_i2s_drv_am261x.$(PROFILE).obj pru_i2s_drv.c + $(RM) $(GEN_DIR)/pru_i2s.am261x.r5f.ti-arm-clang.$(PROFILE).lib + $(AR) rc $(GEN_DIR)/pru_i2s.am261x.r5f.ti-arm-clang.$(PROFILE).lib \ + $(GEN_DIR)/pru_i2s_drv_am261x.$(PROFILE).obj + $(RM) $(GEN_DIR)/pru_i2s_drv_am261x.$(PROFILE).obj + @echo "Library build complete." + +build_am263x: + $(MKDIR) $(GEN_DIR) + @echo "Building pru_i2s library for am263x..." + $(CC) -c $(CFLAGS_common) \ + $(INCLUDES_common) \ + -I$(MCU_PLUS_SDK_PATH)/source/kernel/freertos/config/am263x/r5f \ + -DSOC_AM263X -DOS_FREERTOS \ + -o $(GEN_DIR)/pru_i2s_drv_am263x.$(PROFILE).obj pru_i2s_drv.c + $(RM) $(GEN_DIR)/pru_i2s.am263x.r5f.ti-arm-clang.$(PROFILE).lib + $(AR) rc $(GEN_DIR)/pru_i2s.am263x.r5f.ti-arm-clang.$(PROFILE).lib \ + $(GEN_DIR)/pru_i2s_drv_am263x.$(PROFILE).obj + $(RM) $(GEN_DIR)/pru_i2s_drv_am263x.$(PROFILE).obj + @echo "Library build complete." + +clean: + -$(RMDIR) $(GEN_DIR) + @echo "Finished clean" + +else +all clean: + @echo "Skipping pru_i2s library build: BUILD_MCUPLUS != y" +endif + +.PHONY: all build_am261x build_am263x clean diff --git a/examples/pru_i2s/include/pru_i2s_config.h b/source/i2s/pru_i2s_config.h similarity index 100% rename from examples/pru_i2s/include/pru_i2s_config.h rename to source/i2s/pru_i2s_config.h diff --git a/examples/pru_i2s/driver/pru_i2s_drv.c b/source/i2s/pru_i2s_drv.c similarity index 99% rename from examples/pru_i2s/driver/pru_i2s_drv.c rename to source/i2s/pru_i2s_drv.c index c1b8fd9df..37b387f6e 100644 --- a/examples/pru_i2s/driver/pru_i2s_drv.c +++ b/source/i2s/pru_i2s_drv.c @@ -36,7 +36,7 @@ #include #include "pru_i2s_drv.h" -#include +#include "icss_pru_i2s_fw.h" /* Application calls PRUICSS_intcInit() directly (Motor Control SDK pattern) */ diff --git a/examples/pru_i2s/include/pru_i2s_drv.h b/source/i2s/pru_i2s_drv.h similarity index 98% rename from examples/pru_i2s/include/pru_i2s_drv.h rename to source/i2s/pru_i2s_drv.h index f21231c65..370fc8f89 100644 --- a/examples/pru_i2s/include/pru_i2s_drv.h +++ b/source/i2s/pru_i2s_drv.h @@ -46,7 +46,7 @@ #include #include #include -#include "TDM4/icss_pru_i2s_fw.h" +#include "icss_pru_i2s_fw.h" /* Number of ICSS instances */ #define PRUI2S_NUM_ICSS_INST ( 2 ) /* Number of PRU instances per ICSS */ @@ -330,16 +330,6 @@ int32_t PRUI2S_setUserConfig( uint8_t pruInstId ); -/** - * \brief Apply PRU I2S application configuration - * - * This function applies the user configuration to the PRU I2S driver. - * It must be called before PRUI2S_init(). - * - * \return 0 on success, negative error code on failure - */ -int32_t PRUI2S_applyAppConfig(void); - /* * Get PRUI2S SW IP attributes for use in application, e.g. * - # Tx I2S