px4 RAM and flash overflow occur

11 visualizaciones (últimos 30 días)
종원 이
종원 이 el 11 de Jun. de 2023
Comentada: Arun Mathamkode el 15 de Jun. de 2023
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!

Respuesta aceptada

Arun Mathamkode
Arun Mathamkode el 14 de Jun. de 2023
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 comentarios
종원 이
종원 이 el 14 de Jun. de 2023
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 el 15 de Jun. de 2023
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.

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by