Ubuntu安装MDK
1 環(huán)境部署
- [x] Ubuntu 18.04
- [x] Wine 3.0.4
1.0 查看CPU信息
lscpu| 1 | 架構(gòu) | x86_64 |
| 2 | CPU 運(yùn)行模式 | 32-bit, 64-bit |
| 3 | 字節(jié)序 | Little Endian |
| 4 | CPU | 4 |
| 5 | 在線 CPU 列表 | 0-3 |
| 6 | 每個核的線程數(shù) | 1 |
| 7 | 每個座的核數(shù) | 4 |
| 8 | 座 | 1 |
| 9 | NUMA 節(jié)點 | 1 |
| 10 | 廠商 ID | GenuineIntel |
| 11 | CPU 系列 | 6 |
| 13 | 型號 | 158 |
| 14 | 型號名稱 | Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz |
| 15 | 步進(jìn) | 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 節(jié)點0 CPU | 0-3 |
1.2 Wine環(huán)境
# 添加i386架構(gòu) 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.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]: 進(jìn)入目錄“/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【進(jìn)入】
/usr/src/$(uname -r)/arch/x86【打補(bǔ)丁】
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 Spectreifdef CONFIG_RETPOLINE -ifeq ($(RETPOLINE_CFLAGS),) - $(error You are building kernel with non-retpoline compiler, please update your compiler.) -endifKBUILD_CFLAGS += $(RETPOLINE_CFLAGS)endif@@ -307,6 +304,13 @@ ifndef CC_HAVE_ASM_GOTO@echo Compiler lacks asm-goto support.@exit 1endif +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]: 進(jìn)入目錄“/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: 在函數(shù)‘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: 在函數(shù)‘wait_modem_info’中: /home/xdq/install/Drivers/CH341SER_LINUX/ch34x.c:797:7: 錯誤:隱式聲明函數(shù)‘signal_pending’ [-Werror=implicit-function-declaration]if( signal_pending(current) )^~~~~~~~~~~~~~ cc1:有些警告被當(dāng)作是錯誤 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>
[參考文獻(xiàn)]
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
-------
轉(zhuǎn)載于:https://www.cnblogs.com/xdq101/p/10897789.html
總結(jié)
以上是生活随笔為你收集整理的Ubuntu安装MDK的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: js new
- 下一篇: ubuntu18.04安装pycharm