duff2013 / ulptool

Program the esp32 ULP coprocessor in Arduino
272 stars 65 forks source link

Fix address calculation in ulp_run() call in all examples #55

Open kargeor opened 4 years ago

kargeor commented 4 years ago

FAQ

But all the examples work without this change? _When entry is the first record in the code, &ulp_entry - RTC_SLOW_MEM == 0, so any multiplication or division is still 0. However if you add code before ulpentry you end up at the wrong address.

What do the official docs say? ESP_ERROR_CHECK( ulp_run(&ulp_entry - RTC_SLOW_MEM) ); See here

duff2013 commented 4 years ago

Thanks, I'll take a look at this in a few days.

kargeor commented 4 years ago

Ping ping. I have double-triple-verified this one before opening this PR.

duff2013 commented 4 years ago

Thanks again I'm just in the middle of another project that I need to finish, hopefully soon and I will get back to ulp stuff then. Hold tight I'll be looking at this first.

draget commented 3 years ago

Agree - this fixes the i2c example