yknivag / PxMatrixChristmasIcons

Christmas Icons prepared for use with the PxMatrix to display using LED matrix displays with display method.
3 stars 0 forks source link

Will not Compile Wemos D1 Mini Pro #1

Closed anthonyjclarke closed 4 years ago

anthonyjclarke commented 4 years ago

Hi, wondering if you can assist :)

All @witnessmenow demo sketches compile and work, so I know I have a working unit.

When I compile with your example, I get these errors... I've not seen anything like this before??

Arduino: 1.8.10 (Mac OS X), Board: "LOLIN(WEMOS) D1 mini Pro, 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), 16M (14M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

/Volumes/Macintosh HD 2/Users/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: ChristmasIcons-AC.ino.elf section .rodata' will not fit in regiondram0_0_seg' /Volumes/Macintosh HD 2/Users/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: address 0x4000ab40 of ChristmasIcons-AC.ino.elf section .bss' is not within regiondram0_0_seg' /Volumes/Macintosh HD 2/Users/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: address 0x4000ab40 of ChristmasIcons-AC.ino.elf section .bss' is not within regiondram0_0_seg' collect2: error: ld returned 1 exit status exit status 1 Error compiling for board LOLIN(WEMOS) D1 mini Pro.

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

witnessmenow commented 4 years ago

Just on a quick look it looks like it doesn't have enough memory to hold all the icons.

Could you try your TinyPICO board Anthony?

On Sun, 3 Nov 2019, 08:31 Anthony Clarke, notifications@github.com wrote:

Hi, wondering if you can assist :)

All @witnessmenow https://github.com/witnessmenow demo sketches compile and work, so I know I have a working unit.

When I compile with your example, I get these errors... I've not seen anything like this before??

Arduino: 1.8.10 (Mac OS X), Board: "LOLIN(WEMOS) D1 mini Pro, 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), 16M (14M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

/Volumes/Macintosh HD 2/Users/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: ChristmasIcons-AC.ino.elf section .rodata' will not fit in region dram0_0_seg' /Volumes/Macintosh HD 2/Users/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: address 0x4000ab40 of ChristmasIcons-AC.ino.elf section .bss' is not within region dram0_0_seg' /Volumes/Macintosh HD 2/Users/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: address 0x4000ab40 of ChristmasIcons-AC.ino.elf section .bss' is not within region dram0_0_seg' collect2: error: ld returned 1 exit status exit status 1 Error compiling for board LOLIN(WEMOS) D1 mini Pro.

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/yknivag/PxMatrixChristmasIcons/issues/1?email_source=notifications&email_token=AAL5PQXDV4S5R66GZXFGUMTQR2D6TA5CNFSM4JIKIONKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HWNWGQA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAL5PQW3ALB3OBLVEIYIKLDQR2D6TANCNFSM4JIKIONA .

anthonyjclarke commented 4 years ago

Sadly yes, my compiles to a couple of ESP32 Boards. I say sadly, as I assembled my TinyPICO Matrix Breakout but I cant seem to get it to work. My Wemos D1's all work, and I dont want to steal the ESP32 One that has Tetris Clock working. So I need to do some diagnosis on why the TinyPICO one is not working.... :(

yknivag commented 4 years ago

Hi Anthony,

It seems that no matter how much flash an ESP8266 has and no matter how much or how little one sets aside for SPIFFS, the maximum sketch size is always 1Mb.

The library is quite large, due to all the images. I'll have a look later today at what I can do to make it work on ESP8266.

In the meantime if you need all 44 images then there is no option but to use an ESP32 it seems. If you only need a few then simply comment out those you don't need in the file "IncludeList.h", remove them from the array in the example (being sure to change the array size in both it's declaration and the count variable underneath) and it should work with fewer images.

yknivag commented 4 years ago

Hi Anthony,

This should be fixed now in master.

It seems that simply defining a variable as static const doesn't put the variable in program space for the ESP8266 like it does for the ESP32. I have added PROGMEM to the image definitions and this now compiles on my system for a standard Wemos D1 Mini.

I hope this solves the issue you were having, please do let me know.

Gavin.

anthonyjclarke commented 4 years ago

Hi, updated.

Compiles - Yes

"Sketch uses 362532 bytes (34%) of program storage space. Maximum is 1044464 bytes. Global variables use 52020 bytes (63%) of dynamic memory, leaving 29900 bytes for local variables. Maximum is 81920 bytes."

