开发板
这个例子应用展示了 Explorer 板如何使用 FreeRTOS 的各种功能。该应用使用了 I2C、I2S、SPI、UART、Flash、麦克风阵列和 GPIO 设备。
FreeRTOS 应用程序创建了一个单阶音频处理流水线,应用了一个可变增益。输出的音频被送到 DAC,可以通过 3.5 毫米音频插孔收听。音频增益可以通过 GPIO 调整,其中按钮 A 是音量增大,按钮 B 是音量减小。
硬件准备
演示的UART回路部分要求在X1D36和X1D39之间连接跳线。这将Tx引脚连接到Rx引脚。
构建固件
在xcore_sdk根目录下运行以下命令来构建固件。
- Windows
- Linux and Mac
cmake -G "NMake Makefiles" -B build -DCMAKE_TOOLCHAIN_FILE=xmos_cmake_toolchain/xs3a.cmake
cd build
nmake example_freertos_explorer_board
cmake -B build -DCMAKE_TOOLCHAIN_FILE=xmos_cmake_toolchain/xs3a.cmake
cd build
make example_freertos_explorer_board
important
主机应用程序需要创建文件系统。更多信息见SDK安装说明。
从xcore_sdk构建文件夹中,使用以下命令创建文件系统并将设备刷新:
- Windows
- Linux and Mac
nmake flash_fs_example_freertos_explorer_board
make flash_fs_example_freertos_explorer_board
运行固件
从xcore_sdk构建文件夹执行:
- Windows
- Linux and Mac
nmake run_example_freertos_explorer_board
make run_example_freertos_explorer_board
通过xgdb工具调试固件
从xcore_sdk构建文件夹执行:
- Windows
- Linux and Mac
nmake debug_example_freertos_explorer_board
make debug_example_freertos_explorer_board