condaを使ったPython-Controlのインストール

 

【概要】

pythonに制御工学用パッケージのPython Controlをインストールする方法。

 

【環境】

Windows10

Anaconda3インストール済み

 

【方法】

condaを使って

  • control(Python Control)
  • slycot

をconda-forgeからインストールする。

conda-forgeはconda用のレシピを提供しているGitHubの組織である。

 

コマンドプロンプトで下記を実行してインストールする。

>conda install -c conda-forge slycot

>conda install -c conda-forge control

 

【Test】

>>> import control

>>> from control.matlab import *

>>> Np=[0,1]

>>> Dp=[1,2,3]

>>> P=tf(Np,Dp)    #伝達関数モデルの定義(python-controlの関数)

>>> print(P)

       1

-------------

s^2 + 2 s + 3

GR-Peachへu-boot書き込み(QSPI)

 

概要

gr-peachにopenocdを使用してu-bootを書き込む手順のメモ

  

環境

  • windows10
  • u-boot  2017.5
  • openocd 0.10.0
  • arm-none-eabi-gdb(6 20017q2)
  • teraterm
  • tftpd

 

1.u-bootビルド

rom用にビルドしたu-bootとram実行用にビルドしたu-boot(u-boot-ram)を用意

(ubuntuでビルド)

 

2.openOCDスクリプト用意

https://github.com/fifteenhex/gr-peach-linux

からrenesas_rza1h_swd.cfgをダウンロードして

openocdのscript/boardにコピー

 

3.GR-Peach とPCをUSB接続

 

 

4.openOCDを実行

コマンドプロンプトで次のコマンドを実行

>openocd -f ./board/renesas_rza1h_swd.cfg

 

5.u-boot通信用のteratermを起動

serial

115200bps

 

6.arm-none-eabi-gdbを起動

>target remote localhost:3333

>load c:/XXX/u-boot-ram

>c

u-bootが起動してteratermにログが表示

 

7.tftpサーバーの起動

TFTPD64を起動

rom用のu-bootをTFTPD64のCurrent Directory下に移動

gr-peachとPCをLANケーブルで接続

 

7.u-bootコマンドの実行

>tftp u-boot

>sf update 0x20000000 0x0 0x40000

gr-peachのリセットボタンを押すとteratermにログが表示される。

0x20000000:コピー元

0x0:QSPIのオフセット

0x40000:サイズ

 (u-boot)

 

参考

https://renesasrulz.com/rz/m/files_linux/3262

https://github.com/fifteenhex/gr-peach-linux

 

その他

arm-none-eabi-gdb(7 2018q2)で

>target remote localhost:3333

が通らなかった。

 

u-bootコマンド

>run writeuboot

はLoading: T T T T T T T T T Tが繰り返してNG

 

GR-peachとUSBデバッグポートでシリアル通信をする為には

mbed Windows serial port driverが必要

https://os.mbed.com/handbook/Windows-serial-configuration

 

試す際は自己責任でお願いします。