Skip to content

Compile error - array subscript #373

@greifer500

Description

@greifer500

Operating System

Linux

INFO_UF2.TXT

Not available

What happened ?

Same thing in Issue 339

How to reproduce ?

  1. Install arm toolchain/arm-gnu-toolchain-15.2.rel1-x86_64-arm-none-eabi.tar.xz
  2. paste content into /usr/local/bin
  3. add "export PATH="$PATH:/usr/local/bin/arm-gnu-toolchain-15.2.rel1-x86_64-arm-none-eabi/bin""
  4. Clone repo
  5. cd into repo
  6. make BOARD=pca10056

ifneq (,$(filter 12.% 13.% 14.%,$(shell $(CC) -dumpversion 2>/dev/null))) CFLAGS += --param=min-pagesize=0 endif

fixed by adding 15.%
ifneq (,$(filter 12.% 13.% 14.% 15.%,$(shell $(CC) -dumpversion 2>/dev/null))) CFLAGS += --param=min-pagesize=0 endif

Debug Log

CC bootloader_settings.c lib/sdk11/components/libraries/bootloader_dfu/bootloader_settings.c: In function 'bootloader_mbr_addrs_populate': lib/sdk11/components/libraries/bootloader_dfu/bootloader_settings.c:45:7: error: array subscript 0 is outside array bounds of 'const uint32_t[0]' {aka 'const long unsigned int[]'} [-Werror=array-bounds=] 45 | if (*(const uint32_t *)MBR_BOOTLOADER_ADDR == 0xFFFFFFFF) compilation terminated due to -Wfatal-errors. cc1: all warnings being treated as errors make: *** [Makefile:424: _build/build-pca10056/bootloader_settings.o] Error 1

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions