-
-
Notifications
You must be signed in to change notification settings - Fork 610
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
ULP Support on Arduino #274
Comments
Hi @GarlicToum ! Thanks for reporting that it works. If I'm not mistaken, Arduino framework lacks some of files required to properly generate firmware for ULP, for example the linker script |
Yeah, I believe it's missing the linker script out of the box. I'm not sure about the mapgen stuff - I'm still fairly new to esp32 development as well. Before it was working, I did try setting my framework to Here's a link to my changes: GarlicToum@de01daa |
To be honest, I'm not sure about these changes, it seems a bit hacky to me because it relies on the assumption that |
Awww shucks... Looks like I just got kinda lucky with [mis]configuration. I'm now recalling that I ran into a space issue with using I know duff2013 managed to get ULP with Arduino working with ulptool (https://github.com/duff2013/ulptool). It looks like using a I'm still new to a lot of esp32 development, let alone how the build tools work, so thanks for taking some time to respond! |
I want to use ULP in Arduino. Anybody make support for it in PIO? |
I would also like to use ULP in the Arduino framework of PlatformIO. The Pulse example works fine for me in the espidf framework, but when I try Cpp examples with "framework = arduino, espidf" the Arduino.h header is not found. Not sure how to configure or if this is even possible. Is this supposed to work? |
Hi @kfine100 ! Have you tried this example https://github.com/platformio/platform-espressif32/tree/develop/examples/espidf-arduino-wifiscan ? |
Hi valeros, Thanks much for your quick response. Your example builds with no errors and I see it has cpp. However, when I port my ulp code to this example I end up going in circles trying to correct the errors. The environment is complex, and I feel like a chimpanzee trying to solve a Rubik's cube. What would help me a lot is a simple Blink example that accesses the ulp with a small assembly code. Using PlatformIO with arduino, espidf framework. If that environment works then building up the assembly and C++ for my project would be straightforward. I think it would be used by other too, since the ulp is essential for battery powered devices. BTW, my hardware is an Adafruit ESP32 Feather. not sure if there will be problems with the exp32 dev and esp-wrover-kit boards used in your example. Thanks much for any help. |
OK, could you please test the following project. It's a compilation of sources/configurations based on two projects |
Hi Valerii You are one righteous silicon pilot! Your project compiles and loads. I cannot confirm that it works yet. I took your project and created two simpler projects. I include them which I recommend as examples for us ulp novices. espidf-arduino-ulp_simple_count is a routine from Espressif. All it does is start the ulp processor which increments a number. The count is then printed by the c++ loop function. This routine DOES NOT call the processor to enter into deep sleep. Note that I have set the board to featheresp32 which is the hardware I have. It works fine for me, but one odd thing is that I must delay about 500 ms after Serial.begin to see the first print from setup. This seems like a long time. But after the count increases about 10 x a second, so the ulp processor is working and sharing the count with the main processor. esp-arduino-ulp_wakeup is the simplest possible way I could think to test putting to sleep and then waking up the main processor. Once called, the ulp resets its wakeup clock and then wakes the main processor. I copied the code from Espressif. This routine does not seem to work for me. I include my serial output in 2020_05_17_ulpWakeupPrint.txt. The ulp does wakeup the main processor, and cause = ESP_SLEEP_WAKEUP_ULP. However, it seems like there is a complete reboot. Could you confirm that this is not normal and do you have an idea what the problem is? Thanks much, Kevin 2020_05_17_ulpWakeupPrint.txt |
Hi Kevin, I'm no expert on ESP32 platform, so I cannot confirm that any of the peculiarities you described above are normal. There might be an issue with project configuration or with project code itself. It might be a good idea to ask someone on the official forum here https://esp32.com/viewforum.php?f=23 |
Hi Valerii I can confirm that my wakeup program is not working. This part of the serial printout
normally occurs. This output can be supressed by adding the line
to the c++ initialization code. The part that follows in my .txt file is a reboot because something is wrong. I have managed to program the ulp wakeup in Arduino IDE. I would happier if I could work with PlatformIO and will continue to try to make my example work. I attach the Arduino files in case someone wants to port them to PlatformIO. It would make a simpler example to use as a reference. Thanks, Kevin |
@kfine100 Kevin, have you ever had any luck with moving it to platformio ? |
Hi kororos I believe I was able to get all the ulp functions working in Arduino and PlatformIO. However, my main application was to wakeup Bluetooth and send a message, and this does not work on the ESP32. I have heard they have a newer processor that can maintain BLE while asleep, but I have not tried it. It's all a bit hazy because I went onto other problems, but I figure at some point I will use ULP for some low power application. Kevin |
Is any update on this? I would like to see a platformio project with the Arduino Framework using the ulp capabilities. I have searched many sites but there is not much information available or it is not clear. When I add ULP code to my project I have been sorting with many errors and I'm still blocked. Any update that clarifies a clear and updated method up to date? Thanks in advance |
I would like to use ULP in the Arduino framework of PlatformIO to move my project @waterius to ESP32S2. |
Hi! Any updates on this? Big fan of the idea |
Hey!
So, I just learned about platformio and was working on moving my esp32 project from Arduino over to it. I had some ULP code in the Arduino (using ulptool), and noticed that there wasn't any support for ULP in Arduino. So, I hacked
arduino.py
in the frameworks folder to do some of the ULP stuff fromespidf.py
(based on 8d08246#diff-85c06424f599ebef79138c4c8b4456cc) and got it working (verified with a logic analyzer).I'm not sure how best to proceed, since the change wasn't too complicated, but if you guys are interested in looking at the code, I can put in a PR for it.
The text was updated successfully, but these errors were encountered: