Announcement

Collapse
No announcement yet.

troubleshooting while compiling

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • troubleshooting while compiling

    here is my problem... Too many errors appear after having built my project.


    -------------- Build: Debug in 03092018 (compiler: ImageCraft Gnu C for ARM)---------------

    arm-none-eabi-gcc.exe -mcpu=cortex-m4 -mthumb -DDEBUG=1 -ggdb -DVENDOR=ST -DDEVICE=STM32F410C8 -D__ICC_VERSION=90401 -IC:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8. 0\CMSIS\Include -IC:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8. 0\CMSIS\Device\ST\STM32F4xx\Include -IC:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8. 0\StdPeriph_Driver\inc -IC:\iccv9cortex\include -IC:\iccv9cortex\SDK\Arm\CMSIS -IC:\iccv9cortex\gnuarm\arm-none-eabi\include -c C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\src\stm32f4xx_rcc.c -o obj\Debug\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0\StdP eriph_Driver\src\stm32f4xx_rcc.o
    In file included from C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\src\stm32f4xx_rcc.c:62:0:
    C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\inc/stm32f4xx_rcc.h:51:3: error: unknown type name 'uint32_t'
    uint32_t SYSCLK_Frequency; /*!< SYSCLK clock frequency expressed in Hz */
    ^~~~~~~~
    C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\inc/stm32f4xx_rcc.h:52:3: error: unknown type name 'uint32_t'
    uint32_t HCLK_Frequency; /*!< HCLK clock frequency expressed in Hz */
    ^~~~~~~~
    C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\inc/stm32f4xx_rcc.h:53:3: error: unknown type name 'uint32_t'
    uint32_t PCLK1_Frequency; /*!< PCLK1 clock frequency expressed in Hz */
    ^~~~~~~~
    C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\inc/stm32f4xx_rcc.h:54:3: error: unknown type name 'uint32_t'
    uint32_t PCLK2_Frequency; /*!< PCLK2 clock frequency expressed in Hz */
    ^~~~~~~~
    In file included from C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\src\stm32f4xx_rcc.c:62:0:
    C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\inc/stm32f4xx_rcc.h:893:27: error: unknown type name 'uint8_t'
    void RCC_HSEConfig(uint8_t RCC_HSE);
    ^~~~~~~
    C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\inc/stm32f4xx_rcc.h:894:1: error: unknown type name 'ErrorStatus'
    ErrorStatus RCC_WaitForHSEStartUp(void);
    ^~~~~~~~~~~
    C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\inc/stm32f4xx_rcc.h:895:43: error: unknown type name 'uint8_t'
    void RCC_AdjustHSICalibrationValue(uint8_t HSICalibrationValue);
    ^~~~~~~
    C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\inc/stm32f4xx_rcc.h:896:24: error: unknown type name 'FunctionalState'
    void RCC_HSICmd(FunctionalState NewState);
    ^~~~~~~~~~~~~~~
    C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\inc/stm32f4xx_rcc.h:897:27: error: unknown type name 'uint8_t'
    void RCC_LSEConfig(uint8_t RCC_LSE);
    ^~~~~~~
    C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\inc/stm32f4xx_rcc.h:898:24: error: unknown type name 'FunctionalState'
    void RCC_LSICmd(FunctionalState NewState);
    ^~~~~~~~~~~~~~~
    C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\inc/stm32f4xx_rcc.h:900:24: error: unknown type name 'FunctionalState'
    void RCC_PLLCmd(FunctionalState NewState);
    ^~~~~~~~~~~~~~~
    C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\inc/stm32f4xx_rcc.h:910:27: error: unknown type name 'FunctionalState'
    void RCC_PLLI2SCmd(FunctionalState NewState);
    ^~~~~~~~~~~~~~~
    C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\inc/stm32f4xx_rcc.h:925:27: error: unknown type name 'FunctionalState'
    void RCC_PLLSAICmd(FunctionalState NewState);
    ^~~~~~~~~~~~~~~
    C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\inc/stm32f4xx_rcc.h:936:40: error: unknown type name 'FunctionalState'
    void RCC_ClockSecuritySystemCmd(FunctionalState NewState);
    ^~~~~~~~~~~~~~~
    C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\inc/stm32f4xx_rcc.h:937:28: error: unknown type name 'uint32_t'
    void RCC_MCO1Config(uint32_t RCC_MCO1Source, uint32_t RCC_MCO1Div);
    ^~~~~~~~
    C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\inc/stm32f4xx_rcc.h:937:53: error: unknown type name 'uint32_t'
    void RCC_MCO1Config(uint32_t RCC_MCO1Source, uint32_t RCC_MCO1Div);
    ^~~~~~~~
    C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\inc/stm32f4xx_rcc.h:938:28: error: unknown type name 'uint32_t'
    void RCC_MCO2Config(uint32_t RCC_MCO2Source, uint32_t RCC_MCO2Div);
    ^~~~~~~~

    Process terminated with status 1 (0 minute(s), 0 second(s))
    Build Failed: ExitCode(1) 50 error(s), 0 warning(s) (0 minute(s), 0 second(s))

    /************************************************** **********************************
    * File: main.c
    * Purpose: Cortex-M4 main file.
    * Replace with your code.
    * Date: 05 July 2013
    * Info: If __NO_SYSTEM_INIT is defined in the Build options,
    * the startup code will not branch to SystemInit()
    * and the function can be removed
    ************************************************** **********************************/

    #include "sys/types.h"
    #include "stm32f4xx.h"
    #include "stm32f4xx_adc.h"
    #include "stm32f4xx_rcc.h"


    int end;

    #ifndef __NO_SYSTEM_INIT
    void SystemInit()
    {
    end= 0x200;
    }
    #endif

    /************************************************** *******************
    *
    * main()
    ************************************************** *******************/
    int main()
    {
    /************************************************** ****************
    *
    * Place your code here.
    ************************************************** ****************/
    return 0;
    }



  • #2
    Per usual, the first 2 or 3 messages are the key. Here it's

    C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\inc/stm32f4xx_rcc.h:51:3: error: unknown type name 'uint32_t'
    uint32_t SYSCLK_Frequency; /*!< SYSCLK clock frequency expressed in Hz */

    So it's because uint32_t is undefined. It's part of <stdint.h>. Normally the ST header files would have the correct defines, either by #including <stdint.h> or has its own set.

    Where do you get the program templates from? If from ST CubeMX, then everything should compile.

    If from your own copy and paste from other examples, you may need to #include <stdint.h> yourself or find out whether you have missed including some other ST files.

    Comment


    • #3
      Hello Richard!

      At once, thank you very much for having thought to my problem: it is very kind from your part.

      I seemed to have a problem with an unint32_t type which wasn't defined in my source code but

      it is partialy resolved. Now, I have an other troubleshooting in spite of the fact that I have included

      stdint.h file.

      here are the following errors:


      -------------- Build: Debug in 03092018 (compiler: ImageCraft Gnu C for ARM)---------------

      arm-none-eabi-gcc.exe -mcpu=cortex-m4 -mthumb -DDEBUG=1 -ggdb -DVENDOR=ST -DDEVICE=STM32F410C8 -DSTM32F410C8 -D__ICC_VERSION=90401 -I..\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0\CMSIS\Incl ude -I..\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0\CMSIS\Devi ce\ST\STM32F4xx\Include -I..\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0\StdPeriph_ Driver\inc -I..\GnuARM\arm-none-eabi\include -I..\GnuARM\arm-none-eabi\include\sys -I..\include\include_bis\CMSIS\ST\STM32F4xx -IC:\iccv9cortex\include -IC:\iccv9cortex\SDK\Arm\CMSIS -IC:\iccv9cortex\gnuarm\arm-none-eabi\include -c C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\src\stm32f4xx_adc.c -o obj\Debug\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0\StdP eriph_Driver\src\stm32f4xx_adc.o
      C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\src\stm32f4xx_adc.c: In function 'ADC_Init':
      C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\src\stm32f4xx_adc.c:242:3: warning: implicit declaration of function 'assert_param' [-Wimplicit-function-declaration]
      assert_param(IS_ADC_ALL_PERIPH(ADCx));
      ^~~~~~~~~~~~
      arm-none-eabi-gcc.exe -mcpu=cortex-m4 -mthumb -DDEBUG=1 -ggdb -DVENDOR=ST -DDEVICE=STM32F410C8 -DSTM32F410C8 -D__ICC_VERSION=90401 -I..\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0\CMSIS\Incl ude -I..\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0\CMSIS\Devi ce\ST\STM32F4xx\Include -I..\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0\StdPeriph_ Driver\inc -I..\GnuARM\arm-none-eabi\include -I..\GnuARM\arm-none-eabi\include\sys -I..\include\include_bis\CMSIS\ST\STM32F4xx -IC:\iccv9cortex\include -IC:\iccv9cortex\SDK\Arm\CMSIS -IC:\iccv9cortex\gnuarm\arm-none-eabi\include -c C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\src\stm32f4xx_rcc.c -o obj\Debug\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0\StdP eriph_Driver\src\stm32f4xx_rcc.o
      In file included from C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\src\stm32f4xx_rcc.c:62:0:
      ..\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0\StdPeriph_D river\inc/stm32f4xx_rcc.h:897:1: error: unknown type name 'ErrorStatus'
      ErrorStatus RCC_WaitForHSEStartUp(void);
      ^~~~~~~~~~~
      ..\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0\StdPeriph_D river\inc/stm32f4xx_rcc.h:899:24: error: unknown type name 'FunctionalState'
      void RCC_HSICmd(FunctionalState NewState);
      ^~~~~~~~~~~~~~~
      ..\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0\StdPeriph_D river\inc/stm32f4xx_rcc.h:901:24: error: unknown type name 'FunctionalState'
      void RCC_LSICmd(FunctionalState NewState);
      ^~~~~~~~~~~~~~~
      ..\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0\StdPeriph_D river\inc/stm32f4xx_rcc.h:903:24: error: unknown type name 'FunctionalState'
      void RCC_PLLCmd(FunctionalState NewState);
      ^~~~~~~~~~~~~~~
      ..\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0\StdPeriph_D river\inc/stm32f4xx_rcc.h:913:27: error: unknown type name 'FunctionalState'
      void RCC_PLLI2SCmd(FunctionalState NewState);
      ^~~~~~~~~~~~~~~
      ..\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0\StdPeriph_D river\inc/stm32f4xx_rcc.h:928:27: error: unknown type name 'FunctionalState'
      void RCC_PLLSAICmd(FunctionalState NewState);
      ^~~~~~~~~~~~~~~
      ..\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0\StdPeriph_D river\inc/stm32f4xx_rcc.h:939:40: error: unknown type name 'FunctionalState'
      void RCC_ClockSecuritySystemCmd(FunctionalState NewState);
      ^~~~~~~~~~~~~~~
      ..\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0\StdPeriph_D river\inc/stm32f4xx_rcc.h:953:27: error: unknown type name 'FunctionalState'
      void RCC_RTCCLKCmd(FunctionalState NewState);
      ^~~~~~~~~~~~~~~
      ..\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0\StdPeriph_D river\inc/stm32f4xx_rcc.h:954:32: error: unknown type name 'FunctionalState'
      void RCC_BackupResetCmd(FunctionalState NewState);
      ^~~~~~~~~~~~~~~
      ..\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0\StdPeriph_D river\inc/stm32f4xx_rcc.h:987:61: error: unknown type name 'FunctionalState'
      void RCC_AHB1PeriphClockCmd(uint32_t RCC_AHB1Periph, FunctionalState NewState);
      ^~~~~~~~~~~~~~~
      .
      ^~~~~~~~~~~~~~~
      ..\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0\StdPeriph_D river\inc/stm32f4xx_rcc.h:1051:1: error: unknown type name 'FlagStatus'
      FlagStatus RCC_GetFlagStatus(uint8_t RCC_FLAG);
      ^~~~~~~~~~
      ..\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0\StdPeriph_D river\inc/stm32f4xx_rcc.h:1053:1: error: unknown type name 'ITStatus'
      ITStatus RCC_GetITStatus(uint8_t RCC_IT);
      ^~~~~~~~
      C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\src\stm32f4xx_rcc.c:157:8: error: unknown type name '__I'
      static __I uint8_t APBAHBPrescTable[16] = {0, 0, 0, 0, 1, 2, 3, 4, 1, 2, 3, 4, 6, 7, 8, 9};
      ^~~
      C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\src\stm32f4xx_rcc.c:157:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'APBAHBPrescTable'
      static __I uint8_t APBAHBPrescTable[16] = {0, 0, 0, 0, 1, 2, 3, 4, 1, 2, 3, 4, 6, 7, 8, 9};
      ^~~~~~~~~~~~~~~~
      C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\src\stm32f4xx_rcc.c: In function 'RCC_DeInit':
      C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\src\stm32f4xx_rcc.c:232:3: error: 'RCC' undeclared (first use in this function)
      RCC->CR |= (uint32_t)0x00000001;
      ^~~
      C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\src\stm32f4xx_rcc.c:232:3: note: each undeclared identifier is reported only once for each function it appears in
      C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\src\stm32f4xx_rcc.c: In function 'RCC_HSEConfig':
      C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\src\stm32f4xx_rcc.c:291:3: warning: implicit declaration of function 'assert_param' [-Wimplicit-function-declaration]
      assert_param(IS_RCC_HSE(RCC_HSE));
      ^~~~~~~~~~~~
      C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\src\stm32f4xx_rcc.c:294:5: error: '__IO' undeclared (first use in this function)
      *(__IO uint8_t *) CR_BYTE3_ADDRESS = RCC_HSE_OFF;
      ^~~~
      C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\src\stm32f4xx_rcc.c:294:10: error: expected ')' before 'uint8_t'
      *(__IO uint8_t *) CR_BYTE3_ADDRESS = RCC_HSE_OFF;
      ^~~~~~~
      C:\iccv9cortex\SDK\ST\StdPeriph_Lib\STM32F4_V1.8.0 \StdPeriph_Driver\src\stm32f4xx_rcc.c:297:10: error: expected ')' before 'uint8_t'
      *(__IO uint8_t *) CR_BYTE3_ADDRESS = RCC_HSE;
      ^~~~~~~

      Process terminated with status 1 (0 minute(s), 1 second(s))
      Build Failed: ExitCode(1) 50 error(s), 2 warning(s) (0 minute(s), 1 second(s))

      I thought to make a template file but I don't know what kind of command lines to include in it.

      All my best regards,

      Arist_104

      Comment


      • #4
        OK, the problem is definitely that the correct ST header files are not being #include'd. Erorr_Status and Functional_State are their typedefs/defines. A "template" file will not help you here, it's for making a template from WORKING project so that you can create another similarly looking project.

        How/where did you get this project? Did you just create a new M4 project and then add the StdPeriph_Driver files? Please clarify. Thanks.

        Comment


        • #5
          Yes, I have made a M4 project ( simple int main (void) with return 0 ) and added the StdPeriph_Driver files.

          Comment


          • #6
            Using the StdPeripheral Driver requires careful inclusion of the right header files, which is what you are tripping on. It's one of those that once you have done it successfully a couple times, then it becomes natural.

            This is why we have JSAPI, to make it simple to get started. Starting with SPL like you did is not recommended.

            The other method is to use ST CubeMX to create a project and then import it into JumpSTart C++. This is the easiest method if you want to use ST only code. The help file explains.

            Comment


            • #7
              There are less than 50 errors in my C source code and I don't know where does it come from.

              I use the stm32f4xx_hal_conf header file.

              Comment


              • #8
                Originally posted by arist_104 View Post
                There are less than 50 errors in my C source code and I don't know where does it come from.

                I use the stm32f4xx_hal_conf header file.
                Right, as I said, there's probably a simple ST header file you are missing. The simplest way to address this is to create a simple program with ST CubeMX and then import it to JumpStart C++. It should build without problems. Then you can see how the header files are included. Also check the Build Options->Paths for the include file path.

                As said, it's not hard but it can be convoluted when you first start. So start with a working example as above, then it should be clear.

                Comment


                • #9
                  • Hello Richard,

                    I have autogenerated some code with STM32CubeMX and this code doesn't contain any errors at all. When I generate my source code with STCUBE
                    I have generated four files like main.c, stm32f4xx_hal_msp.c, stm32f4xx_it.c, and system_stm32f4xx.c then I I get too three header files like main.h, stm32f4xx_hal_conf.h, and stm32f4xx_it.h

                    Now, the problem is that when I create one project within ImageCraft compiler by adding files into my project I get maximaly 35 errors that I cannot remove.

                    Following lines are my compiling errors:

                    -------------- Build: Debug in essai_project_1 (compiler: ImageCraft Gnu C for ARM)---------------

                    arm-none-eabi-gcc.exe -mcpu=cortex-m4 -mthumb -DDEBUG=1 -ggdb -D_ARMGNUCPP -DVENDOR=ST -DDEVICE=STM32F410C8 -DSTM32F410C8 -D__ICC_VERSION=90401 -IC:\Users\dominique_ES\Documents\stm32f4\Drivers\S TM32F4xx_HAL_Driver\Inc -IC:\Users\dominique_ES\Documents\stm32f4\Drivers\C MSIS\Device\ST\STM32F4xx\Include\stm32f4xx.h -IC:\Users\dominique_ES\STM32Cube\Repository\STM32C ube_FW_F4_V1.21.0\Projects\STM32F446ZE-Nucleo\Examples\WWDG\WWDG_Example\Inc -IC:\Users\dominique_ES\Documents\essai_project_1\I nc -IC:\Users\dominique_ES\Documents\essai_project\Dri vers\CMSIS\Device\ST\STM32F4xx\Include -IC:\iccv9cortex\SDK\ST\CMSIS_HAL\STM32F4_CMSIS_HAL _v1.18.0\STM32F4xx_HAL_Driver\Inc -IC:\Users\dominique_ES\Documents\essai_project_1\D rivers\STM32F4xx_HAL_Driver\Inc -IC:\iccv9cortex\GnuARM\arm-none-eabi\include -IC:\iccv9cortex\SDK\ST\CMSIS_HAL\StdPeriph_Lib\STM 32F4_V1.8.0\CMSIS\Device\ST\STM32F4xx\Include -IC:\iccv9cortex\include -IC:\iccv9cortex\SDK\Arm\CMSIS -IC:\iccv9cortex\gnuarm\arm-none-eabi\include -c C:\Users\dominique_ES\Documents\essai_project_1\Sr c\stm32f4xx_hal_msp.c -o obj\Debug\..\..\Users\dominique_ES\Documents\essai _project_1\Src\stm32f4xx_hal_msp.o
                    cc1.exe: warning: C:\Users\dominique_ES\Documents\stm32f4\Drivers\CM SIS\Device\ST\STM32F4xx\Include\stm32f4xx.h: not a directory
                    In file included from C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal_def.h:46:0,
                    from C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal_rcc.h:45,
                    from C:\Users\dominique_ES\STM32Cube\Repository\STM32Cu be_FW_F4_V1.21.0\Projects\STM32F446ZE-Nucleo\Examples\WWDG\WWDG_Example\Inc/stm32f4xx_hal_conf.h:184,
                    from C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal.h:46,
                    from C:\Users\dominique_ES\Documents\essai_project_1\Sr c\stm32f4xx_hal_msp.c:40:
                    C:\Users\dominique_ES\Documents\essai_project\Driv ers\CMSIS\Device\ST\STM32F4xx\Include/stm32f4xx.h:191:3: error: #error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
                    #error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
                    ^~~~~
                    In file included from C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal_rcc.h:49:0,
                    from C:\Users\dominique_ES\STM32Cube\Repository\STM32Cu be_FW_F4_V1.21.0\Projects\STM32F446ZE-Nucleo\Examples\WWDG\WWDG_Example\Inc/stm32f4xx_hal_conf.h:184,
                    from C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal.h:46,
                    from C:\Users\dominique_ES\Documents\essai_project_1\Sr c\stm32f4xx_hal_msp.c:40:
                    C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal_rcc_ex.h:6727:45: error: unknown type name 'RCC_PeriphCLKInitTypeDef'; did you mean 'RCC_PLLInitTypeDef'?
                    HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit);
                    ^~~~~~~~~~~~~~~~~~~~~~~~
                    RCC_PLLInitTypeDef
                    C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal_rcc_ex.h:6728:35: error: unknown type name 'RCC_PeriphCLKInitTypeDef'; did you mean 'RCC_PLLInitTypeDef'?
                    void HAL_RCCEx_GetPeriphCLKConfig(RCC_PeriphCLKInitType Def *PeriphClkInit);
                    ^~~~~~~~~~~~~~~~~~~~~~~~
                    RCC_PLLInitTypeDef
                    In file included from C:\Users\dominique_ES\STM32Cube\Repository\STM32Cu be_FW_F4_V1.21.0\Projects\STM32F446ZE-Nucleo\Examples\WWDG\WWDG_Example\Inc/stm32f4xx_hal_conf.h:188:0,
                    from C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal.h:46,
                    from C:\Users\dominique_ES\Documents\essai_project_1\Sr c\stm32f4xx_hal_msp.c:40:
                    C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal_gpio.h:241:21: error: unknown type name 'GPIO_TypeDef'; did you mean 'GPIO_InitTypeDef'?
                    void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init);
                    ^~~~~~~~~~~~
                    GPIO_InitTypeDef
                    C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal_gpio.h:242:23: error: unknown type name 'GPIO_TypeDef'; did you mean 'GPIO_InitTypeDef'?
                    void HAL_GPIO_DeInit(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin);
                    ^~~~~~~~~~~~
                    GPIO_InitTypeDef
                    C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal_gpio.h:251:32: error: unknown type name 'GPIO_TypeDef'; did you mean 'GPIO_InitTypeDef'?
                    GPIO_PinState HAL_GPIO_ReadPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
                    ^~~~~~~~~~~~
                    GPIO_InitTypeDef
                    C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal_gpio.h:252:24: error: unknown type name 'GPIO_TypeDef'; did you mean 'GPIO_InitTypeDef'?
                    void HAL_GPIO_WritePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState);
                    ^~~~~~~~~~~~
                    GPIO_InitTypeDef
                    C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal_gpio.h:253:25: error: unknown type name 'GPIO_TypeDef'; did you mean 'GPIO_InitTypeDef'?
                    void HAL_GPIO_TogglePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
                    ^~~~~~~~~~~~
                    GPIO_InitTypeDef
                    C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal_gpio.h:254:36: error: unknown type name 'GPIO_TypeDef'; did you mean 'GPIO_InitTypeDef'?
                    HAL_StatusTypeDef HAL_GPIO_LockPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
                    ^~~~~~~~~~~~
                    GPIO_InitTypeDef
                    In file included from C:\Users\dominique_ES\STM32Cube\Repository\STM32Cu be_FW_F4_V1.21.0\Projects\STM32F446ZE-Nucleo\Examples\WWDG\WWDG_Example\Inc/stm32f4xx_hal_conf.h:196:0,
                    from C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal.h:46,
                    from C:\Users\dominique_ES\Documents\essai_project_1\Sr c\stm32f4xx_hal_msp.c:40:
                    C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal_cortex.h:279:27: error: unknown type name 'IRQn_Type'
                    void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority);
                    ^~~~~~~~~
                    C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal_cortex.h:280:25: error: unknown type name 'IRQn_Type'
                    void HAL_NVIC_EnableIRQ(IRQn_Type IRQn);
                    ^~~~~~~~~
                    C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal_cortex.h:281:26: error: unknown type name 'IRQn_Type'
                    void HAL_NVIC_DisableIRQ(IRQn_Type IRQn);
                    ^~~~~~~~~
                    C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal_cortex.h:293:27: error: unknown type name 'IRQn_Type'
                    void HAL_NVIC_GetPriority(IRQn_Type IRQn, uint32_t PriorityGroup, uint32_t* pPreemptPriority, uint32_t* pSubPriority);
                    ^~~~~~~~~
                    C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal_cortex.h:294:33: error: unknown type name 'IRQn_Type'
                    uint32_t HAL_NVIC_GetPendingIRQ(IRQn_Type IRQn);
                    ^~~~~~~~~
                    C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal_cortex.h:295:29: error: unknown type name 'IRQn_Type'
                    void HAL_NVIC_SetPendingIRQ(IRQn_Type IRQn);
                    ^~~~~~~~~
                    C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal_cortex.h:296:31: error: unknown type name 'IRQn_Type'
                    void HAL_NVIC_ClearPendingIRQ(IRQn_Type IRQn);
                    ^~~~~~~~~
                    C:\Users\dominique_ES\Documents\stm32f4\Drivers\ST M32F4xx_HAL_Driver\Inc/stm32f4xx_hal_cortex.h:297:29: error: unknown type name 'IRQn_Type'
                    uint32_t HAL_NVIC_GetActive(IRQn_Type IRQn);
                    ^~~~~~~~~

                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~

                    ^~~


                    Process terminated with status 1 (0 minute(s), 0 second(s))
                    Build Failed: ExitCode(1) 35 error(s), 2 warning(s) (0 minute(s), 0 second(s))


                    Thank you very much for your help!

                    Best regards,

                    Arist

                  Post Reply

                  Comment


                  • #10
                    Hello Richard,

                    It gets perfectly because I have just found my error. I haven't produced a makefile of my project.

                    So, I wasn't able to import the STCubeMX project makefile into my ImageCraft compiler.

                    You was right: I had to conceive a project under STM32CubeMX and import it under ImageCraft.

                    Thank you very much for your help!

                    All my best regards,

                    Arist_104

                    Comment


                    • #11
                      Excellent! Once you have a working project, it's easy to see what needs to be done to get the header file situation sorted. In 9.04.03, you can even "clone" a working project to a different project so that you can maintain all the header paths etc.

                      Comment

                      Working...
                      X