初级会员
- 积分
- 82
- 金钱
- 82
- 注册时间
- 2019-11-18
- 在线时间
- 15 小时
|
1金钱
本帖最后由 zhubaojun 于 2023-8-30 11:53 编辑
第一步修改platform-top.h文件如下:
#include <configs/platform-auto.h>
#define CONFIG_FPGA_ZYNQPL
#define CONFIG_SYS_BOOTM_LEN 0xF000000
#define DFU_ALT_INFO_RAM \
"dfu_ram_info=" \
"setenv dfu_alt_info " \
"bitstream_bit=system.bit\0" \
"bitstream=system.bit\0" \
"loadbit_addr=0x100000\0" \
"mmc_loadbit=echo Loading bitstream from SD/MMC/eMMC to RAM.. && " \
"mmcinfo && " \
"load mmc 0 ${loadbit_addr} ${bitstream} && " \
"fpga loadb 0 ${loadbit_addr} ${filesize}\0" \
"image.ub ram $netstart 0x1e00000\0" \
"dfu_ram=run dfu_ram_info && dfu 0 ram 0\0" \
"thor_ram=run dfu_ram_info && thordown 0 ram 0\0"
#define DFU_ALT_INFO_MMC \
"dfu_mmc_info=" \
"set dfu_alt_info " \
"${kernel_image} fat 0 1\\\\;" \
"dfu_mmc=run dfu_mmc_info && dfu 0 mmc 0\0" \
"thor_mmc=run dfu_mmc_info && thordown 0 mmc 0\0"
/*Required for uartless designs */
#ifndef CONFIG_BAUDRATE
#define CONFIG_BAUDRATE 115200
#ifdef CONFIG_DEBUG_UART
#undef CONFIG_DEBUG_UART
#endif
#endif
/*Define CONFIG_ZYNQ_EEPROM here and its necessaries in u-boot menuconfig if you had EEPROM memory. */
#ifdef CONFIG_ZYNQ_EEPROM
#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
#define CONFIG_SYS_I2C_EEPROM_ADDR 0x54
#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4
#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
#define CONFIG_SYS_EEPROM_SIZE 1024 /* Bytes */
#define CONFIG_SYS_I2C_MUX_ADDR 0x74
#define CONFIG_SYS_I2C_MUX_EEPROM_SEL 0x4
#endif
#define CONFIG_BOOTCOMMAND "run mmc_loadbit; run default_bootcmd"​
第二步 重新编译
petalinux-build​
第三步生成BOOT.BIN
petalinux-package --boot --fsbl --u-boot --force
第四步 拷贝BOOT.BIN image.ub system.bit到sd卡​
问题是进入uboot时候用run mmc_loadbit提示:
error: "mmc_loadbit" not defined
为什么会出现未定义错误,,不是在platform-top.h中定义了吗?
mmc_loadbit=echo Loading bitstream from SD/MMC/eMMC to RAM.. && " \
"mmcinfo && " \
"load mmc 0 ${loadbit_addr} ${bitstream} && " \
"fpga loadb 0 ${loadbit_addr} ${filesize}\0" \
请问是哪儿出现了错误?
|
|