Skip to main content
Visitor II
March 2, 2024
Question

Only half of the pins are getting declared in CubeIDE

  • March 2, 2024
  • 2 replies
  • 2161 views

While creating new project and initialising the peripherals in default mode , even after doing these the pins are not getting declared default

    This topic has been closed for replies.

    2 replies

    Super User
    March 2, 2024

    Please explain what you mean by this - show examples.

    Note that only pins configured as GPIO tend to get their own _GPIO_PIN_ & _GPIO_Port_  definitions; pins used as Alternate Functions (eg, UART Rx & Tx) tend to be handled by the peripheral - so you may not see separate  _GPIO_PIN_ & _GPIO_Port_  definitions for them ...

     

    Please use this button to properly post source code:

    AndrewNeil_0-1709381124608.png

     

     

    Visitor II
    March 3, 2024

    Why do you expect that "all" pins of a package are initialized (by CubeMX generated code)?
    All pins after a reset will go anyway to their default state (mainly floating, not enabled for "anything").

    To be honest: I do not care if pins have to be configured after a reset when I will not use them afterwards. I leave all not used stuff, esp. not used pins, in their "default" state after reset. I have never realized any issue with this approach.

    What is your understanding of "default" states of pins? If you mean, "pins have to be brought to their default state" after reset - it is not true. They have a default state with reset done.

    surrveshAuthor
    Visitor II
    March 3, 2024

    00:53:41 **** Build of configuration Debug for project project1 ****

    make -j12 all

    arm-none-eabi-gcc "../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -DSTM32H563xx -c -I../Core/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32H5xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal.d" -MT"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal.o"

    arm-none-eabi-gcc "../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_adc.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -DSTM32H563xx -c -I../Core/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32H5xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_adc.d" -MT"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_adc.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_adc.o"

    arm-none-eabi-gcc "../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_adc_ex.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -DSTM32H563xx -c -I../Core/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32H5xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_adc_ex.d" -MT"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_adc_ex.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_adc_ex.o"

    arm-none-eabi-gcc "../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_cortex.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -DSTM32H563xx -c -I../Core/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32H5xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_cortex.d" -MT"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_cortex.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_cortex.o"

    arm-none-eabi-gcc "../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_dma.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -DSTM32H563xx -c -I../Core/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32H5xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_dma.d" -MT"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_dma.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_dma.o"

    arm-none-eabi-gcc "../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_dma_ex.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -DSTM32H563xx -c -I../Core/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32H5xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_dma_ex.d" -MT"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_dma_ex.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_dma_ex.o"

    arm-none-eabi-gcc "../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_eth.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -DSTM32H563xx -c -I../Core/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32H5xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_eth.d" -MT"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_eth.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_eth.o"

    arm-none-eabi-gcc "../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_eth_ex.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -DSTM32H563xx -c -I../Core/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32H5xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_eth_ex.d" -MT"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_eth_ex.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_eth_ex.o"

    arm-none-eabi-gcc "../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_exti.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -DSTM32H563xx -c -I../Core/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32H5xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_exti.d" -MT"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_exti.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_exti.o"

    arm-none-eabi-gcc "../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_flash.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -DSTM32H563xx -c -I../Core/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32H5xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_flash.d" -MT"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_flash.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_flash.o"

    arm-none-eabi-gcc "../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_flash_ex.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -DSTM32H563xx -c -I../Core/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32H5xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_flash_ex.d" -MT"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_flash_ex.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_flash_ex.o"

    arm-none-eabi-gcc "../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_gpio.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -DSTM32H563xx -c -I../Core/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc -I../Drivers/STM32H5xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32H5xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_gpio.d" -MT"Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_gpio.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_gpio.o"

    In file included from ../Drivers/STM32H5xx_HAL_Driver/Inc/stm32h5xx_hal.h:29,

    from ../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_dma_ex.c:517:

    ../Core/Inc/stm32h5xx_hal_conf.h:409:11: fatal error: stm32h5xx_hal_usart.h: No such file or directory

    409 | #include "stm32h5xx_hal_usart.h"

    | ^~~~~~~~~~~~~~~~~~~~~~~

    In file included from ../Drivers/STM32H5xx_HAL_Driver/Inc/stm32h5xx_hal.h:29,

    from ../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal.c:35:

    ../Core/Inc/stm32h5xx_hal_conf.h:409:11: fatal error: stm32h5xx_hal_usart.h: No such file or directory

    409 | #include "stm32h5xx_hal_usart.h"

    | ^~~~~~~~~~~~~~~~~~~~~~~

    In file included from ../Drivers/STM32H5xx_HAL_Driver/Inc/stm32h5xx_hal.h:29,

    from ../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_eth_ex.c:21:

    ../Core/Inc/stm32h5xx_hal_conf.h:409:11: fatal error: stm32h5xx_hal_usart.h: No such file or directory

    409 | #include "stm32h5xx_hal_usart.h"

    | ^~~~~~~~~~~~~~~~~~~~~~~

    In file included from ../Drivers/STM32H5xx_HAL_Driver/Inc/stm32h5xx_hal.h:29,

    from ../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_adc_ex.c:33:

    ../Core/Inc/stm32h5xx_hal_conf.h:409:11: fatal error: stm32h5xx_hal_usart.h: No such file or directory

    409 | #include "stm32h5xx_hal_usart.h"

    | ^~~~~~~~~~~~~~~~~~~~~~~

    In file included from ../Drivers/STM32H5xx_HAL_Driver/Inc/stm32h5xx_hal.h:29,

    from ../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_cortex.c:118:

    ../Core/Inc/stm32h5xx_hal_conf.h:409:11: fatal error: stm32h5xx_hal_usart.h: No such file or directory

    409 | #include "stm32h5xx_hal_usart.h"

    | ^~~~~~~~~~~~~~~~~~~~~~~

    In file included from ../Drivers/STM32H5xx_HAL_Driver/Inc/stm32h5xx_hal.h:29,

    from ../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_flash_ex.c:87:

    ../Core/Inc/stm32h5xx_hal_conf.h:409:11: fatal error: stm32h5xx_hal_usart.h: No such file or directory

    409 | #include "stm32h5xx_hal_usart.h"

    | ^~~~~~~~~~~~~~~~~~~~~~~

    In file included from ../Drivers/STM32H5xx_HAL_Driver/Inc/stm32h5xx_hal.h:29,

    from ../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_flash.c:84:

    ../Core/Inc/stm32h5xx_hal_conf.h:409:11: fatal error: stm32h5xx_hal_usart.h: No such file or directory

    409 | #include "stm32h5xx_hal_usart.h"

    | ^~~~~~~~~~~~~~~~~~~~~~~

    In file included from ../Drivers/STM32H5xx_HAL_Driver/Inc/stm32h5xx_hal.h:29,

    from ../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_gpio.c:108:

    ../Core/Inc/stm32h5xx_hal_conf.h:409:11: fatal error: stm32h5xx_hal_usart.h: No such file or directory

    409 | #include "stm32h5xx_hal_usart.h"

    | ^~~~~~~~~~~~~~~~~~~~~~~

    In file included from ../Drivers/STM32H5xx_HAL_Driver/Inc/stm32h5xx_hal.h:29,

    from ../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_adc.c:294:

    ../Core/Inc/stm32h5xx_hal_conf.h:409:11: fatal error: stm32h5xx_hal_usart.h: No such file or directory

    409 | #include "stm32h5xx_hal_usart.h"

    | ^~~~~~~~~~~~~~~~~~~~~~~

    In file included from ../Drivers/STM32H5xx_HAL_Driver/Inc/stm32h5xx_hal.h:29,

    from ../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_dma.c:187:

    ../Core/Inc/stm32h5xx_hal_conf.h:409:11: fatal error: stm32h5xx_hal_usart.h: No such file or directory

    409 | #include "stm32h5xx_hal_usart.h"

    | ^~~~~~~~~~~~~~~~~~~~~~~

    In file included from ../Drivers/STM32H5xx_HAL_Driver/Inc/stm32h5xx_hal.h:29,

    from ../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_eth.c:178:

    ../Core/Inc/stm32h5xx_hal_conf.h:409:11: fatal error: stm32h5xx_hal_usart.h: No such file or directory

    409 | #include "stm32h5xx_hal_usart.h"

    | ^~~~~~~~~~~~~~~~~~~~~~~

    In file included from ../Drivers/STM32H5xx_HAL_Driver/Inc/stm32h5xx_hal.h:29,

    from ../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_exti.c:86:

    ../Core/Inc/stm32h5xx_hal_conf.h:409:11: fatal error: stm32h5xx_hal_usart.h: No such file or directory

    409 | #include "stm32h5xx_hal_usart.h"

    | ^~~~~~~~~~~~~~~~~~~~~~~

    compilation terminated.

    compilation terminated.

    compilation terminated.

    compilation terminated.

    compilation terminated.

    compilation terminated.

    compilation terminated.

    compilation terminated.

    compilation terminated.

    compilation terminated.

    compilation terminated.

    compilation terminated.

    make: *** [Drivers/STM32H5xx_HAL_Driver/Src/subdir.mk:100: Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_cortex.o] Error 1

    make: *** Waiting for unfinished jobs....

    make: *** [Drivers/STM32H5xx_HAL_Driver/Src/subdir.mk:100: Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal.o] Error 1

    make: *** [Drivers/STM32H5xx_HAL_Driver/Src/subdir.mk:100: Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_dma.o] Error 1

    make: *** [Drivers/STM32H5xx_HAL_Driver/Src/subdir.mk:100: Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_flash.o] Error 1

    make: *** [Drivers/STM32H5xx_HAL_Driver/Src/subdir.mk:100: Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_adc.o] Error 1

    make: *** [Drivers/STM32H5xx_HAL_Driver/Src/subdir.mk:100: Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_dma_ex.o] Error 1

    make: *** [Drivers/STM32H5xx_HAL_Driver/Src/subdir.mk:100: Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_eth_ex.o] Error 1

    make: *** [Drivers/STM32H5xx_HAL_Driver/Src/subdir.mk:100: Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_gpio.o] Error 1

    make: *** [Drivers/STM32H5xx_HAL_Driver/Src/subdir.mk:100: Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_adc_ex.o] Error 1

    make: *** [Drivers/STM32H5xx_HAL_Driver/Src/subdir.mk:100: Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_exti.o] Error 1

    make: *** [Drivers/STM32H5xx_HAL_Driver/Src/subdir.mk:100: Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_flash_ex.o] Error 1

    make: *** [Drivers/STM32H5xx_HAL_Driver/Src/subdir.mk:100: Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_eth.o] Error 1

    "make -j12 all" terminated with exit code 2. Build might be incomplete.

     

    00:53:44 Build Failed. 25 errors, 0 warnings. (took 3s.134ms)
    im getting this error for any code i write

    Technical Moderator
    March 3, 2024

    Hello @surrvesh 

    I think you are tooking about the same issue on this post. Can you give more details about your configurations.

    Best Regards.

    STTwo-32 

    Visitor II
    March 3, 2024

    What is your question?

    Have you realized your compile error?
    ../Core/Inc/stm32h5xx_hal_conf.h:409:11: fatal error: stm32h5xx_hal_usart.h: No such file or directory

    Fix this error first (potentially missing files or project include paths are not set properly).
    How is it related to your topic as "Only half of the pins are getting declared in CubeIDE"?

    Were you every able to compile and flash a FW?