px4 RAM and flash overflow occur

8 ビュー (過去 30 日間)
종원 이
종원 이 2023 年 6 月 11 日
コメント済み: Arun Mathamkode 2023 年 6 月 15 日
Hello,
I am trying to upload my controller which includes some optimization code to pixhawk cube orange, But below error occurs.
Memory region Used Size Region Size %age Used
ITCM_RAM: 0 GB 64 KB 0.00%
FLASH: 2047201 B 1920 KB 104.13%
DTCM1_RAM: 0 GB 64 KB 0.00%
DTCM2_RAM: 0 GB 64 KB 0.00%
AXI_SRAM: 147237348 B 512 KB 28083.30%
SRAM1: 0 GB 128 KB 0.00%
SRAM2: 0 GB 128 KB 0.00%
SRAM3: 0 GB 32 KB 0.00%
SRAM4: 0 GB 64 KB 0.00%
BKPRAM: 0 GB 4 KB 0.00c:/p/toolchain/gcc-arm/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: cubepilot_cubeorange_default.elf section `.text' will not fit in region `FLASH'
c:/p/toolchain/gcc-arm/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: cubepilot_cubeorange_default.elf section `.bss' will not fit in region `AXI_SRAM'
c:/p/toolchain/gcc-arm/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH' overflowed by 81121 bytes
c:/p/toolchain/gcc-arm/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: region `AXI_SRAM' overflowed by 146713060 bytes
collect2.exe: error: ld returned 1 exit status
As you can see, flash and ram is overflowed, and I cannot upload it.
As Arun Mathamkode said in below link,
https://www.mathworks.com/matlabcentral/answers/1809440-pixhawk-6x-5x-6c-support-by-simulink?s_tid=srchtitle
I know I have to delete some useless module in CMake File, but I am not sure in which file I should modificate exactly.
Also, as you can see SRAM is very highly overflowed, i am not sure I can solve the problem by deleting modules. Is there any method I can do to solve overflow issue except for deleting modules?
Thank you!

採用された回答

Arun Mathamkode
Arun Mathamkode 2023 年 6 月 14 日
Yeah for the flash issue, you can consider removing modules. For example, if you are working with a multi-copter, you can consider removing fixed-wing controllers and related modules. But I don't think that's going to solve the RAM issue. Since it overflowed highly, I believe you need to review the signals and data used inside your controller module. For example, if you are using large look-up tables that can cause RAM issues. To debug, you can selectively disable different blocks or modules and see how that is impacting the RAM. This should give you an idea of which part of your modeling is causing the issue.
  2 件のコメント
종원 이
종원 이 2023 年 6 月 14 日
Thank you for reply.
Can you tell me more precisely how can I remove those modules?
In which file should I revise exactly? I cannot figure out which file I should deal with...
Thank you!
Arun Mathamkode
Arun Mathamkode 2023 年 6 月 15 日
You can edit the <PX4 Dir>\Firmware\boards\cubepilot\cubeorange\default.cmake' file. If you are focusing on quadcopter you can remove fixed wing modules 'fw_att_control ' and 'fw_pos_control_l1' by commenting out those lines.

サインインしてコメントする。

その他の回答 (0 件)

タグ

製品


リリース

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by