Difference between revisions of "User:FabienM"

From ArmadeusWiki
Jump to: navigation, search
m (bac à sable)
(Blog)
 
(41 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[MemberList | << liste des membres]]
 
[[MemberList | << liste des membres]]
  
= ''' Présentation ''' =
 
  
Fabien Marteau, Électronicien/Informaticien en dernière année d'école d'ingé spécialisée en systèmes embarqués ([http://uuu.enseirb.fr/~kadionik/se/index.html ENSEIRB])
+
= Mes petites bidouilles avec l'armadeus =
  
J'ai toujours fait de l'électronique/informatique, depuis les magnétoscopes et réveils que j'ai démonté en passant par la filière SI du Bac S ainsi que le DUT GEII et l'[http://www.enseirb.fr/ ENSEIRB]. J'aime bidouiller des petits circuits électroniques avec des applications plus ou moins utiles comme ma [http://fabienmarteau.free.fr/?page=stationmeteo/stationmeteoindex station météo].
+
* [[Une led qui clignote avec le spartan 3]]
 +
* [[Petits trucs en vrac]]
 +
* [[Led sensor]]
 +
* [[vim | The best editor in the world]]
  
En tant que membre d'[http://eirbot.enseirb.fr  Eirbot] je suis très intéressé par les applications en robotiques réalisable avec armadeus. Je suis aussi particulièrement intéressé par les applications en domotique avec la gestion de capteurs ainsi que la gestion de l'énergie.
+
= Trucs =
.
+
  
 +
== Python en environnement virtuel ==
  
== Compétences : ==
+
Un pense bète pour installer la version voulue de python en environnement virtuel avec virtualenv:
* réalisation de cartes electroniques numériques ([http://www.cadsoft.de/ Eagles] et [http://www.lis.inpg.fr/realise_au_lis/kicad/ Kicad])
+
  
* programmation en C / assembleur 68000
+
=== virtualenv et autre tkinter ===
  
* Conception et simulation VHDL
+
<pre>
 +
apt-get install python-tk python3-tk tk-dev
 +
apt-get install python-virtualenv
 +
</pre>
  
* microcontrolleurs Atmega, 68HC11, PIC
+
=== Python 3.7.4 ===
  
== Objectifs : ==
+
<pre>
* Faire de l'embarqué sur des platforme autre que x86 avec les vrais contraintes de l'embarqué
+
sudo apt-get install libffi-dev
 +
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
 +
sudo ldconfig /usr/local/lib
 +
</pre>
  
* me former à Linux embarqué et aux fpga
+
=== virtualenv ===
  
 +
* Virtual env configuration:
  
= Mes petites bidouilles avec l'armadeus =
+
<pre>
 +
apt-get install python-virtualenv
 +
mkdir virtenv
 +
cd virtenv
 +
virtualenv --python=/usr/local/bin/python3.7 envp37
 +
</pre>
  
* [[Une led qui clignote avec le spartan 3]]
+
* enum bug fix:
* [[Petits trucs en vrac]]
+
 
* [[Led sensor]]
+
<pre>
* [[vim | The best editor in the world]]
+
cd ~/virtenv/envp37/lib/python3.7
 +
ln -s /usr/local/lib/python3.7/enum.py
 +
</pre>
 +
 
 +
* Activation:
 +
<pre>
 +
source /home/armadeus/virtenv/envp37/bin/activate
 +
</pre>
 +
 
 +
* Desactivation:
 +
<pre>
 +
deactivate
 +
</pre>
  
 
= '''P'''eripheral '''O'''n '''D'''emand =
 
= '''P'''eripheral '''O'''n '''D'''emand =
Line 45: Line 75:
  
 
* [[A simple design with Wishbone bus]]
 
* [[A simple design with Wishbone bus]]
* [[8_16_32_flash | how to configure flash space on apf9328]]
 
  
 +
* [[How to use kernel 2.6.38.x on APF27]]
 +
 +
== Trash ==
 +
* [[APF27_FPGA-IMX_interface_description | Description of FPGA-IMX interface for APF27]]
 +
* [[APF51_FPGA-IMX_interface_description | Description of FPGA-IMX interface for APF51]]
 +
* [[FPGA | FPGA on APF introduction]]
 +
* [[FPGA and led | Button and LED]]
  
 
== Projets ==
 
== Projets ==
Line 56: Line 92:
 
* [[OOCP]] (Only One Cable Project)
 
* [[OOCP]] (Only One Cable Project)
 
* [[Use MySQL-client on apf9328]]
 
* [[Use MySQL-client on apf9328]]
 +
* [[Light-APF27Dev | Light-APF27Dev project ]]
  
 
= Liens utiles =
 
= Liens utiles =
Line 62: Line 99:
 
* Site [http://www.armadeus.com/english/index.html entreprise]
 
* Site [http://www.armadeus.com/english/index.html entreprise]
 
* Les codes de retour d'erreurs : http://www.opengroup.org/onlinepubs/007908799/xsh/errno.h.html
 
* Les codes de retour d'erreurs : http://www.opengroup.org/onlinepubs/007908799/xsh/errno.h.html
* [[Fr:Paquets_Buildroot]]
+
* [[Buildroot_Packages]]
 +
* [http://sebsauvage.net/files/20130426_cpp_quovadis2013cppontheweb-130425105424-phpapp01.pdf 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 [http://sebsauvage.net/files/20130426_cpp_multiplatformconthewebwithemscripten-130405172545-phpapp01.pdf 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 :
 +
 
 +
<source lang="bash">
 +
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
 +
</source>
 +
 
 +
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 ==
 +
 
 +
<source lang="bash">
 +
#!/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
 +
</source>
 +
 
 +
== Press enter to continue ==
 +
=== C ===
 +
 
 +
<source lang="C">
 +
#include <stdio.h>
 +
 
 +
void pressEnterToContinue(void)
 +
{
 +
    printf("Press enter to continue\n");
 +
    getc(stdin);//XXX
 +
    while( getc(stdin) != '\n') ;
 +
}
 +
 
 +
 
 +
</source>
 +
 
 +
=== C++ ===
 +
<source lang="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' );
 +
}
 +
 
 +
</source>
 +
 
 +
=== Python 2 ===
 +
 
 +
<source lang="python">
 +
 
 +
def pressEnterToContinue():
 +
    print "Press enter to continue"
 +
    raw_input()
 +
 
 +
</source>
 +
 
 +
=== Python 3 ===
 +
 
 +
 
 +
<source lang="python">
 +
 
 +
def pressEnterToContinue():
 +
    print("Press enter to continue")
 +
    input()
 +
 
 +
</source>
 +
 
 +
= Kernel Driver =
 +
 
 +
* [[IIO kernel driver model]]
 +
* [[UIO kernel driver model]]
  
 
= bac à sable =
 
= bac à sable =
 +
[[Image:dessin.svg]]
 +
 +
* [[APF6_SP_DDR3_PINOUT]]
 +
* [[APF6_SP The full howto]]
 +
 +
== Wavedrom ==
 +
 +
If [https://github.com/Martoni/mediawiki_wavedrom wavedrom plugin] is installed on this wiki, we can see a beautiful waves bellow :
 +
 +
<wavedrom>
 +
{ signal: [
 +
  { name: "clk",  wave: "p......" },
 +
  { name: "bus",  wave: "x.34.5x",  data: "head body tail" },
 +
  { name: "wire", wave: "0.1..0." },
 +
]}
 +
</wavedrom>
  
[[Image:indus.png]]
+
= Blog =
  
[[Fichier:plop.tar.bz2]]
+
* [[2022_02_18_Container_docker_pour_vieux_BSP]]

Latest revision as of 16:40, 18 February 2022

<< liste des membres


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 et autre tkinter

apt-get install python-tk python3-tk tk-dev
apt-get install python-virtualenv

Python 3.7.4

sudo apt-get install libffi-dev
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
sudo ldconfig /usr/local/lib

virtualenv

  • Virtual env configuration:
apt-get install python-virtualenv
mkdir virtenv
cd virtenv
virtualenv --python=/usr/local/bin/python3.7 envp37
  • enum bug fix:
cd ~/virtenv/envp37/lib/python3.7
ln -s /usr/local/lib/python3.7/enum.py
  • Activation:
source /home/armadeus/virtenv/envp37/bin/activate
  • Desactivation:
deactivate

Peripheral On Demand

Participation à la documentation ArmadeuS Project

Trash

Projets

Liens utiles

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

Dessin.svg

Wavedrom

If wavedrom plugin is installed on this wiki, we can see a beautiful waves bellow :

Blog