-
Notifications
You must be signed in to change notification settings - Fork 58
[UBLOX_EVK_ODIN_W2 + IAR] Fails to register over WiFi #194
Comments
ARM Internal Ref: IOTCLT-1529 |
Has anyone done some ODIN UBLOX testing with this: https://github.com/ARMmbed/mbed-os-cliapp using IAR? Seems you're suspecting some issue and well, it's not a client issue in reality. |
mbed-os-example-wifi works fine for both iar and export make iar. |
Wifi example doesn't use mbedTLS at all, right? That might explain it. |
Not sure how good our test coverage is there, but the tests were passing. |
Does the WiFi example use the async APIs at all? Client uses ASYNC socket APIs. Those are not tested at all elsewhere as far as I understand. |
No, wifi example tests mostly wifi and very simple HTTP transaction to verify the link is up. |
To answer you next question, no we don't have any networking tests run on wifi at the moment. It's planned, we have the tests for Ethernet, but they won't be run on WiFi before we unify the network interfaces (finger crossed for it to happen for 5.5). |
@bridadan @bulislaw @0xc0170 Is the memory map linker script for IAR quite different from ARMCC and GCC options ? I think there is a difference between ARMCC, GCC and IAR linker scripts. They define different size of stack, heap memory areas for different compilers and that can be the reason for failure for IAR build because client needs more memory (because of TLS certificate handshake) , this example is clearly crossing the memory boundary for IAR builds. |
There's one big issue with IAR it has to have it HEAP defined at compiler time, so that's done in the linker script. But allocation issue should be easy to spot. |
I'll take your word for it :) Odin has 256K of RAM, not sure how much is needed for the client. @andreaslarssonublox is there any way to squeeze a little bit more of memory for the HEAP so the behavior is the same across the toolchains? |
Client definitely doesn't need 256 k RAM but if the memory map script for IAR toolchain is configured to utilize only a very limited memory size which might be lower than client needs then we have an issue. |
We can't have it 'the same' unfortunately, because ARM/GCC can use it dynamic and set at boot time, while IAR needs it hardcoded at build time. But maybe @andreaslarssonublox can help you make it work. |
Thanks for the feedback. I tried to just increase the heap size in the linker script: We can probably just increase it. When increasing it to 0xF000 it seemed to work. However there is a risk it won't work with other apps since it's hard-coded and very dependent on the use case. Is there a way of defining the heap size in some app configuration file instead @bulislaw ? |
Whats the current size? is it around 48k ? How much RAM does we have available for these targets? what should be the sensible default value? |
@yogpan01 please review this patch (increasing heap size for those 2 platforms to 1/2 RAM) - ARMmbed/mbed-os#3871 |
@0xc0170 This looks fine. |
Please send a patch (it with the client and IAR)) |
Looks like I can't build with the latest branch of
Just for fun I tried changing the heap size for that target like was done in this PR: https://github.com/ARMmbed/mbed-os/pull/3871/files#diff-e4c37ceb1dc7db22e3b98d6883f0dfe8L20 The value I chose was |
Thanks Brian for reporting cc @mazimkhan (to be aware of this) |
Wasn't the heap change tested? I think @andreaslarssonublox suggested 0xF000 maybe we should go with it, I mean there will still be the limitation of IAR, but we will address the client issue for this release. We can always tweak it later. |
Heap change was tested with tls-client example. Above failure means this example (+ libs) requires I created a map file in IAR workbench. It shows both lwip that uses For now we can find something that suites most of the examples. tls-client at least requires 0x10000 i.e. 64K of heap. |
@mazimkhan @bulislaw @0xc0170 This example now doesn't compile. Did someone fix this issue for example-client ? |
Whats the error? Is it overflow in the section reported above by Brian or ? |
@0xc0170 Yes the above one reported by Brian. I am now updating README of this example with this as "KNOWN ISSUE". |
Why are we still having this issue in the 5.4.1 OOB? |
FYI, waiting on this PR to be merged: ARMmbed/mbed-os#3920 |
@bridadan I think this issue is fixed. Closing. |
Branch: oob_test-mbed-os-5.4
When the UBLOX_EVK_ODIN_W2 is built with the IAR toolchain (with mbed CLI
-t IAR
option, the-i make_iar
exporter, and the-i iar
IDE exporter), the device connects to WiFi but fails to register with mbed Connector. It works with GCC_ARM and ARM.@bulislaw Is it possible this is an issue with the IAR binary driver that's present in mbed OS? Does the basic WiFi socket example work with IAR?
Logs:
The text was updated successfully, but these errors were encountered: