-
Notifications
You must be signed in to change notification settings - Fork 3k
M487: Add some bugfixes #5366
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
M487: Add some bugfixes #5366
Conversation
@Patater Is there anyone else who should review uvisor changes? please add as reviewer |
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.
uVisor-related changes look OK to me.
wakeup_tick = timestamp; | ||
|
||
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.
Please don't add trailing whitespace.
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.
*/ | ||
#ifdef TARGET_DEBUG | ||
#if defined(MBED_CONF_TARGET_UVISOR_DEBUG_SEMIHOSTING_ENABLE) && MBED_CONF_TARGET_UVISOR_DEBUG_SEMIHOSTING_ENABLE | ||
uvisor_api.debug_semihosting_enable(); |
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.
Hi @ccli8 ,
I think you are missing the point of having uvisor_api.debug_semihosting_enable()
.
The idea was to have a single binary that can be executed both with debugger attached and debugger detached. There is no way to reliably programmatically determine whether debugger is attached (on all ther platforms). So we added this function to prevent MCU from halting on BKPT
instruction.
We need a debugger to be attached to get the semihosting prints. In such a case - you can add a simply call to uvisor_api.debug_semihosting_enable()
to the debugger init script.
Calling uvisor_api.debug_semihosting_enable()
function statically guarded by ifdef
is misaligned with our goal.
Please refer to the https://github.com/ARMmbed/uvisor/blob/master/docs/lib/DEBUGGING.md
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.
@alzix The NUMAKER_PFM_M487 target doesn't support GDB debugger. Currently I can debug by following the Build with GCC and Debug with uVIsion guide. Do you know how to call uvisor_api.debug_semihosting_enable()
in uVision debugger?
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.
There is field under Debugger settings tab in uVision5
that allows specifying Initialization file
.
uvisor_api.debug_semihosting_enable()
can be called from it.
You will probably need to clear the Run to main()
checkbox, otherwise initialization file commands will only be executed once you reach main.
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.
@alzix The approach is failed on my uVision 5.24. I try with another simple example and find C function call by debugger doesn't work whether in Initialization File, Command Window, or Watch Window.
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.
@alzix I remove the commit with uvisor_api.debug_semihosting_enable()
. If there are other means to enable uvisor semi-hosting in Keil debugger, please let me know. Thanks.
Old lp_ticker handles past event, but it has a bug with premature go-off. The bug can re-produce on mbed-os-tests-mbed_drivers-lp_timeout/mbed-os-tests-mbed_hal-lp_us_tickers (mbed-os commit: 9c1fd48). Because upper layer (mbed-os/hal/mbed_ticker_api.c) has handled past event, this code can be removed from lp_ticker. The similar fix also applies to us_ticker.
LGTM |
@ccli8 There's travis again not reporting. Are you logged into travis? I was told that would help to eliminate abuse detected statuses. I can not locate this PR in travis. I'll close and open Please update the pull request thread with the latest status (in this case this was reworked to remove uvisor changes) and only tickers fix is present. |
@0xc0170 I don't log in travis. I will update status after you re-open this PR. |
Current status for this PR:
|
Abuse detected in the logs. @ccli8 I was asking about travis logging, because I received a response from travis help team yesterday:
They mention the organization however seems like this is valid also for a user :( Therefore I was asking if you can at least once log into travis, this would not flag this PR as abuse. This is the second time I am seeing this abuse detected status in travis this month. As my reopening did not help, the only way I know is to open a new PR or try to logging to travis CI and we can reopen this again. |
@0xc0170 I've logged in travis CI. Please re-try the travis test. |
@0xc0170 Could the abuse issue be fixed? Or I need to raise another PR? |
I contacted your colleague @cyliangtw the previous week to resolve this. I resent the email just now including you also there to agree on the next steps with this PR. Lets send new pull request. |
Description
This PR includes the following bugfixes with NUMAKER_PFM_M487 target: