GithubHelp home page GithubHelp logo

Comments (6)

PhilippvK avatar PhilippvK commented on June 17, 2024

Currently explicitly ignored sections:

.stack
.comment
.riscv.attributes
.strtab
.shstrtab

Missing sections on etiss_pulpino:

INFO - ignored: .symtab / size: 8384

Missing sections on spike/ovpsim:

INFO - ignored: .eh_frame / size: 4
INFO - ignored: .fini_array / size: 4
INFO - ignored: .symtab / size: 9520

Missing sestions on host_x86:

INFO - ignored: .interp / size: 28
INFO - ignored: .note.gnu.property / size: 32
INFO - ignored: .note.gnu.build-id / size: 36
INFO - ignored: .note.ABI-tag / size: 32
INFO - ignored: .gnu.hash / size: 36
INFO - ignored: .dynsym / size: 264
INFO - ignored: .dynstr / size: 195
INFO - ignored: .gnu.version / size: 22
INFO - ignored: .gnu.version_r / size: 96
INFO - ignored: .rela.dyn / size: 240
INFO - ignored: .rela.plt / size: 120
INFO - ignored: .init / size: 27
INFO - ignored: .plt / size: 96
INFO - ignored: .plt.got / size: 16
INFO - ignored: .plt.sec / size: 80
INFO - ignored: .fini / size: 13
INFO - ignored: .eh_frame_hdr / size: 364
INFO - ignored: .eh_frame / size: 1512
INFO - ignored: .fini_array / size: 8
INFO - ignored: .dynamic / size: 512
INFO - ignored: .got / size: 104
INFO - ignored: .symtab / size: 4488

Missing section on corstone300:

INFO - ignored: .ARM.exidx / size: 8
INFO - ignored: .copy.table / size: 12
INFO - ignored: .zero.table / size: 0
INFO - ignored: .sram / size: 0
INFO - ignored: .heap / size: 32768
INFO - ignored: .ARM.attributes / size: 42
INFO - ignored: .stab / size: 60
INFO - ignored: .stabstr / size: 118
INFO - ignored: .symtab / size: 20704

from mlonmcu.

PhilippvK avatar PhilippvK commented on June 17, 2024

After a quick inspection we shoould at least properly detect the following sections as they have a non-neglectable size:

  • .heap (ARM)

from mlonmcu.

rafzi avatar rafzi commented on June 17, 2024

This should be decided based on which sections would be required for a minimal functioning deployment.

For example:

ignore:

symtab, all of the extra ARM sections?

count:

eh_frame, fini_array

eh_frame is unexpected because we compile most code without exceptions enabled. Are we missing something? Would they even work if our main code does not support them? In that case they can also be ignored.

We don't use the heap of the CRT so I don't think we would need to deploy the ARM heap section.

x86 is a special case because we run on an operating system with a complex dynamic loader that requires way more than what would be necessary on bare metal. We can just keep it as is to have a roughly accurate representation but these numbers will not be very useful for tinyml evaluation anyways.

from mlonmcu.

PhilippvK avatar PhilippvK commented on June 17, 2024

I am in the process of integrating support for ESP32/ESP32C3 targets. Here are the memory segments used in the ELF:

WARNING - ignored: .rtc.text / size: 16
WARNING - ignored: .rtc.force_fast / size: 0
WARNING - ignored: .rtc.data / size: 16
WARNING - ignored: .rtc_noinit / size: 0
WARNING - ignored: .rtc.force_slow / size: 0
WARNING - ignored: .iram0.text / size: 32004
WARNING - ignored: .dram0.dummy / size: 32256
WARNING - ignored: .dram0.data / size: 3140
WARNING - ignored: .noinit / size: 0
WARNING - ignored: .dram0.bss / size: 6960
WARNING - ignored: .flash.text / size: 75412
WARNING - ignored: .flash_rodata_dummy / size: 131072
WARNING - ignored: .flash.appdesc / size: 256
WARNING - ignored: .flash.rodata / size: 554504
WARNING - ignored: .eh_frame / size: 0
WARNING - ignored: .flash.rodata_noload / size: 0
WARNING - ignored: .iram0.text_end / size: 252
WARNING - ignored: .iram0.data / size: 0
WARNING - ignored: .iram0.bss / size: 0
WARNING - ignored: .dram0.heap_start / size: 0
WARNING - ignored: .symtab / size: 52512

Instead of .text, .bss,... ESP-IDF uses .flash*, .iram,... - We need to find a fair mapping for these to enable comparisons between different platforms!

from mlonmcu.

PhilippvK avatar PhilippvK commented on June 17, 2024

I tried to map all of those in elf.py.

@rafzi What do you think about .iram.text, .iram.data and .iram.bss? Code could be split up over flash and instruction RAM, so should be still add .iram.text to rom_code?

from mlonmcu.

rafzi avatar rafzi commented on June 17, 2024

I'm not sure how the flash and boot process works for these. I guess text and data need to be stored in full in flash and then text would be loaded into iram during boot? The bss would not need storage space, but I assume it still has to occupy its whole space, because there would otherwise not be any information about it

from mlonmcu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.