Ubuntu安装MDK
1 环境部署
- [x] Ubuntu 18.04
- [x] Wine 3.0.4
1.0 查看CPU信息
lscpu
| 序号 | 属性 | 描述 |
|---|---|---|
| 1 | 架构 | x86_64 |
| 2 | CPU 运行模式 | 32-bit, 64-bit |
| 3 | 字节序 | Little Endian |
| 4 | CPU | 4 |
| 5 | 在线 CPU 列表 | 0-3 |
| 6 | 每个核的线程数 | 1 |
| 7 | 每个座的核数 | 4 |
| 8 | 座 | 1 |
| 9 | NUMA 节点 | 1 |
| 10 | 厂商 ID | GenuineIntel |
| 11 | CPU 系列 | 6 |
| 13 | 型号 | 158 |
| 14 | 型号名称 | Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz |
| 15 | 步进 | 9 |
| 16 | CPU MHz | 2748.422 |
| 17 | CPU 最大 MHz | 3500.0000 |
| 18 | CPU 最小 MHz | 800.0000 |
| 19 | BogoMIPS | 6000.00 |
| 20 | 虚拟化 | VT-x |
| 21 | L1d 缓存 | 32K |
| 22 | L1i 缓存 | 32K |
| 23 | L2 缓存 | 256K |
| 24 | L3 缓存 | 6144K |
| 25 | NUMA 节点0 CPU | 0-3 |
1.2 Wine环境
# 添加i386架构
sudo dpkg --add-architecture i386
# 安装64位wine
sudo apt install wine64
# 添加wineHQ签名密钥
wget -qO- https://dl.winehq.org/wine-builds/Release.key | sudo apt-key add -
# 添加存储库
sudo apt-add-repository 'deb http://dl.winehq.org/wine-builds/ubuntu/ artful main'
2 “安装”MDK
(1)将Win下安装的MDK文件,打包压缩,传送到Ubuntn;
(2)安装Pack,将MDK文件夹Pack中的.Download下载的pack文件离线安装;
(3)Ubuntu显示隐藏文件Ctrl+H;
(4)μVision⇒ Project⇒ Manage⇒ Pack Installer⇒ File⇒ Import⇒ Keil.STM32F1xx_DFP.1.0.5.pdsc;
(5)重启μVision即可新建工程;
3 问题
3.1 不能编译
--- Error: failed to execute '\home\xdq\install\MD\Kmdk514\core\ARM\ARMCC\Bin\ArmCC'
没有指定ARMCC
依次打开:
Project-->Manage-->Compoments,Books-->Folders/Extensions

