NXT Community
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.


Le forum de la communauté WikiNXT.
 
AccueilPortailRechercherDernières imagesS'enregistrerConnexion
Le Deal du moment :
Réassort du coffret Pokémon 151 ...
Voir le deal

 

 USB et NBC

Aller en bas 
2 participants
AuteurMessage
manawy
Grand Maître
Grand Maître
manawy


Nombre de messages : 243
Age : 36
Localisation : Morbihan(56)
Date d'inscription : 02/01/2008

USB et NBC Empty
MessageSujet: USB et NBC   USB et NBC Icon_minitimeSam 5 Avr - 15:51

/!\ Oyez oyez braves gens, une grande nouvelle vient d'arriver /!\

Le compilateur nbc est désormais capable de transférer tout seul ses fichiers sur la brique !

Il suffit désormais de taper dans sa console ;

Code:
$ nbc -S=usb bonjour.nxc
Pour compiler et uploader le fichier bonjour.nxc sur sa brique !

Bien sur quelques petites manipulations sont nécessaires, elles sont décrites sur un topic de nxtasy.org


La liaison bluetooth est bien sûr elle aussi utilisable !

Toutes les options de nbc version b35 :
Code:
[manawy@cafeline sources]$ nbc -help
Next Byte Codes Compiler version 1.0.1.b35 (1.0.1.35, built Wed Apr 2 21:09:33 CDT 2008)
    Copyright (c) 2006, John Hansen
Syntax: nbc [options] filename [options]

  -S=<portname>: specify port name (COMn or usb), resource name, or alias
  -BT: use bluetooth
  -d: download program
  -b: treat input file as a binary file (don't compile it)
  -q: quiet
  -n: prevent the system file from being included
  -D=<sym>[=<value>]: define macro <sym>
  -x: decompile program
  -Z[1|2]: turn on compiler optimizations
  -O=<outfile> : specify output file
  -E=<filename> : write compiler errors to <filename>
  -I=<path>: search <path> for include files
  -nbc=<filename> : save NXC intermediate NBC code to <filename>
  -L=<filename> : generate code listing to <filename>
  -Y=<filename> : generate symbol table to <filename>
  -w[-|+] : warnings off or on [default is off]
  -EF : enhanced firmware
  -safecall: NXC will wrap all function calls in Acquire/Release
  -api: dump the API to stdout
  -help : display command line options

Notons la possibilité de ne pas compiler un fichier aussi !

De plus NeXTTool, un utilitaire pour sa brique a été porté sous linux ! Très pratique et très complet.

Les options de NeXTTool
Code:
[manawy@cafeline sources]$ ./NeXTTool -help
nexttool version 1.0.1.0 (1.0.1.0, built Wed Apr 2 21:05:52 CDT 2008)
    Copyright (c) 2006, John Hansen
Usage: NeXTTool [options] [actions]
Options:
  /COM=port: specify port name (COMn, usb, resource string, or alias)
  /BT[=name]: use bluetooth (selects the first brick found or the named brick)
  /HEX: use hexidecimal for numeric output
  /Duration=<n>: specify the tone duration for the playtone action
  /Inbox=<n>: use inbox number n when sending or reading a message
  /Loop: loop when playing sound files
  /Relative: reset output position relative
  /Empty: empty mailbox when reading
  /Bin[=filename]: dump data output as binary to a file (nxt.bin)
Actions:
  -init : initialize nxt.dat file
  -listbricks : list resource names of all found NXT bricks
  -clear : erase all items on the brick
  -battery : return the battery level
  -input=<N> : read input N (0-3)
  -output=<N> : read the status of output N (0-2)
  -mute : stop playing sounds
  -playtone=<frequency> : play a tone for the specified duration
  -run=<filename> : run the specified program
  -runningprogram : return the name of the currently running program
  -stop : stop the currently running program
  -playfile=<filename> : play the specified sound file
  -firmware=<filename> : download firmware
  -download=<filename> : download the specified file to the NXT
  -upload[=<pattern>] : upload the specified file(s) from the NXT (or *.*)
  -listfiles[=<pattern>] : list the files matching the pattern (or *.*)
  -listmodules[=<pattern>] : list the modules matching the pattern (or *.*)
  -delete=<filename> : delete the specified file from the NXT
  -datalog | -datalog_full: upload datalog (_full == verbose)
  -eeprom=<n> | -eeprom_full: upload eeprom block (_full == all blocks)
  -memory=<n> | -memory_full: upload 128 bytes of memory (_full == all memory)
  -map: upload memory map
  -keepalive : return the current sleep time limit
  -sleep=<timeout> : set NXT sleep timeout (in minutes)
  -msg=<string> : send the specified message to the NXT
  -readmsg=<box> : read the message from the specified box
  -resetoutputposition=<port> : reset the position for the specified port
  -resetinputsv=<port> : reset the input scaled value for the specified port
  -setname=<new_name> : set the name of the NXT
  -getname : return the name of the NXT
  -versions : return the NXT firmware and protocol versions
  -deviceinfo : return all NXT device information
  -freemem : return the amount of free memory
  -lsstatus=<port> : return the low speed status for the specified port
  -boot : reset the NXT into SAMBA mode (usb only)
  -btreset : reset the NXT bluetooth to factory settings (usb only)
  -defrag : defragment the NXT filesystem
General:
  -help : display command line options

Notons parmi ces options : -defrag, qui permet de défragmenter sa brique. Options que je n'ai vu nulle part ailleurs sous GNU/Linux

Dès que je peux je traduit les instructions et je les mets ici !


A quand Bricxcc sous GNU/linux ? :-)
Revenir en haut Aller en bas
gtkshroom
Admin
Admin
gtkshroom


Nombre de messages : 238
Age : 32
Localisation : France/Moselle(57)
Date d'inscription : 03/11/2007

USB et NBC Empty
MessageSujet: Re: USB et NBC   USB et NBC Icon_minitimeSam 5 Avr - 21:29

Hop, je file tout de suite la prendre! Langue
Pourrais tu me passer l'archive utils.zip de J. Hansen, je ne suis pas inscrit sur nxtasy.org...
Revenir en haut Aller en bas
http://louis.scheidt.free.fr/wiki/
manawy
Grand Maître
Grand Maître
manawy


Nombre de messages : 243
Age : 36
Localisation : Morbihan(56)
Date d'inscription : 02/01/2008

USB et NBC Empty
MessageSujet: Re: USB et NBC   USB et NBC Icon_minitimeLun 7 Avr - 9:46

oki, faut que je la reprenne suur mon ordi, et je te l'envoie dès qu eje peux ;-)
Revenir en haut Aller en bas
gtkshroom
Admin
Admin
gtkshroom


Nombre de messages : 238
Age : 32
Localisation : France/Moselle(57)
Date d'inscription : 03/11/2007

USB et NBC Empty
MessageSujet: Re: USB et NBC   USB et NBC Icon_minitimeMer 9 Avr - 21:14

manawy a écrit:
oki, faut que je la reprenne suur mon ordi, et je te l'envoie dès qu eje peux ;-)

Merki! Wink
Revenir en haut Aller en bas
http://louis.scheidt.free.fr/wiki/
Contenu sponsorisé





USB et NBC Empty
MessageSujet: Re: USB et NBC   USB et NBC Icon_minitime

Revenir en haut Aller en bas
 
USB et NBC
Revenir en haut 
Page 1 sur 1

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
NXT Community :: Général :: Blog-
Sauter vers:  
Ne ratez plus aucun deal !
Abonnez-vous pour recevoir par notification une sélection des meilleurs deals chaque jour.
IgnorerAutoriser