Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation errors with arm-none-eabi-gcc 7 #7502

Merged
merged 7 commits into from
Jul 18, 2017

Conversation

jlecoeur
Copy link
Contributor

With newer versions of GCC, new warnings are emitted and prevent building on master.

Associated NuttX fixes: PX4/NuttX#3

This prevents the compiler from optimising pdump. The error was:
Firmware/src/drivers/boards/common/board_crashdump.c:41:2: error: 'memset' writing 3240 bytes into a region of size 4 overflows the destination [-Werror=stringop-overflow=]
  memset(pdump, 0, sizeof(fullcontext_s));
@dagar dagar requested a review from davids5 June 28, 2017 14:38
@jlecoeur jlecoeur force-pushed the lis/arm-none-eabi-gcc7 branch from da3d7ec to ad40899 Compare June 28, 2017 15:22
@jlecoeur
Copy link
Contributor Author

@davids5 Part of the Nuttx patch was already in upstream master. I made a PR to NuttX with the remaining warning (-Wimplicit-fallthrough) here: https://bitbucket.org/nuttx/nuttx/pull-requests/424/fix-warning-implicit-fallthrough-on-with/diff. Let's see if they accept it.

@jlecoeur
Copy link
Contributor Author

Ok, the patch was merged upstream, that was quick!
I see that upstream is ~2300 commits ahead of PX4/NuttX. Do I update the submodule, or keep the patch for now?

@davids5
Copy link
Member

davids5 commented Jun 28, 2017

@jlecoeur

Great!

No. Keep the patch on master. But list it as a '30-BACKPORT-fix-compilation-errors-arm-none-eabi-gcc-7.patch' (there are some other in the quere)

PX4 master is tied to V7.18+ plus patches.
PX4 master_nxphlite and master_new_archs branches are tied to upstream nuttx at my uptake rate. I can update it today.

@jlecoeur
Copy link
Contributor Author

I renamed the patch as suggested.

There was another error in NuttX/apps so I added another patch. This error is - I think - not in upstream anymore: the file nshlib/nsh_syscmds.c was removed, and there is no g_unknown of BOARD_NAME or cmd_uname in the repo anymore.

@bkueng
Copy link
Member

bkueng commented Jul 4, 2017

@davids5 can you review again?

@davids5
Copy link
Member

davids5 commented Jul 4, 2017

@jlecoeur

If I follow you the '00031-PENDING-fix-unused-variable-arm-none-eabi-gcc-7.patch' is not applicable upstream. So it should be named 00031-REJECTED-fix-unused-variable-arm-none-eabi-gcc-7.patch

@davids5
Copy link
Member

davids5 commented Jul 4, 2017

@jlecoeur On further investigation I see nsh_syscmds.c upstream.

Would you please see if it has the same issue? I would just replace our version with the file. If if does not build because of other incompatibilities we would keep the REJECTED patch. If it does build but has the issue then, the submit the PR upstream and then backport the whole file as a BACKPORT

@jlecoeur
Copy link
Contributor Author

jlecoeur commented Jul 4, 2017

Thanks for the heads-up @davids5 I do not know how I missed it.
I just noticed that there are other compilation errors with v3 v4 and v4pro targets, are there other targets I should test the compiler against?
Anyway I mark this WIP and I will notify you when this is ready!

@bkueng The problem is that compatibility with gcc7 might be broken again as it is not enforced by CI. What do you think of installing a gcc 7 in parallel to the current version on travis (or other), to test against it?

@jlecoeur jlecoeur changed the title Fix compilation errors with arm-none-eabi-gcc 7 [WIP] Fix compilation errors with arm-none-eabi-gcc 7 Jul 4, 2017
@jlecoeur jlecoeur force-pushed the lis/arm-none-eabi-gcc7 branch from ad0c111 to 974ba9d Compare July 4, 2017 16:45
@davids5
Copy link
Member

davids5 commented Jul 4, 2017

@jlecoeur make check will build the CI lot of targets

@bkueng
Copy link
Member

bkueng commented Jul 5, 2017

@bkueng The problem is that compatibility with gcc7 might be broken again as it is not enforced by CI. What do you think of installing a gcc 7 in parallel to the current version on travis (or other), to test against it?

I have nothing against that, we just have to make sure CI does not slow down too much. @dagar ?

