-
Notifications
You must be signed in to change notification settings - Fork 17
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
C3: panic attack! #23
Comments
i forgot what was the number of issue, but with old code, it wouldn't compile it because of the put this in code PreferenceHandler.cpp
|
for now the only thing i fund is 2 links: |
i think i found a clue what is what. this project is excellent and works with very little changes, mainly because the library's have been updated and changed some codes. but, the main problem comes from this rep:
To:
i don't know what to do except change everything and began from the beginnings. reason is, i don't work with C++ and the code from C++ cannot be converted to C. there are few instructions in C++ that don't Implements in C. |
Hello @josef2600 I'll start soon a new esp32 project, and I will for sure follow your advice about C/C++ and I'll go the H4 road as it will give the right tooling without spending too much time on learning. |
thank you @RomeHein , i have been working on automation projects for 18 years. i have a patented invention on one. but until 2 years ago, i was always working with PIC (microchip) for them. my last project was around 18 month ago. it was beautiful and wonderful. the only problem was, i used a PIC32MZ2048EFH144 for it. and the price for that thing was 25$ alone! it had a huge PCB and a lot of expensive other parts. including an extra 32MB DDR2 ram on it. in total, the price got to around 90$ just for one board. and the programming for that was enormous! in general, for everyone using, it was too expensive. so i was looking and searching. at least i checked 500 projects from cheap micro to using a PC! and among all of them, the best one that i loved, was yours. your idea was excellent and with a cheap module. the reason i chose the ESP32-C3 is simple. it wasn't the price, but the specs. i chose ok, back to program. i found that the async lib has a big problem (among 50 more!). as i said, it uses the RTOS, the big big problem with this kind of working is when you use it, you cant know when 2 or more functions are going to clash. for example in this particular work, it is crashing because |
This is known as function overloading, which is a feature of the C++ language that allows you to define multiple functions with the same name but different parameter types or numbers. But I guess you are horrified by this type of things 😅 At the moment I only have classic esp32, but also esp32-s2 for low power projects. I bought these only for the price which is super low, and the form factor super small. I'll go the C3 or S3 road once the price will be lower. By the way, I have changed the telegram channel to be open for discussion: https://t.me/especial32 |
oh man, great! and yes! i was going crazy how is it working!
e.g |
Guru Meditation Error: Core 0 panic'ed (Load access fault). Exception was unhandled.
now, it runs, works, and suddenly, panics! i setup 3 analog input pins and read them. if the an2 is over 0, it send a massage in serial port (i am using USB inside the chip as serial port). after awhile, it panics, then hangs, then reboot itself.
for now i am working on changing strings on air to a global register. again, please when programming for microcontrollers, never use C++ as it is the worst language for it. read a datasheet, any micro from last 25 years that still exist. if they support any high language, it is always C and never C++. there are many reasons for it.
eg:
what is the difference between array and string?
in C, nothing! and that is logic answer. BUT
A "C" string:
char *myString = "This is my string";
is an array of characters. It is no different to an "array".
However, a "C++ String Object" is vastly different.
String myString = "This is my string";
That is an entire object with methods and properties which, while it makes programming easier, is not advised when working with microcontrollers. The memory usage when you're not doing much with it is only slightly more than a "C" string. However, a lot of the methods involve the allocation and deallocation (freeing) of memory, which leads to memory fragmentation.
"C" strings take a bit more working with, but the benefits from a memory management point of view are worth the time taken to learn about working with them.
The text was updated successfully, but these errors were encountered: