Visible to Intel only — GUID: kqf1593117238639
Ixiasoft
1.2.1. Prerequisites
1.2.2. Getting Started
1.2.3. Generating the Initial HDL in Platform Designer
1.2.4. Modifying Top Level File
1.2.5. Adding Pin Assignments for SPIM0
1.2.6. Hardware Programming File Compilation and Generation
1.2.7. Building U-Boot
1.2.8. Preparing QSPI Image
1.2.9. Building Linux
1.2.10. Building Yocto Rootfs
1.2.11. Building spidev Test Program
1.2.12. Creating SD Card Image
1.2.13. Booting the Board
1.2.14. Testing the SPIM0
Visible to Intel only — GUID: kqf1593117238639
Ixiasoft
1.2.11. Building spidev Test Program
The test application is very simple, it creates a single SPI transfer composed of two buffers:
- One 1-byte TX buffer containing the flash Read ID command
- One 6-byte RX buffer containing the response from the flash to the Read ID command
- Go to the Accessing SPI Devices in Linux web page and scroll to the bottom of the page to the demo application that shows how to read the Flash ID from a SPI Flash device.
- Copy-paste the contents and save it as: spidev_flash_test.c.
- Compile the above C source code file:
cd ~/s10_spim_fpga ${CROSS_COMPILE}gcc -static spidev_flash_test.c -o spidev_flash_test