Example to Blink LED on VSC

Hi there,and welcome to 'our Party…
OMG Why … LOL :face_with_hand_over_mouth:
Better to do it in Arduino and use the DISassembler .a.k.a “the washing machine” LOL :grin:
takes me back, to my Z80,8086 and 68020 days. WOW
You have to make sure to use the register offsets as you can’t write to the middle… 16Bits or 32, or 64… :face_with_peeking_eye:
also for LED Espressif used on the devbrd is a RGB LED is connected through GPIO8, but it mentioned that it is addressable RGB LED . So I assume it wont work with simple GPIO output, unlike the Xiao.

I see this;

  1 .equ GPIO_OUTPUT_REG, 0x60091005
  2 .equ GPIO_SEL8, 0x60091574
  3  
  4 .section .iram_loader.text
  5 .globl call_start_cpu0
  6  
  7 call_start_cpu0:
  8  
  9     li    a0, GPIO_SEL8
 10     li    a1, 0x80
 11     sb    a1, 0(a0)
 12  
 13     li    a0, GPIO_OUTPUT_REG
 14     li    a1, 1 
 15     sb    a1, 0(a0)
 16  
 17     j halt
 18  
 19  
 20 halt: j halt
 21 
Thanks to gcantor8 :+1:

Keep in mind if you use the Washing machine , you’ll get some overhead code from the IDE…FYI
After it compiled RUN:

esptool.py --chip esp32c6 elf2image blink.elf --output blink.bin
flash it to the chip. (you may need to save it as a “.S” to flash.) ie. assembler

You’ll need to use and read the 7.5.3 section in the ESP32-C6 Technical Reference Manual.

HTH
GL :slight_smile: PJ
:v:
FYI , you may need a plugin for Visual Studio Code too.