@dagar
Copy link
Member

dagar commented Jul 5, 2017

If someone would like to get a gcc 7 docker image together I'll get it into the build system.
https://github.com/PX4/containers/blob/master/docker/px4-dev/Dockerfile_nuttx

@davids5
Copy link
Member

davids5 commented Jul 5, 2017

@jlecoeur I noticed a "patch unexpectedly ends in middle of line"

FYI @dagar ci is not failing.

Building px4esc-v1_default
B-- CMAKE_MODULE_PATH: /home/runner/Firmware/cmake
-- Nuttx build for px4esc-v1 on m4 hardware, using nsh 
-- Generating UAVCAN Bootable as org.pixhawk.px4esc-v1-1.6-0.1.b139318c.uavcan.bin
-- Build Type: MinSizeRel
-- PX4 VERSION: v1.6.2-135-gb139318
-- CONFIG: nuttx-px4esc-v1-default
-- The ASM compiler identification is GNU
-- Found assembler: /usr/lib/ccache/arm-none-eabi-gcc
-- Found PythonInterp: /usr/bin/python (found version "2.7.12") 
-- Found PY_jinja2: /usr/local/lib/python2.7/dist-packages/jinja2  
-- C compiler: arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]
-- C++ compiler: arm-none-eabi-g++ (GNU Tools for ARM Embedded Processors) 5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]
-- Using C++03
-- Release build type: MinSizeRel
-- Adding UAVCAN STM32 platform driver
-- Configuring done
-- Generating done
-- Build files have been written to: /home/runner/Firmware/build_px4esc-v1_default

