px4 RAM and flash overflow occur

17 次查看(过去 30 天)
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 个)

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

标签

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by