图3.1 设置路径
3.2 编译错误
【Ubuntu源文件修改】
error You are building kernel with non-retpoline compiler, please update your compiler
make -C /lib/modules/4.15.0-50-generic/build M=/home/xdq/install/Drivers/CH341SER_LINUX
make[1]: 进入目录“/usr/src/linux-headers-4.15.0-50-generic”
arch/x86/Makefile:252: *** 分隔符缺失 (你大概想用 TAB,而不是八个空格)。 停止。
make[1]: 离开目录“/usr/src/linux-headers-4.15.0-50-generic”
Makefile:5: recipe for target 'default' failed
make: *** [default] Error 2
【进入】
/usr/src/$(uname -r)/arch/x86
【打补丁】
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index f5d7f41..75ef499 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -220,9 +220,6 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
# Avoid indirect branches in kernel to deal with Spectre
ifdef CONFIG_RETPOLINE
-ifeq ($(RETPOLINE_CFLAGS),)
- $(error You are building kernel with non-retpoline compiler, please update your compiler.)
-endif
KBUILD_CFLAGS += $(RETPOLINE_CFLAGS)
endif
@@ -307,6 +304,13 @@ ifndef CC_HAVE_ASM_GOTO
@echo Compiler lacks asm-goto support.
@exit 1
endif
+ifdef CONFIG_RETPOLINE
+ifeq ($(RETPOLINE_CFLAGS),)
+ @echo "You are building kernel with non-retpoline compiler." >&2
+ @echo "Please update your compiler." >&2
+ @false
+endif
+endif
【下载文件修改】
make -C /lib/modules/4.15.0-50-generic/build M=/home/xdq/install/Drivers/CH341SER_LINUX
make[1]: 进入目录“/usr/src/linux-headers-4.15.0-50-generic”
CC [M] /home/xdq/install/Drivers/CH341SER_LINUX/ch34x.o
/home/xdq/install/Drivers/CH341SER_LINUX/ch34x.c: 在函数‘ch34x_close’中:
/home/xdq/install/Drivers/CH341SER_LINUX/ch34x.c:591:2: 错误:未知的类型名‘wait_queue_t’
wait_queue_t wait;
^~~~~~~~~~~~
/home/xdq/install/Drivers/CH341SER_LINUX/ch34x.c:591:15: 警告:未使用的变量‘wait’ [-Wunused-variable]
wait_queue_t wait;
^~~~
/home/xdq/install/Drivers/CH341SER_LINUX/ch34x.c:590:7: 警告:未使用的变量‘timeout’ [-Wunused-variable]
long timeout;
^~~~~~~
/home/xdq/install/Drivers/CH341SER_LINUX/ch34x.c:589:6: 警告:未使用的变量‘bps’ [-Wunused-variable]
int bps;
^~~
/home/xdq/install/Drivers/CH341SER_LINUX/ch34x.c: 在函数‘wait_modem_info’中:
/home/xdq/install/Drivers/CH341SER_LINUX/ch34x.c:797:7: 错误:隐式声明函数‘signal_pending’ [-Werror=implicit-function-declaration]
if( signal_pending(current) )
^~~~~~~~~~~~~~
cc1:有些警告被当作是错误
scripts/Makefile.build:337: recipe for target '/home/xdq/install/Drivers/CH341SER_LINUX/ch34x.o' failed
make[2]: *** [/home/xdq/install/Drivers/CH341SER_LINUX/ch34x.o] Error 1
Makefile:1552: recipe for target '_module_/home/xdq/install/Drivers/CH341SER_LINUX' failed
make[1]: *** [_module_/home/xdq/install/Drivers/CH341SER_LINUX] Error 2
make[1]: 离开目录“/usr/src/linux-headers-4.15.0-50-generic”
Makefile:5: recipe for target 'default' failed
make: *** [default] Error 2
注释或删除:wait_queue_t,long timeout,int bps
添加头文件: #include <linux/sched/signal.h>
[参考文献]
1 https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=25896d073d8a0403b07e6dec56f58e6c33678207
2 https://blog.csdn.net/nuttiny/article/details/79842900
3 https://blog.csdn.net/jazzsoldier/article/details/70170466
4 http://www.wch.cn/download/CH341SER_LINUX_ZIP.html
Ubuntu安装MDK的更多相关文章
- Mac OS、Ubuntu 安装及使用 Consul
Consul 概念(摘录): Consul 是 HashiCorp 公司推出的开源工具,用于实现分布式系统的服务发现与配置.与其他分布式服务注册与发现的方案,比如 Airbnb 的 SmartStac ...
- ubuntu安装mysql
好记性不如烂笔头,记录一下,ubuntu安装mysql的指令. 安装MySQL: sudo apt-get install mysql-server sudo apt-get install mysq ...
- ubuntu安装vim时提示 没有可用的软件包 vim,但是它被其它的软件包引用了 解决办法
ubuntu安装vim时提示 没有可用的软件包 vim-gtk3,但是它被其它的软件包引用了 解决办法 本人在ubuntu系统安装vim 输入 sudo apt-get install vim 提示 ...
- docker 1.8+之后ubuntu安装指定版本docker-engine
这边记录ubuntu安装过程,首先是官网文档 If you haven’t already done so, log into your Ubuntu instance. Open a termina ...
- debian/ubuntu安装桌面环境
apt-get install xorg apt-get install gnome 然后startx ubuntu 安装Gnome桌面 1.安装全部桌面环境,其实Ubuntu系列桌面实际上有几种桌面 ...
- 一个ubuntu phper的自我修养(ubuntu安装)
ubuntu安装篇 一.ubuntu下载 到ubuntu官网下载适合自己电脑配置的系统版本,此处不做展开. 二.制作USB启动盘 在windows下制作USB启动盘,工具是universal usb ...
- ubuntu 安装JAVA jdk的两种方法:
ubuntu 安装jdk 的两种方式: 1:通过ppa(源) 方式安装. 2:通过官网下载安装包安装. 这里推荐第1种,因为可以通过 apt-get upgrade 方式方便获得jdk的升级 使用pp ...
- [其他]Ubuntu安装genymotion后unable to load VirtualBox engine
问题: Ubuntu安装genymotion后unable to load VirtualBox engine 解决办法: 如果没有安装VirtualBox,要先安装VirtualBox. 安装Vir ...
- Ubuntu安装出现左上角光标一直闪解决方式
Ubuntu安装出现左上角光标一直闪解决方式: 01下载ubunu http://cn.ubuntu.com/download/ 02.软碟通 http://pan.baidu.com/s/1qY8O ...
随机推荐
- canopy聚类算法的MATLAB程序
canopy聚类算法的MATLAB程序 凯鲁嘎吉 - 博客园 http://www.cnblogs.com/kailugaji/ 1. canopy聚类算法简介 Canopy聚类算法是一个将对象分组到 ...
- vue+elementUI+node实现登录模块--验证用户名是否正确
验证用户名是否正确 1==>// 引入qs import qs from 'qs'; 2===>收集用户账号后, 发送请求 把参数发给后端(把用户名和密码发给后 ...
- 5.Java基础_Java算术/字符/字符串/赋值运算符
/* 算术/字符/字符串/赋值 运算符 */ public class OperatorDemo01 { public static void main(String[] args){ //算术运算符 ...
- idea插件(mybatis框架下mapper接口快速跳转对应xml文件)亲测好用!
我相信目前在绝大部分公司里,主要使用的框架是S(spring)S(spring MVC)M(mybatis),其中mybatis总体架构是编写mapper接口,框架扫描其对应的mapper.xml文件 ...
- Pwn-level2(x64)
题目地址 https://dn.jarvisoj.com/challengefiles/level2_x64.04d700633c6dc26afc6a1e7e9df8c94e 已经知道了它是64位了, ...
- 2019.6.11_MySQL进阶二:主键与外键
通过图形界面(UI)创建外键 打开设计表,在对应的栏位填写相应的内容.其中FK_deptno是限制名 # 先给主表建立主键 ALTER TABLE dept ADD PRIMARY KEY(dep ...
- SOA案例分析浅谈
SOA是英文 Service-Oriented Architecture 三个首字母单词的缩写,中文译为: 面向服务架构 ( SOA), SOA架构与 B/S . C/S 架构是目前最流行三种 Web ...
- js/java 获取、添加、修改、删除cookie(最全)
一.cookie介绍 1.cookie的本来面目 HTTP协议本身是无状态的.什么是无状态呢,即服务器无法判断用户身份.Cookie实际上是一小段的文本信息(key-value格式).客户端向服务 ...
- spring cloud启动zipkin,报错maven依赖jar包冲突 Class path contains multiple SLF4J bindings
项目启动报错: Connected to the target VM, address: '127.0.0.1:59412', transport: 'socket' SLF4J: Class pat ...
- DWR日志 在log4j.xml配置
一.日志 DWR依赖 Apache Commons Logging,可以使用log4j实现日志记录功能. 1.1 日志简介 和其他日志框架一样,当设置低等级的日志时所有高于此等级的日志也将会打印出来. ...