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

Narrowing conversion error #226

Open
JMattChiam opened this issue Oct 26, 2024 · 0 comments
Open

Narrowing conversion error #226

JMattChiam opened this issue Oct 26, 2024 · 0 comments

Comments

@JMattChiam
Copy link

JMattChiam commented Oct 26, 2024

Hi, I'm trying to get NNOM to build and compile in my project on the Daisy Seed (STM32H750).

I've included the relevant directories but I'm running into an error in nnom_local.h while compiling (see below, i've truncated the errors). I don't see any other mentions of this issue. Could this be an issue with my compilation configuration?

$ make
arm-none-eabi-g++ -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -DUSE_HAL_DRIVER -DSTM32H750xx -DHSE_VALUE=16000000  -DCORE_CM7 -DSTM32H750IB -DARM_MATH_CM7 -DUSE_FULL_LL_DRIVER -Innom_core/inc -Innom_core/port -include stm32h7xx.h -I../../libDaisy/ -I../../libDaisy//src/ -I../../libDaisy//src/sys -I../../libDaisy//src/usbd -I../../libDaisy//src/usbh -I../../libDaisy//Drivers/CMSIS/Include/ -I../../libDaisy//Drivers/CMSIS/DSP/Include -I../../libDaisy//Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../../libDaisy//Drivers/STM32H7xx_HAL_Driver/Inc/ -I../../libDaisy//Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../../libDaisy//Middlewares/ST/STM32_USB_Host_Library/Core/Inc -I../../libDaisy//Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Inc -I../../libDaisy//core/ -I../../DaisySP//Source -I../../libDaisy//Middlewares/Third_Party/FatFs/src -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -Wno-stringop-overflow -g -ggdb -MMD -MP -MF"build/test_NNOM.d" -fno-exceptions -fasm -finline -finline-functions-called-once -fshort-enums -fno-move-loop-invariants -fno-unwind-tables -fno-rtti -Wno-register -std=gnu++14 -Wa,-a,-ad,-alms=build/test_NNOM.lst test_NNOM.cpp -o build/test_NNOM.o
In file included from nnom_core/inc/layers/nnom_activation.h:26,
                 from nnom_core/inc/nnom_layers.h:44,
                 from nnom_core/inc/nnom.h:343,
                 from test_NNOM.cpp:3:
nnom_core/inc/nnom_local.h:522:1: error: narrowing conversion of '128' from 'int' to 'int8_t' {aka 'signed char'} [-Wnarrowing]
  522 | };
      | ^
nnom_core/inc/nnom_local.h:522:1: error: narrowing conversion of '128' from 'int' to 'int8_t' {aka 'signed char'} [-Wnarrowing]
nnom_core/inc/nnom_local.h:522:1: error: narrowing conversion of '128' from 'int' to 'int8_t' {aka 'signed char'} [-Wnarrowing]
nnom_core/inc/nnom_local.h:522:1: error: narrowing conversion of '128' from 'int' to 'int8_t' {aka 'signed char'} [-Wnarrowing]
...
...
...
nnom_core/inc/nnom_local.h:522:1: error: narrowing conversion of '210' from 'int' to 'int8_t' {aka 'signed char'} [-Wnarrowing]
nnom_core/inc/nnom_local.h:522:1: error: narrowing conversion of '217' from 'int' to 'int8_t' {aka 'signed char'} [-Wnarrowing]
nnom_core/inc/nnom_local.h:522:1: error: narrowing conversion of '225' from 'int' to 'int8_t' {aka 'signed char'} [-Wnarrowing]
nnom_core/inc/nnom_local.h:522:1: error: narrowing conversion of '232' from 'int' to 'int8_t' {aka 'signed char'} [-Wnarrowing]
nnom_core/inc/nnom_local.h:522:1: error: narrowing conversion of '240' from 'int' to 'int8_t' {aka 'signed char'} [-Wnarrowing]
nnom_core/inc/nnom_local.h:522:1: error: narrowing conversion of '248' from 'int' to 'int8_t' {aka 'signed char'} [-Wnarrowing]
nnom_core/inc/nnom_local.h:968:1: error: narrowing conversion of '32768' from 'int' to 'int16_t' {aka 'short int'} [-Wnarrowing]
  968 | };
      | ^
nnom_core/inc/nnom_local.h:968:1: error: narrowing conversion of '32768' from 'int' to 'int16_t' {aka 'short int'} [-Wnarrowing]
nnom_core/inc/nnom_local.h:968:1: error: narrowing conversion of '32768' from 'int' to 'int16_t' {aka 'short int'} [-Wnarrowing]
nnom_core/inc/nnom_local.h:968:1: error: narrowing conversion of '32768' from 'int' to 'int16_t' {aka 'short int'} [-Wnarrowing]
nnom_core/inc/nnom_local.h:968:1: error: narrowing conversion of '32768' from 'int' to 'int16_t' {aka 'short int'} [-Wnarrowing]
...
...
...
nnom_core/inc/nnom_local.h:968:1: error: narrowing conversion of '53793' from 'int' to 'int16_t' {aka 'short int'} [-Wnarrowing]
nnom_core/inc/nnom_local.h:968:1: error: narrowing conversion of '55617' from 'int' to 'int16_t' {aka 'short int'} [-Wnarrowing]
nnom_core/inc/nnom_local.h:968:1: error: narrowing conversion of '57511' from 'int' to 'int16_t' {aka 'short int'} [-Wnarrowing]
nnom_core/inc/nnom_local.h:968:1: error: narrowing conversion of '59463' from 'int' to 'int16_t' {aka 'short int'} [-Wnarrowing]
nnom_core/inc/nnom_local.h:968:1: error: narrowing conversion of '61461' from 'int' to 'int16_t' {aka 'short int'} [-Wnarrowing]
nnom_core/inc/nnom_local.h:968:1: error: narrowing conversion of '63491' from 'int' to 'int16_t' {aka 'short int'} [-Wnarrowing]
make: *** [../../libDaisy//core/Makefile:285: build/test_NNOM.o] Error 1
@JMattChiam JMattChiam changed the title Narrowing conversion Narrowing conversion error Oct 26, 2024
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

No branches or pull requests

1 participant