Browse Source

CMake Bloaty add static ram usage breakout

release/1.12
Peter van der Perk 4 years ago committed by Daniel Agar
parent
commit
96bc58f0eb
  1. 2
      .github/workflows/compile_nuttx.yml
  2. 13
      Tools/bloaty_static_ram.bloaty
  3. 7
      cmake/bloaty.cmake

2
.github/workflows/compile_nuttx.yml

@ -123,6 +123,8 @@ jobs:
run: make ${{matrix.config}} bloaty_symbols || true run: make ${{matrix.config}} bloaty_symbols || true
- name: make ${{matrix.config}} bloaty_templates - name: make ${{matrix.config}} bloaty_templates
run: make ${{matrix.config}} bloaty_templates || true run: make ${{matrix.config}} bloaty_templates || true
- name: make ${{matrix.config}} bloaty_ram
run: make ${{matrix.config}} bloaty_ram || true
- name: make ${{matrix.config}} bloaty_compare_master - name: make ${{matrix.config}} bloaty_compare_master
run: make ${{matrix.config}} bloaty_compare_master || true run: make ${{matrix.config}} bloaty_compare_master || true
- name: ccache post-run - name: ccache post-run

13
Tools/bloaty_static_ram.bloaty

@ -0,0 +1,13 @@
custom_data_source: {
name: "bloaty_static_ram"
base_data_source: "sections"
rewrite: {
pattern: "^\\.bss"
replacement: "ram"
}
rewrite: {
pattern: "^\\.data"
replacement: "ram"
}
}

7
cmake/bloaty.cmake

@ -71,6 +71,13 @@ if (BLOATY_PROGRAM)
USES_TERMINAL USES_TERMINAL
) )
# bloaty statically allocated RAM
add_custom_target(bloaty_ram
COMMAND ${BLOATY_PROGRAM} -c ${PX4_SOURCE_DIR}/Tools/bloaty_static_ram.bloaty -d bloaty_static_ram,compileunits --source-filter ^ram$ ${BLOATY_OPTS} $<TARGET_FILE:px4>
DEPENDS px4
USES_TERMINAL
)
# bloaty compare with last master build # bloaty compare with last master build
add_custom_target(bloaty_compare_master add_custom_target(bloaty_compare_master
COMMAND wget -c -N --no-verbose https://s3.amazonaws.com/px4-travis/Firmware/master/${PX4_BOARD_VENDOR}_${PX4_BOARD_MODEL}_${PX4_BOARD_LABEL}.elf -O master.elf COMMAND wget -c -N --no-verbose https://s3.amazonaws.com/px4-travis/Firmware/master/${PX4_BOARD_VENDOR}_${PX4_BOARD_MODEL}_${PX4_BOARD_LABEL}.elf -O master.elf

Loading…
Cancel
Save