m5stack / Core2-for-AWS-IoT-Kit

Accompanying code for use with AWS IoT Kit content. Works with PlatformIO and ESP-IDF v4.2.
https://m5stack.com/collections/m5-core/products/m5stack-core2-esp32-iot-development-kit-for-aws-iot-edukit
MIT License
127 stars 66 forks source link

Partly worked on raspbian on Raspberry Pi4 #48

Closed bathtimefish closed 3 years ago

bathtimefish commented 3 years ago

In a few days before I tried to run the tutorial on Ubuntu ARM64 Raspberry Pi but did not work.

https://github.com/m5stack/Core2-for-AWS-IoT-EduKit/issues/45

So I changed my trial to on Raspbian and it's partly worked fine. I just want to share the logs.

Raspberry Pi 4 8GB

uname -a
Linux raspberrypi 5.4.83-v7l+ #1379 SMP Mon Dec 14 13:11:54 GMT 2020 armv7l GNU/Linux

Getting Started was not worked as it is so I changed platformio.ini as bellow.

- platform = espressif32@2.1.0
+ platform = espressif32@3.1.0

I get working successfully to build and flash & monitor after changed it.

In Blinky Hello, AWS CLI installation has been the defferent way which is explained the guide of page because the guide do not explain to install to ARM32.

https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html

git clone https://github.com/aws/aws-cli.git
cd aws-cli && git checkout v2
pip install -r requirements.txt
pip install .
aws --version
aws-cli/2.1.28 Python/3.7.10 Linux/5.4.83-v7l+ source/armv7l.raspbian.10 prompt/off

After setuped, I got to finish the tutorial fine. However It spent many time for build the firmware around 3 minites due to Raspberry Pi's resourse.

I finished 2 tutorial like above but Smart Thermostat could not be finish. I got to build the firmware successfully but I have gotten cpu panic after flash it.

Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x40185258  PS      : 0x00060b30  A0      : 0x800f27dc  A1      : 0x3ffc8e80  
0x40185258: lv_color_fill at /home/pi/Core2-for-AWS-IoT-EduKit/Smart-Thermostat/build/../components/core2forAWS/tft/lvgl/lvgl/src/lv_misc/lv_color.c:54

A2      : 0x00000000  A3      : 0x00007eef  A4      : 0x00000140  A5      : 0x00000000  
A6      : 0x00000000  A7      : 0x000000ff  A8      : 0x7eef7eef  A9      : 0x00000010  
A10     : 0x00000000  A11     : 0x00000281  A12     : 0x00000000  A13     : 0x3ffc9180  
A14     : 0x3ffb4d18  A15     : 0x00000001  SAR     : 0x00000000  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000000  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000  

Backtrace:0x40185255:0x3ffc8e80 0x400f27d9:0x3ffc8ea0 0x400f32ca:0x3ffc8f40 0x400e111a:0x3ffc8fa0 0x400e17e5:0x3ffc9060 0x400d9bd7:0x3ffc9080 0x400da8e6:0x3ffc9110 0x400da995:0x3ffc9160 0x400daca4:0x3ffc9180 0x400dae29:0x3ffc9210 0x400daf12:0x3ffc9240 0x400daf74:0x3ffc9260 0x400e58ed:0x3ffc9290 0x400e59d8:0x3ffc92b0 0x400d6145:0x3ffc92d0 0x4008a4c9:0x3ffc92f0
0x40185255: lv_color_fill at /home/pi/Core2-for-AWS-IoT-EduKit/Smart-Thermostat/build/../components/core2forAWS/tft/lvgl/lvgl/src/lv_misc/lv_color.c:53

0x400f27d9: fill_normal at /home/pi/Core2-for-AWS-IoT-EduKit/Smart-Thermostat/build/../components/core2forAWS/tft/lvgl/lvgl/src/lv_draw/lv_draw_blend.c:364 (discriminator 3)

