Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get app-mirb to work #5

Open
Sebbb opened this issue Mar 8, 2021 · 4 comments
Open

Unable to get app-mirb to work #5

Sebbb opened this issue Mar 8, 2021 · 4 comments

Comments

@Sebbb
Copy link

Sebbb commented Mar 8, 2021

Hello,

I can't get app-mirb to work..

With esp-idf 4.2 I can't even compile it:

CC build/cbor/tinycbor/src/cborvalidation.o
CC build/cbor/tinycbor/src/open_memstream.o
/home/seb/esp/esp-idf/components/cbor/tinycbor/src/open_memstream.c:45:4: error: #error "Cannot implement open_memstream!"
 #  error "Cannot implement open_memstream!"
    ^~~~~
/home/seb/esp/esp-idf/components/cbor/tinycbor/src/open_memstream.c:57:8: error: unknown type name 'RetType'
 static RetType write_to_buffer(void *cookie, const char *data, LenType len)
        ^~~~~~~
/home/seb/esp/esp-idf/components/cbor/tinycbor/src/open_memstream.c:57:64: error: unknown type name 'LenType'; did you mean 'CborType'?
 static RetType write_to_buffer(void *cookie, const char *data, LenType len)
                                                                ^~~~~~~
                                                                CborType
/home/seb/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/xtensa-esp32-elf/sys-include/stdio.h: In function 'open_memstream':
/home/seb/esp/esp-idf/components/cbor/tinycbor/src/open_memstream.c:113:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
At top level:
/home/seb/esp/esp-idf/components/cbor/tinycbor/src/open_memstream.c:82:12: warning: 'close_buffer' defined but not used [-Wunused-function]
 static int close_buffer(void *cookie)
            ^~~~~~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [/home/seb/esp/esp-idf/make/component_wrapper.mk:292: tinycbor/src/open_memstream.o] Error 1
make: *** [/home/seb/esp/esp-idf/make/project.mk:635: component-cbor-build] Error 2

With esp-idf 4.3 and master:

compilation works (I also set FREERTOS_UNICORE), but then I can't start it.

I also tried mruby 3.0.0 stable, but that did not help either.

