全能電路設計實戰

2022年8月29日 星期一

[Raspberry Pi ] 查詢 Software and Hardware Version of a Raspberry Pi

 

How to Check the Software and Hardware Version of a Raspberry Pi

 Type the following commands , you will get all information about Raspberry Pi
  • cat /etc/os-release
  • uname -a
  • cat /proc/cpuinfo | grep Model



 2019 年發布的Raspberry Pi 4  ,被發現有 USB-C 的充電問題,而小改款  v1.2 解決了此問題! 

2022年8月12日 星期五

[Linux 程式設計] 關於GCC

 

1. 後面的-lxxxx 如果是linux他的位置在哪裡? 

(base) ubuntu@ubuntu1804:/usr/lib$ cat  /etc/ld.so.conf.d/x86_64-linux-gnu.conf


# Multiarch support
/usr/local/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
(base) ubuntu@ubuntu1804:/usr/lib$ pwd
/usr/lib

2. 標準函式庫為何不用帶-lxxx

 因為gcc 預設會連結標準函式庫 libc.so.xx

3. 如果使用opensource 專案時要使用 -lxxxx 這部分該怎使用如果他的lib名稱 不是lib<project>
 
  如果不是標準名稱就得用library全名. 主要還是要指定 -L<lib目錄>  , 指名library的位置, 如果不是放在library 的搜尋路徑上的話



(base) ubuntu@ubuntu1804:~$ gcc -v

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.5.0-3ubuntu1~18.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)


----------
相關課程: 
https://www.ittraining.com.tw/ittraining/it-elearning/el-linux-embedded/e-linuxsys#tab01

2022年8月1日 星期一

Jupyter notebook 延伸工具

 

超好用的2個Jupyter notebook 延伸工具
  • Table of content : 針對Markdown cell 提供目錄
  • autopep8:  python代碼格式化工具






(2) 安裝 Jupyter notebook extensions

打開Anaconda Prompt  , 執行

pip install jupyter_contrib_nbextensions && jupyter contrib nbextension install

(3) 重新開啓Jupyter Notebook, Enable "Table of content "