实验目的:

编译NXP官网sdk并在实验板上运行demo。

NPX提供了imx6ulSDK包:

i.MX 6ULL应用处理器_Arm® Cortex®-A7单核,频率为900 MHz_NXP 半导体

下载后解压,可在如下目录找到最简单的hello_world demo程序。

/root/SDK_2.2_MCIM6ULL/boards/evkmcimx6ull/demo_apps/hello_world

进行编译

root@xxzh:~/SDK_2.2_MCIM6ULL/boards/evkmcimx6ull/demo_apps/hello_world/armgcc# ./build_ddr_debug.sh
-- TOOLCHAIN_DIR: /usr
-- BUILD_TYPE: ddr_debug
-- TOOLCHAIN_DIR: /usr
-- BUILD_TYPE: ddr_debug
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/arm-none-eabi-gcc
-- Configuring done
-- Generating done
-- Build files have been written to: /root/SDK_2.2_MCIM6ULL/boards/evkmcimx6ull/demo_apps/hello_world/armgcc
Scanning dependencies of target hello_world.elf
[  6%] Building C object CMakeFiles/hello_world.elf.dir/root/SDK_2.2_MCIM6ULL/boards/evkmcimx6ull/demo_apps/hello_world/hello_world.c.obj
[ 13%] Building C object CMakeFiles/hello_world.elf.dir/root/SDK_2.2_MCIM6ULL/devices/MCIMX6Y2/drivers/fsl_uart.c.obj
[ 20%] Building C object CMakeFiles/hello_world.elf.dir/root/SDK_2.2_MCIM6ULL/boards/evkmcimx6ull/demo_apps/hello_world/pin_mux.c.obj
[ 26%] Building ASM object CMakeFiles/hello_world.elf.dir/root/SDK_2.2_MCIM6ULL/devices/MCIMX6Y2/gcc/startup_MCIMX6Y2.S.obj
[ 33%] Building C object CMakeFiles/hello_world.elf.dir/root/SDK_2.2_MCIM6ULL/boards/evkmcimx6ull/demo_apps/hello_world/board.c.obj
[ 40%] Building C object CMakeFiles/hello_world.elf.dir/root/SDK_2.2_MCIM6ULL/devices/MCIMX6Y2/drivers/fsl_common.c.obj
[ 46%] Building C object CMakeFiles/hello_world.elf.dir/root/SDK_2.2_MCIM6ULL/devices/MCIMX6Y2/utilities/fsl_debug_console.c.obj
[ 53%] Building C object CMakeFiles/hello_world.elf.dir/root/SDK_2.2_MCIM6ULL/devices/MCIMX6Y2/utilities/fsl_io.c.obj
[ 60%] Building C object CMakeFiles/hello_world.elf.dir/root/SDK_2.2_MCIM6ULL/devices/MCIMX6Y2/utilities/fsl_log.c.obj
[ 66%] Building C object CMakeFiles/hello_world.elf.dir/root/SDK_2.2_MCIM6ULL/devices/MCIMX6Y2/utilities/fsl_str.c.obj
[ 73%] Building C object CMakeFiles/hello_world.elf.dir/root/SDK_2.2_MCIM6ULL/devices/MCIMX6Y2/system_MCIMX6Y2.c.obj
[ 80%] Building C object CMakeFiles/hello_world.elf.dir/root/SDK_2.2_MCIM6ULL/boards/evkmcimx6ull/demo_apps/hello_world/clock_config_ocram.c.obj
[ 86%] Building C object CMakeFiles/hello_world.elf.dir/root/SDK_2.2_MCIM6ULL/boards/evkmcimx6ull/demo_apps/hello_world/clock_config.c.obj
[ 93%] Building C object CMakeFiles/hello_world.elf.dir/root/SDK_2.2_MCIM6ULL/devices/MCIMX6Y2/drivers/fsl_clock.c.obj
[100%] Linking C executable ddr_debug/hello_world.elf
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv7-ar/thumb/fpu/libc_nano.a(lib_a-atexit.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv7-ar/thumb/fpu/libc_nano.a(lib_a-exit.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv7-ar/thumb/fpu/libc_nano.a(lib_a-fini.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv7-ar/thumb/fpu/libc_nano.a(lib_a-impure.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv7-ar/thumb/fpu/libc_nano.a(lib_a-init.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv7-ar/thumb/fpu/libc_nano.a(lib_a-malloc.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv7-ar/thumb/fpu/libc_nano.a(lib_a-memset.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv7-ar/thumb/fpu/libc_nano.a(lib_a-nano-freer.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv7-ar/thumb/fpu/libc_nano.a(lib_a-nano-mallocr.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv7-ar/thumb/fpu/libc_nano.a(lib_a-sbrkr.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv7-ar/thumb/fpu/libc_nano.a(lib_a-strlen.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv7-ar/thumb/fpu/libc_nano.a(lib_a-__atexit.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv7-ar/thumb/fpu/libc_nano.a(lib_a-__call_atexit.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv7-ar/thumb/fpu/libc_nano.a(lib_a-reent.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
[100%] Built target hello_world.elf
root@xxzh:~/SDK_2.2_MCIM6ULL/boards/evkmcimx6ull/demo_apps/hello_world/armgcc# 

官方demo依赖于cmake编译。需要按照好cmake环境。

本实验的硬件板卡,用于调试输出都是UART4,默认官方demo是UART1,因此需要修改代码,改为串口4,也比较简单,主要是修改io和串口寄存器。顺着hello_world.c开始修改即可。

修改后重新编译,输出如下:

root@xxzh:~/SDK_2.2_MCIM6ULL/boards/evkmcimx6ull/demo_apps/hello_world/armgcc/ddr_debug# ls
hello_world.elf  sdk20-app.bin

通过uboot加载裸机运行:

U-Boot 2016.03-g6f19009 (Nov 20 2021 - 16:07:44 +0800)CPU:   Freescale i.MX6ULL rev1.1 528 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 115C) at 37C
Reset cause: POR
Board: MYD-Y6ULL 14x14
DRAM:  512 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
In:    serial
Out:   serial
Err:   serial
switch to partitions #0, OK
mmc1(part 0) is current device
Net:   GroundCtrl 20211015 oil_gpio_init
FEC0
Normal Boot
Hit any key to stop autoboot:  3
pwd:oil0
=> tftp 0x80002000 sdk20-app.bin
Using FEC0 device
TFTP from server 192.168.1.108; our IP address is 192.168.1.200
Filename 'sdk20-app.bin'.
Load address: 0x80002000
Loading: ###932.6 KiB/s
done
Bytes transferred = 36320 (8de0 hex)
=> go 0x80002000
## Starting application at 0x80002000 ...
hello world.

或者增加头部后,拷贝到SD卡、flash等运行:

root@xxzh:~/src/my_imx6ul/MyBootloaderForIMX6UL# make pack
./tools/mkimage -n ./tools/imximage.cfg.cfgtmp -T imximage -e 0x80002000 -d boot.bin boot.imx
Image Type:   Freescale IMX Boot Image
Image Ver:    2 (i.MX53/6/7 compatible)
Mode:         DCD
Data Size:    40960 Bytes = 40.00 KiB = 0.04 MiB
Load Address: 80001420
Entry Point:  80002000
cat tools/header_zero_1K.bin boot.imx > boot.img
sz boot.imx
rz
Starting zmodem transfer.  Press Ctrl+C to cancel.
Transferring boot.imx...100%      39 KB      39 KB/sec    00:00:01       0 Errors  sz boot.img
rz
Starting zmodem transfer.  Press Ctrl+C to cancel.
Transferring boot.img...100%      40 KB      40 KB/sec    00:00:01       0 Errors  root@xxzh:~/src/my_imx6ul/MyBootloaderForIMX6UL# 

烧写到SD启动

imx6ul使用官方SDK裸机及驱动包相关推荐

  1. ARM(IMX6U)裸机官方SDK包使用

    参考:Linux之ARM(IMX6U)裸机C语言LED驱动实验–驱动编写,编译 作者:一只青木呀 发布时间: 2020-08-11 11:20:17 网址:https://blog.csdn.net/ ...

  2. i.MX6ULL裸机篇(二)NXP官方SDK移植之踩坑 网口驱动

    MX6ULL官方SDK移植之踩坑 网口驱动 一.引言 NXP MX6ULL 网口移植其实主要修改底层驱动程序,LWIP协议通用,一般不用修改,这里主要和大家分享在Linux环境下移植修改网口驱动程序. ...

  3. 嵌入式学习:裸机开发_L4_官方SDK开发LED实验

    裸机开发_L4_官方SDK开发LED实验 1. 硬件层电路 1.1 正点原子 i.MX6ULL ALPHA V2.2 开发板 1.2 飞凌i.MX6UL-C开发板 2. 软件编写 2.1. 正点原子 ...

  4. 谷歌的android下拉刷新页面,Android SwipeRefreshLayout:谷歌官方SDK包中的下拉刷新

     <Android SwipeRefreshLayout:谷歌官方SDK包中的下拉刷新> 下拉刷新在如今移动开发中应用如此广泛和普遍,以至于谷歌干脆在SDK中给予支持.在android ...

  5. location驱动包_Zynq SDK 驱动探求(三):论一个外设驱动的全部身家·Xilinx SDK 驱动源码结构...

    Processor is ready. Configure programable logic. 在新专栏 Rapid TCP/IP on Zynq 中,将围绕 Xilinx Zynq 系列芯片,从 ...

  6. oracle19c数据库用11g驱动包,OJDBC14.jar包11g最新版数据库驱动官方版

    你是否在寻找好用的OJDBC14.jar 11g驱动包呢,快来下载OJDBC14.jar 11g正式版进行使用吧,它是最近上线的一款专业数据库驱动工具,也是一个oracle数据库中很常见的驱动包,它的 ...

  7. 韦东山 IMX6ULL和正点原子_「正点原子Linux连载」第十二章官方SDK移植试验

    1)实验平台:正点原子Linux开发板 2)摘自<正点原子I.MX6U嵌入式Linux驱动开发指南> 关注官方微信号公众号,获取更多资料:正点原子 第十二章官方SDK移植试验 在上一章中, ...

  8. IMX6ULL学习笔记(11)——获取和编译官方SDK

    一.简介 SDK(Software Development Kit) 是 NXP 针对其官方评估板的软件开发包,可以在 NXP 的官网下载得到.SDK 中包含了固件库和各种程序范例.这个 SDK 包提 ...

  9. Maven-Maven中添加Oracle驱动包到本地仓库

    问题 解决办法 1 确认本机安装了Maven 2下载对应版本的数据库驱动 官方下载jar 通过本地安装目录查找 oracle的驱动包说明 3安装驱动到本地仓库 pomxml 中使用Oracle驱动包 ...

最新文章

  1. 【学术相关】谈谈国自然申请中标的经验
  2. php超星查课接口,这是一个可以查询超星课程的接口,请教一下该怎么用啊
  3. Win 11 真的要来了!微软宣布 Win10 将于 2025 年终止支持!
  4. Downloader Middlewares
  5. Linux 中最常用 150 个命令汇总
  6. Android使用valgrind内存泄漏和越界检测等
  7. 室内设计——健身房室内设计(包含预览图jpg和.psd文件)
  8. 使用 PotPlayer 搭配 SVP 4 播放60帧电影
  9. VS2010上winform打包发布、打包安装程序(超全超详细)
  10. 哈哈,用FlexGrid做开发,轻松处理百万级表格数据
  11. Wifi源码学习(Android5.1)之wifi开关
  12. 数据告诉你,全世界到底有多少人在炒币
  13. 计算图像每行占用的字节数
  14. 操作系统 第五章虚拟器存储器(自我总结式)
  15. python生成ppt图表_使用Python从Excel到PowerPoint的图表
  16. I am a lazy bone
  17. 找回淘宝的“高级搜索”功能
  18. 亲测:一加手机3刷机OxygenOS详细教程
  19. 软件实训之智慧停车需要解决什么痛点和难点
  20. 搭搭云 新世代超级应用平台 JNPF快速开发平台框架

热门文章

  1. gird布局解决 最后一行数量不对布局问题
  2. appium元素定位之元素定位工具 什么是uiautomatorviewer,uiautomatorviewer是干嘛的
  3. Linux deepin 15.11设置:输入时禁用触摸板
  4. 信息安全实习:实习一 古典加密算法 Swing图形化 (报告+详细代码)
  5. scroll lock键 和 sandy bridge
  6. 安徽省淮南市谷歌卫星地图下载
  7. 用矩阵解方程式的运算-高斯消元法
  8. 自动消防报警喷水灭火系统实训装置QY-LY154
  9. 缓慢的 HTTP 的拒绝服务攻击
  10. 服务器未响应wan口连接失败,路由器WAN口连接失败如何解决 路由器WAN口连接失败解决方法【详解】...