-
Notifications
You must be signed in to change notification settings - Fork 3k
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
mbed-os-example-client size with UBLOX_EVK_ODIN_W2 is massive #3598
Comments
|
What is really strange is that if you look at the mbed-os-example-client-map.csv, total flash is 464853 -> so the size should not be even remotely close to 1 megabyte? What's the linker doing in the end? |
|
K64F with ESP8266 as reference:
237876 Jan 17 15:36 mbed-os-example-client.bin* The image size very closely matches what elf2bin reports. |
Issue also exists with mbed-os-example-wifi, so it's not to do with mbed-os-example-client. For K64F
UBLOX;
So, should be around 308 kb but it is 990 kb. So, we actually have 2 issues: |
Kudos to @teetak01 for actually spotting that this is an issue. I just did some more digging on this and filed this bug. |
The u-blox ODIN-W2 Wi-Fi driver takes approximately 1M of flash since the driver contains patch files for Wi-Fi(682k) and Bluetooth in addition to the stacks. This is defined as: When building the wifi test (included in mbed test suite) with ARM and IAR toolchains the numbers look OK: Don't know why the elf2bin is presenting the wrong numbers. |
@JanneKiiskila @andreaslarssonublox It sounds like this is a bug with memap.py. @MarceloSalazar Any thoughts on what could be causing this? |
@MarceloSalazar Any update? |
I'm sorry, didn't have chance to look into this yet... |
The patch file is indeed defined in the '.firmware' section, however this is not part of the GNU GCC standard sections, and hence why it's discarded. The problem doesn't happen when using the ARM or IAR compilers, because of the nature of the memory map files (this falls in the RO area). @andreaslarssonublox would it be possible to rename .firmware to .text? |
Thanks for finding it @MarceloSalazar. We will fix it in the next release of the driver. |
Built Wifi example with UBLOX_EVK_ODIN_W2 and mbed OS SHA: 5d0ce3c Total Flash memory (text + data + misc): 998507 bytes Issue considered fixed. |
Note: This is just a template, so feel free to use/remove the unnecessary things
Description
#abc
Bug
Target
UBLOX_EVK_ODIN_W2
Toolchain:
GCC_ARM
Toolchain version:
0.9.10
mbed-cli version:
(
mbed --version
)meed-os sha:
(
git log -n1 --oneline
)5.3.3
DAPLink version:
Expected behavior
mbed-os-example-client binary size should match approximately what it is for the rest of the boards, somewhere from 250 to 500 kB.
Actual behavior
The binary is huge, it 1.1 megabytes.
Steps to reproduce
git clone mbed-os-example-client
generate security.h from portal (connect.mbed.com)
./build_all.sh
check binary sizes
The text was updated successfully, but these errors were encountered: