<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to adapt Core code to Core2?]]></title><description><![CDATA[<p dir="auto">Hi</p>
<p dir="auto">I have some code that compiles and runs fine for Core<br />
So I replaced M5Stack.h with M5core.h and compiled it for the Core2 and downloaded.<br />
But it just keeps rebooting.</p>
<p dir="auto">Here's what I get in the serial window. Any suggestions on what is wrong and needs to be adapted to make Core-code work in a Core2?</p>
<pre><code>Rebooting...
M5Core2 initializing...axp: vbus limit off
axp: gpio1 init
axp: gpio2 init
axp: rtc battery charging enabled
axp: esp32 power voltage was set to 3.35v
axp: lcd backlight voltage was set to 2.80v
axp: lcd logic and sdcard voltage preset to 3.3v
axp: vibrator voltage preset to 2v
E (1455) ledc: ledc_channel_config(369): gpio_num argument is invalid
touch: FT6336 ready (fw id 0x10 rel 1, lib 0x300E)
OK
E (3029) rmt: rmt_set_gpio(526): RMT GPIO ERROR
E (3029) rmt: rmt_config(686): set gpio for RMT driver failed
[i] SDK:          'v4.4-beta1-189-ga79dc75f0a'
[i] CPU Speed:    240 MHz
[i] Chip Id:      43F23A08
[i] Flash Mode:   00000002
[i] Flash Size:   01000000
[i] Flash Speed:  80 MHz
[i] Heap          261868/288324
[i] SPIRam        4192139/4192139

[i] Starting
[WiFi] Connecting...
OTA Ready
[i] read status from SPIFFS
[i]   Setup MQTT
[REL] setting 0 to OFF
[REL] setting 1 to OFF
[REL] setting 0 to ON
[REL] setting 1 to ON
[REL] setting 0 to OFF in 2000 ms
[REL] setting 1 to OFF in 5000 ms
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x400df248  PS      : 0x00060733  A0      : 0x800dfae4  A1      : 0x3ffb2710  
A2      : 0xffffffff  A3      : 0x00000003  A4      : 0x00060720  A5      : 0x00000000  
A6      : 0x007b764c  A7      : 0x003fffff  A8      : 0x3f410ab4  A9      : 0x00000058  
A10     : 0xffffffab  A11     : 0x00000084  A12     : 0x3ffc9ebc  A13     : 0x00060723  
A14     : 0x00060720  A15     : 0x00000001  SAR     : 0x0000000a  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000058  LBEG    : 0x40086565  LEND    : 0x4008656d  LCOUNT  : 0x00000027  


Backtrace:0x400df245:0x3ffb27100x400dfae1:0x3ffb2740 0x400dff3f:0x3ffb2770 0x400d4031:0x3ffb27b0 0x400d4170:0x3ffb27e0 0x400d5bc3:0x3ffb2800 0x400ea60d:0x3ffb2820 




ELF file SHA256: 0000000000000000

Rebooting...
</code></pre>
]]></description><link>https://community.m5stack.com/topic/4000/how-to-adapt-core-code-to-core2</link><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Mar 2026 08:33:07 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4000.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 03 Feb 2022 22:08:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to adapt Core code to Core2? on Fri, 04 Feb 2022 12:35:57 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/16406">@Thomasx</a></p>
<p dir="auto">sorry to disappoint you, but sadly not every library has been written in a way that it can automatically adapt to a new product. Or sometimes the <code>init()</code> or <code>begin()</code> functions need to be provided with different parameters to account for a specific product which doesn't use default values. And I am afraid in some cases you have to directly modify the library yourself to make it work with a specific product.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/16524</link><guid isPermaLink="true">https://community.m5stack.com/post/16524</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Fri, 04 Feb 2022 12:35:57 GMT</pubDate></item><item><title><![CDATA[Reply to How to adapt Core code to Core2? on Fri, 04 Feb 2022 11:35:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a></p>
<p dir="auto">Yes, but since none of these function calls reside in my code, but (I assume) in libraries, I would have expected this to be handled by using M5Core2.h and choosing the correct target in the IDE.</p>
<p dir="auto">I can't see what else to change, other than replacing some libraries, but what to replace, and with what, in that case.</p>
]]></description><link>https://community.m5stack.com/post/16523</link><guid isPermaLink="true">https://community.m5stack.com/post/16523</guid><dc:creator><![CDATA[Thomasx]]></dc:creator><pubDate>Fri, 04 Feb 2022 11:35:04 GMT</pubDate></item><item><title><![CDATA[Reply to How to adapt Core code to Core2? on Fri, 04 Feb 2022 04:31:32 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/16406">@Thomasx</a></p>
<p dir="auto">my best guess (w/o knowing the actual code you wish to compile) is that some GPIOs need to be adapted from M5Stack to M5Core2. This <a href="https://www.gwendesign.ch/kb/m5stack/m5core2/#m5core2-bus-and-gpios-compared-to-m5stack" target="_blank" rel="noopener noreferrer nofollow ugc">table</a> might help you.</p>
<p dir="auto">The <strong>E</strong>rror lines in your log file might give you some hints as well:</p>
<pre><code>E (1455) ledc: ledc_channel_config(369): gpio_num argument is invalid
E (3029) rmt: rmt_set_gpio(526): RMT GPIO ERROR
E (3029) rmt: rmt_config(686): set gpio for RMT driver failed
</code></pre>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/16519</link><guid isPermaLink="true">https://community.m5stack.com/post/16519</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Fri, 04 Feb 2022 04:31:32 GMT</pubDate></item></channel></rss>