[1/270] Generating git_init_Tools_gencpp.stamp
[2/270] Generating git_init_Tools_genmsg.stamp
[3/270] Generating git_init_src_lib_matrix.stamp
[4/270] Generating git_init_mavlink_include_mavlink_v1.0.stamp
[5/270] Generating git_init_NuttX.stamp
[6/270] Generating git_init_src_modules_uavcan_libuavcan.stamp
[6/270] Generating git_init_Tools_genmsg.stamp
[7/270] Generating git hash header
[7/270] Generating git_init_Tools_gencpp.stamp
[8/270] Creating airframes.xml
[8/270] Generating git_init_NuttX.stamp
[9/270] Copying NuttX for px4esc-v1 with nsh
[9/270] Generating git_init_src_lib_matrix.stamp
[10/270] Running dsdl compiler
[10/270] Generating git_init_src_modules_uavcan_libuavcan.stamp
[11/270] Generating ../../../../parameters.xml
[11/270] Generating git_init_mavlink_include_mavlink_v1.0.stamp
[11/270] Creating airframes.xml
[11/270] Generating git hash header
[11/270] Generating ../../../../parameters.xml
[11/270] Running dsdl compiler
[11/270] Copying NuttX for px4esc-v1 with nsh
[12/270] px4esc-v1: nuttx-patches/00001-REJECTED-add-math.h.patch applied
[12/270] px4esc-v1: nuttx-patches/00001-REJECTED-add-math.h.patch applied
[13/270] px4esc-v1: nuttx-patches/0000...ECTED-fix-shadow-wanings.patch applied
[13/270] px4esc-v1: nuttx-patches/0000...ECTED-fix-shadow-wanings.patch applied
[14/270] px4esc-v1: nuttx-patches/0000...r-expansion-in-nsh-parse.patch applied
[14/270] px4esc-v1: nuttx-patches/0000...r-expansion-in-nsh-parse.patch applied
[15/270] px4esc-v1: nuttx-patches/0000...-copy-with-export-insitu.patch applied
[15/270] px4esc-v1: nuttx-patches/0000...-copy-with-export-insitu.patch applied
[16/270] px4esc-v1: nuttx-patches/00005-REJECTED-support-c++11.patch applied
[16/270] px4esc-v1: nuttx-patches/00005-REJECTED-support-c++11.patch applied
[17/270] px4esc-v1: nuttx-patches/00006-REJECTED-cstdint-fix.patch applied
[17/270] px4esc-v1: nuttx-patches/00006-REJECTED-cstdint-fix.patch applied
[18/270] px4esc-v1: nuttx-patches/0000...lence-jobserver-warnings.patch applied
[18/270] px4esc-v1: nuttx-patches/0000...lence-jobserver-warnings.patch applied
[19/270] px4esc-v1: nuttx-patches/0000...JECTED-static-assert-fix.patch applied
[19/270] px4esc-v1: nuttx-patches/0000...JECTED-static-assert-fix.patch applied
[20/270] px4esc-v1: nuttx-patches/0000...ctype-fix-shadow-wanings.patch applied
[20/270] px4esc-v1: nuttx-patches/0000...ctype-fix-shadow-wanings.patch applied
[21/270] px4esc-v1: nuttx-patches/0001...corruption-fix-no-HSI-on.patch applied
[21/270] px4esc-v1: nuttx-patches/0001...corruption-fix-no-HSI-on.patch applied
[22/270] px4esc-v1: nuttx-patches/0001...priority-restoration-fix.patch applied
[22/270] px4esc-v1: nuttx-patches/0001...priority-restoration-fix.patch applied
[23/270] px4esc-v1: nuttx-patches/0001...coloration-overreach-fix.patch applied
[23/270] px4esc-v1: nuttx-patches/0001...coloration-overreach-fix.patch applied
[24/270] px4esc-v1: nuttx-patches/0001...-stm32-serial-dma-hotfix.patch applied
[24/270] px4esc-v1: nuttx-patches/0001...-stm32-serial-dma-hotfix.patch applied
[25/270] px4esc-v1: nuttx-patches/00014-BACKPORT-i2c-hotfix.patch applied
[25/270] px4esc-v1: nuttx-patches/00014-BACKPORT-i2c-hotfix.patch applied
[26/270] px4esc-v1: nuttx-patches/00015-BACKPORT-stm32f7-DTCM.patch applied
[26/270] px4esc-v1: nuttx-patches/00015-BACKPORT-stm32f7-DTCM.patch applied
[27/270] px4esc-v1: nuttx-patches/0001...PORT-fix-CRTSCTS-defines.patch applied
[27/270] px4esc-v1: nuttx-patches/0001...PORT-fix-CRTSCTS-defines.patch applied
[28/270] px4esc-v1: nuttx-patches/00017-BACKPORT-cdcacm.patch applied
[28/270] px4esc-v1: nuttx-patches/00017-BACKPORT-cdcacm.patch applied
[29/270] px4esc-v1: nuttx-patches/0001...KPORT-stm32-serial-break.patch applied
[29/270] px4esc-v1: nuttx-patches/0001...KPORT-stm32-serial-break.patch applied
[30/270] px4esc-v1: nuttx-patches/0001...RT-stm32-rcc-keep-HSI-on.patch applied
[30/270] px4esc-v1: nuttx-patches/0001...RT-stm32-rcc-keep-HSI-on.patch applied
[31/270] px4esc-v1: nuttx-patches/0002...RT-ramtron-CONFIG-prefix.patch applied
[31/270] px4esc-v1: nuttx-patches/0002...RT-ramtron-CONFIG-prefix.patch applied
[32/270] px4esc-v1: nuttx-patches/0002...ACKPORT-stm32f3x-add-BKP.patch applied
[32/270] px4esc-v1: nuttx-patches/0002...ACKPORT-stm32f3x-add-BKP.patch applied
[33/270] px4esc-v1: nuttx-patches/0002...-stm32-bkp-reference-fix.patch applied
[33/270] px4esc-v1: nuttx-patches/0002...-stm32-bkp-reference-fix.patch applied
[34/270] px4esc-v1: nuttx-patches/0002...tm32f7-bkp-reference-fix.patch applied
[34/270] px4esc-v1: nuttx-patches/0002...tm32f7-bkp-reference-fix.patch applied
[35/270] px4esc-v1: nuttx-patches/0002...tm32f7-serial-dma-hotfix.patch applied
[35/270] px4esc-v1: nuttx-patches/0002...tm32f7-serial-dma-hotfix.patch applied
[36/270] px4esc-v1: nuttx-patches/0002...CKPORT-add-set-ex-to-nsh.patch applied
[36/270] px4esc-v1: nuttx-patches/0002...CKPORT-add-set-ex-to-nsh.patch applied
[37/270] px4esc-v1: nuttx-patches/0002...32fX-serial-fix-freezing.patch applied
[37/270] px4esc-v1: nuttx-patches/0002...32fX-serial-fix-freezing.patch applied
[38/270] px4esc-v1: nuttx-patches/0002...2-sdio-1-bit-and-16G-fix.patch applied
[38/270] px4esc-v1: nuttx-patches/0002...2-sdio-1-bit-and-16G-fix.patch applied
[39/270] px4esc-v1: nuttx-patches/0003...rors-arm-none-eabi-gcc-7.patch applied
[39/270] px4esc-v1: nuttx-patches/0003...rors-arm-none-eabi-gcc-7.patch applied
patch unexpectedly ends in middle of line

[40/270] px4esc-v1: nuttx-patches/0003...able-arm-none-eabi-gcc-7.patch applied
[40/270] px4esc-v1: nuttx-patches/0003...able-arm-none-eabi-gcc-7.patch applied
[41/270] px4esc-v1: nuttx-patches/0003...able-arm-none-eabi-gcc-7.patch applied
[41/270] px4esc-v1: nuttx-patches/0003...able-arm-none-eabi-gcc-7.patch applied
[42/270] px4esc-v1: nuttx-patches/9000...wip-inflight-to-upstream.patch applied
[42/270] px4esc-v1: nuttx-patches/9000...wip-inflight-to-upstream.patch applied
[43/270] Configuring NuttX for px4esc-v1 with nsh
[43/270] Configuring NuttX for px4esc-v1 with nsh
[44/270] Building NuttX for px4esc-v1 with nsh
[44/270] Building NuttX for px4esc-v1 with nsh
[45/270] Generating uORB topic sources
[46/270] Generating uORB topic headers
[47/270] Generating uORB topic multi headers for nuttx
[47/270] Generating uORB topic sources
[47/270] Generating uORB topic multi headers for nuttx
[47/270] Generating uORB topic headers
[48/270] Building CXX object CMakeFile....dir/topics_sources/esc_status.cpp.obj
[49/270] Building CXX object CMakeFile...opics_sources/estimator_status.cpp.obj
[50/270] Building CXX object CMakeFile...en.dir/topics_sources/gps_dump.cpp.obj
[51/270] Building CXX object CMakeFile...topics_sources/geofence_result.cpp.obj
[52/270] Building CXX object CMakeFile....dir/topics_sources/uORBTopics.cpp.obj
[53/270] Building CXX object CMakeFile.../topics_sources/actuator_armed.cpp.obj
[53/270] Building CXX object CMakeFile....dir/topics_sources/esc_status.cpp.obj
[54/270] Building CXX object CMakeFile...pics_sources/actuator_controls.cpp.obj
[54/270] Building CXX object CMakeFile...topics_sources/geofence_result.cpp.obj
[55/270] Building CXX object CMakeFile...topics_sources/actuator_direct.cpp.obj
[55/270] Building CXX object CMakeFile...opics_sources/estimator_status.cpp.obj
[56/270] Building CXX object CMakeFile...opics_sources/actuator_outputs.cpp.obj
[56/270] Building CXX object CMakeFile...en.dir/topics_sources/gps_dump.cpp.obj
[57/270] Building CXX object CMakeFile...r/topics_sources/follow_target.cpp.obj
[57/270] Building CXX object CMakeFile...r/topics_sources/follow_target.cpp.obj
[58/270] Building CXX object CMakeFile...ir/topics_sources/fence_vertex.cpp.obj
[58/270] Building CXX object CMakeFile.../topics_sources/actuator_armed.cpp.obj
[59/270] Building CXX object CMakeFile...s_sources/filtered_bottom_flow.cpp.obj
[59/270] Building CXX object CMakeFile...ir/topics_sources/fence_vertex.cpp.obj
[60/270] Building CXX object CMakeFile...ics_sources/fw_pos_ctrl_status.cpp.obj
[60/270] Building CXX object CMakeFile...pics_sources/actuator_controls.cpp.obj
[61/270] Building CXX object CMakeFile....dir/topics_sources/esc_report.cpp.obj
[61/270] Building CXX object CMakeFile...opics_sources/actuator_outputs.cpp.obj
[62/270] Building CXX object CMakeFile....dir/topics_sources/adc_report.cpp.obj
[62/270] Building CXX object CMakeFile...topics_sources/actuator_direct.cpp.obj
[63/270] Building CXX object CMakeFile...r/topics_sources/att_pos_mocap.cpp.obj
[63/270] Building CXX object CMakeFile...ics_sources/fw_pos_ctrl_status.cpp.obj
[64/270] Building CXX object CMakeFile.../topics_sources/battery_status.cpp.obj
[64/270] Building CXX object CMakeFile....dir/topics_sources/esc_report.cpp.obj
[65/270] Building CXX object CMakeFile...en.dir/topics_sources/airspeed.cpp.obj
[65/270] Building CXX object CMakeFile...s_sources/filtered_bottom_flow.cpp.obj
[66/270] Building CXX object CMakeFile...topics_sources/distance_sensor.cpp.obj
[66/270] Building CXX object CMakeFile....dir/topics_sources/adc_report.cpp.obj
[67/270] Building CXX object CMakeFile.../topics_sources/camera_trigger.cpp.obj
[67/270] Building CXX object CMakeFile...topics_sources/distance_sensor.cpp.obj

@dagar
Copy link
Member

dagar commented Jul 5, 2017

Is that usually a CRLF issue? The patch command would need to return an error to fail the build in this case, but it appears to only be a (harmless?) warning.

@davids5
Copy link
Member

davids5 commented Jul 5, 2017

I am not sure. @dagar please point @jlecoeur to the build options to use to see the patches applied localy. Maybe he can fix the cause.

@jlecoeur
Copy link
Contributor Author

jlecoeur commented Jul 6, 2017

This was indeed a warning because of bad patch format. For reference I used git format-patch branch_name --stdout > name_of_patch.patch. Copy-pasting the output of git diff removes the warning.

@jlecoeur
Copy link
Contributor Author

jlecoeur commented Jul 6, 2017

@dagar I found this dockerfile for gcc 7.1.0 https://hub.docker.com/_/gcc/
I had no luck for arm-none-eabi-gcc

Julien Lecoeur and others added 5 commits July 6, 2017 18:11
BMP280: fix -Werror=implicit-fallthrough on arm-none-eabi-gcc 7

gnss: fix -Werror=implicit-fallthrough on arm-none-eabi-gcc 7

fmu: fix -Werror=implicit-fallthrough on arm-none-eabi-gcc 7

timer.c: fix -Werror=implicit-fallthrough on arm-none-eabi-gcc 7

px4cannode_led: fix -Werror=implicit-fallthrough on arm-none-eabi-gcc 7

Fix -Werror=implicit-fallthrough on gcc7
The error was:
Firmware/src/systemcmds/hardfault_log/hardfault_log.c:312:7: error: specified bound 30 equals the size of the destination [-Werror=stringop-overflow=]
       strncat(marker, sp_name, sizeof(marker));
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
…ings

Rename nuttx patch

Add nuttx patch for unused variable error

Pending nuttx patch

Backport nuttx fix for unused variables in nsh_proccmds.c

Fix Patch format

Modify pending patch to match new nuttx PR

Move accepted nuttx changes from pending patch to backport patch
@jlecoeur jlecoeur force-pushed the lis/arm-none-eabi-gcc7 branch from 7de721e to 020ebac Compare July 6, 2017 16:12
@jlecoeur jlecoeur changed the title [WIP] Fix compilation errors with arm-none-eabi-gcc 7 Fix compilation errors with arm-none-eabi-gcc 7 Jul 6, 2017
@jlecoeur
Copy link
Contributor Author

jlecoeur commented Jul 6, 2017

@davids5 It is ready, all NuttX patches are upstream, and I cleaned the commit history. Can you review again please?

@jlecoeur jlecoeur mentioned this pull request Jul 6, 2017
@davids5
Copy link
Member

davids5 commented Jul 6, 2017

@jlecoeur 0 I looks good to me. I think we need to get it built in CI with the correct version and flight tested.

@dagar Is there a way we can we do this in parallel?

@LorenzMeier
Copy link
Member

Awesome! @PX4TestFlights Can you take this to a test?

@santiago3dr
Copy link

@davids5
Copy link
Member

davids5 commented Jul 7, 2017

@santiago3dr Is this with the current build from CI or did you install the arm-none-eabi-gcc 7.1.0 tools?

@jlecoeur - So we can all get on the same version, would please post the output of arm-none-eabi-gcc --version so we can ID the version you are using. A link to a launchpad download would be even better.

@santiago3dr
Copy link

current build, will install tools and re-compile

@jlecoeur
Copy link
Contributor Author

jlecoeur commented Jul 7, 2017

I am using the version from Arch repository:

~ > arm-none-eabi-gcc --version
arm-none-eabi-gcc (Arch Repository) 7.1.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

~ > arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-none-eabi/7.1.0/lto-wrapper
Target: arm-none-eabi
Configured with: /build/arm-none-eabi-gcc/src/gcc-7-20170504/configure --target=arm-none-eabi --prefix=/usr --with-sysroot=/usr/arm-none-eabi --with-native-system-header-dir=/include --libexecdir=/usr/lib --enable-languages=c,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-system-zlib --with-newlib --with-headers=/usr/arm-none-eabi/include --with-python-dir=share/gcc-arm-none-eabi --with-gmp --with-mpfr --with-mpc --with-isl --with-libelf --enable-gnu-indirect-function --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='Arch Repository' --with-bugurl=https://bugs.archlinux.org/ --with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r
Thread model: single
gcc version 7.1.0 (Arch Repository) 

If that can help, here are a few builds: https://gist.github.com/jlecoeur/f6e8128deb9d7a28227bb313637ef940

@santiago3dr
Copy link

couple of flight with pixracer (V4) compiled with arm-none-eabi-gcc 7.1.0 tools

http://logs.px4.io/plot_app?log=a0354f3c-9cfc-4318-9651-5000eb108eb2
http://logs.px4.io/plot_app?log=67688771-4fa5-4567-b827-e5e604c478cd

@jlecoeur
Copy link
Contributor Author

jlecoeur commented Jul 7, 2017

@santiago3dr Thanks for testing this.
Did you use a ubuntu package to install arm-none-eabi-gcc 7.1.0? That would help setting up CI for that compiler.

@r0gelion
Copy link
Contributor

r0gelion commented Jul 7, 2017

@jlecoeur we used the builds from your link
https://gist.github.com/jlecoeur/f6e8128deb9d7a28227bb313637ef940

@jlecoeur
Copy link
Contributor Author

Thanks @r0gelion @santiago3dr the flights look fine.

I see this warning: [load_mon] log_writer_file low on stack! (292 bytes left).
With my 7.1.0 build, it is only in the 2nd flight but not in the 1st flight. With your < 7.1.0 build, it does not happen. Any clue?

@jlecoeur jlecoeur force-pushed the lis/arm-none-eabi-gcc7 branch from 020ebac to f5105e0 Compare July 11, 2017 08:50
@davids5
Copy link
Member

davids5 commented Jul 11, 2017

I think it is the rounding. But the allocation needs to be increased by 8-16 bytes.
The stack mon threshold is 300 bytes. The rounding of the stack size is modulo 8. Just an allocation order difference my cause an allocation on a word boundary that gets rounded down. Asking for X+8 will get at least X but asking for X may get less the X worst case.

Test flights reported the warning `[load_mon] log_writer_file low on stack! (292 bytes left)`

Increase stack size from 1060  to 1072 (=8 + 1060 rounded to next multiple of 8).
@bkueng
Copy link
Member

bkueng commented Jul 17, 2017

I need this as well.
@davids5 is this ready to merge?

Copy link
Member

@davids5 davids5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look fine, I thought we were waiting on a CI build for the new compiler in parallel.

@dagar Please advise.

Once that is done we need to vet this. The concern being it does not stem from the ARM team, and we may not see a loss of "special tweak" on the surface. CPU load, code size, jitter needs to all be looked at characterized or at least understood.

@bkueng
Copy link
Member

bkueng commented Jul 17, 2017

Once that is done we need to vet this. The concern being it does not stem from the ARM team, and we may not see a loss of "special tweak" on the surface. CPU load, code size, jitter needs to all be looked at characterized or at least understood.

I just need it for the host compilation, for SITL. I agree, once we raise the ARM GCC version, we need to vet all of that.

@bkueng bkueng merged commit 71136dc into PX4:master Jul 18, 2017
@jlecoeur jlecoeur deleted the lis/arm-none-eabi-gcc7 branch July 18, 2017 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants