To use jenkins in Archlinux is required change default java environment to Java 8.
sudo archlinux-java set java-8-openjdk/jre
Monday, April 30, 2018
Sunday, April 29, 2018
MBED how to fix: tools.utils.NotSupportedException: No linker script found.
You try to export the MBED project to Eclipse, but the following error raise:
raise NotSupportedException("No linker script found.")
tools.utils.NotSupportedException: No linker script found.
To fix this problem append " --source $PWD" to command line.
mbed export -m NUCLEO_F429ZI -i eclipse_gcc_arm --source $PWD
raise NotSupportedException("No linker script found.")
tools.utils.NotSupportedException: No linker script found.
mbed export -m NUCLEO_F429ZI -i eclipse_gcc_arm --source $PWD
MBED NUCLEO F429ZI com SDCard
Começando pelo exemplo oficial:
https://github.com/ARMmbed/mbed-os-example-sd-driver
O código de exemplo oficial, funciona mas precisa de alguns ajustes.
Tanto na baudrate da porta serial,
como na ligação do SDcard para os pinos do SDMMC.
Depois de fazer as correções, o resto do workflow é o normal de qualquer projeto usando mbed.
O código corrigido pode ser encontrado em:
https://github.com/murilopontes/mbed-sdcard-nucleo-f429zi
No conector CN8 vamos usar a interface SPI3 para cuidar do SDCARD.
PC_9 é o SPI CS / SDCARD D3
PC_10 é o SPI CLK / SDCARD CLK
PC_11 é o SPI MISO (DO) / SDCARD D0
PC_12 é o SPI MOSI (DI ) / SDCARD CMD
os pinos SDCARD: D2, D1, CD ficam desconectados.
sudo pip install mbed-cli --upgrade
mbed --version
1.5.1
mbed import mbed-os-example-sd-driver
cd mbed-os-example-sd-driver
mbed compile -m NUCLEO_F429ZI -t GCC_ARM
st-flash write ./BUILD/NUCLEO_F429ZI/GCC_ARM/mbed-os-example-sd-driver.bin 0x8000000
Minicom result
Exportar para Eclipse
mbed export -m NUCLEO_F429ZI -i eclipse_gcc_arm --source $PWD
https://github.com/ARMmbed/mbed-os-example-sd-driver
O código de exemplo oficial, funciona mas precisa de alguns ajustes.
Tanto na baudrate da porta serial,
como na ligação do SDcard para os pinos do SDMMC.
Depois de fazer as correções, o resto do workflow é o normal de qualquer projeto usando mbed.
O código corrigido pode ser encontrado em:
https://github.com/murilopontes/mbed-sdcard-nucleo-f429zi
No conector CN8 vamos usar a interface SPI3 para cuidar do SDCARD.
PC_9 é o SPI CS / SDCARD D3
PC_10 é o SPI CLK / SDCARD CLK
PC_11 é o SPI MISO (DO) / SDCARD D0
PC_12 é o SPI MOSI (DI ) / SDCARD CMD
os pinos SDCARD: D2, D1, CD ficam desconectados.
sudo pip install mbed-cli --upgrade
mbed --version
1.5.1
cd mbed-os-example-sd-driver
mbed compile -m NUCLEO_F429ZI -t GCC_ARM
st-flash write ./BUILD/NUCLEO_F429ZI/GCC_ARM/mbed-os-example-sd-driver.bin 0x8000000
Minicom result
Exportar para Eclipse
mbed export -m NUCLEO_F429ZI -i eclipse_gcc_arm --source $PWD
Friday, June 16, 2017
how to use tplink wr1043 v1 qss button with openwrt 15.05
Create missing folder
mkdir -p /etc/hotplug.d/buttonCreate missing event debug handler /etc/hotplug.d/button/buttons
logger the button was $BUTTON and the action was $ACTIONCreate missing button event handler /etc/hotplug.d/button/00-button
#!/bin/sh
. /lib/functions.sh
do_button () {
local button
local action
local handler
local min
local max
config_get button $1 button
config_get action $1 action
config_get handler $1 handler
config_get min $1 min
config_get max $1 max
[ "$ACTION" = "$action" -a "$BUTTON" = "$button" -a -n "$handler" ] && {
[ -z "$min" -o -z "$max" ] && eval $handler
[ -n "$min" -a -n "$max" ] && {
[ $min -le $SEEN -a $max -ge $SEEN ] && eval $handler
}
}
}
config_load system
config_foreach do_button button
Configure buttons, so append at the end of /etc/system/config
config button
option button 'wps'
option action 'pressed'
option handler 'echo 1 > /sys/class/leds/tp-link\:green\:qss/brightness'
config button
option button 'wps'
option action 'released'
option handler 'echo 0 > /sys/class/leds/tp-link\:green\:qss/brightness'
Friday, October 28, 2016
Debian Jessie howto install Emdebian CrossToolchains
echo deb http://emdebian.org/tools/debian/ jessie main > /etc/apt/sources.list.d/crosstools.list apt-get install -y curl curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | sudo apt-key add - sudo dpkg --add-architecture arm64 sudo dpkg --add-architecture armel sudo dpkg --add-architecture armhf sudo dpkg --add-architecture mips sudo dpkg --add-architecture mipsel sudo dpkg --add-architecture powerpc sudo dpkg --add-architecture ppc64el sudo apt-get update sudo apt-get install crossbuild-essential-arm64 sudo apt-get install crossbuild-essential-armel sudo apt-get install crossbuild-essential-armhf sudo apt-get install crossbuild-essential-mipsel sudo apt-get install crossbuild-essential-ppc64el
# I found problems with powerpc toolchain sudo apt-get install crossbuild-essential-powerpc # libc6:powerpc is broken Unpacking libc6:powerpc (2.19-18+deb8u6) ... dpkg: error processing archive /var/cache/apt/archives/libc6_2.19-18+deb8u6_powerpc.deb (--unpack): trying to overwrite shared '/lib/ld.so.1', which is different from other instances of package libc6:powerpc # remove broken powerpc toolchain sudo apt-get remove libatomic1:powerpc libc6-dev:powerpc libgcc1:powerpc libgomp1:powerpc libstdc++6:powerpc crossbuild-essential-powerpc libgcc-4.9-dev:powerpc libstdc++-4.9-dev:powerpc g++-4.9-powerpc-linux-gnu gcc-4.9-powerpc-linux-gnu g++-powerpc-linux-gnu gcc-powerpc-linux-gnu
Sunday, October 16, 2016
How to fix - (EE) intel(0): sna_mode_shutdown_crtc: invalid state found on pipe 0, disabling CRTC:21
Screen sleep resulting in black screen of death (ubuntu 16.04 / intel i7 4790k / ga-z97x-ud3h-bk )
Possible fixes are:
1) restart X and loose current session
2) replace SNA with UXA and be happy foverer (best solution)
How to detect bug:
cat /var/log/Xorg.0.log | grep sna_mode_shutdown_crtc
(EE) intel(0): sna_mode_shutdown_crtc: invalid state found on pipe 0, disabling CRTC:21
How to fix:
Copy and save script above, and do:
sudo sh replace-sna-with-uxa.sh
Possible fixes are:
1) restart X and loose current session
2) replace SNA with UXA and be happy foverer (best solution)
How to detect bug:
cat /var/log/Xorg.0.log | grep sna_mode_shutdown_crtc
(EE) intel(0): sna_mode_shutdown_crtc: invalid state found on pipe 0, disabling CRTC:21
How to fix:
Copy and save script above, and do:
sudo sh replace-sna-with-uxa.sh
Tuesday, September 6, 2016
telegram bot api
1) get an apikey from @botfather
2) check bot
curl -i -X GET https://api.telegram.org/bot{apikey}/getMe
3) get chatid
curl -i -X GET https://api.telegram.org/bot{apikey}/getUpdates
4) be happy
curl -i -X GET https://api.telegram.org/bot{apikey}/sendMessage?chat_id={chatId}&text={someText}
Tuesday, August 23, 2016
Scaling up number of tcp/ip connections in linux
#as client sysctl net.ipv4.ip_local_port_range="20000 65535" sysctl net.ipv4.tcp_fin_timeout=30 #as server ifconfig eth0 txqueuelen 10000 sysctl net.core.somaxconn=10240 sysctl net.core.netdev_max_backlog=10000 sysctl net.ipv4.tcp_max_syn_backlog=2560 echo 3000000 > /proc/sys/fs/nr_open ulimit -n 2000000
Monday, August 22, 2016
Sunday, August 14, 2016
Allow 65536 threads with 65536 tcp ports listening
Thread-65532 tcp_port= 65531
Thread-65533 tcp_port= 65532
Thread-65534 tcp_port= 65533
Thread-65535 tcp_port= 65534
Thread-65536 tcp_port= 65535
active threads 62547
join
Saturday, August 13, 2016
fix gitlab with letsencrypt certificate
Cannot register Go Runner because of x509: certificate signed by unknown authority
If you are using a letsencrypt certificate the bug is trigged by curl.
curl https://gitlab.example.com:9999/ci/api/v1/runners/register.json
curl: (60) SSL certificate problem: unable to get local issuer certificate
To fix this, add letsencrypt root certificates to system
sudo curl https://letsencrypt.org/certs/isrgrootx1.pem.txt -o /usr/local/share/ca-certificates/isrgrootx1.crt sudo curl https://letsencrypt.org/certs/letsencryptauthorityx1.pem.txt -o /usr/local/share/ca-certificates/letsencryptauthorityx1.crt sudo curl https://letsencrypt.org/certs/letsencryptauthorityx2.pem.txt -o /usr/local/share/ca-certificates/letsencryptauthorityx2.crt sudo curl https://letsencrypt.org/certs/lets-encrypt-x1-cross-signed.pem.txt -o /usr/local/share/ca-certificates/letsencryptx1.crt sudo curl https://letsencrypt.org/certs/lets-encrypt-x2-cross-signed.pem.txt -o /usr/local/share/ca-certificates/letsencryptx2.crt sudo curl https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem.txt -o /usr/local/share/ca-certificates/letsencryptx3.crt sudo curl https://letsencrypt.org/certs/lets-encrypt-x4-cross-signed.pem.txt -o /usr/local/share/ca-certificates/letsencryptx4.crt sudo dpkg-reconfigure ca-certificates
gitlab-ci-multi-runner register Running in system-mode. Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/ci): https://gitlab.example.com:9999/ci Please enter the gitlab-ci token for this runner: 5454353453453453534 Please enter the gitlab-ci description for this runner: [example2]: Please enter the gitlab-ci tags for this runner (comma separated): shared Registering runner... succeeded runner=43242342 Please enter the executor: parallels, shell, ssh, virtualbox, docker+machine, docker-ssh+machine, docker, docker-ssh: docker Please enter the default Docker image (eg. ruby:2.1): ubuntu:16.04 Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
Subscribe to:
Posts (Atom)




