LibreSolar / esp32-edge-firmware

Firmware for CAN/UART to WiFi/BLE gateway using ESP32
Apache License 2.0
26 stars 12 forks source link

Ts can #28

Closed Gretel5X closed 3 years ago

Gretel5X commented 3 years ago

Adds CAN connection capabilities! For now, the connection is fixed to one address, so only one device can be used at a time on the can bus. ThingSet is used in text-mode, but the cbor-translation bib is already implemented, but might need some more tweaks when the binary mode is really activated.

martinjaeger commented 3 years ago

I'm getting a hard fault immediately after startup:

ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:6704
load:0x40078000,len:14224
load:0x40080400,len:3708
entry 0x40080680
I (27) boot: ESP-IDF v4.4-dev-960-gcf457d412 2nd stage bootloader
I (27) boot: compile time 16:23:31
I (27) boot: chip revision: 1
I (31) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (38) boot.esp32: SPI Speed      : 40MHz
I (43) boot.esp32: SPI Mode       : DIO
I (48) boot.esp32: SPI Flash Size : 4MB
I (52) boot: Enabling RNG early entropy source...
I (58) boot: Partition Table:
I (61) boot: ## Label            Usage          Type ST Offset   Length
I (68) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (76) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (83) boot:  2 factory          factory app      00 00 00010000 00200000
I (91) boot:  3 website          Unknown data     01 82 00210000 00080000
I (98) boot:  4 stm_ota          Unknown data     01 82 00290000 00020000
I (106) boot:  5 config           WiFi data        01 02 002b0000 00005000
I (113) boot: End of partition table
I (118) boot_comm: chip revision: 1, min. application chip revision: 0
I (125) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=2d508h (185608) map
[0;32mI (203) esp_image: segment 1: paddr=0003d530 vaddr=3ffbdb60 size=02ae8h ( 10984) load
I (208) esp_image: segment 2: paddr=00040020 vaddr=400d0020 size=e1c30h (924720) map
[0;32mI (558) esp_image: segment 3: paddr=00121c58 vaddr=3ffc0648 size=0208ch (  8332) load
I (562) esp_image: segment 4: paddr=00123cec vaddr=40080000 size=1e5d4h (124372) load
[0;32mI (617) esp_image: segment 5: paddr=001422c8 vaddr=50000000 size=00010h (    16) load
I (633) boot: Loaded app from partition at offset 0x10000
I (634) boot: Disabling RNG early entropy source...
I (645) cpu_start: Pro cpu up.
I (645) cpu_start: Starting app cpu, entry point is 0x40081378
I (632) cpu_start: App cpu up.
I (662) cpu_start: Pro cpu start user code
I (662) cpu_start: cpu freq: 160000000
I (662) cpu_start: Application information:
I (666) cpu_start: Project name:     esp32-edge
I (672) cpu_start: App version:      a1209af
I (676) cpu_start: Compile time:     Jun 24 2021 18:34:58
I (683) cpu_start: ELF file SHA256:  4be2ea9d49396e0a...
I (689) cpu_start: ESP-IDF:          v4.4-dev-960-gcf457d412
I (695) heap_init: Initializing. RAM available for dynamic allocation:
I (702) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (708) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (714) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (721) heap_init: At 3FFCADD8 len 00015228 (84 KiB): DRAM
I (727) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (733) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (739) heap_init: At 4009E5D4 len 00001A2C (6 KiB): IRAM
I (747) spi_flash: detected chip: generic
I (750) spi_flash: flash io: dio
W (754) spi_flash: Detected size(16384k) larger than the size in the binary image header(4096k). Using the size in the binary image header.
I (769) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (817) system_api: Base MAC address is not set
I (817) system_api: read default base MAC address from EFUSE
Booting Libre Solar Data Manager...
[0;32mI (3907) web_fs: Partition size for website: total: 474641, used: 338097
I (3917) web_fs: Partition size ota: total: 113201, used: 0
[0;31mE (4417) ts_ser: Could not retrieve device information: Code 255
[0;31mE (4917) ts_ser: Could not retrieve device information: Code 255
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x400014fd  PS      : 0x00060c30  A0      : 0x8019741c  A1      : 0x3ffbc450  
A2      : 0x00000000  A3      : 0xfffffffc  A4      : 0x000000ff  A5      : 0x0000ff00  
A6      : 0x00ff0000  A7      : 0xff000000  A8      : 0x00000000  A9      : 0x3ffbc4a0  
A10     : 0x3ffc29c8  A11     : 0x00060023  A12     : 0x00060020  A13     : 0x00000000  
A14     : 0x00000001  A15     : 0x00000000  SAR     : 0x00000018  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000000  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xffffffff  

Backtrace:0x400014fa:0x3ffbc4500x40197419:0x3ffbc460 0x400dc5b1:0x3ffbc520 0x400dd89c:0x3ffbc550 0x400dc73c:0x3ffbc590 0x400dc520:0x3ffbc5b0 0x401b1921:0x3ffbc5e0 0x400944e1:0x3ffbc600 

ELF file SHA256: 4be2ea9d49396e0a

Rebooting...

Any idea?

martinjaeger commented 3 years ago

Ok, problems fixed, going to merge... :)