Uploaded Sketch to Wemos D1 Pro and it reboots continually. Will try to diagnose next

06:49:47.161 -> 06:49:47.161 -> Exception (3): 06:49:47.161 -> epc1=0x402050f9 epc2=0x00000000 epc3=0x00000000 06:49:47.161 -> 06:49:47.161 -> >>>stack>>> 06:49:47.161 -> 06:49:47.161 -> ctx: cont 06:49:47.161 -> sp: 3ffffdd0 end: 3fffffc0 offset: 01a0 06:49:47.161 -> 3fffff70: feefeffe feefeffe feefeffe feefeffe
06:49:47.161 -> 3fffff80: 00000010 00000030 3fff4398 3fff4588
06:49:47.161 -> 3fffff90: 3fff43e0 3ffee2d8 00000000 40201d6a
06:49:47.161 -> 3fffffa0: 3fffdad0 00000000 3fff4558 402031e8
06:49:47.161 -> 3fffffb0: feefeffe feefeffe 3ffe85b8 40100555
06:49:47.161 -> <<<stack<<< 06:49:47.161 -> 06:49:47.161 -> ets Jan 8 2013,rst cause:2, boot mode:(3,7) 06:49:47.161 -> 06:49:47.161 -> load 0x4010f000, len 1384, room 16 06:49:47.161 -> tail 8 06:49:47.161 -> chksum 0x2d 06:49:47.161 -> csum 0x2d 06:49:47.161 -> v8b899c12 06:49:47.161 -> ~ld 06:49:47.161 -> 06:49:47.161 -> Exception (3): 06:49:47.161 -> epc1=0x402050f9 epc2=0x00000000 epc3=0x00000000 excvaddr=0x4024fa92 depc=0x00000000 06:49:47.161 -> 06:49:47.161 -> >>>stack>>> 06:49:47.161 -> 06:49:47.161 -> ctx: cont 06:49:47.161 -> sp: 3ffffdd0 end: 3fffffc0 offset: 01a0 06:49:47.161 -> 3fffff70: feefeffe feefeffe feefeffe feefeffe
06:49:47.161 -> 3fffff80: 00000010 00000030 3fff4398 3fff4588
06:49:47.161 -> 3fffff90: 3fff43e0 3ffee2d8 00000000 40201d6a
06:49:47.161 -> 3fffffa0: 3fffdad0 00000000 3fff4558 402031e8
06:49:47.161 -> 3fffffb0: feefeffe feefeffe 3ffe85b8 40100555
06:49:47.161 -> <<<stack<<< 06:49:47.161 -> 06:49:47.161 -> ets Jan 8 2013,rst cause:2, boot mode:(3,7) 06:49:47.161 -> 06:49:47.161 -> load 0x4010f000, len 1384, room 16 06:49:47.161 -> tail 8 06:49:47.161 -> chksum 0x2d 06:49:47.161 -> csum 0x2d 06:49:47.161 -> v8b899c12 06:49:47.161 -> ~ld 06:49:47.161 ->

Thoughts?

yknivag commented 4 years ago

Hi Anthony,

I'm sorry you're having so many problems. It looks like it may be a heap fragmentation issue caused by loading and unloading too many large arrays.

Do you have the ESP exception decoder installed (https://github.com/me-no-dev/EspExceptionDecoder)?

If so could you run the stack trace through it? (Has to be done on the same machine that compiled the code and code must be compiled and uploaded after the installation of the decoder for it to work)

I'll try and make a smaller test sketch for you to try tomorrow (UK time). I don't have a D1 Mini Pro but I should have a standard D1 hanging around to test.

yknivag commented 4 years ago

Well that was fun! After much head scratching, and a few little tweaks...

I can load this now onto a standard D1 mini and watch it run without crashing. However I cannot see whether it will display as I don't have a D1 mini display shield.

I don't have a D1 mini pro either so I can't confirm it runs on there.

I'd be very grateful if you could test again from master and let me know if it now works for you.

Thanks,

Gavin.

anthonyjclarke commented 4 years ago

Thanks so much, will give it a go and report back

anthonyjclarke commented 4 years ago

Here we go, success!

https://gfycat.com/portlyvioletflatfish

image

yknivag commented 4 years ago

So glad it's working for you now. Sorry it has taken so long.