IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

MPLAB Discussion :

Envoi de trames d'octets avec Ethernet - Kit de démarrage Ethernet PIC32


Sujet :

MPLAB

  1. #1
    Membre régulier
    Homme Profil pro
    Étudiant
    Inscrit en
    Mai 2018
    Messages
    73
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Doubs (Franche Comté)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Mai 2018
    Messages : 73
    Points : 77
    Points
    77
    Par défaut Envoi de trames d'octets avec Ethernet - Kit de démarrage Ethernet PIC32
    Bonjour,

    Je dispose d'un Kit de démarrage Ethernet PIC32, celui-ci est connecté à une caméra qui fait le comptage de voyageurs, les données collectées sont sous forme de trames en octets.
    Je voudrais réaliser un code pour envoyer ces trames d'octets sur un ordinateur et les afficher en utilisant un lien Ethernet (TCP, IPv4), je souhaiterais développer cela, avec MPLAB sous Windows

    • Indications pour commencer?

    • Quelle pile TCP / IP utiliser et où le télécharger?

    • Quelle version de MPLAB utiliser)?


    Merci à tous

  2. #2
    Modérateur

    Avatar de Vincent PETIT
    Homme Profil pro
    Consultant en Systèmes Embarqués
    Inscrit en
    Avril 2002
    Messages
    3 187
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Pas de Calais (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Consultant en Systèmes Embarqués
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Avril 2002
    Messages : 3 187
    Points : 11 568
    Points
    11 568
    Par défaut
    Salut,
    http://www.microchip.com/doclisting/...lesByFunc.aspx Colonne Application, filtre sur Ethernet, il y a des exemples de code pour PIC32

    Impossible d'en dire plus car tu ne nous dis même pas le nom de ta démo board, ni le type de PIC32.
    La science ne nous apprend rien : c'est l'expérience qui nous apprend quelque chose.
    Richard Feynman

  3. #3
    Membre régulier
    Homme Profil pro
    Étudiant
    Inscrit en
    Mai 2018
    Messages
    73
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Doubs (Franche Comté)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Mai 2018
    Messages : 73
    Points : 77
    Points
    77
    Par défaut
    Bonjour,
    Je dispose de ce kit (http://www.microchip.com/Development...tional-summary) et pour le type de microcontrôleur, c'est PIC32MX795F512L

  4. #4
    Modérateur

    Avatar de Vincent PETIT
    Homme Profil pro
    Consultant en Systèmes Embarqués
    Inscrit en
    Avril 2002
    Messages
    3 187
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Pas de Calais (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Consultant en Systèmes Embarqués
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Avril 2002
    Messages : 3 187
    Points : 11 568
    Points
    11 568
    Par défaut
    Ok,
    Alors là je ne sais pas trop quoi te dire...
    Tu veux envoyer des trames TCP avec une démoboard prévue pour mettre en oeuvre Ethernet (PIC32 Ethernet Starter Kit), tout tombe bien ! Il suffit juste de lire les documents car ça fait exactement ce que tu veux.

    Mise à part charger les exemples fournies avec la carte et s'en inspirer !? Essaye de prendre "CAN to Ethernet Bridge Demo", charge le programme, et si ça marche (et ça va marcher puisque c'est un programme de démo ) tu vires la partie CAN et tu la remplaces par les données de ta caméra.
    La science ne nous apprend rien : c'est l'expérience qui nous apprend quelque chose.
    Richard Feynman

  5. #5
    Membre régulier
    Homme Profil pro
    Étudiant
    Inscrit en
    Mai 2018
    Messages
    73
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Doubs (Franche Comté)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Mai 2018
    Messages : 73
    Points : 77
    Points
    77
    Par défaut
    Bonjour,

    J'ai essayé votre proposition et en fait, mon projet comme tout les projets et démos s’arrête sur la même erreur qui m’empêche d’avancer, cette erreur est la bibliothèque <plib.h> qui est introuvable et n'est pas reconnue ! voici la grande erreur que m'affiche la construction de la démo "CAN to Ethernet Bridge Demo" :


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
     make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
    make[1]: Entering directory 'C:/CAN to Ethernet Bridge_070811/CAN to Ethernet Bridge/CAN to Ethernet Demo/TCPIP PIC32 CAN TO ETH Demo App/TCPIP PIC32 ETH Demo App-C32.X'
    make  -f nbproject/Makefile-default.mk dist/default/production/TCPIP_PIC32_ETH_Demo_App-C32.X.production.hex
    make[2]: Entering directory 'C:/CAN to Ethernet Bridge_070811/CAN to Ethernet Bridge/CAN to Ethernet Demo/TCPIP PIC32 CAN TO ETH Demo App/TCPIP PIC32 ETH Demo App-C32.X'
    In file included from ../../Microchip/Include/TCPIP Stack/TCPIP.h:59:0,
                     from ../../Microchip/TCPIP Stack/ARP.c:64:
    ../../Microchip/Include/Compiler.h:82:19: fatal error: plib.h: No such file or directory
      #include <plib.h>
                       ^
    compilation terminated.
    In file included from ../TCPIPConfig.h:57:0,
                     from ../CustomHTTPApp.c:56:
    ../../Microchip/Include/Compiler.h:82:19: fatal error: plib.h: No such file or directory
      #include <plib.h>
                       ^
    compilation terminated.
    In file included from ../../Microchip/Include/TCPIP Stack/TCPIP.h:59:0,
                     from ../../Microchip/TCPIP Stack/Delay.c:53:
    ../../Microchip/Include/Compiler.h:82:19: fatal error: plib.h: No such file or directory
      #include <plib.h>
                       ^
    compilation terminated.
    "C:\Program Files\Microchip\xc32\v2.10\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX795F512L -I.. -I../../Microchip/Include "-I../../Microchip/Include/TCPIP Stack" -I. -Wall -MMD -MF build/default/production/_ext/1295770447/ARP.o.d -o build/default/production/_ext/1295770447/ARP.o "../../Microchip/TCPIP Stack/ARP.c" -DXPRJ_default=default -no-legacy-libc 
    nbproject/Makefile-default.mk:527: recipe for target 'build/default/production/_ext/1295770447/ARP.o' failed
    "C:\Program Files\Microchip\xc32\v2.10\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX795F512L -I.. -I../../Microchip/Include "-I../../Microchip/Include/TCPIP Stack" -I. -Wall -MMD -MF build/default/production/_ext/1472/CustomHTTPApp.o.d -o build/default/production/_ext/1472/CustomHTTPApp.o ../CustomHTTPApp.c -DXPRJ_default=default -no-legacy-libc 
    In file included from ../TCPIPConfig.h:57:0,
    nbproject/Makefile-default.mk:509: recipe for target 'build/default/production/_ext/1472/CustomHTTPApp.o' failed
    "C:\Program Files\Microchip\xc32\v2.10\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX795F512L -I.. -I../../Microchip/Include "-I../../Microchip/Include/TCPIP Stack" -I. -Wall -MMD -MF build/default/production/_ext/1295770447/Announce.o.d -o build/default/production/_ext/1295770447/Announce.o "../../Microchip/TCPIP Stack/Announce.c" -DXPRJ_default=default -no-legacy-libc 
    nbproject/Makefile-default.mk:521: recipe for target 'build/default/production/_ext/1295770447/Announce.o' failed
    "C:\Program Files\Microchip\xc32\v2.10\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX795F512L -I.. -I../../Microchip/Include "-I../../Microchip/Include/TCPIP Stack" -I. -Wall -MMD -MF build/default/production/_ext/1295770447/DHCPs.o.d -o build/default/production/_ext/1295770447/DHCPs.o "../../Microchip/TCPIP Stack/DHCPs.c" -DXPRJ_default=default -no-legacy-libc 
    "C:\Program Files\Microchip\xc32\v2.10\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX795F512L -I.. -I../../Microchip/Include "-I../../Microchip/Include/TCPIP Stack" -I. -Wall -MMD -MF build/default/production/_ext/1472/MainDemo.o.d -o build/default/production/_ext/1472/MainDemo.o ../MainDemo.c -DXPRJ_default=default -no-legacy-libc 
    nbproject/Makefile-default.mk:545: recipe for target 'build/default/production/_ext/1295770447/DHCPs.o' failed
    nbproject/Makefile-default.mk:503: recipe for target 'build/default/production/_ext/1472/MainDemo.o' failed
    "C:\Program Files\Microchip\xc32\v2.10\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX795F512L -I.. -I../../Microchip/Include "-I../../Microchip/Include/TCPIP Stack" -I. -Wall -MMD -MF build/default/production/_ext/1295770447/Delay.o.d -o build/default/production/_ext/1295770447/Delay.o "../../Microchip/TCPIP Stack/Delay.c" -DXPRJ_default=default -no-legacy-libc 
    "C:\Program Files\Microchip\xc32\v2.10\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX795F512L -I.. -I../../Microchip/Include "-I../../Microchip/Include/TCPIP Stack" -I. -Wall -MMD -MF build/default/production/_ext/1295770447/DHCP.o.d -o build/default/production/_ext/1295770447/DHCP.o "../../Microchip/TCPIP Stack/DHCP.c" -DXPRJ_default=default -no-legacy-libc 
    nbproject/Makefile-default.mk:533: recipe for target 'build/default/production/_ext/1295770447/Delay.o' failed
    nbproject/Makefile-default.mk:539: recipe for target 'build/default/production/_ext/1295770447/DHCP.o' failed
                     from ../../Microchip/TCPIP Stack/DHCPs.c:58:
    ../../Microchip/Include/Compiler.h:82:19: fatal error: plib.h: No such file or directory
    "C:\Program Files\Microchip\xc32\v2.10\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX795F512L -I.. -I../../Microchip/Include "-I../../Microchip/Include/TCPIP Stack" -I. -Wall -MMD -MF build/default/production/_ext/1295770447/UDPPerformanceTest.o.d -o build/default/production/_ext/1295770447/UDPPerformanceTest.o "../../Microchip/TCPIP Stack/UDPPerformanceTest.c" -DXPRJ_default=default -no-legacy-libc 
    nbproject/Makefile-default.mk:515: recipe for target 'build/default/production/_ext/1295770447/UDPPerformanceTest.o' failed
    make[2]: Leaving directory 'C:/CAN to Ethernet Bridge_070811/CAN to Ethernet Bridge/CAN to Ethernet Demo/TCPIP PIC32 CAN TO ETH Demo App/TCPIP PIC32 ETH Demo App-C32.X'
    nbproject/Makefile-default.mk:90: recipe for target '.build-conf' failed
    make[1]: Leaving directory 'C:/CAN to Ethernet Bridge_070811/CAN to Ethernet Bridge/CAN to Ethernet Demo/TCPIP PIC32 CAN TO ETH Demo App/TCPIP PIC32 ETH Demo App-C32.X'
      #include <plib.h>
                       ^
    compilation terminated.
    In file included from ../TCPIPConfig.h:57:0,
                     from ../../Microchip/TCPIP Stack/Announce.c:61:
    ../../Microchip/Include/Compiler.h:82:19: fatal error: plib.h: No such file or directory
      #include <plib.h>
                       ^
    compilation terminated.
    In file included from ../../Microchip/Include/TCPIP Stack/TCPIP.h:59:0,
                     from ../MainDemo.c:94:
    ../../Microchip/Include/Compiler.h:82:19: fatal error: plib.h: No such file or directory
      #include <plib.h>
                       ^
    compilation terminated.
    make[2]: *** [build/default/production/_ext/1295770447/ARP.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    make[2]: *** [build/default/production/_ext/1472/CustomHTTPApp.o] Error 1
    make[2]: *** [build/default/production/_ext/1295770447/Announce.o] Error 1
    In file included from ../TCPIPConfig.h:57:0,
                     from ../../Microchip/TCPIP Stack/UDPPerformanceTest.c:56:
    ../../Microchip/Include/Compiler.h:82:19: fatal error: plib.h: No such file or directory
      #include <plib.h>
                       ^
    compilation terminated.
    In file included from ../TCPIPConfig.h:57:0,
                     from ../../Microchip/TCPIP Stack/DHCP.c:85:
    ../../Microchip/Include/Compiler.h:82:19: fatal error: plib.h: No such file or directory
      #include <plib.h>
                       ^
    compilation terminated.
    make[2]: *** [build/default/production/_ext/1295770447/DHCPs.o] Error 1
    make[2]: *** [build/default/production/_ext/1472/MainDemo.o] Error 1
    make[2]: *** [build/default/production/_ext/1295770447/Delay.o] Error 1
    make[2]: *** [build/default/production/_ext/1295770447/DHCP.o] Error 1
    make[2]: *** [build/default/production/_ext/1295770447/UDPPerformanceTest.o] Error 1
    make[1]: *** [.build-conf] Error 2
    nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
    make: *** [.build-impl] Error 2
    
    BUILD FAILED (exit value 2, total time: 7s)
    Je vous remercie

  6. #6
    Modérateur

    Avatar de Vincent PETIT
    Homme Profil pro
    Consultant en Systèmes Embarqués
    Inscrit en
    Avril 2002
    Messages
    3 187
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Pas de Calais (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Consultant en Systèmes Embarqués
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Avril 2002
    Messages : 3 187
    Points : 11 568
    Points
    11 568
    Par défaut
    Microchip fournie des exemples bancals maintenant ? Visiblement tu n'es pas le seul a avoir ce problème.

    Je suis désolé mais je ne vais pas pouvoir t'aider, je n'ai pas de PIC32 sous la main et je n'utilise plus MPLAB depuis plus de 15 ans. De mon temps on installait MPLAB, on compilait les programmes d'exemples pour ça démoboard et ça fonctionnait (aujourd'hui s'il faut commencer a rafistoler le truc, c'est pas la peine.....)

    Bon courage !
    La science ne nous apprend rien : c'est l'expérience qui nous apprend quelque chose.
    Richard Feynman

Discussions similaires

  1. Envoi reception trame avec un Module CAN/USB
    Par laoualb dans le forum Embarqué
    Réponses: 2
    Dernier message: 07/03/2014, 10h56
  2. Lecture et envoie de trames ethernet en python
    Par olivierguzzi dans le forum Réseau/Web
    Réponses: 0
    Dernier message: 19/05/2013, 16h24
  3. envoi d'une trame via rs232 avec SOH CR LF
    Par tibjedi dans le forum C
    Réponses: 4
    Dernier message: 24/04/2013, 14h06
  4. Envoie d'une trame (en octet)
    Par clem80 dans le forum MATLAB
    Réponses: 0
    Dernier message: 20/04/2011, 14h06
  5. Envoie de plusieurs octets avec un Serialport
    Par hunteshiva dans le forum VB.NET
    Réponses: 7
    Dernier message: 09/04/2010, 14h32

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo