This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Error: CFI instruction used without previous .cfi_startproc

Hi

I get the following compiler (assembler) error in my project:

...
Compiling file: hardfault_handler_gcc.c
/tmp/ccstUNqW.s: Assembler messages:
/tmp/ccstUNqW.s:46: Error: CFI instruction used without previous .cfi_startproc
/tmp/ccstUNqW.s:47: Error: CFI instruction used without previous .cfi_startproc
Makefile.common:273: recipe for target '_build/nrf52810_xxaa/hardfault_handler_gcc.c.o' failed
make: *** [_build/nrf52810_xxaa/hardfault_handler_gcc.c.o] Error 1

The error seems to be related to the debugging information compiler flag (-g). The error only occurs when the flag "-g0" (or no g-flag) is set.

If a debug information flag "-g1" or greater is set no error occurs.

Does anybody know how to solve this problem?

Currently I try to migrate a project from nRF52832 to nRF52810.This error does not occur in the "old" nRF52832-Project.

Here are some more information about the "new" nRF52810-Project:

nRF52810, SDK14.2, S112 (5.1.0), arm-gcc toolchain (V5.4.1)

Parents Reply
  • I tried the following versions of the GNU Arm Embedded Toolchain but without success:

    - 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 227977]

    - 5.4.1 20160609 (release) [ARM/embedded-5-branch revision 237715]

    - 6.3.1 20170620 (release) [ARM/embedded-6-branch revision 249437]

    - 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204]

    By the way, in the release notes of the SDK14.2 the following is written:

    The following toolchains/devices have been used for testing and
    verification:
    - ARM: MDK-ARM version 5.18a
    - GCC: GCC ARM Embedded 4.9 2015q3
    - IAR: IAR Workbench 7.80.4
    - SES: SES 3.30
    - Linux: Ubuntu 17.04, Kernel 4.10.0.
    - Jlink: 6.20d

    Why is only the "old" 4.9 version of the GCC ARM Embedded toolchain used by Nordic?

Children
Related