Topics

offsets.c:25:24: fatal error: gen_offset.h: No such file or directory #stm32


Stefan Jaritz
 
Edited

Hej

I am new to Zephyr. I checkout the latest version on the master branch (1.12.0-rc2). I created an own board for a custom PCB based on the nucleo_f412zg board. I put up a simple hello world program by copying it from the sample folder.

It worked the last time when. After getting to the latest version I got following error:

zephyr/arch/arm/core/offsets/offsets.c:25:24: fatal error: gen_offset.h: No such file or directory
 #include <gen_offset.h>
                        ^
compilation terminated.
ninja: build stopped: subcommand failed.

Any ideas what went wrong?

Stefan

PS: same error occur when using the nucleo eval board and a sample app (blink led)

stefan@stefan-UX550VD:~/zephyr/hpfw/build$ ninja
[0/1] Re-running CMake...
CMake Deprecation Warning at /home/stefan/zephyr/cmake/app/boilerplate.cmake:38 (cmake_policy):
  The OLD behavior for policy CMP0000 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMakeLists.txt:5 (include)


-- Selected BOARD nucleo_f412zg
Zephyr version: 1.12.0
Parsing Kconfig tree in /home/stefan/zephyr/Kconfig
Using /home/stefan/zephyr/hpfw/build/zephyr/.config as base
fatal: No names found, cannot describe anything.
-- Generating zephyr/include/generated/generated_dts_board.h
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart3@0 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart3@1 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart2@0 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart2@1 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart1@0 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart1@1 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart1@2 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart6@0 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /leds/led@0 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /leds/led@1 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /leds/led@2 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /gpio_keys/button@0 has a unit name, but no reg property
extract_dts_includes.py: Merge of 'title': 'STM32 OTGFS'  overwrites 'USB Base Structure'.
extract_dts_includes.py: Merge of 'description': 'This binding gives a base representation of the STM32 OTGFS controller
'  overwrites 'This binding gives the base structures for all USB devices
'.
extract_dts_includes.py: Merge of 'node_type': '['USB-EP', 'USB']'  overwrites '['USB']'.
extract_dts_includes.py: Merge of 'description': 'Clock gate control information'  overwrites 'Clock gate information'.
-- Cache files will be written to: /home/stefan/.cache/zephyr
-- Configuring done
-- Generating done
-- Build files have been written to: /home/stefan/zephyr/hpfw/build
[1/116] Generating always_rebuild
Building for board nucleo_f412zg
[7/116] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
FAILED: zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
ccache /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-gcc -DKERNEL -DSTM32F412Zx -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -D_FORTIFY_SOURCE=2 -D__ZEPHYR__=1 -I../../kernel/include -I../../arch/arm/include -I../../arch/arm/soc/st_stm32/stm32f4 -I../../arch/arm/soc/st_stm32/stm32f4/include -I../../arch/arm/soc/st_stm32/include -I../../boards/arm/nucleo_f412zg -I../../include -I../../include/drivers -Izephyr/include/generated -isystem /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/lib/arm-zephyr-eabi/gcc/arm-zephyr-eabi/6.2.0/include -isystem /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/lib/arm-zephyr-eabi/gcc/arm-zephyr-eabi/6.2.0/include-fixed -I../../drivers -I../../lib/libc/minimal/include -I../../ext/hal/cmsis/Include -I../../ext/hal/st/stm32cube/stm32f4xx/soc -I../../ext/hal/st/stm32cube/stm32f4xx/drivers/include -I../../ext/hal/st/stm32cube/stm32f4xx/drivers/include/Legacy -Os -g -Wall -Wformat -Wformat-security -Wno-format-zero-length -imacros /home/stefan/zephyr/hpfw/build/zephyr/include/generated/autoconf.h -ffreestanding -Wno-main --sysroot /opt/zephyr-sdk/sysroots/armv5-zephyr-eabi/usr -mthumb -mcpu=cortex-m4 -std=c99 -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -Wno-pointer-sign -Wno-unused-but-set-variable -fno-reorder-functions -fno-defer-pop -Werror=implicit-int -ffunction-sections -fdata-sections -mabi=aapcs -march=armv7e-m -MD -MT zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj -MF zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj.d -o zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj   -c /home/stefan/zephyr/arch/arm/core/offsets/offsets.c
/home/stefan/zephyr/arch/arm/core/offsets/offsets.c:25:24: fatal error: gen_offset.h: No such file or directory
 #include <gen_offset.h>
                        ^
compilation terminated.
ninja: build stopped: subcommand failed.


Carles Cufi
 

Hi  Stefan,

 

Your logs suggest something is wrong with Kconfig or dtc, but I cannot reproduce it. I copied the hello_world folder into ZEPHYR_BASE/mysample and then built it for nucleo_f412zg without any issues at all. I notice that you are not invoking cmake with -DBOARD= nucleo_f412zg, can you try with that? I ran:

 

carles@zweck ~/src/zephyr/mysample/b (master)

$ cmake -DBOARD=nucleo_f412zg ..

 

Regards,

 

Carles

 

 

From: <users@...> on behalf of Stefan Jaritz <stefan@...>
Date: Friday, 1 June 2018 at 18:34
To: "users@..." <users@...>
Subject: [Zephyr-users] offsets.c:25:24: fatal error: gen_offset.h: No such file or directory #stm32

 

[Edited Message Follows]

Hej

I am new to Zephyr. I checkout the latest version on the master branch (1.12.0-rc2). I created an own board for a custom PCB based on the nucleo_f412zg board. I put up a simple hello world program by copying it from the sample folder.

It worked the last time when. After getting to the latest version I got following error:

zephyr/arch/arm/core/offsets/offsets.c:25:24: fatal error: gen_offset.h: No such file or directory
 #include <gen_offset.h>
                        ^
compilation terminated.
ninja: build stopped: subcommand failed.

Any ideas what went wrong?

Stefan

PS: same error occur when using the nucleo eval board and a sample app (blink led)

stefan@stefan-UX550VD:~/zephyr/hpfw/build$ cmake ..
CMake Deprecation Warning at /home/stefan/zephyr/cmake/app/boilerplate.cmake:38 (cmake_policy):
  The OLD behavior for policy CMP0000 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMakeLists.txt:5 (include)


-- Selected BOARD nucleo_f412zg
Zephyr version: 1.12.0
Parsing Kconfig tree in /home/stefan/zephyr/Kconfig
Using /home/stefan/zephyr/boards/arm/nucleo_f412zg/nucleo_f412zg_defconfig as base
Merging /home/stefan/zephyr/hpfw/prj.conf
fatal: No names found, cannot describe anything.
-- Generating zephyr/include/generated/generated_dts_board.h
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart3@0 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart3@1 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart2@0 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart2@1 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart1@0 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart1@1 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart1@2 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart6@0 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /leds/led@0 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /leds/led@1 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /leds/led@2 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /gpio_keys/button@0 has a unit name, but no reg property
extract_dts_includes.py: Merge of 'title': 'STM32 OTGFS'  overwrites 'USB Base Structure'.
extract_dts_includes.py: Merge of 'description': 'This binding gives a base representation of the STM32 OTGFS controller
'  overwrites 'This binding gives the base structures for all USB devices
'.
extract_dts_includes.py: Merge of 'node_type': '['USB-EP', 'USB']'  overwrites '['USB']'.
extract_dts_includes.py: Merge of 'description': 'Clock gate control information'  overwrites 'Clock gate information'.
-- Cache files will be written to: /home/stefan/.cache/zephyr
-- Configuring done
-- Generating done
-- Build files have been written to: /home/stefan/zephyr/hpfw/build