Skip to content
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

UBLOX_EVK_ODIN_W2 - IAR - hard faults with mbed-os-example-client & Mbed OS 5.9 #7137

Closed
JanneKiiskila opened this issue Jun 6, 2018 · 16 comments

Comments

@JanneKiiskila
Copy link
Contributor

JanneKiiskila commented Jun 6, 2018

Description

Code in: https://github.com/ARMmbed/mbed-os-example-client/tree/mbed-os-5.9.0-oob

git clone [email protected]:ARMmbed/mbed-os-example-client.git
git checkout mbed-os-5.9.0-oob
cp configs/wifi_odin_v4.json mbed_app.json

Put in your WiFi SSID/password to mbed_app.json.
Replace security.h with the downloaded security.h from Mbed Connector.

compile -m UBLOX_EVK_ODIN_W2 -t IAR

Flash to device, start it.

  • should run (GCC ARM, CC ARM versions do run & pass)
  • IAR version crashes.

Issue request type

[] Question
[ ] Enhancement 
[X] Bug 

More details in; ARMmbed/mbed-os-example-client#405 (comment)

14:57:21.199 | D1 <<< DutThread: ++ MbedOS Fault Handler ++
14:57:21.200 | D1 <<< DutThread: FaultType: HardFault
14:57:21.200 | D1 <<< DutThread: Context:
14:57:21.200 | D1 <<< DutThread: R0 : FFFFFFFF
14:57:21.201 | D1 <<< DutThread: R1 : 2002A33C
14:57:21.201 | D1 <<< DutThread: R2 : 00000000
14:57:21.202 | D1 <<< DutThread: R3 : 080E844C
14:57:21.203 | D1 <<< DutThread: R4 : 00000000
14:57:21.203 | D1 <<< DutThread: R5 : 080D0599
14:57:21.203 | D1 <<< DutThread: R6 : 00000000
14:57:21.204 | D1 <<< DutThread: R7 : 00000004
14:57:21.204 | D1 <<< DutThread: R8 : 00000000
14:57:21.204 | D1 <<< DutThread: R9 : 20008860
14:57:21.205 | D1 <<< DutThread: R10 : 00000000
14:57:21.205 | D1 <<< DutThread: R11 : 00000000
14:57:21.205 | D1 <<< DutThread: R12 : 080BFCA1
14:57:21.206 | D1 <<< DutThread: SP : 2000BEA0
14:57:21.206 | D1 <<< DutThread: LR : 080B6C1D
14:57:21.206 | D1 <<< DutThread: PC : 080D05A4
14:57:21.206 | D1 <<< DutThread: xPSR : 61000000
14:57:21.207 | D1 <<< DutThread: PSP : 2000BE80
14:57:21.207 | D1 <<< DutThread: MSP : 20006DE8
14:57:21.207 | D1 <<< DutThread: CPUID: 410FC241
14:57:21.207 | D1 <<< DutThread: HFSR : 80000000
14:57:21.207 | D1 <<< DutThread: MMFSR: 00000000
14:57:21.208 | D1 <<< DutThread: BFSR : 00000000
14:57:21.208 | D1 <<< DutThread: UFSR : 00000000
14:57:21.208 | D1 <<< DutThread: DFSR : 0000000A
14:57:21.208 | D1 <<< DutThread: AFSR : 00000000
14:57:21.209 | D1 <<< DutThread: SHCSR: 00000000
14:57:21.209 | D1 <<< DutThread: Mode : Thread
14:57:21.210 | D1 <<< DutThread: Priv : Privileged
14:57:21.210 | D1 <<< DutThread: Stack: PSP
14:57:21.210 | D1 <<< DutThread: Threads Info:
14:57:21.210 | D1 <<< DutThread: Current:
14:57:21.211 | D1 <<< DutThread: State: 0x00000002 Entry: 0x080BCD41 Stack Size: 0x00001000 Mem: 0x2000AF48 SP: 0x2000BED8
14:57:21.211 | D1 <<< DutThread: Next:
14:57:21.212 | D1 <<< DutThread: State: 0x00000002 Entry: 0x080BCD41 Stack Size: 0x00001000 Mem: 0x2000AF48 SP: 0x2000BED8
14:57:21.212 | D1 <<< DutThread: Wait:
14:57:21.212 | D1 <<< DutThread: State: 0x00000083 Entry: 0x08130139 Stack Size: 0x00000300 Mem: 0x20026BF0 SP: 0x20026E88
14:57:21.213 | D1 <<< DutThread: Delay:
14:57:21.303 | D1 <<< DutThread: State: 0x00000043 Entry: 0x080BCD41 Stack Size: 0x00000200 Mem: 0x200082A8 SP: 0x20008410
14:57:21.303 | D1 <<< DutThread: Idle:
14:57:21.304 | D1 <<< DutThread: State: 0x00000001 Entry: 0x080C20C1 Stack Size: 0x00000200 Mem: 0x20027C80 SP: 0x20027E30
14:57:21.304 | D1 <<< DutThread: -- MbedOS Fault Handler --
14:57:21.304 | D1 <<< DutThread: ++ MbedOS Error Info ++
14:57:21.304 | D1 <<< DutThread: Error Status: 0x80ff013d Code: 317 Entity: 255
14:57:21.305 | D1 <<< DutThread: Error Message: System encountered an unrecoverable fault excaption, halting system.
14:57:21.305 | D1 <<< DutThread: Location: 0x80d05a4
@JanneKiiskila
Copy link
Contributor Author

