ulptool icon indicating copy to clipboard operation
ulptool copied to clipboard

Fix address calculation in ulp_run() call in all examples

Open kargeor opened this issue 5 years ago • 4 comments

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 ulp_entry 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

kargeor avatar Feb 09 '20 18:02 kargeor

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

duff2013 avatar Feb 09 '20 23:02 duff2013

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

kargeor avatar Mar 15 '20 22:03 kargeor

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.

duff2013 avatar Mar 15 '20 23:03 duff2013

Agree - this fixes the i2c example

draget avatar Nov 13 '20 12:11 draget