0x400f32ca: _lv_blend_fill at /home/pi/Core2-for-AWS-IoT-EduKit/Smart-Thermostat/build/../components/core2forAWS/tft/lvgl/lvgl/src/lv_draw/lv_draw_blend.c:179

0x400e111a: draw_bg at /home/pi/Core2-for-AWS-IoT-EduKit/Smart-Thermostat/build/../components/core2forAWS/tft/lvgl/lvgl/src/lv_draw/lv_draw_rect.c:231

0x400e17e5: lv_draw_rect at /home/pi/Core2-for-AWS-IoT-EduKit/Smart-Thermostat/build/../components/core2forAWS/tft/lvgl/lvgl/src/lv_draw/lv_draw_rect.c:110

0x400d9bd7: lv_obj_design at /home/pi/Core2-for-AWS-IoT-EduKit/Smart-Thermostat/build/../components/core2forAWS/tft/lvgl/lvgl/src/lv_core/lv_obj.c:3904

0x400da8e6: lv_refr_obj at /home/pi/Core2-for-AWS-IoT-EduKit/Smart-Thermostat/build/../components/core2forAWS/tft/lvgl/lvgl/src/lv_core/lv_refr.c:699 (discriminator 1)

0x400da995: lv_refr_obj_and_children at /home/pi/Core2-for-AWS-IoT-EduKit/Smart-Thermostat/build/../components/core2forAWS/tft/lvgl/lvgl/src/lv_core/lv_refr.c:641

0x400daca4: lv_refr_area_part at /home/pi/Core2-for-AWS-IoT-EduKit/Smart-Thermostat/build/../components/core2forAWS/tft/lvgl/lvgl/src/lv_core/lv_refr.c:572

0x400dae29: lv_refr_area at /home/pi/Core2-for-AWS-IoT-EduKit/Smart-Thermostat/build/../components/core2forAWS/tft/lvgl/lvgl/src/lv_core/lv_refr.c:482 (discriminator 2)

0x400daf12: lv_refr_areas at /home/pi/Core2-for-AWS-IoT-EduKit/Smart-Thermostat/build/../components/core2forAWS/tft/lvgl/lvgl/src/lv_core/lv_refr.c:404

0x400daf74: _lv_disp_refr_task at /home/pi/Core2-for-AWS-IoT-EduKit/Smart-Thermostat/build/../components/core2forAWS/tft/lvgl/lvgl/src/lv_core/lv_refr.c:203

0x400e58ed: lv_task_exec at /home/pi/Core2-for-AWS-IoT-EduKit/Smart-Thermostat/build/../components/core2forAWS/tft/lvgl/lvgl/src/lv_misc/lv_task.c:409 (discriminator 1)

0x400e59d8: lv_task_handler at /home/pi/Core2-for-AWS-IoT-EduKit/Smart-Thermostat/build/../components/core2forAWS/tft/lvgl/lvgl/src/lv_misc/lv_task.c:142

0x400d6145: guiTask at /home/pi/Core2-for-AWS-IoT-EduKit/Smart-Thermostat/build/../components/core2forAWS/core2forAWS.c:319

0x4008a4c9: vPortTaskWrapper at /home/pi/esp/esp-idf/components/freertos/xtensa/port.c:143

ELF file SHA256: b5d26c7b8e109c7a

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x17 (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:4
load:0x3fff0034,len:7064
load:0x40078000,len:13212
load:0x40080400,len:4568
0x40080400: _init at ??:?

I guess that is a tft library error but I could not understand to it.

This is just sharing because I have understood this tutorial is not support to Raspberry Pi. However let me know if you can advice to me. Thanks you.

rashedtalukder commented 3 years ago

@bathtimefish, sorry for the delay in response. The Raspberry Pi and Raspberry OS is not officially supported with the AWS IoT EduKit program. That said, I have done a build and upload test of the latest projects and they all compiled and functioned without issue.

Please give it a try. It will take an extraordinarily long time to compile though....