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

lib: updatehub: Don't build after convertion from DT_FLASH_AREA to FLASH_AREA macros #25332

Closed
nandojve opened this issue May 15, 2020 · 0 comments · Fixed by #25333
Closed
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug priority: high High impact/importance bug Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
Milestone

Comments

@nandojve
Copy link
Member

Describe the bug
samples/net/updatehub stop build after convertion from DT_FLASH_AREA to FLASH_AREA macros

To Reproduce
west build -b frdm_k64f samples/net/updatehub

Expected behavior
sample app build normally

Screenshots or console output

[116/189] Building C object zephyr/lib/updatehub/CMakeFiles/lib__updatehub.dir/updatehub.c.obj
FAILED: zephyr/lib/updatehub/CMakeFiles/lib__updatehub.dir/updatehub.c.obj 
ccache /home/gfbudke/zephyr-sdk-0.11.2/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DBOARD_FLASH_SIZE=CONFIG_FLASH_SIZE -DBUILD_VERSION=v2.3.0-rc1-99-ga0ae53410eef -DCPU_MK64FN1M0VLL12 -DKERNEL -DNDEBUG -D_FORTIFY_SOURCE=2 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I../include -Izephyr/include/generated -I../soc/arm/nxp_kinetis/k6x -I../lib/libc/newlib/include -I../lib/fnmatch/. -I../subsys/net/lib/coap/. -I../subsys/net/lib/sockets/. -I../subsys/net/lib/dns/. -I../subsys/net/l2 -I/home/gfbudke/zephyros/mainline/modules/hal/cmsis/CMSIS/Core/Include -I/home/gfbudke/zephyros/mainline/modules/hal/nxp/mcux/devices/MK64F12 -I/home/gfbudke/zephyros/mainline/modules/hal/nxp/mcux/components/phyksz8081 -I/home/gfbudke/zephyros/mainline/modules/hal/nxp/mcux/drivers/kinetis/. -I/home/gfbudke/zephyros/mainline/modules/crypto/tinycrypt/lib/include -Os -imacros/home/gfbudke/zephyros/mainline/zephyr/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mcpu=cortex-m4 -mthumb -mabi=aapcs -imacros/home/gfbudke/zephyros/mainline/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-address-of-packed-member -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/gfbudke/zephyros/mainline/zephyr/samples/net/updatehub=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/gfbudke/zephyros/mainline/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/gfbudke/zephyros/mainline=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -std=c99 -MD -MT zephyr/lib/updatehub/CMakeFiles/lib__updatehub.dir/updatehub.c.obj -MF zephyr/lib/updatehub/CMakeFiles/lib__updatehub.dir/updatehub.c.obj.d -o zephyr/lib/updatehub/CMakeFiles/lib__updatehub.dir/updatehub.c.obj   -c /home/gfbudke/zephyros/mainline/zephyr/lib/updatehub/updatehub.c
/home/gfbudke/zephyros/mainline/zephyr/lib/updatehub/updatehub.c: In function 'install_update':
/home/gfbudke/zephyros/mainline/zephyr/lib/updatehub/updatehub.c:443:26: warning: implicit declaration of function 'FLASH_AREA_ID' [-Wimplicit-function-declaration]
  443 |  if (boot_erase_img_bank(FLASH_AREA_ID(image_1)) != 0) {
      |                          ^~~~~~~~~~~~~
/home/gfbudke/zephyros/mainline/zephyr/lib/updatehub/updatehub.c:443:40: error: 'image_1' undeclared (first use in this function)
  443 |  if (boot_erase_img_bank(FLASH_AREA_ID(image_1)) != 0) {
      |                                        ^~~~~~~
/home/gfbudke/zephyros/mainline/zephyr/lib/updatehub/updatehub.c:443:40: note: each undeclared identifier is reported only once for each function it appears in
[119/189] Building C object zephyr/lib/updatehub/CMakeFiles/lib__updatehub.dir/updatehub_firmware.c.obj
FAILED: zephyr/lib/updatehub/CMakeFiles/lib__updatehub.dir/updatehub_firmware.c.obj 
ccache /home/gfbudke/zephyr-sdk-0.11.2/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DBOARD_FLASH_SIZE=CONFIG_FLASH_SIZE -DBUILD_VERSION=v2.3.0-rc1-99-ga0ae53410eef -DCPU_MK64FN1M0VLL12 -DKERNEL -DNDEBUG -D_FORTIFY_SOURCE=2 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I../include -Izephyr/include/generated -I../soc/arm/nxp_kinetis/k6x -I../lib/libc/newlib/include -I../lib/fnmatch/. -I../subsys/net/lib/coap/. -I../subsys/net/lib/sockets/. -I../subsys/net/lib/dns/. -I../subsys/net/l2 -I/home/gfbudke/zephyros/mainline/modules/hal/cmsis/CMSIS/Core/Include -I/home/gfbudke/zephyros/mainline/modules/hal/nxp/mcux/devices/MK64F12 -I/home/gfbudke/zephyros/mainline/modules/hal/nxp/mcux/components/phyksz8081 -I/home/gfbudke/zephyros/mainline/modules/hal/nxp/mcux/drivers/kinetis/. -I/home/gfbudke/zephyros/mainline/modules/crypto/tinycrypt/lib/include -Os -imacros/home/gfbudke/zephyros/mainline/zephyr/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mcpu=cortex-m4 -mthumb -mabi=aapcs -imacros/home/gfbudke/zephyros/mainline/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-address-of-packed-member -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/gfbudke/zephyros/mainline/zephyr/samples/net/updatehub=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/gfbudke/zephyros/mainline/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/gfbudke/zephyros/mainline=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -std=c99 -MD -MT zephyr/lib/updatehub/CMakeFiles/lib__updatehub.dir/updatehub_firmware.c.obj -MF zephyr/lib/updatehub/CMakeFiles/lib__updatehub.dir/updatehub_firmware.c.obj.d -o zephyr/lib/updatehub/CMakeFiles/lib__updatehub.dir/updatehub_firmware.c.obj   -c /home/gfbudke/zephyros/mainline/zephyr/lib/updatehub/updatehub_firmware.c
/home/gfbudke/zephyros/mainline/zephyr/lib/updatehub/updatehub_firmware.c: In function 'updatehub_get_firmware_version':
/home/gfbudke/zephyros/mainline/zephyr/lib/updatehub/updatehub_firmware.c:13:28: warning: implicit declaration of function 'FLASH_AREA_ID' [-Wimplicit-function-declaration]
   13 |  if (boot_read_bank_header(FLASH_AREA_ID(image_0), &header,
      |                            ^~~~~~~~~~~~~
/home/gfbudke/zephyros/mainline/zephyr/lib/updatehub/updatehub_firmware.c:13:42: error: 'image_0' undeclared (first use in this function)
   13 |  if (boot_read_bank_header(FLASH_AREA_ID(image_0), &header,
      |                                          ^~~~~~~
/home/gfbudke/zephyros/mainline/zephyr/lib/updatehub/updatehub_firmware.c:13:42: note: each undeclared identifier is reported only once for each function it appears in
[121/189] Building C object zephyr/boards/arm/frdm_k64f/CMakeFiles/boards__arm__frdm_k64f.dir/pinmux.c.obj
ninja: build stopped: subcommand failed.

Environment (please complete the following information):

  • OS: Linux
  • Toolchain Zephyr SDK 0.11.2
  • Commit SHA a0ae534

CC @otavio

@nandojve nandojve added the bug The issue is a bug, or the PR is fixing a bug label May 15, 2020
@nandojve nandojve added this to the v2.3.0 milestone May 15, 2020
@nandojve nandojve self-assigned this May 15, 2020
@nandojve nandojve added the Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. label May 15, 2020
nandojve added a commit to UpdateHub/zephyr that referenced this issue May 15, 2020
The conversion from DT_FLASH_AREA to FLASH_AREA macros don't add the
storage flash_map.h include file.

Fixes: zephyrproject-rtos#25332

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
@erwango erwango added the priority: high High impact/importance bug label May 15, 2020
carlescufi pushed a commit that referenced this issue May 18, 2020
The conversion from DT_FLASH_AREA to FLASH_AREA macros don't add the
storage flash_map.h include file.

Fixes: #25332

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
krip-tip pushed a commit to krip-tip/zephyr-local that referenced this issue May 30, 2020
The conversion from DT_FLASH_AREA to FLASH_AREA macros don't add the
storage flash_map.h include file.

Fixes: zephyrproject-rtos#25332

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
nandojve added a commit to UpdateHub/zephyr that referenced this issue Jul 30, 2020
The conversion from DT_FLASH_AREA to FLASH_AREA macros don't add the
storage flash_map.h include file.

Fixes: zephyrproject-rtos#25332

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
nandojve added a commit to UpdateHub/zephyr that referenced this issue Aug 30, 2020
The conversion from DT_FLASH_AREA to FLASH_AREA macros don't add the
storage flash_map.h include file.

Fixes: zephyrproject-rtos#25332

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug priority: high High impact/importance bug Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants