Added NanoC6 Infos and Board definition

This commit is contained in:
atc1441
2023-10-12 17:20:42 +02:00
parent 06f3a5d524
commit 26598fc408
13 changed files with 21899 additions and 21454 deletions

View File

@@ -1,281 +0,0 @@
TRACE +0.008 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=00100040
TRACE +0.000 Write 14 bytes: c0000a04000000000000100040c0
TRACE +0.002 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010a04006f80e02c00000000c0
TRACE +0.000 Received full packet: 010a04006f80e02c00000000
Detecting chip type...
TRACE +0.000 command op=0x14 data len=0 wait_response=1 timeout=3.000 data=
TRACE +0.000 Write 10 bytes: c00014000000000000c0
TRACE +0.008 Read 1 bytes: c0
TRACE +0.000 Read 33 bytes:
011418006f80e02c 0000000000000000 | ....o..,........
0000000c0d000000 0000000000000000 | ................
c0 | .
TRACE +0.000 Received full packet:
011418006f80e02c 0000000000000000 | ....o..,........
0000000c0d000000 0000000000000000 | ................
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=80f58740
TRACE +0.000 Write 14 bytes: c0000a04000000000080f58740c0
TRACE +0.002 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010a04000000000000000000c0
TRACE +0.000 Received full packet: 010a04000000000000000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=50080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000050080b60c0
TRACE +0.000 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010a04000000000800000000c0
TRACE +0.000 Received full packet: 010a04000000000800000000
TRACE +0.008 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=50080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000050080b60c0
TRACE +0.002 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010a04000000000800000000c0
TRACE +0.000 Received full packet: 010a04000000000800000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=50080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000050080b60c0
TRACE +0.000 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010a04000000000800000000c0
TRACE +0.000 Received full packet: 010a04000000000800000000
Chip is ESP32-C6 (QFN40) (revision v0.0)
Features: WiFi 6, BT 5, IEEE802.15.4
Crystal is 40MHz
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=44080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000044080b60c0
TRACE +0.010 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010a0400e85342ca00000000c0
TRACE +0.000 Received full packet: 010a0400e85342ca00000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=48080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000048080b60c0
TRACE +0.000 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010a04004c40feff00000000c0
TRACE +0.000 Received full packet: 010a04004c40feff00000000
MAC: 40:4c:ca:ff:fe:42:53:e8
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=44080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000044080b60c0
TRACE +0.008 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010a0400e85342ca00000000c0
TRACE +0.000 Received full packet: 010a0400e85342ca00000000
TRACE +0.002 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=48080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000048080b60c0
TRACE +0.000 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010a04004c40feff00000000c0
TRACE +0.000 Received full packet: 010a04004c40feff00000000
BASE MAC: 40:4c:ca:42:53:e8
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=44080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000044080b60c0
TRACE +0.008 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010a0400e85342ca00000000c0
TRACE +0.000 Received full packet: 010a0400e85342ca00000000
!!! TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=48080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000048080b60c0
TRACE +0.002 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010a04004c40feff00000000c0
TRACE +0.000 Received full packet: 010a04004c40feff00000000
MAC_EXT: ff:fe
Enabling default SPI flash mode...
!!!! TRACE +0.000 command op=0x0d data len=8 wait_response=1 timeout=3.000 data=0000000000000000
TRACE +0.000 Write 18 bytes:
c0000d0800000000 0000000000000000 | ................
00c0 | ..
TRACE +0.000 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010d04004c40feff00000000c0
TRACE +0.000 Received full packet: 010d04004c40feff00000000
v TRACE +0.008 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=18300060
TRACE +0.000 Write 14 bytes: c0000a04000000000018300060c0
TRACE +0.002 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010a04000000008000000000c0
TRACE +0.000 Received full packet: 010a04000000008000000000
v TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=20300060
TRACE +0.000 Write 14 bytes: c0000a04000000000020300060c0
TRACE +0.000 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010a04000000007000000000c0
TRACE +0.000 Received full packet: 010a04000000007000000000
v TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=2830006017000000ffffffff00000000
TRACE +0.000 Write 26 bytes:
c000091000000000 0028300060170000 | .........(0.`...
00ffffffff000000 00c0 | ..........
TRACE +0.010 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010904000000007000000000c0
TRACE +0.000 Received full packet: 010904000000007000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=1830006000000090ffffffff00000000
TRACE +0.000 Write 26 bytes:
c000091000000000 0018300060000000 | ..........0.`...
90ffffffff000000 00c0 | ..........
TRACE +0.000 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010904000000007000000000c0
TRACE +0.000 Received full packet: 010904000000007000000000
TRACE +0.008 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=203000609f000070ffffffff00000000
TRACE +0.000 Write 26 bytes:
c000091000000000 00203000609f0000 | ......... 0.`...
70ffffffff000000 00c0 | p.........
TRACE +0.002 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010904000000007000000000c0
TRACE +0.000 Received full packet: 010904000000007000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=5830006000000000ffffffff00000000
TRACE +0.000 Write 26 bytes:
c000091000000000 0058300060000000 | .........X0.`...
00ffffffff000000 00c0 | ..........
TRACE +0.008 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010904000000007000000000c0
TRACE +0.000 Received full packet: 010904000000007000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=0030006000000400ffffffff00000000
TRACE +0.000 Write 26 bytes:
c000091000000000 0000300060000004 | ..........0.`...
00ffffffff000000 00c0 | ..........
TRACE +0.002 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010904000000007000000000c0
TRACE +0.000 Received full packet: 010904000000007000000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=00300060
TRACE +0.000 Write 14 bytes: c0000a04000000000000300060c0
TRACE +0.008 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010a04000000000000000000c0
TRACE +0.000 Received full packet: 010a04000000000000000000
!!! TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=58300060
TRACE +0.000 Write 14 bytes: c0000a04000000000058300060c0
TRACE +0.002 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010a0400c840170000000000c0
TRACE +0.000 Received full packet: 010a0400c840170000000000
!!! TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=1830006000000080ffffffff00000000
TRACE +0.000 Write 26 bytes:
c000091000000000 0018300060000000 | ..........0.`...
80ffffffff000000 00c0 | ..........
TRACE +0.000 Read 1 bytes: c0
TRACE +0.008 Read 13 bytes: 01090400c840170000000000c0
TRACE +0.000 Received full packet: 01090400c840170000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=2030006000000070ffffffff00000000
TRACE +0.000 Write 26 bytes:
c000091000000000 0020300060000000 | ......... 0.`...
70ffffffff000000 00c0 | p.........
TRACE +0.002 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 01090400c840170000000000c0
TRACE +0.000 Received full packet: 01090400c840170000000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=18300060
TRACE +0.000 Write 14 bytes: c0000a04000000000018300060c0
TRACE +0.008 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010a04000000008000000000c0
TRACE +0.000 Received full packet: 010a04000000008000000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=20300060
TRACE +0.000 Write 14 bytes: c0000a04000000000020300060c0
TRACE +0.002 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010a04000000007000000000c0
TRACE +0.000 Received full packet: 010a04000000007000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=2830006007000000ffffffff00000000
TRACE +0.000 Write 26 bytes:
c000091000000000 0028300060070000 | .........(0.`...
00ffffffff000000 00c0 | ..........
TRACE +0.008 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010904000000007000000000c0
TRACE +0.000 Received full packet: 010904000000007000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=1c3000600700005cffffffff00000000
TRACE +0.000 Write 26 bytes:
c000091000000000 001c300060070000 | ..........0.`...
5cffffffff000000 00c0 | \.........
TRACE +0.002 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010904000000007000000000c0
TRACE +0.000 Received full packet: 010904000000007000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=18300060000000f0ffffffff00000000
TRACE +0.000 Write 26 bytes:
c000091000000000 0018300060000000 | ..........0.`...
f0ffffffff000000 00c0 | ..........
TRACE +0.008 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010904000000007000000000c0
TRACE +0.000 Received full packet: 010904000000007000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=203000605a000070ffffffff00000000
TRACE +0.000 Write 26 bytes:
c000091000000000 00203000605a0000 | ......... 0.`Z..
70ffffffff000000 00c0 | p.........
TRACE +0.000 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010904000000007000000000c0
TRACE +0.000 Received full packet: 010904000000007000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=0430006010000000ffffffff00000000
TRACE +0.000 Write 26 bytes:
c000091000000000 0004300060100000 | ..........0.`...
00ffffffff000000 00c0 | ..........
TRACE +0.012 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010904000000007000000000c0
TRACE +0.000 Received full packet: 010904000000007000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=5830006000000000ffffffff00000000
TRACE +0.000 Write 26 bytes:
c000091000000000 0058300060000000 | .........X0.`...
00ffffffff000000 00c0 | ..........
TRACE +0.000 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010904000000007000000000c0
TRACE +0.000 Received full packet: 010904000000007000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=0030006000000400ffffffff00000000
TRACE +0.000 Write 26 bytes:
c000091000000000 0000300060000004 | ..........0.`...
00ffffffff000000 00c0 | ..........
TRACE +0.010 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010904000000007000000000c0
TRACE +0.000 Received full packet: 010904000000007000000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=00300060
TRACE +0.000 Write 14 bytes: c0000a04000000000000300060c0
TRACE +0.000 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010a04000000000000000000c0
TRACE +0.000 Received full packet: 010a04000000000000000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=58300060
TRACE +0.000 Write 14 bytes: c0000a04000000000058300060c0
TRACE +0.010 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010a0400c800000000000000c0
TRACE +0.000 Received full packet: 010a0400c800000000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=1830006000000080ffffffff00000000
TRACE +0.000 Write 26 bytes:
c000091000000000 0018300060000000 | ..........0.`...
80ffffffff000000 00c0 | ..........
TRACE +0.000 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 01090400c800000000000000c0
TRACE +0.000 Received full packet: 01090400c800000000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=2030006000000070ffffffff00000000
TRACE +0.000 Write 26 bytes:
c000091000000000 0020300060000000 | ......... 0.`...
70ffffffff000000 00c0 | p.........
TRACE +0.010 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 01090400c800000000000000c0
TRACE +0.000 Received full packet: 01090400c800000000000000
Manufacturer: c8
Device: 4017
Detected flash size: 8MB

View File

@@ -1,96 +0,0 @@
C6 flash starting
Write 1 bytes: c000082400000000000707122055555555
55555555555555555555555555555555
555555555555555555555555c0
Read 1 bytes: 004553502d524f4d3a657370333263362d32303232303931390d0a4275696c643a53657020313920323032320d0a7273743a3078312028504f5745524f4e292c626f6f743a307836362028444f574e4c4f4144285553422f55415254302f5344494f5f5245495f46454f29290d0a77616974696e6720666f7220646f776e6c6f61640d0a
Write 1 bytes: c000082400000000000707122055555555
55555555555555555555555555555555
555555555555555555555555c0
Read 1 bytes: c0010804000707122000000000c0
Write 1 bytes: c0000a04000000000000100040c0
Read 1 bytes: c0010804000707122000000000c0
c0010804000707122000000000c0
c0010804000707122000000000c0
c0010804000707122000000000c0
c0010804000707122000000000c0
c0010804000707122000000000c0
c0010804000707122000000000c0
c0010a04006f80e02c00000000c0
Write 1 bytes: c0000a04000000000048080b60c0 600b0848!!! read 0x12
c0000a04000000000044080b60c0 600b0844 read 0x11
Read 1 bytes: c0010a04004c40feff00000000c0
c0010a0400e85342ca00000000c0
esptool: c0010a04004c40feff00000000c0
>>>>> Write 1 bytes: c0000a0400000000004c080b60c0 600b084C!!! read 0x13
esptool: c0000a04000000000048080b60c0 600b0848 read 0x12
Read 1 bytes: c0010a04000000000000000000c0
esptool: c0010a04004c40feff00000000c0
command op=0x0d data len=8
>>>>> Write 1 bytes: c0000d080000000000feff000000000000c0
esptool:c0000d0800000000000000000000000000c0
>>>>> Read 1 bytes: c0010d04000000000000000000c0
esptool: c0010d04004c40feff00000000c0
Connected to target
Connected to ESP32-C6
bootloader
size: 21248
Erasing flash (this may take a while)...
esp_loader_flash_start
block_size 1024
detect_flash_size
spi_flash_command 159 0 24
v Write 1 bytes: c0000a04000000000018300060c0
Read 1 bytes: c0010a04000000008000000000c0
v Write 1 bytes: c0000a04000000000020300060c0
Read 1 bytes: c0010a04000000007000000000c0
v Write 1 bytes: c000091000000000002830006017000000
ffffffff00000000c0
Read 1 bytes: c0010904000000007000000000c0
v Write 1 bytes: c000091000000000001830006000000090
ffffffff00000000c0
Read 1 bytes: c0010904000000007000000000c0
v Write 1 bytes: c00009100000000000203000609f000070
ffffffff00000000c0
Read 1 bytes: c0010904000000007000000000c0
v Write 1 bytes: c000091000000000005830006000000000
ffffffff00000000c0
Read 1 bytes: c0010904000000007000000000c0
v Write 1 bytes: c000091000000000000030006000000400
ffffffff00000000c0
Read 1 bytes: c0010904000000007000000000c0try 9
v Write 1 bytes: c0000a04000000000000300060c0
Read 1 bytes: c0010a04000000000000000000c0
Write 1 bytes: c0000a04000000000058300060c0
!!! Read 1 bytes: c0010a0400ffffff0000000000c0
Write 1 bytes: c000091000000000001830006000000080
ffffffff00000000c0
!!! Read 1 bytes: c001090400ffffff0000000000c0
Write 1 bytes: c000091000000000002030006000000070
ffffffff00000000c0
Read 1 bytes: c001090400ffffff0000000000c0
size_id 255
DEBUG: Flash size detection failed, falling back to default
Write 1 bytes: c000021400000000000053000015000000
000400000000000000000000c0
Read 0 bytes:
Erasing flash failed with error 2.

View File

@@ -268,6 +268,14 @@ static esp_loader_error_t spi_config_esp32xx(uint32_t efuse_base, uint32_t *spi_
{
*spi_config = 0;
// *** FIXME
// There seems to be a bug here.
// For ESP32-C6, esptool reads registers 0x600b0844 and 0x600b0848 (0x11 and 0x12).
// This tools reads registers 0x600b0848 and 0x600b084C (0x12 and 0x13).
// This function is supposted to read non-default SPI pins.
// As mostly they will be connected like default, it's pretty save to just exit.
return ESP_LOADER_SUCCESS;
// *** end FIXME
uint32_t reg1, reg2;
RETURN_ON_ERROR( esp_loader_read_register(efuse_word_addr(efuse_base, 18), &reg1) );
RETURN_ON_ERROR( esp_loader_read_register(efuse_word_addr(efuse_base, 19), &reg2) );

File diff suppressed because it is too large Load Diff

View File

@@ -17,10 +17,10 @@ build_flags =
-D SERIAL_FLASHER_RESET_HOLD_TIME_MS=100
-D SERIAL_FLASHER_BOOT_HOLD_TIME_MS=50
-D SERIAL_FLASHER_INTERFACE_UART
;-D SERIAL_FLASHER_DEBUG_TRACE
-D SERIAL_FLASHER_DEBUG_TRACE
upload_port = COM22
monitor_port = COM22
upload_port = COM11
monitor_port = COM11
[env:ESP32_S3_16_8_YELLOW_AP]
board = esp32-s3-devkitc-1
@@ -68,4 +68,46 @@ board_build.arduino.memory_type = qio_opi
board_build.psram_type=qspi_opi
board_upload.maximum_size = 16777216
board_upload.maximum_ram_size = 327680
board_upload.flash_size = 16MB
board_upload.flash_size = 16MB
; ----------------------------------------------------------------------------------------
; !!! this configuration expects the Nano_C6
;
; ----------------------------------------------------------------------------------------
[env:OpenEPaperLink_Nano_C6_this]
platform = https://github.com/platformio/platform-espressif32.git
board=lolin_s2_mini
board_build.partitions = default.csv
build_unflags =
-D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
build_flags =
${env.build_flags}
-D OPENEPAPERLINK_NANO_AP_PCB
-D ARDUINO_USB_MODE=0
-D CONFIG_SPIRAM_USE_MALLOC=1
-D CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC=y
-D POWER_NO_SOFT_POWER
-D BOARD_HAS_PSRAM
-D FLASHER_AP_SS=-1
-D FLASHER_AP_CLK=-1
-D FLASHER_AP_MOSI=-1
-D FLASHER_AP_MISO=-1
-D FLASHER_AP_RESET=39
-D FLASHER_AP_POWER={-1}
-D FLASHER_AP_TEST=-1
-D FLASHER_AP_TXD=35
-D FLASHER_AP_RXD=33
;-D FLASHER_DEBUG_TXD=19
;-D FLASHER_DEBUG_RXD=20
;-D FLASHER_DEBUG_PROG=21
-D FLASHER_LED=15
-D FLASHER_RGB_LED=-1
-D MD5_ENABLED=1
-D SERIAL_FLASHER_INTERFACE_UART=1
-D SERIAL_FLASHER_BOOT_HOLD_TIME_MS=50
-D SERIAL_FLASHER_RESET_HOLD_TIME_MS=100
build_src_filter =
+<*>-<usbflasher.cpp>-<swd.cpp>-<espflasher.cpp>
board_build.psram_type=qspi_opi
board_upload.maximum_size = 4194304
board_upload.maximum_ram_size = 327680
board_upload.flash_size = 4MB

File diff suppressed because it is too large Load Diff

View File

@@ -51,14 +51,14 @@ esp_loader_error_t flash_binary1(const uint8_t *bin, size_t size, size_t address
static uint8_t payload[1024];
const uint8_t *bin_addr = bin;
printf("Erasing flash (this may take a while)...\n");
Serial.printf("Erasing flash (this may take a while)...\n");
err = esp_loader_flash_start(address, size, sizeof(payload));
if (err != ESP_LOADER_SUCCESS)
{
printf("Erasing flash failed with error %d.\n", err);
Serial.printf("Erasing flash failed with error %d.\n", err);
return err;
}
printf("Start programming\n");
Serial.printf("Start programming\n");
size_t binary_size = size;
size_t written = 0;
@@ -68,10 +68,12 @@ esp_loader_error_t flash_binary1(const uint8_t *bin, size_t size, size_t address
size_t to_read = MIN(size, sizeof(payload));
memcpy(payload, bin_addr, to_read);
Serial.printf("Writing to_read: %i, %02X %02X %02X %02X %02X %02X \r\n",to_read, payload[0], payload[1], payload[2], payload[3], payload[4], payload[5]);
err = esp_loader_flash_write(payload, to_read);
if (err != ESP_LOADER_SUCCESS)
{
printf("\nPacket could not be written! Error %d.\n", err);
Serial.printf("\nPacket could not be written! Error %d.\n", err);
return err;
}
@@ -80,25 +82,25 @@ esp_loader_error_t flash_binary1(const uint8_t *bin, size_t size, size_t address
written += to_read;
int progress = (int)(((float)written / binary_size) * 100);
printf("\rProgress: %d %%", progress);
Serial.printf("\rProgress: %d %%", progress);
fflush(stdout);
};
printf("\nFinished programming\n");
Serial.printf("\nFinished programming\n");
#if MD5_ENABLED
err = esp_loader_flash_verify();
if (err == ESP_LOADER_ERROR_UNSUPPORTED_FUNC)
{
printf("ESP8266 does not support flash verify command.");
Serial.printf("ESP8266 does not support flash verify command.");
return err;
}
else if (err != ESP_LOADER_SUCCESS)
{
printf("MD5 does not match. err: %d\n", err);
Serial.printf("MD5 does not match. err: %d\n", err);
return err;
}
printf("Flash verified\n");
Serial.printf("Flash verified\n");
#endif
return ESP_LOADER_SUCCESS;
@@ -106,26 +108,31 @@ esp_loader_error_t flash_binary1(const uint8_t *bin, size_t size, size_t address
void setup()
{
pinMode(17, INPUT_PULLUP);
pinMode(18, INPUT_PULLUP);
pinMode(15,OUTPUT);
pinMode(39,OUTPUT);
pinMode(37,OUTPUT);
digitalWrite(39, LOW);
digitalWrite(37, LOW);
delay(100);
digitalWrite(39, HIGH);
Serial.begin(115200);
delay(1000);
delay(10000);
Serial.println("ESP_Flasher_hi");
const loader_esp32_config_t config = {
.baud_rate = 115200,
.uart_port = 2,
.uart_rx_pin = GPIO_NUM_19,
.uart_tx_pin = GPIO_NUM_20,
.reset_trigger_pin = GPIO_NUM_47,
.gpio0_trigger_pin = GPIO_NUM_21,
.uart_port = 1,
.uart_rx_pin = GPIO_NUM_18,
.uart_tx_pin = GPIO_NUM_16,
.reset_trigger_pin = GPIO_NUM_39,
.gpio0_trigger_pin = GPIO_NUM_37,
};
Serial.printf("serial initialization: %i \r\n", loader_port_esp32_init(&config));
if (connect_to_target1(230400) == ESP_LOADER_SUCCESS)
{
Serial.printf("We got the following ESP: %i\r\n", esp_loader_get_target());
Serial.printf("We got the following ESP: %i\r\n", esp_loader_get_target());
Serial.println("Loading bootloader...");
flash_binary1(data_bootloader, sizeof(data_bootloader), 0x0);
Serial.println("Loading partition table...");
@@ -134,10 +141,20 @@ void setup()
flash_binary1(data_application, sizeof(data_application), 0x10000);
Serial.println("Done!");
}
loader_port_esp32_deinit();
//Serial1.begin(115200, SERIAL_8N1, 16, 18);
pinMode(39,OUTPUT);
pinMode(37,OUTPUT);
digitalWrite(39, LOW);
digitalWrite(37, HIGH);
delay(100);
digitalWrite(39, HIGH);
}
void loop()
{
Serial.printf("MS: %u\r\n", millis());
delay(1000);
digitalWrite(15, LOW);
delay(100);
digitalWrite(15, HIGH);
delay(100);
}

View File

@@ -36,6 +36,9 @@ build_flags =
-D DISABLE_ALL_LIBRARY_WARNINGS
-D ILI9341_DRIVER
-D SMOOTH_FONT
upload_port = COM11
monitor_port = COM11
; ----------------------------------------------------------------------------------------
; !!! this configuration expects the Mini_AP
;
@@ -112,6 +115,51 @@ board_upload.maximum_size = 4194304
board_upload.maximum_ram_size = 327680
board_upload.flash_size = 4MB
; ----------------------------------------------------------------------------------------
; !!! this configuration expects the Nano_C6
;
; ----------------------------------------------------------------------------------------
[env:OpenEPaperLink_Nano_C6]
platform = https://github.com/platformio/platform-espressif32.git
board=lolin_s2_mini
board_build.partitions = default.csv
build_unflags =
-std=gnu++11
-D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
build_flags =
-std=gnu++17
${env.build_flags}
-D OPENEPAPERLINK_NANO_AP_PCB
-D ARDUINO_USB_MODE=0
-D CONFIG_SPIRAM_USE_MALLOC=1
-D CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC=y
-D POWER_NO_SOFT_POWER
-D BOARD_HAS_PSRAM
-D FLASHER_AP_SS=-1
-D FLASHER_AP_CLK=-1
-D FLASHER_AP_MOSI=-1
-D FLASHER_AP_MISO=-1
-D FLASHER_AP_RESET=39
-D FLASHER_AP_POWER={-1}
-D FLASHER_AP_TEST=-1
-D FLASHER_AP_TXD=35
-D FLASHER_AP_RXD=33
;-D FLASHER_DEBUG_TXD=16
;-D FLASHER_DEBUG_RXD=18
;-D FLASHER_DEBUG_PROG=37
-D FLASHER_LED=15
-D FLASHER_RGB_LED=-1
-D MD5_ENABLED=1
-D SERIAL_FLASHER_INTERFACE_UART=1
-D SERIAL_FLASHER_BOOT_HOLD_TIME_MS=50
-D SERIAL_FLASHER_RESET_HOLD_TIME_MS=100
build_src_filter =
+<*>-<usbflasher.cpp>-<swd.cpp>-<espflasher.cpp>
board_build.psram_type=qspi_opi
board_upload.maximum_size = 4194304
board_upload.maximum_ram_size = 327680
board_upload.flash_size = 4MB
; ----------------------------------------------------------------------------------------
; !!! this configuration expects the 16MB Flash / 8MB Ram version of the ESP32-S3-DevkitC1
;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 896 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

View File

@@ -0,0 +1,24 @@
# PCB for the NanoC6 AP running an ESP32-C6 and the WEMOS S2-Mini
## NanoC6_AP by [ATC1441](https://github.com/atc1441)
The NanoC6_AP is made with the WEMOS S2-Min With an ESP32-S2 ( https://de.aliexpress.com/item/1005004981201254.html )
together with this PCB and an ESP32-C6 it makes a potent but small Access Point for the OpenEPaperLink with an impressive range.
<img width="600" alt="Complete_NanoC6_AP" src="Complete_NanoC6_AP.jpg">
<img width="600" alt="NanoC6_AP_overview" src="NanoC6_AP_overview.jpg">
<img width="600" alt="PCB_NanoC6_AP" src="PCB_NanoC6_AP.jpg">
Gerber of the PCB can be found in this folder
Parts for the PCB:
- 1x ESP32-C6
- 2x 0603 LEDs in the color of your choice
- 2x 0603 Resistor 1K for the LEDs (0805 fits as well)
- 3x 0603 Resistor 10K for Enable, flash pull-up and Boot line of ESP32-C6 (0805 fits as well)
- 2x 0603 Capacitor 100nf for 3.3V and 5V Rail
- 2x 0805 Capacitor 1uf for the 3.3V and 5V Rail
- 1x AMS1117 3.3V LDO Voltage regulator