Skip to content

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

Open
kargeor wants to merge 1 commit intoduff2013:masterfrom
kargeor:fix_ulp_run
Open

Fix address calculation in ulp_run() call in all examples#55
kargeor wants to merge 1 commit intoduff2013:masterfrom
kargeor:fix_ulp_run

Conversation

@kargeor
Copy link
Copy Markdown

@kargeor kargeor commented Feb 9, 2020

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 kargeor requested a review from duff2013 February 9, 2020 18:35
@duff2013
Copy link
Copy Markdown
Owner

duff2013 commented Feb 9, 2020

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

@kargeor
Copy link
Copy Markdown
Author

kargeor commented Mar 15, 2020

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

@duff2013
Copy link
Copy Markdown
Owner

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
Copy link
Copy Markdown

draget commented Nov 13, 2020

Agree - this fixes the i2c example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants