日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > Ubuntu >内容正文

Ubuntu

Ubuntu安装MDK

發(fā)布時間:2023/12/18 Ubuntu 21 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Ubuntu安装MDK 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

1 環(huán)境部署

  • [x] Ubuntu 18.04
  • [x] Wine 3.0.4

1.0 查看CPU信息

lscpu 序號屬性描述
1架構(gòu)x86_64
2CPU 運(yùn)行模式32-bit, 64-bit
3字節(jié)序Little Endian
4CPU4
5在線 CPU 列表0-3
6每個核的線程數(shù)1
7每個座的核數(shù)4
81
9NUMA 節(jié)點1
10廠商 IDGenuineIntel
11CPU 系列6
13型號158
14型號名稱Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
15步進(jìn)9
16CPU MHz2748.422
17CPU 最大 MHz3500.0000
18CPU 最小 MHz800.0000
19BogoMIPS6000.00
20虛擬化VT-x
21L1d 緩存32K
22L1i 緩存32K
23L2 緩存256K
24L3 緩存6144K
25NUMA 節(jié)點0 CPU0-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.1 設(shè)置路徑

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)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。