/!\ 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 ? :-)