{"id":5734,"date":"2025-12-11T09:54:01","date_gmt":"2025-12-11T08:54:01","guid":{"rendered":"https:\/\/workboot.fr\/ciela\/?page_id=5734"},"modified":"2025-12-11T16:43:47","modified_gmt":"2025-12-11T15:43:47","slug":"led-rouge-blink","status":"publish","type":"page","link":"https:\/\/workboot.fr\/ciela\/led-rouge-blink\/","title":{"rendered":"LED ROUGE Blink"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Archive des codes : <a href=\"https:\/\/workboot.fr\/Download\/longan\/\">longan_leds.tar<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">led_rouge, led_verte, led_bleue, led_blanche<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Le longan Nano est un Risc V 32<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Installation de base :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Compilateur RISC-V et outils\nsudo apt update\nsudo apt install gcc-riscv64-unknown-elf  # Le compilateur principal\nsudo apt install binutils-riscv64-unknown-elf  # Outils suppl\u00e9mentaires<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Outils g\u00e9n\u00e9raux\nsudo apt install build-essential  # make, gcc, etc.\nsudo apt install make             # Si pas d\u00e9j\u00e0 install\u00e9\nsudo apt install git              # Pour cloner des projets\n\n# Pour flasher le Longan Nano\nsudo apt install dfu-util         # Outil de flash DFU\n\n# Outils d'analyse\nsudo apt install binutils         # objdump, objcopy, etc.<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>#en r\u00e9sum\u00e9 !\nsudo apt update &amp;&amp; sudo apt install -y \\\n    gcc-riscv64-unknown-elf \\\n    binutils-riscv64-unknown-elf \\\n    build-essential \\\n    make \\\n    dfu-util \\\n    git \\\n    device-tree-compiler<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Ajoute ton utilisateur aux groupes n\u00e9cessaires\nsudo usermod -a -G dialout $USER\nsudo usermod -a -G plugdev $USER\n\n# D\u00e9connecte-toi et reconnecte-toi pour que les changements prennent effet\n# Ou ex\u00e9cute :\nnewgrp dialout<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">led_blink.c<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"c\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/* led_blink_simple.c - \u00c7a marche ! *\/\n\nint main(void) {\n    \/* Active GPIOC *\/\n    *(volatile unsigned int*)0x40021018 |= (1 &lt;&lt; 4);\n    \n    \/* Configure PC13 *\/\n    volatile unsigned int *CRH = (volatile unsigned int*)0x40011004;\n    *CRH = (*CRH &amp; ~(0xF &lt;&lt; 20)) | (0x1 &lt;&lt; 20);\n    \n    volatile unsigned int *ODR = (volatile unsigned int*)0x4001100C;\n    \n    while(1) {\n        \/* LED ON *\/\n        *ODR &amp;= ~(1 &lt;&lt; 13);\n        \n        \/* D\u00e9lai *\/\n        for(volatile unsigned int i = 0; i &lt; 1000000; i++);\n        \n        \/* LED OFF *\/\n        *ODR |= (1 &lt;&lt; 13);\n        \n        \/* D\u00e9lai *\/\n        for(volatile unsigned int i = 0; i &lt; 1000000; i++);\n    }\n}\n\nvoid _start(void) {\n    asm volatile(\"la sp, 0x20005000\");\n    main();\n    while(1);\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">gd32vf103.lds<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/* Fichier de liaison pour Longan Nano *\/\n\nENTRY(_start)\n\nMEMORY {\n    FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 64K\n    RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 20K\n}\n\nSECTIONS {\n    .text : {\n        *(.text._start)\n        *(.text)\n        *(.text.*)\n    } > FLASH\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Makefille<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">PROGRAM = led_blink\n\nCC = riscv64-unknown-elf-gcc\nOBJCOPY = riscv64-unknown-elf-objcopy\n\n# IMPORTANT: O0 d\u00e9sactive les optimisations pour pr\u00e9server les boucles de d\u00e9lai\nCFLAGS = -march=rv32imac -mabi=ilp32 -nostdlib -O0 -Wall\nLDFLAGS = -T gd32vf103.lds -Wl,--gc-sections\n\nall: $(PROGRAM).bin\n\n$(PROGRAM).elf: $(PROGRAM).c gd32vf103.lds\n\t$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $&lt;\n\n$(PROGRAM).bin: $(PROGRAM).elf\n\t$(OBJCOPY) -O binary $&lt; $@\n\t@echo \"\u2705 $(PROGRAM).bin cr\u00e9\u00e9 - Taille: $$(stat -c%s $@) octets\"\n\t@echo \"\ud83d\udd0d V\u00e9rification:\"\n\t@riscv64-unknown-elf-size $&lt;\n\nclean:\n\trm -f $(PROGRAM).elf $(PROGRAM).bin\n\nflash: $(PROGRAM).bin\n\t@echo \"\ud83d\udd0c Mode DFU: BOOT+RESET\"\n\t@echo \"\u26a1 Flash...\"\n\tdfu-util -d 28e9:0189 -a 0 --dfuse-address 0x08000000:leave -D $(PROGRAM).bin\n\n# Pour tester rapidement\ntest: clean all flash\n\t@echo \"\ud83d\udc41\ufe0f  La LED rouge devrait clignoter!\"\n\n.PHONY: all clean flash test<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Archive des codes : longan_leds.tar led_rouge, led_verte, led_bleue, led_blanche Le longan Nano est un Risc V 32 Installation de base : led_blink.c gd32vf103.lds Makefille<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","_uag_custom_page_level_css":"","footnotes":""},"class_list":["post-5734","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>LED ROUGE Blink - workboot<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/workboot.fr\/ciela\/led-rouge-blink\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"LED ROUGE Blink - workboot\" \/>\n<meta property=\"og:description\" content=\"Archive des codes : longan_leds.tar led_rouge, led_verte, led_bleue, led_blanche Le longan Nano est un Risc V 32 Installation de base : led_blink.c gd32vf103.lds Makefille\" \/>\n<meta property=\"og:url\" content=\"https:\/\/workboot.fr\/ciela\/led-rouge-blink\/\" \/>\n<meta property=\"og:site_name\" content=\"workboot\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-11T15:43:47+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/led-rouge-blink\\\/\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/led-rouge-blink\\\/\",\"name\":\"LED ROUGE Blink - workboot\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#website\"},\"datePublished\":\"2025-12-11T08:54:01+00:00\",\"dateModified\":\"2025-12-11T15:43:47+00:00\",\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/workboot.fr\\\/ciela\\\/led-rouge-blink\\\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#website\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/\",\"name\":\"workboot\",\"description\":\"Open Source, Open Minds \",\"publisher\":{\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#organization\",\"name\":\"workboot\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/logo_ciel-dorian-1.png\",\"contentUrl\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/logo_ciel-dorian-1.png\",\"width\":1024,\"height\":950,\"caption\":\"workboot\"},\"image\":{\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"LED ROUGE Blink - workboot","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/workboot.fr\/ciela\/led-rouge-blink\/","og_locale":"fr_FR","og_type":"article","og_title":"LED ROUGE Blink - workboot","og_description":"Archive des codes : longan_leds.tar led_rouge, led_verte, led_bleue, led_blanche Le longan Nano est un Risc V 32 Installation de base : led_blink.c gd32vf103.lds Makefille","og_url":"https:\/\/workboot.fr\/ciela\/led-rouge-blink\/","og_site_name":"workboot","article_modified_time":"2025-12-11T15:43:47+00:00","twitter_misc":{"Dur\u00e9e de lecture estim\u00e9e":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/workboot.fr\/ciela\/led-rouge-blink\/","url":"https:\/\/workboot.fr\/ciela\/led-rouge-blink\/","name":"LED ROUGE Blink - workboot","isPartOf":{"@id":"https:\/\/workboot.fr\/ciela\/#website"},"datePublished":"2025-12-11T08:54:01+00:00","dateModified":"2025-12-11T15:43:47+00:00","inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/workboot.fr\/ciela\/led-rouge-blink\/"]}]},{"@type":"WebSite","@id":"https:\/\/workboot.fr\/ciela\/#website","url":"https:\/\/workboot.fr\/ciela\/","name":"workboot","description":"Open Source, Open Minds ","publisher":{"@id":"https:\/\/workboot.fr\/ciela\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/workboot.fr\/ciela\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/workboot.fr\/ciela\/#organization","name":"workboot","url":"https:\/\/workboot.fr\/ciela\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/workboot.fr\/ciela\/#\/schema\/logo\/image\/","url":"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2025\/05\/logo_ciel-dorian-1.png","contentUrl":"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2025\/05\/logo_ciel-dorian-1.png","width":1024,"height":950,"caption":"workboot"},"image":{"@id":"https:\/\/workboot.fr\/ciela\/#\/schema\/logo\/image\/"}}]}},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"admin","author_link":"https:\/\/workboot.fr\/ciela\/author\/admin\/"},"uagb_comment_info":0,"uagb_excerpt":"Archive des codes : longan_leds.tar led_rouge, led_verte, led_bleue, led_blanche Le longan Nano est un Risc V 32 Installation de base : led_blink.c gd32vf103.lds Makefille","_links":{"self":[{"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/pages\/5734","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/comments?post=5734"}],"version-history":[{"count":8,"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/pages\/5734\/revisions"}],"predecessor-version":[{"id":5772,"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/pages\/5734\/revisions\/5772"}],"wp:attachment":[{"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/media?parent=5734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}