Sunday, June 30, 2019

gcc-arm-none-eabiでstm32のビルドに詰まった話

  No comments
新しいパソコンを買ったのでいつも通りWSLを入れて、Halをビルドしてたら唐突に

/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/crt0.o: Conflicting CPU architectures 13/1
/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/crt0.o

と言われビルドできなかった。
家のUbuntu 18.04 サーバーだとできたのに。。
原因を調べてみるとありました。

https://stackoverflow.com/questions/50151897/arm-gcc-conflicting-cpu-architectures


Ubuntu 18.04の特有の問題です。
arm-none-eabi-gccをちゃんとPPAから入れろって話。
  • 消す:
    sudo apt remove gcc-arm-none-eabi
  • PPAから入れる:
    sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
    sudo apt-get update
    sudo apt-get install gcc-arm-embedded
     
    これだけの話だったのに1時間近く費やしてしまった。。 

Wednesday, June 19, 2019

VS Code 1.35(2019/05)の更新内容

  No comments
Visual Studio Codeの2019年5月のアップデートです。
これらの変更がされました。
オンラインで見たければcode.visualstudio.comUpdatesから見れます
インサイダー版: 新機能を早く体感したいですか?早期インサイダービルドをダウンロードすると試すことができます! そして、Visual Studio Code ニュース、アップデートそして変更点を知りたいなら、Twitterで@codeをフォローしてね!



アイコンの更新

Over the past two months, we've been working on updating the VS Code product logo. We've taken feedback from the community (thank you to everyone who responded) and we are happy to release the new logos for Stable and Insiders. We are also using same logo on all platforms.
 

 

エディター

定義の参照が改善されました

We have polished the Go to Definition action and its friends, Go to Declaration, Go to Type Definition, and Go to Implementation.
  • Earlier, we added the editor.gotoLocation.multiple: goto option to disable showing a Peek view when a symbol has multiple definitions. However, it would only show the first definition and ignore the rest. This is now much better, as multiple results are shown in the Status bar and pressing F12 jumps to each definition.
Go to Definition, no Peek view
  • Go to Definition now honors the workbench.editor.revealIfOpen setting. This means that an editor that is already open in another group can be reused (or not) when going to a symbol. Note that the old, hard-coded behavior was to reuse the current editor and the default for revealIfOpen is not to reuse.
  • The Peek view now supports search and filter, like the results tree, to allow you to quickly narrow down on a result.
  • Last but not least, you can now cancel long running requests for definitions by pressing Escape.

Breadcrumbs displayed

Breadcrumbs for quick file and symbol navigation are now on by default. This can be toggled in the View menu View > Toggle Breadcrumbs command.
breadcrumb navigation on by default

言語

TypeScript 3.5

VS Code now ships with TypeScript 3.5.1. This update brings TypeScript language improvements, along with tooling enhancements for both JavaScript and TypeScript. It also fixes a number of important bugs, including fixes for performance issues that some users were seeing when working with styled-components.

Smart selection for JavaScript and TypeScript

JavaScript and TypeScript now support smart selection. This feature uses semantic knowledge to intelligently expand selections for expressions, types, statements, classes, and imports:
Smart selection in a TypeScript file

Extract to type alias refactoring for TypeScript

Use the new Extract to type alias refactoring for TypeScript to quickly extract part type into its own type alias:
Extracting part of complex type to a type alias
The Extract to type alias refactoring has a kind of refactor.extract.type. You can configure a single keybinding that extracts either constants or type aliases using:
{
    "key": "shift+ctrl+e",
    "command": "editor.action.codeAction",
    "args": {
        "kind": "refactor.extract",
        "preferred": true
    }
}
See the Code Action documentation for more information on configuring keybindings for refactorings.

JavaScript and TypeScriptで変換候補の並び替え

We've tuned our suggestion sorting for JavaScript and TypeScript to more heavily prioritize suggestions for local variables over suggestions for globals or auto-imports:
As shown in the image below, if you create a function called setTimOut, VS Code will now suggest it first instead of assuming you mean setTimeout.
Suggest user defined setTimOut function first

機能の増えたターミナル

True color support

The terminal now supports programs that use true color (24-bit) escape sequences, rendering the correct color instead of the previous approximation of it.
Before:
Integrated Terminal 256 color approximation
After:
Integrated Terminal true color

Improved surfacing of shell selector on Windows

For some time, there has been a command to select the default shell on Windows. This release makes the command more discoverable as a shortcut available in the terminal selector dropdown.
Integrated Terminal shell selector

ソースコントロール

Compare merge conflicts with complete context

A new setting merge-conflict.diffViewPosition allows you to open the diff view in a new editor group when you compare merge conflicts. In addition, the new view shows the complete diff view of the changed file, which provides better context for the merge conflicts.
Compare merge conflicts in a new editor group

Contributions to extensions

リモート開発 (プレビュー)

リモート開発 拡張がVS Codeの安定版で利用可能になりました!and allow you to use a container, remote machineやWindows Subsystem for Linux (WSL) as a full-featured development environment. The extensions run in the context of the remote workspace while you work with VS Code just as you would in a local workspace.
Remote development architecture
You can learn about new extension features and bug fixes in the Remote Development release notes.

Saturday, June 8, 2019

BazelをUbuntu 19.04にインストールする

  No comments
公式サイトのインストール手順に則って

ステップ1: JDKをインストール

JDK 8をインストール:
sudo apt-get install openjdk-8-jdk

ステップ2: Bazelのリポジトリをパッケージソースとして追加

echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -

ステップ3: Bazelのインストールとアプデ

sudo apt-get update && sudo apt-get install bazel
一度、このようにしてインストールできたら、次回からはこのコマンドでBazelをアプデできます
コマンド:
sudo apt-get install --only-upgrade bazel
 
次回からはBazelを使っていきますね〜

Tuesday, June 4, 2019

Test Post

  No comments
Hello !
My name is Celica!

This is a test post.

Image alt
App isn't available
This is a picture

This is my code

global _start

section .text

_start:
  mov rax, 1        ; write(
  mov rdi, 1        ;   STDOUT_FILENO,
  mov rsi, msg      ;   "Hello, world!\n",
  mov rdx, msglen   ;   sizeof("Hello, world!\n")
  syscall           ; );

  mov rax, 60       ; exit(
  mov rdi, 0        ;   EXIT_SUCCESS
  syscall           ; );

section .rodata
  msg: db "Hello, world!", 10
  msglen: equ $ - msg

VS Code is the best
VS Code
Hello World Program