在 <home>/.config 新增 autostart 目錄
touch <home>/.config/autostart/<program name>.desktop
在<program name>.desktop加入以下內容
[Desktop Entry]
Name=<program name>
Exec=<path to>/<your program execuable>
Type=application
就可以了
RaspberryPi也一樣可以這樣處理
在 <home>/.config 新增 autostart 目錄
touch <home>/.config/autostart/<program name>.desktop
在<program name>.desktop加入以下內容
[Desktop Entry]
Name=<program name>
Exec=<path to>/<your program execuable>
Type=application
就可以了
RaspberryPi也一樣可以這樣處理
首先到 mbed online IDE
https://ide.mbed.com/compiler/
第一次使用經過註冊程序就會看到IDE畫面
接著開始新增專案 mbed沒有提供STM32F4 DISC1版本
但是 Seeed Arch Max 剛好是使用 STMD32F407 這顆 MCU
所以選取 Seeed Arch Max 當作專案 platform
專案 template 選取 Blinky LED Hello World
程式碼修改如下:
#include "mbed.h"
#define BLINKING_RATE 500
int main()
{
// Initialise PD12 as an output
DigitalOut gLED(PD_12);
while (true) {
gLED = !gLED;
ThisThread::sleep_for(BLINKING_RATE);
}
}
按下介面上的 Compile 按鈕
mbed online IDE 會在完成後跳出下載 binary 檔案
將這個 .bin 檔存入 STM32F4 DISC1 的資料夾
最後就會看到 PD12 開始閃爍囉!
Reference
https://www.hackster.io/PSoC_Rocks/easy-programming-stm32f407-discovery-board-with-mbed-8ead8e
環境: Ubuntu 18.04 Server
第一次登入EC2後
以上完成wordpress需要的軟體。
在使用mysql server前先進行初始化。
mysql> USE mysql;
mysql> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
將原本root的登入方式(auth_socket)改為mysql_native_password
mysql> CREATE DATABASE new_db;
mysql> CREATE USER 'new_user'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON new_db.* TO 'new_user'@'localhost';
建立wordpress的資料庫(new_db)並設定資料庫權限給新建的使用者帳戶(new_user),之後wordpress安裝時需要輸入此使用者帳戶及密碼。
接下來到wordpress.org下載最新版本(目前為5.5.1)的wordpress
% cd /var/www/html
% sudo unzip wordpress-5.5.1.zip
% sudo chown -R www-data. wordpress/
最後打開AWS EC2的security group的port 80
連入網站即可開始進行wordpress的最後設定。
常用的解決方法
sudo mount -o remount,rw /Download driver from:
https://github.com/ulli-kroll/rtl8188fu
After ‘make’:
sudo modprobe cfg80211
sudo insmod rtl8188fu.ko
Connect to AP:
nmcli r wifi on
nmcli d wifi list
nmcli d wifi connect “ssid” password “pw”
我在下指令 gradlew signingReport 時, 出現了這個錯誤
error occurred during initialization of vm could not reserve enough space for 1572864kb object heap
原來我安裝到了 32bit 版本的 JDK
所以 allocate 過大的 heap size 會出現問題
解決的方法當然是改成安裝 64bit JDK 或者如果是用 Android Studio 的
可以在 gradle.properties 檔修改成
org.gradle.jvmargs=-Xmx512M
就可以了
PS. 如果下指令 java -d32 -version 會正常出現版本說明的話 那就是安裝到 32bit JDK
ZYNQ add SPI interface
Customize SPI device tree for petalinux
After update HDF and execute command: petalinux-config –get-hw-description=<HDF Directory>
In components/plnx_workspace/device-tree/device-tree/pl.dtsi, will produce SPI device node automatically as below:
Modify project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi as below
Enable SPI device driver
$ petalinux-config -c kernel
Go to Device Drivers -> SPI Support -> User mode SPI device driver support and enable it.
Use spidev_test.c to verify the SPI interface.
$ ls /dev/spi*
$ gcc spidev_test.c -o spidev_test
$ ./spidev_test -D /dev/spidev1.0
本實驗中,Nucleo H753ZI 當作 SPI Master,PYNQ-Z2 當作 SPI Slave。 使用SPI通訊協定傳送及接收8 Bytes。 腳位設定如下: Nucleo H753ZI 功能 PYNZ-Z2 PD14 CS W9 PA5 SCLK...