{"id":5274,"date":"2022-10-24T13:25:03","date_gmt":"2022-10-24T11:25:03","guid":{"rendered":"https:\/\/entropie.org\/3615\/?p=5274"},"modified":"2022-10-24T23:15:35","modified_gmt":"2022-10-24T21:15:35","slug":"nxc-et-geany-sous-debian-11","status":"publish","type":"post","link":"https:\/\/entropie.org\/3615\/index.php\/2022\/10\/24\/nxc-et-geany-sous-debian-11\/","title":{"rendered":"NXC et Geany sous Debian 11"},"content":{"rendered":"<p><a href=\"http:\/\/bricxcc.sourceforge.net\/nbc\/\" rel=\"noopener\" target=\"_blank\">NXC<\/a> est un langage de programmation sp\u00e9cifique au robot Lego Mindstorms NXT. Il est bas\u00e9 sur le NBC, un langage assembleur.<\/p>\n<p>Dans la console :<br \/>\n<em>sudo apt-get install nbc<\/em><\/p>\n<p>On va param\u00e9trer Geany pour pouvoir compiler aussi bien des fichiers nxc que nbc. De plus on se basera sur la coloration syntaxique du langage C.<\/p>\n<p><a href=\"https:\/\/entropie.org\/3615\/wp-content\/uploads\/2022\/10\/NXC.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/entropie.org\/3615\/wp-content\/uploads\/2022\/10\/NXC.png\" alt=\"\" width=\"833\" height=\"609\" class=\"alignnone size-full wp-image-5287\" srcset=\"https:\/\/entropie.org\/3615\/wp-content\/uploads\/2022\/10\/NXC.png 833w, https:\/\/entropie.org\/3615\/wp-content\/uploads\/2022\/10\/NXC-300x219.png 300w, https:\/\/entropie.org\/3615\/wp-content\/uploads\/2022\/10\/NXC-768x561.png 768w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a><\/p>\n<p>Dans ~\/.config\/geany, modifier le fichier filetype_extensions.conf :<\/p>\n<pre>\r\n#~ # Filetype extension configuration file for Geany\r\n#~ # Insert as many items as you want, separate them with a \";\".\r\n#~ # See Geany's main documentation for details.\r\n[Extensions]\r\nNXC=*.nxc;*.nbc;\r\n<\/pre>\n<p>Dans ~\/.config\/geany\/filedefs, cr\u00e9er un fichier filetypes.NXC.conf :<\/p>\n<pre>\r\n# For complete documentation of this file, please see Geany's main documentation\r\n\r\n[styling=C]\r\n\r\n[keywords=C]\r\n\r\n[lexer_properties=C]\r\n\r\n[settings]\r\nlexer_filetype=C\r\n\r\n# default extension used when saving files\r\nextension=nxc\r\n\r\n# single comments, like # in this file\r\ncomment_single=\/\/\r\n# multiline comments\r\ncomment_open=\/*\r\ncomment_close=*\/\r\n\r\n[indentation]\r\nwidth=2\r\n# 0 is spaces, 1 is tabs, 2 is tab & spaces\r\ntype=0\r\n\r\n[build-menu]\r\n# %f will be replaced by the complete filename\r\n# %e will be replaced by the filename without extension\r\n# (use only one of it at one time)\r\nFT_00_LB=V\u00e9rifier \/ Compiler\r\nFT_00_CM=nbc %e.n*c\r\nFT_00_WD=\r\nFT_01_LB=T\u00e9l\u00e9verser\r\nFT_01_CM=nbc -S=usb -d %e.n*c\r\nFT_01_WD=\r\nFT_02_LB=\r\nFT_02_CM=\r\nFT_02_WD=\r\nEX_00_LB=\r\nEX_00_CM=\r\nEX_00_WD=\r\n\r\n<\/pre>\n<p>Dans ~\/.config\/geany\/templates\/files, cr\u00e9er un fichier program.nxc :<\/p>\n<pre>\r\n\/\/ Lego Mindstorms NXT\r\n<\/pre>\n<p>Enregistrer les fichiers sources au format nxc, puis compiler (touche F8). Le t\u00e9l\u00e9versement sur la brique NXT se fait avec la touche F9 (ne pas oublier de v\u00e9rifier que la brique NXT est allum\u00e9e, sinon Geany indique \u00ab\u00a0Compilation \u00e9chou\u00e9e\u00a0\u00bb).<\/p>\n<p><u>Remarque<\/u> : Depuis que j&rsquo;ai mis \u00e0 jour Debian, le tiret bas (du 8) ne s&rsquo;affiche plus dans Geany. La solution est de modifier la police de caract\u00e8res dans \u00c9diter > Pr\u00e9f\u00e9rences > Interface > Polices \u00c9diteur (par exemple Liberation Mono Regular \u00e0 la place de Monospace Regular).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NXC est un langage de programmation sp\u00e9cifique au robot Lego Mindstorms NXT. Il est bas\u00e9 sur le NBC, un langage assembleur. Dans la console : sudo apt-get install nbc On va param\u00e9trer Geany pour pouvoir compiler aussi bien des fichiers nxc que nbc. De plus on se basera sur la coloration syntaxique du langage C. &hellip; <a href=\"https:\/\/entropie.org\/3615\/index.php\/2022\/10\/24\/nxc-et-geany-sous-debian-11\/\" class=\"more-link\">Continuer la lecture<span class=\"screen-reader-text\"> de &laquo;&nbsp;NXC et Geany sous Debian 11&nbsp;&raquo;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,28,25,5],"tags":[],"class_list":["post-5274","post","type-post","status-publish","format-standard","hentry","category-debian","category-installation","category-lego-mindstorms-nxt","category-tutoriels"],"_links":{"self":[{"href":"https:\/\/entropie.org\/3615\/index.php\/wp-json\/wp\/v2\/posts\/5274"}],"collection":[{"href":"https:\/\/entropie.org\/3615\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/entropie.org\/3615\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/entropie.org\/3615\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/entropie.org\/3615\/index.php\/wp-json\/wp\/v2\/comments?post=5274"}],"version-history":[{"count":21,"href":"https:\/\/entropie.org\/3615\/index.php\/wp-json\/wp\/v2\/posts\/5274\/revisions"}],"predecessor-version":[{"id":5297,"href":"https:\/\/entropie.org\/3615\/index.php\/wp-json\/wp\/v2\/posts\/5274\/revisions\/5297"}],"wp:attachment":[{"href":"https:\/\/entropie.org\/3615\/index.php\/wp-json\/wp\/v2\/media?parent=5274"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/entropie.org\/3615\/index.php\/wp-json\/wp\/v2\/categories?post=5274"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/entropie.org\/3615\/index.php\/wp-json\/wp\/v2\/tags?post=5274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}