rst:0x7 (TG0WDT_SYS_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:6812
ho 0 tail 12 room 4
load:0x40078000,len:14308
load:0x40080400,len:3452
entry 0x40080640
I (57) boot: ESP-IDF v4.3-beta1-24-g0bbc721a6 2nd stage bootloader
I (58) boot: compile time 00:11:35
I (58) boot: chip revision: 1
I (63) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (70) boot.esp32: SPI Speed      : 40MHz
I (74) boot.esp32: SPI Mode       : DIO
I (79) boot.esp32: SPI Flash Size : 4MB
W (83) boot.esp32: PRO CPU has been reset by WDT.
W (89) boot.esp32: WDT reset info: PRO CPU PC=0x4008659d
I (95) boot: Enabling RNG early entropy source...
I (100) boot: Partition Table:
I (104) boot: ## Label            Usage          Type ST Offset   Length
I (111) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (119) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (126) boot:  2 factory          factory app      00 00 00010000 00100000
I (134) boot: End of partition table
I (138) boot_comm: chip revision: 1, min. application chip revision: 0
I (145) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=2f1d8h (192984) map
I (222) esp_image: segment 1: paddr=0003f200 vaddr=3ffb0000 size=00e18h (  3608) load
I (223) esp_image: segment 2: paddr=00040020 vaddr=400d0020 size=510e8h (332008) map
I (345) esp_image: segment 3: paddr=00091110 vaddr=3ffb0e18 size=01740h (  5952) load
I (347) esp_image: segment 4: paddr=00092858 vaddr=40080000 size=0a198h ( 41368) load
I (373) boot: Loaded app from partition at offset 0x10000
I (373) boot: Disabling RNG early entropy source...
I (384) cpu_start: Pro cpu up.
I (384) cpu_start: Single core mode
I (393) cpu_start: Pro cpu start user code
I (393) cpu_start: cpu freq: 160000000
I (393) cpu_start: Application information:
I (397) cpu_start: Project name:     mruby-esp32-app-mirb
I (403) cpu_start: App version:      0343caa-dirty
I (409) cpu_start: Compile time:     Mar  9 2021 00:11:40
I (415) cpu_start: ELF file SHA256:  675d627f4a8febc1...
I (421) cpu_start: ESP-IDF:          v4.3-beta1-24-g0bbc721a6
I (428) heap_init: Initializing. RAM available for dynamic allocation:
I (435) heap_init: At 3FF80000 len 00002000 (8 KiB): RTCRAM
I (441) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (447) heap_init: At 3FFB30B8 len 0002CF48 (179 KiB): DRAM
I (453) heap_init: At 3FFE0440 len 0001FBC0 (126 KiB): D/IRAM
I (460) heap_init: At 40078000 len 00008000 (32 KiB): IRAM
I (466) heap_init: At 4008A198 len 00015E68 (87 KiB): IRAM
I (473) spi_flash: detected chip: generic
I (477) spi_flash: flash io: dio
I (481) cpu_start: Starting scheduler on PRO CPU.
Guru Meditation Error: Core  0 panic'ed (StoreProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x40088730  PS      : 0x00060e33  A0      : 0x8008895a  A1      : 0x3ffb3240
A2      : 0x3ffb30cc  A3      : 0x3ffbb46c  A4      : 0x3ffbbd20  A5      : 0x00000152
A6      : 0x3ffbbd28  A7      : 0x00000000  A8      : 0x00000004  A9      : 0x0000000b
A10     : 0x00000002  A11     : 0x00000001  A12     : 0xfffffffc  A13     : 0x0002470d
A14     : 0x00024b90  A15     : 0x0000000c  SAR     : 0x0000000c  EXCCAUSE: 0x0000001d
EXCVADDR: 0x0000015e  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0xffffffff

Backtrace:0x4008872d:0x3ffb3240 0x40088957:0x3ffb3260 0x40081a64:0x3ffb3280 0x40081ae1:0x3ffb32b0 0x40088b91:0x3ffb32d0 0x400d4cbd:0x3ffb32f0 0x400e1ed5:0x3ffb3310 0x400e1f15:0x3ffb3330 0x400dd53e:0x3ffb3350 0x400dd6de:0x3ffb33e0 0x400d4411:0x3ffb3400 0x400d494e:0x3ffb3430 0x400e3595:0x3ffb3450 0x400d566c:0x3ffb3470 0x400e4eb6:0x3ffb34e0 0x400dd683:0x3ffb3510 0x400dd6de:0x3ffb35a0 0x400d4411:0x3ffb35c0 0x400d494e:0x3ffb35f0 0x400e3595:0x3ffb3610 0x400d566c:0x3ffb3630 0x400e4eb6:0x3ffb36a0 0x400dd683:0x3ffb36d0 0x400dd6de:0x3ffb3760 0x400d4411:0x3ffb3780 0x400d494e:0x3ffb37b0 0x400e3595:0x3ffb37d0 0x400d566c:0x3ffb37f0 0x400e4eb6:0x3ffb3860 0x400dd683:0x3ffb3890 0x400dd6de:0x3ffb3920 0x400d4411:0x3ffb3940 0x400d494e:0x3ffb3970 0x400e3595:0x3ffb3990 0x400d566c:0x3ffb39b0 0x400e4eb6:0x3ffb3a20 0x400dd683:0x3ffb3a50 0x400dd6de:0x3ffb3ae0 0x400d4411:0x3ffb3b00 0x400d494e:0x3ffb3b30 0x400e3595:0x3ffb3b50 0x400d566c:0x3ffb3b70 0x400e4eb6:0x3ffb3be0 0x400dd683:0x3ffb3c10 0x400dd6de:0x3ffb3ca0 0x400d4411:0x3ffb3cc0 0x400d494e:0x3ffb3cf0 0x400e3595:0x3ffb3d10 0x400d566c:0x3ffb3d30 0x400e4eb6:0x3ffb3da0 0x400dd683:0x3ffb3dd0 0x400dd6de:0x3ffb3e60 0x400d4411:0x3ffb3e80 0x400d494e:0x3ffb3eb0 0x400e3595:0x3ffb3ed0 0x400d566c:0x3ffb3ef0 0x400e4eb6:0x3ffb3f60 0x400dd683:0x3ffb3f90 0x400dd6de:0x3ffb4020 0x400d4411:0x3ffb4040 0x400d494e:0x3ffb4070 0x400e3595:0x3ffb4090 0x400d566c:0x3ffb40b0 0x400e4eb6:0x3ffb4120 0x400dd683:0x3ffb4150 0x400dd6de:0x3ffb41e0 0x400d4411:0x3ffb4200 0x400d494e:0x3ffb4230 0x400e3595:0x3ffb4250 0x400d566c:0x3ffb4270 0x400e4eb6:0x3ffb42e0 0x400dd683:0x3ffb4310 0x400dd6de:0x3ffb43a0 0x400d4411:0x3ffb43c0 0x400d494e:0x3ffb43f0 0x400e3595:0x3ffb4410 0x400d566c:0x3ffb4430 0x400e4eb6:0x3ffb44a0 0x400dd683:0x3ffb44d0 0x400dd6de:0x3ffb4560 0x400d4411:0x3ffb4580 0x400d494e:0x3ffb45b0 0x400e3595:0x3ffb45d0 0x400d566c:0x3ffb45f0 0x400e4eb6:0x3ffb4660 0x400dd683:0x3ffb4690 0x400dd6de:0x3ffb4720 0x400d4411:0x3ffb4740 0x400d494e:0x3ffb4770 0x400e3595:0x3ffb4790 0x400d566c:0x3ffb47b0 0x400e4eb6:0x3ffb4820 0x400dd683:0x3ffb4850 0x400dd6de:0x3ffb48e0 0x400d4411:0x3ffb4900 0x400d494e:0x3ffb4930 0x400e3595:0x3ffb4950 0x400d566c:0x3ffb4970 0x400e4eb6:0x3ffb49e0 0x400dd683:0x3ffb4a10 |<-CONTINUES


ELF file SHA256: 675d627f4a8febc1

Rebooting...
[...]

I compiled on a Debian buster with current versions of all build-tools, if that's important. I am trying it on a an ESP32­WROVER­B.

Can you tell me what's wrong? What esp-idf version should I use?

Thanks
Sebastian

@pandax381
Copy link
Member

Hi,

I have confirmed that mirb build and works with ESP-IDF v4.2 on Ubuntu 20.04.

The version of mruby included in mruby-esp32 is 3.0.0-preview, but it doesn't work if you upgrade to a higher version (the build passes with some changes, but I've seen errors around the heap at runtime).

I am investigating the cause, but it will take some time due to best effort.

@Sebbb
Copy link
Author

Sebbb commented Mar 11, 2021

Hello,

thanks for the info, I'll probably install a Ubuntu then and try with it, although I would assume it should make no difference.

Were you able to compile Enumerable and mruby-esp32/mruby-io in?

@pandax381
Copy link
Member

mruby-esp32/mruby-esp32 has been updated, please check it.

mruby-esp32-app-mirb update is a work in progress (will take some time as we are finding some issues).

@Sebbb
Copy link
Author

Sebbb commented Mar 11, 2021

mruby-esp32/mruby-esp32 is working fine for me now, thanks! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants