Comments (14)
By the way, I ran into this issue on mbed-cmake too. What I did was I just had cmake detect whether prettytable
was installed and, if not, disable memory mapping entirely. You'll notice I added my super-convenient CheckPythonPackage module in the upload methods PR which can be used to do this in like 2 lines of code (like this).
from mbed-tools.
Also this might be a good time to review the memory reporting, which has its own issues, see ARMmbed/mbed-os#10922
from mbed-tools.
Is it worth making memmap as own python module that could be installed ?
@0xc0170 you're talking about memap.py
right? not the numpy.memmap module.
I think it would be nice to have it as an external module or even better, integrate the new version to mbed-tools. I've seen some issues when mbed-os is not at the root of the project, you don't get the nice division between modules.
Being able to work on it with PRs here would be nice.
from mbed-tools.
Hi @boraozgen, thanks for the report. It is in the backlog, we will look at this soon.
I already created requirements.txt for Cmake as PR but that is rather a workaround, so we should reconsider this.
from mbed-tools.
@rajkan01 Please review
from mbed-tools.
Which PR do you mean? This is another question I have: Where is the project tracked? I see some tasks in GitHub Projects, and there are some references in the changelog, of which I have no idea where they are referenced...
from mbed-tools.
Where is the project tracked? I see some tasks in GitHub Projects, and there are some references in the changelog, of which I have no idea where they are referenced...
That is on of the things to be fixed. We are currently having this tracked internally only. The Github contains technical issues only at the moment.
@boraozgen @multiplemonomials How do you find memmap (besides the bugs, that could be fixed.) ? Is it worth making memmap as own python module that could be installed ?
from mbed-tools.
That is on of the things to be fixed. We are currently having this tracked internally only. The Github contains technical issues only at the moment.
Would be nice, as I now have multiple issues during my evaluation and don't want to report duplicate stuff you already track internally...
How do you find memmap (besides the bugs, that could be fixed.) ? Is it worth making memmap as own python module that could be installed ?
What does it do other than to report the memory information in a few lines? Is there a documentation? I would like a way of reporting the module sizes with deeper hierarchy (more than the current one level), but I guess 3rd party tools could be used for that...
from mbed-tools.
If issue is not on Github, raise a new one please.
Quick check for the differences between what toolchain provides and what memmap provides:
GCC ARM "-Wl,--print-memory-usage" flag:
Memory region Used Size Region Size %age Used
m_interrupts: 1 KB 1 KB 100.00%
m_flash_config: 16 B 16 B 100.00%
m_text: 42688 B 1047536 B 4.08%
m_data: 64 KB 64 KB 100.00%
m_data_2: 191 KB 192 KB 99.48%
memmap module:
| Module | .text | .data | .bss |
|------------------|---------------|-------------|-------------|
| [fill] | 116(+116) | 4(+4) | 2185(+2185) |
| [lib]\c.a | 12027(+12027) | 2472(+2472) | 89(+89) |
| [lib]\gcc.a | 760(+760) | 0(+0) | 0(+0) |
| [lib]\misc | 188(+188) | 4(+4) | 28(+28) |
| [lib]\nosys.a | 32(+32) | 0(+0) | 0(+0) |
| main.cpp.obj | 44(+44) | 0(+0) | 0(+0) |
| mbed-os\cmsis | 8017(+8017) | 168(+168) | 5952(+5952) |
| mbed-os\drivers | 206(+206) | 0(+0) | 0(+0) |
| mbed-os\hal | 1697(+1697) | 8(+8) | 115(+115) |
| mbed-os\platform | 7279(+7279) | 260(+260) | 365(+365) |
| mbed-os\rtos | 214(+214) | 0(+0) | 0(+0) |
| mbed-os\targets | 9286(+9286) | 36(+36) | 386(+386) |
| Subtotals | 39866(+39866) | 2952(+2952) | 9120(+9120) |
Total Static RAM memory (data + bss): 12072(+12072) bytes
Total Flash memory (text + data): 42818(+42818) bytes
ARMClang "--info=summarysizes,sizes,totals,unused,veneers"
Program Size: Code=35512 RO-data=4756 RW-data=292 ZI-data=205684
memmap:
| Module | .text | .data | .bss |
|---------------------|---------------|-----------|---------------|
| [lib]\c_w.l | 4368(+4368) | 16(+16) | 348(+348) |
| [lib]\fz_wm.l | 26(+26) | 0(+0) | 0(+0) |
| [lib]\libcppabi_w.l | 44(+44) | 0(+0) | 0(+0) |
| anon$$obj.o | 32(+32) | 0(+0) | 2304(+2304) |
| main.o | 48(+48) | 0(+0) | 0(+0) |
| mbed-os\cmsis | 9468(+9468) | 168(+168) | 6609(+6609) |
| mbed-os\drivers | 534(+534) | 0(+0) | 0(+0) |
| mbed-os\hal | 1672(+1672) | 8(+8) | 115(+115) |
| mbed-os\platform | 8122(+8122) | 64(+64) | 357(+357) |
| mbed-os\rtos | 425(+425) | 0(+0) | 0(+0) |
| mbed-os\targets | 15389(+15389) | 36(+36) | 341(+341) |
| Subtotals | 40128(+40128) | 292(+292) | 10074(+10074) |
Total Static RAM memory (data + bss): 10366(+10366) bytes
Total Flash memory (text + data): 40420(+40420) bytes
from mbed-tools.
I believe we will use scripts with CMake so requirements will be required anyway. One way to address this would be to add requirements to CMake Mbed OS: ARMmbed/mbed-os#13944. If we upstream memmap to be separate package, it would be just updated. If we add additional script to post process output file, all would be added to requirements. It is now left in between nowhere.
from mbed-tools.
@ladislas It's not just if mbed-os is at the root, but also and/if mbed_app.json is not at the root.
from mbed-tools.
@jrobeson what do you mean?
in my case, mbed_app.json is a the root of the project. mbed-os is located at ./extern/mbed-os
.
memap.py shows only one category for mbed-os: extern/mbed-os
from mbed-tools.
If you put mbed_app.json
somewhere else and then use --app-config=/path/to/mbed_app.json
it also ruins the memmap display
from mbed-tools.
Fixed via #170
from mbed-tools.
Related Issues (20)
- mbed-tool detect doesn't detect mbed devices inside docker HOT 4
- Build Mbed application with out-of-tree modules HOT 4
- default example build fails HOT 9
- Allow to fetch the latest mbed-os without the entire Git history HOT 2
- TARGET_NAME global macro is not set HOT 2
- Unable to detect CYW9P62S1_43012EVB_01
- POST_APPLICATION_ADDR macro for bootloader is not defined HOT 1
- Is it possible to get different "exit code" ? HOT 1
- mbed-tools deploy fails while parsing .lib files HOT 1
- Build failed with shared mbed-os using Windows junction HOT 2
- mbed-tools compile fails with bare-metal HOT 4
- `mbed-tools configure` fails due to multiple mbed-os paths being searched
- Use pdoc rather than pdoc3 HOT 3
- Upgrade to suport recent version of click. HOT 3
- CMakeLists.tmpl not Found HOT 1
- --mbed-os-path Doesn't work HOT 2
- Deploy command fails on non-git repos.
- Custom build profiles do not work HOT 1
- Running `mbed-tools detect` on mac_os fails when a USB peripheral does not provide some data
- how to set CMAKE_CXX_COMPILER ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mbed-tools.