Frame-larger-than compilation error with debug option

Hello,

After some modifications, I tried to compile ardupilot (4.0.4) with the debug option on CubeOrange. Then, I got this “frame-larger-than” error:

…/…/libraries/AP_UAVCAN/AP_UAVCAN.cpp: In member function ‘virtual void AP_UAVCAN::init(uint8_t, bool)’:
…/…/libraries/AP_UAVCAN/AP_UAVCAN.cpp:329:1: error: the frame size of 1408 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

My modifications were not in UAVCAN module. My question is: which file I should modify to change the frame size (for CubeOrange)?

By the way, in this forum, I found a similar discussion under Issue building/compiling 3DR solo code
There, a need to update the compiler was suggested, but this discussion is older than the version I am currently using (gcc-arm-none-eabi-6-2017-q2-update).

I hope somebody would give me a hint!

Thank you very much in advance

You can get past thi sby using something like:

#pragma GCC diagnostic push
#pragma GCC diagnostic error "-Wframe-larger-than=1400"

on the init function

Hello andyp1per,

That worked, thank you very much!

taku