# qemu-system-aarch64 -M arm-generic-fdt-7series -dtb /var/dts/zynq-zybo.dtb -serial null -serial mon:stdio -nographic -kernel ./fmpTOPPERS/FMP3 Kernel Release 3.0.0 for ZYBO_Z7 <Zynq-7000, Cortex-A9> (Sep 26 2019, 12:37:57)
Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
Toyohashi Univ. of Technology, JAPAN
Copyright (C) 2004-2019 by Embedded and Real-Time Systems Laboratory
Graduate School of Information Science, Nagoya Univ., JAPAN
Processor 2 start.
Processor 1 start.
local_inirtn exinf = 2, counter = 1
local_inirtn exinf = 1, counter = 2
Server task 2 starts.
System logging task is started on port 1.
Server task 1 starts.
Sample program starts (exinf = 1).selecttskno 0x11
selectcycid 1
selectalmid 1
selectprocessor 1
selectclass 1
task1_1 is running on prc1 (001) .|task1_1 is running on prc1 (002) .|task1_1 is running on prc1 (003) .|task1_1 is running on prc1 (004) .|task1_1 is running on prc1 (005) .|...(略)
cd /
curl -L https://toppers.jp/download.cgi/atk2-sc1-mc_zynqmp_r5_gcc-20170929.tar.gz -O
tar xf atk2-sc1-mc_zynqmp_r5_gcc-20170929.tar.gz
rm atk2-sc1-mc_zynqmp_r5_gcc-20170929.tar.gz
cd atk2-sc1-mc_1.4.2/
mkdir mysample
cd mysample
../configure -g /usr/local/bin/cfg -T zynqmp_r5_gcc
make GCC_TARGET=arm-none-eabi
qemu-system-aarch64 -M xilinx-zynq-a9 -m 1024 -serial null -serial mon:stdio -nographic -kernel ./asp
TOPPERS/ASP3 Kernel Release 3.4.0 for ZYBO <Zynq-7000, Cortex-A9> (Sep 8 2019, 12:20:51)
Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
Toyohashi Univ. of Technology, JAPAN
Copyright (C) 2004-2019 by Embedded and Real-Time Systems Laboratory
Graduate School of Information Science, Nagoya Univ., JAPAN
System logging task is started.
(何も表示されない、反応しない)
qemu-system-arm -M xilinx-zynq-a9 -m 1024 -serial null -serial mon:stdio -nographic -kernel ./asp
TOPPERS/ASP3 Kernel Release 3.4.0 for ZYBO <Zynq-7000, Cortex-A9> (Sep 8 2019, 12:20:51)
Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
Toyohashi Univ. of Technology, JAPAN
Copyright (C) 2004-2019 by Embedded and Real-Time Systems Laboratory
Graduate School of Information Science, Nagoya Univ., JAPAN
System logging task is started.
(何も表示されない、反応しない)
以下だとエラー。
qemu-system-aarch64 -M arm-generic-fdt-7series -dtb /var/dts/zynq-zybo.dtb -serial null -serial mon:stdio -nographic -kernel ./asp
TOPPERS/ASP3 Kernel Release 3.2.0 for Xilinx Zynq-7000(Cortex-A9) (Sep 8 2019, 17:42:57)Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
Toyohashi Univ. of Technology, JAPAN
Copyright (C) 2004-2017 by Embedded and Real-Time Systems Laboratory
Graduate School of Information Science, Nagoya Univ., JAPAN
System logging task is started.
../arch/arm_gcc/common/gic_kernel_impl.c:191: Assertion `TMIN_INTPRI<= intpri &&intpri<= TMAX_INTPRI' failed.
いろいろ調整が必要なようだ。
HRP3
ZYBO-Z7
3.1.0(いちおう動いた)
ビルド
cd /
curl -L https://toppers.jp/download.cgi/hrp3_zybo_z7_gcc-20190830.zip -O
unzip hrp3_zybo_z7_gcc-20190830.zip -d /zybo_z7
rm hrp3_zybo_z7_gcc-20190830.zip
cd /zybo_z7/hrp_3.1
mkdir mysample
cd mysample
ruby ../configure.rb -T zybo_z7_gcc
make
qemu-system-arm -M xilinx-zynq-a9 -m 1024 -serial null -serial mon:stdio -nographic -kernel ./hrp
TOPPERS/HRP3 Kernel Release 3.1.0 for ZYBO <Zynq-7000, Cortex-A9> (Sep 8 2019, 11:18:06)
Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
Toyohashi Univ. of Technology, JAPAN
Copyright (C) 2004-2019 by Embedded and Real-Time Systems Laboratory
Graduate School of Information Science, Nagoya Univ., JAPAN
System logging task is started.
(何も表示されない、反応しない)
cd /
curl -L https://toppers.jp/download.cgi/fmp3_zybo_z7_gcc-20190830.zip -O
unzip fmp3_zybo_z7_gcc-20190830.zip -d /zybo_z7
rm fmp3_zybo_z7_gcc-20190830.zip
cd /zybo_z7/fmp_3.0
mkdir mysample
cd mysample
ruby ../configure.rb -T zybo_z7_gcc
make
make 時点で make: *** No rule to make target 'sample1.cdl', needed by 'gen/tecsgen.timestamp'. Stop. が発生。
実行
なし。
ZYBO
3.0.0(動かなかった)
ビルド
cd /
curl -L https://toppers.jp/download.cgi/fmp3_zybo_gcc-20190331.tar.gz -O
tar xf fmp3_zybo_gcc-20190331.tar.gz
rm fmp3_zybo_gcc-20190331.tar.gz
cd /fmp3_3.0.0
mkdir mysample
cd mysample
ruby ../configure.rb -T zybo_gcc
make
make 時点で make: *** No rule to make target 'sample1.cdl', needed by 'gen/tecsgen.timestamp'. Stop. が発生。
実行
なし。
HRMP3
ZYBO-Z7
3.0.0(動かなかった)
ビルド
cd /
curl -L https://toppers.jp/download.cgi/hrmp3_zybo_z7_gcc-20190830.zip -O
unzip hrmp3_zybo_z7_gcc-20190830.zip -d /zybo_z7
rm hrmp3_zybo_z7_gcc-20190830.zip
cd cd /zybo_z7/hrmp_3.0
mkdir mysample
cd mysample
ruby ../configure.rb -T zybo_z7_gcc
make
make 時点で make: *** No rule to make target 'sample1.cdl', needed by 'gen/tecsgen.timestamp'. Stop. が発生。
実行
なし。
ZYBO
3.0.0(動かなかった)
ビルド
cd /
curl -L https://toppers.jp/download.cgi/hrmp3_zybo_gcc-20190329.tar.gz -O
tar xf hrmp3_zybo_gcc-20190329.tar.gz
rm hrmp3_zybo_gcc-20190329.tar.gz
cd /hrmp3_3.0.0
mkdir mysample
cd mysample
ruby ../configure.rb -T zybo_gcc
make
make 時点で make: *** No rule to make target 'sample1.cdl', needed by 'gen/tecsgen.timestamp'. Stop. が発生。
実行
なし。
FMP
Zynq UltraScale+ MPSoC Cortex-A53 AArch64
1.4.0(動いた)
ビルド
cd /
curl -L https://toppers.jp/download.cgi/fmp_zynqmp_a53_arm64_gcc-20190125.zip -O
unzip fmp_zynqmp_a53_arm64_gcc-20190125.zip -d a53
rm fmp_zynqmp_a53_arm64_gcc-20190125.zip
cd /a53/fmp_1.4.0/
mkdir mysample
cd mysample
chmod u+x ../configure
../configure -T zynqmp_a53_arm64_gcc -g /usr/local/bin/cfg
make GCC_TARGET=aarch64-elf
PS C:\Users\mikoto> cd ~/project/
PS C:\Users\mikoto\project> yo code
_-----_ ╭──────────────────────────╮
|| │ Welcome to the Visual │
|--(o)--| │ Studio Code Extension │
`---------´ │ generator! │
(_´U`_ ) ╰──────────────────────────╯
/___A___\ /
|~|__'.___.'__
´ `|° ´ Y`? What type of extension do you want to create? New Extension (TypeScript)
? What's the name of your extension? snippet? What's the identifier of your extension? snippet
? What's the description of your extension? Language Support for Snippet.? Initialize a git repository? Yes? Which package manager to use? npm create snippet\.vscode\extensions.json create snippet\.vscode\launch.json create snippet\.vscode\settings.json create snippet\.vscode\tasks.json create snippet\src\test\runTest.ts create snippet\src\test\suite\extension.test.ts create snippet\src\test\suite\index.ts create snippet\.vscodeignore create snippet\.gitignore create snippet\README.md create snippet\CHANGELOG.md create snippet\vsc-extension-quickstart.md create snippet\tsconfig.json create snippet\src\extension.ts create snippet\package.json create snippet\tslint.jsonI'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN snippet@0.0.1 No repository field.
npm WARN snippet@0.0.1 No license field.
added 143 packages from 573 contributors and audited 325 packages in 3.974s
found 0 vulnerabilities
Your extension snippet has been created!
To start editing with Visual Studio Code, use the following commands:
cd snippet
code .
Open vsc-extension-quickstart.md inside the new extension for further instructions
on how to modify, test and publish your extension.
For more information, also visit http://code.visualstudio.com and follow us @code.
PS C:\Users\mikoto\project># プロジェクト管理の都合でディレクトリの名前変更PS C:\Users\mikoto\project> mv .\snippet .\vscode-snippet
LSP に必要なパッケージを追加
vscode-languageclient を追加する。
cd vscode-snippet
npm install --save vscode-languageclient
プロジェクトのメタデータを編集
package.json を編集。
{"name":"snippet","displayName":"snippet","description":"Language Support for Snippet.","version":"0.0.1","publisher":"mikoto2000","engines":{"vscode":"^1.37.0"},"categories":["Other"],"activationEvents":["*"],"main":"./out/extension.js","contributes":{},"scripts":{"vscode:prepublish":"npm run compile","compile":"tsc -p ./","watch":"tsc -watch -p ./","pretest":"npm run compile","test":"node ./out/test/runTest.js"},"devDependencies":{"@types/glob":"^7.1.1","@types/mocha":"^5.2.6","@types/node":"^10.12.21","@types/vscode":"^1.37.0","glob":"^7.1.4","mocha":"^6.1.4","typescript":"^3.3.1","tslint":"^5.12.1","vscode-test":"^1.0.2"},"dependencies":{"vscode-languageclient":"^5.2.1"}}
発行者(publisher) を追加
スニペットサーバーは常時起動させておきたいので、 activationEvents を * に修正
コマンドは必要ないので contributes/commands を削除
LSP サーバー起動コードの実装
import * as vscode from 'vscode';
import { Executable, LanguageClient, LanguageClientOptions, StreamInfo } from 'vscode-languageclient';
export function activate(context: vscode.ExtensionContext) {
const serverOptions: Executable = {
// TODO: requirements に「java にパスを通しておくこと」を追加したうえで java に修正
command: 'C:/Java/openjdk-12.0.1/bin/java',
args: ['--add-modules=ALL-SYSTEM',
'--add-opens',
'java.base/java.util=ALL-UNNAMED',
'--add-opens', 'java.base/java.lang=ALL-UNNAMED',
'-Declipse.application=org.eclipse.jdt.ls.core.id1',
'-Dosgi.bundles.defaultStartLevel=4',
'-Declipse.product=org.eclipse.jdt.ls.core.product',
'-Dlog.level=ALL',
'-noverify',
'-Dfile.encoding=UTF-8',
'-Xmx1G',
// TODO: jar を同梱する
'-jar',
'C:/Users/mikoto/project/lsp4snippet/build/libs/lsp4snippet-1.0.0.jar',
// TODO: config 化
'--snippet', 'C:/Users/mikoto/project/dotvim/.vim/snippets/java.yaml',
'--snippet', 'C:/Users/mikoto/project/dotvim/.vim/snippets/markdown.yaml']
};
const clientOptions: LanguageClientOptions = {
documentSelector: [{ scheme: 'file', language: '*' }]
};
const disposable = new LanguageClient('lsp4snippet', 'lsp4snippet', serverOptions, clientOptions).start();
context.subscriptions.push(disposable);
}
// this method is called when your extension is deactivated
export function deactivate() {}