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

Realtek_RTL8195AM fix for debug profile #5044

Merged
merged 5 commits into from Sep 19, 2017

Conversation

Projects
None yet
9 participants
@Archcady
Contributor

Archcady commented Sep 7, 2017

Previously Realtek_RTL8195AM is unable to run with debug profile, now the issue is resolved. Changes are:
Change MSP setting method in booting;
Update wlan libs to fix a mutex osErrorISR issue;
Increase tcpip thread stacksize;

Related PR:
#4665

Archcady added some commits Sep 7, 2017

Update MSP setup
Use asm code to set MSP
Update wlan lib to fix debug profile
The issue of mutex returning osErrorISR with debug profile is fixed
Increase tcpip thread stacksize for REALTEK_RTL8195AM
The default stack size is not enough for debug profile (low compiler
optimization)
Remove unused code
Clean rtl8195a_init.c a little bit
@Archcady

This comment has been minimized.

Contributor

Archcady commented Sep 7, 2017

Hi @marcuschangarm , we fix the issue with debug profile with GCC on windows. I'm not sure if the issue with ARMCC/Linux is fixed since we don't have the compiler. Would you please give this PR a quick test? Many thanks.

@0xc0170

0xc0170 approved these changes Sep 7, 2017

@bulislaw

LGTM

@marcuschangarm

This comment has been minimized.

Contributor

marcuschangarm commented Sep 7, 2017

@Archcady Thank you for the fix. My test app is currently too large when using debug profile, so it might take me some time to shrink the test app enough to test this.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Sep 8, 2017

@Archcady Thank you for the fix. My test app is currently too large when using debug profile, so it might take me some time to shrink the test app enough to test this.

Any estimate?

@marcuschangarm

This comment has been minimized.

Contributor

marcuschangarm commented Sep 8, 2017

Well, good news, bad news. 😄

I'm not seeing the problems I saw when compiling with debug profile. So thats great!

Overall, I'm still seeing a lot of instability issues. My TLS client test connects successfully 50% of the time, the other times it fails on a socket error.

When I run my large application, it crashes at random places.

I'm also seeing this odd warning when linking:

Link: tls-client
Elf2Bin: tls-client
Malformed input found when parsing GCC map: linker stubs
Malformed input found when parsing GCC map: linker stubs
@Archcady

This comment has been minimized.

Contributor

Archcady commented Sep 11, 2017

Hi @marcuschangarm , those strange messages (Malformed input found when parsing GCC map: linker stubs) are coming from mbed-os\tools\memap.py. Looks like the MemapParser could not parse all the lines in .map file. The same messages are found when compile with ARMCC.

Re-work Rtl8195AM ticker
Remove intermediate variances and use uint64 instead;
Remove HalTimerIrqEn called in us_ticker.c
@Archcady

This comment has been minimized.

Contributor

Archcady commented Sep 15, 2017

Hi @marcuschangarm , with this new commit, mbed-cloud-client-example-r-confidential is much stable now. I ran it for at least one hour without crash or hanging.

@marcuschangarm

This comment has been minimized.

Contributor

marcuschangarm commented Sep 15, 2017

Thank you! That is great news! I'm currently traveling, but I'll try it out as soon as I get back!

@adbridge

This comment has been minimized.

Contributor

adbridge commented Sep 18, 2017

/morph test-nightly

@mbed-bot

This comment has been minimized.

mbed-bot commented Sep 18, 2017

Result: ABORTED

Your command has finished executing! Here's what you wrote!

/morph test-nightly

@studavekar

This comment has been minimized.

Collaborator

studavekar commented Sep 19, 2017

/morph test-nightly

@mbed-bot

This comment has been minimized.

mbed-bot commented Sep 19, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test-nightly

Output

mbed Build Number: 1338

All builds and test passed!

@adbridge

This comment has been minimized.

Contributor

adbridge commented Sep 19, 2017

@0xc0170 there was another change since you last reviewed, could you take a quick re-review?

@adbridge

A couple of minor coding style issues which should be fixed in any subsequent PR but not going to block this one on them.

@@ -23,24 +23,33 @@
#define SYS_TIM_ID 1 // the G-Timer ID for System
#define APP_TIM_ID 6 // the G-Timer ID for Application
#define TICK_TO_US(x) (uint64_t)(((x)/2) * 61 + ((x)%2) * TIMER_TICK_US)

This comment has been minimized.

@adbridge

adbridge Sep 19, 2017

Contributor

An explanation of where '61' comes from would be useful here

This comment has been minimized.

@tung7970

tung7970 Sep 20, 2017

Contributor

@adbridge Clock source is 32K, therefore, us per tick is 30.5. The TICK_TO_US macro is basically: (tick / 2) * (30.5*2) + residue

This patch is basically broken. I have submitted another PR #5143 to address us ticker issue, and also added proper inline comment.

}
void us_ticker_init(void)
{
if (us_ticker_inited) return;
if (us_ticker_inited){

This comment has been minimized.

@adbridge

adbridge Sep 19, 2017

Contributor

space required before '{'

This comment has been minimized.

@tung7970

tung7970 Sep 20, 2017

Contributor

Also fixed in #5143

@adbridge adbridge merged commit 003dd7c into ARMmbed:master Sep 19, 2017

4 checks passed

Cam-CI uvisor Build & Test Success
Details
ci/morph-test-nightly Job has completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@adbridge adbridge removed the needs: CI label Sep 19, 2017

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