User:FabienM
From ArmadeusWiki
Revision as of 12:02, 7 December 2020 by FabienM (Talk | contribs) (→Python en environnement virtuel)
Contents
Mes petites bidouilles avec l'armadeus
Trucs
Python en environnement virtuel
Un pense bète pour installer la version voulue de python en environnement virtuel avec virtualenv:
virtualenv
apt-get install python-virtualenv
Python 3.7.4
$ wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tar.xz $ tar -Jxvf Python-3.7.4.tar.xz $ cd Python-3.7.4 $ ./configure --enable-shared $ make $ sudo make install
virtualenv
apt-get install python-virtualenv
Peripheral On Demand
Participation à la documentation ArmadeuS Project
- How to make a VHDL design in Ubuntu/Debian
- How to simulate post synthesis and post place & route design with GHDL
Trash
- Description of FPGA-IMX interface for APF27
- Description of FPGA-IMX interface for APF51
- FPGA on APF introduction
- Button and LED
Projets
- Camera C38A with chip ov7620
- Camera omnivision VC21CC1
- Robotic
- Compteur d'énergie électrique
- OOCP (Only One Cable Project)
- Use MySQL-client on apf9328
- Light-APF27Dev project
Liens utiles
- Projets sourceforge
- Site entreprise
- Les codes de retour d'erreurs : http://www.opengroup.org/onlinepubs/007908799/xsh/errno.h.html
- Buildroot_Packages
- Un papier très intéressant d'un développeur de jeux vidéo prônant l'utilisation du C++ ... pour le web. Notamment grâce à l'utilisation de emscripten qui permet de compiler du C++ vers le javascript (HTML5).
Somes usefull tricks
press a button
Here, function to «press enter to continue» on apf in different languages :
setbit /proc/driver/gpio/portFmode 13 1 # set pin as gpio
setbit /proc/driver/gpio/portFdir 13 0 # set pin as input
setbit /proc/driver/gpio/portFirq 13 1 # irq on rising edge
/usr/bin/testsuite/testbutton /dev/gpio/PF13 3
With testbutton program comming from target/linux/modules/fpga/wishbone_example/wb_button. Type «make» in this directory to compile it.
Logging with timestamps in seconds
#!/bin/sh
while true
do
LIGHT=$(cat /sys/class/hwmon/hwmon0/device/in3_input)
TIME=$(date +%s)
echo $TIME", sec, "$LIGHT", mV," >> log;
sleep 2
done
Press enter to continue
C
#include <stdio.h>
void pressEnterToContinue(void)
{
printf("Press enter to continue\n");
getc(stdin);//XXX
while( getc(stdin) != '\n') ;
}
C++
#include <stdio.h> //XXX
#include <iostream>
void pressEnterToContinue(void)
{
cout << "Press enter to continue" << endl;
getc(stdin); //XXX
std::cin.ignore( std::numeric_limits <std::streamsize> ::max(), '\n' );
}
Python 2
def pressEnterToContinue():
print "Press enter to continue"
raw_input()
Python 3
def pressEnterToContinue():
print("Press enter to continue")
input()
Kernel Driver
bac à sable
Wavedrom
If wavedrom plugin is installed on this wiki, we can see a beautiful waves bellow :