@ARMmbed/team-ublox
@SeppoTakalo

@SeppoTakalo
Copy link
Contributor

CC: @KariHaapalehto please study.

@asifrizwanubx
Copy link
Contributor

Tried to reproduce with the driver source code but didn't get the hard fault. We will look it soon.

@ciarmcom
Copy link
Member

ciarmcom commented Jun 6, 2018

ARM Internal Ref: MBOTRIAGE-434

@asifrizwanubx
Copy link
Contributor

Internal u-blox ref: TE_OM2-197.

@KariHaapalehto
Copy link
Contributor

Running out of memory. I did say from the heap traces that in this case heap allocation did fail.

@mikaleppanen
Copy link

Made a pull request to increase the heap on IAR. #7289

@asifrizwanubx We are seeing an increase on heap usage on Odin wlan driver during initialization from 5.8 to 5.9. Are e.g. the thread stack sizes allocated by driver optimized?

@asifrizwanubx
Copy link
Contributor

@mikaleppanen there is no change/update in drivers related to thread stack sizes.

@asifrizwanubx
Copy link
Contributor

asifrizwanubx commented Jun 25, 2018

But there are changes related to memory allocation, static memory allocation mostly changed in drivers. @mikaleppanen

@screamerbg
Copy link
Contributor

screamerbg commented Jun 27, 2018

@mikaleppanen @asifrizwanubx Is the #7289 PR fixing this issue?

@mikaleppanen
Copy link

Yes, tested mbed-os-example-client with the changes and error does now occur anymore.

@asifrizwanubx
Copy link
Contributor

yes, I have verifed it.

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 28, 2018

Thanks for the verification !

@0xc0170 0xc0170 closed this as completed Jun 28, 2018
@0xc0170 0xc0170 reopened this Jun 28, 2018
@0xc0170
Copy link
Contributor

0xc0170 commented Jun 28, 2018

Not yet merged, too fast closing :)

@JanneKiiskila
Copy link
Contributor Author

When will this get merged? Known issue list with the Mbed OS boards is just getting longer and longer...

@mikaleppanen
Copy link

Correction has been merged:

#7289

@0xc0170 0xc0170 closed this as completed Aug 2, 2018
adbridge pushed a commit that referenced this issue Aug 10, 2018
Decreased stack size from 24kB to 1kB (stack is used on boot-up/interrupt
handler). Increased heap size from 65kB to 89kB.

Change is related to issue #7137
where UBLOX_EVK_ODIN_W2 runs out of heap on WLAN.
adbridge pushed a commit that referenced this issue Aug 13, 2018
Decreased stack size from 24kB to 1kB (stack is used on boot-up/interrupt
handler). Increased heap size from 65kB to 89kB.

Change is related to issue #7137
where UBLOX_EVK_ODIN_W2 runs out of heap on WLAN.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants