-
Notifications
You must be signed in to change notification settings - Fork 16
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
Makefile #203
Conversation
Makefile
Outdated
DEFINES += HAVE_U2F HAVE_IO_U2F U2F_PROXY_MAGIC=\"ADA\" | ||
SDK_SOURCE_PATH += lib_u2f | ||
|
||
DEFINES += HAVE_UX_LEGACY |
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.
This wasn't included in the previous version, is it really needed?
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 think what you need is something like:
ifeq ($(TARGET_NAME), TARGET_NANOS)
DISABLE_STANDARD_BAGL_UX_FLOW=1
endif
To keep the same kind of stuff that you had before.
Though dropping the usage of old nanos ux code, to use the common one would be an interssting improvement.
I see that it's automatically done if you have HAVE_FLOW in uiHelpers_nanos.c and uiHelpers_nanox.c but not in menu_nanos.c, menu_nanox.c, menu.h, io.c, uiHelpers.h, io.h, uiScreens_bagl.c, uiHelpers.c
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've tried it, however, I'd say that lib_standard_app/main.c
is not compatible with it:
/opt/nanos-secure-sdk/lib_standard_app/main.c:33:19: error: redefinition of 'ux' with a different type: 'bolos_ux_params_t' (aka 'struct bolos_ux_params_s') vs 'ux_state_t' (aka 'struct ux_state_s')
bolos_ux_params_t G_ux_params;
^
/opt/nanos-secure-sdk/lib_ux/include/ux.h:322:30: note: expanded from macro 'G_ux_params'
#define G_ux_params ux.params
^
/opt/nanos-secure-sdk/lib_standard_app/main.c:32:19: note: previous definition is here
ux_state_t G_ux;
^
/opt/nanos-secure-sdk/lib_ux/include/ux.h:321:30: note: expanded from macro 'G_ux'
#define G_ux ux
^
/opt/nanos-secure-sdk/lib_standard_app/main.c:33:19: error: expected ';' after top level declarator
bolos_ux_params_t G_ux_params;
^
/opt/nanos-secure-sdk/lib_ux/include/ux.h:322:32: note: expanded from macro 'G_ux_params'
#define G_ux_params ux.params
@xchapron-ledger Any advice, please?
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 guess you have to choose between either:
1/ Keeping old Nanos flow, and thus having:
ifeq ($(TARGET_NAME), TARGET_NANOS)
DISABLE_STANDARD_BAGL_UX_FLOW=1
endif
and DISABLE_STANDARD_APP_FILES=1
which means you only benefit from standard_app makefile, and not from other files from the lib.
2/ Update the UX code to the flow UX API, and therefore drop the DISABLE_STANDARD_BAGL_UX_FLOW=1
and
HAVE_UX_LEGACY
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.
(At some point, we might rewrite the UI to use the new version, but at present we don't have time and budget for that.)
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.
As you want, I'm even wondering if you have anything to do.
I looks like you could simply:
- Enable HAVE_FLOW for TARGET_NANOS
- Update some #ifdef in menu_nanos.c, menu_nanox.c, menu.h, io.c, uiHelpers.h, io.h, uiScreens_bagl.c, uiHelpers.c
And that should be all?
But could be for another time.
Makefile
Outdated
python -m ledgerblue.deleteApp $(COMMON_DELETE_PARAMS) | ||
# code style | ||
format: | ||
astyle --options=.astylerc "src/*.h" "src/*.c" --exclude=src/glyphs.h --exclude=src/glyphs.c --ignore-exclude-errors |
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.
glyphs.c and glyphs.h are not generated in src anymore.
You could make a CI check of the coding style to make sure code stay formatted.
src/cardano_io.c
Outdated
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.
Could probably be really simplified if using UX_FLOW on TARGET_NANOS
b31197f
to
852916f
Compare
The Makefile refactoring part (using |
This got closed automatically, but we've not given up on Makefile refactoring. |
No description provided.