-
Notifications
You must be signed in to change notification settings - Fork 117
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
Updates needed to build latest code on CircuitPython #122
Conversation
Won't we run into circular definitions? This is from obj.h: I have to admit, I am never sure, whether one should use lower case, or upper case with these type checks. If you know what to do, I am not against making the whole thing uniform, so that we wouldn't have to distinguish between One might have to consider, though, that macros are in-lined, so we would probably add to the size of the firmware |
This fixes the diagnostic when building circuitpython: ``` ../../extmod/ulab/code/approx.c:25:12: error: no previous prototype for ‘approx_python_call’ [-Werror=missing-prototypes] mp_float_t approx_python_call(const mp_obj_type_t *type, mp_obj_t fun, mp_float_t x, mp_obj_t *fargs, uint8_t nparams) { ^~~~~~~~~~~~~~~~~~ ```
As far as I can tell, these are not checked for the sake of efficiency. This silences compiler diagnostics when building CircuitPython ``` ../../extmod/ulab/code/approx.c:25:12: error: no previous prototype for ‘approx_python_call’ [-Werror=missing-prototypes] mp_float_t approx_python_call(const mp_obj_type_t *type, mp_obj_t fun, mp_float_t x, mp_obj_t *fargs, uint8_t nparams) { ^~~~~~~~~~~~~~~~~~ ```
If CircuitPython ever updates from MicroPython, we'll have to change it. But for now, this seems like the easiest way. I've updated this PR with additional fixes for building on CircuitPython, due to our compiler flags. |
OK. Go ahead! |
@@ -28,6 +28,7 @@ | |||
|
|||
#if CIRCUITPY | |||
#define mp_obj_is_bool(o) (MP_OBJ_IS_TYPE((o), &mp_type_bool)) | |||
#define mp_obj_is_int(x) (MP_OBJ_IS_INT((x))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, this is the easiest way. MicroPython was just trying to canonicalize their macro names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't mean for this to be a review, just a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, but a comment by the oracle qualifies as a review. Seriously, Dan, I really appreciate that you chipped in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am only an oracle because I subscribe to all the micropython git notifcations 😄
I noticed on v923z#122 that no actions were run. I believe this is because the paths directives had no wildcards, contrary to the examples at https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpaths Eliminating the paths: restrictions entirely may be an equally valid course of action.
This fixes the following build error when updating ulab in CircuitPython: