tinymlcontest / tinymlcontest2023_demo_evaluation

GNU General Public License v2.0
0 stars 2 forks source link

Error Asking #1

Closed qhy991 closed 9 months ago

qhy991 commented 9 months ago

When I follow the evolution instructions for cubemx-ai, I met the following error when I compiled the project after replacing the four files you provided in this repo. I had used both V5 and V6 ARM compiler to test. The error depicts as follows: ../Src/usart.c(81): error: use of undeclared identifier 'GPIO_SPEED_FREQ_VERY_HIGH' GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; ^ ../Src/usart.c(88): error: use of undeclared identifier 'GPIO_SPEED_FREQ_VERY_HIGH' GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; ^ ../Src/usart.c(89): error: use of undeclared identifier 'GPIO_AF3_USART2' GPIO_InitStruct.Alternate = GPIO_AF3_USART2; ^ 3 errors generated. compiling usart.c... compiling app_x-cube-ai.c... ../Src/main.c(176): error: use of undeclared identifier 'RCC_OSCILLATORTYPE_MSI' RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_MSI; ^ ../Src/main.c(177): error: no member named 'MSIState' in 'RCC_OscInitTypeDef' RCC_OscInitStruct.MSIState = RCC_MSI_ON;


../Src/main.c(177): error: use of undeclared identifier 'RCC_MSI_ON'
  RCC_OscInitStruct.MSIState = RCC_MSI_ON;
                               ^
../Src/main.c(178): error: no member named 'MSICalibrationValue' in 'RCC_OscInitTypeDef'; did you mean 'HSICalibrationValue'?
  RCC_OscInitStruct.MSICalibrationValue = 0;
                    ^~~~~~~~~~~~~~~~~~~
                    HSICalibrationValue
../Drivers/STM32F3xx_HAL_Driver/Inc\stm32f3xx_hal_rcc.h(289): note: 'HSICalibrationValue' declared here
  uint32_t HSICalibrationValue;   /*!< The HSI calibration trimming value (default is RCC_HSICALIBRATION_DEFAULT).
           ^
../Src/main.c(179): error: no member named 'MSIClockRange' in 'RCC_OscInitTypeDef'
  RCC_OscInitStruct.MSIClockRange = RCC_MSIRANGE_6;
  ~~~~~~~~~~~~~~~~~ ^
../Src/main.c(179): error: use of undeclared identifier 'RCC_MSIRANGE_6'
  RCC_OscInitStruct.MSIClockRange = RCC_MSIRANGE_6;
                                    ^
../Src/main.c(181): error: use of undeclared identifier 'RCC_PLLSOURCE_MSI'
  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_MSI;
                                    ^
../Src/main.c(182): error: no member named 'PLLM' in 'RCC_PLLInitTypeDef'
  RCC_OscInitStruct.PLL.PLLM = 1;
  ~~~~~~~~~~~~~~~~~~~~~ ^
../Src/main.c(183): error: no member named 'PLLN' in 'RCC_PLLInitTypeDef'
  RCC_OscInitStruct.PLL.PLLN = 40;
  ~~~~~~~~~~~~~~~~~~~~~ ^
../Src/main.c(184): error: no member named 'PLLP' in 'RCC_PLLInitTypeDef'
  RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV7;
  ~~~~~~~~~~~~~~~~~~~~~ ^
../Src/main.c(184): error: use of undeclared identifier 'RCC_PLLP_DIV7'
  RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV7;
                               ^
../Src/main.c(185): error: no member named 'PLLQ' in 'RCC_PLLInitTypeDef'
  RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2;
  ~~~~~~~~~~~~~~~~~~~~~ ^
../Src/main.c(185): error: use of undeclared identifier 'RCC_PLLQ_DIV2'
  RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2;
                               ^
../Src/main.c(186): error: no member named 'PLLR' in 'RCC_PLLInitTypeDef'
  RCC_OscInitStruct.PLL.PLLR = 2;
  ~~~~~~~~~~~~~~~~~~~~~ ^
../Src/main.c(200): error: use of undeclared identifier 'FLASH_LATENCY_4'
  if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_4) != HAL_OK)
                                              ^
../Src/main.c(204): error: use of undeclared identifier 'RCC_PERIPHCLK_USART2'
  PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USART2;
                                       ^
../Src/main.c(205): error: no member named 'Usart2ClockSelection' in 'RCC_PeriphCLKInitTypeDef'
  PeriphClkInit.Usart2ClockSelection = RCC_USART2CLKSOURCE_PCLK1;
  ~~~~~~~~~~~~~ ^
../Src/main.c(205): error: use of undeclared identifier 'RCC_USART2CLKSOURCE_PCLK1'
  PeriphClkInit.Usart2ClockSelection = RCC_USART2CLKSOURCE_PCLK1;
                                       ^
../Src/main.c(212): error: call to undeclared function 'HAL_PWREx_ControlVoltageScaling'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  if (HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1) != HAL_OK)
      ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

Thank you for your kind help! 
tinymlcontest commented 9 months ago

Hi,

I understand your need for the validation code and would like to inform you that it has not been released yet. However, I want to assure you that we are actively working on preparing and publishing the validation code specifically for the MCU platform.

Thank you for your understanding, and we look forward to providing you with the validation code soon.

Best regards,

TinyML Contest Organizer

On Wed, Sep 13, 2023 at 9:33 PM qhy991 @.***> wrote:

When I follow the evolution instructions for cubemx-ai, I met the following error when I compiled the project after replacing the four files you provided in this repo. I had used both V5 and V6 ARM compiler to test. The error depicts as follows: ../Src/usart.c(81): error: use of undeclared identifier 'GPIO_SPEED_FREQ_VERY_HIGH' GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; ^ ../Src/usart.c(88): error: use of undeclared identifier 'GPIO_SPEED_FREQ_VERY_HIGH' GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; ^ ../Src/usart.c(89): error: use of undeclared identifier 'GPIO_AF3_USART2' GPIO_InitStruct.Alternate = GPIO_AF3_USART2; ^ 3 errors generated. compiling usart.c... compiling app_x-cube-ai.c... ../Src/main.c(176): error: use of undeclared identifier 'RCC_OSCILLATORTYPE_MSI' RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_MSI; ^ ../Src/main.c(177): error: no member named 'MSIState' in 'RCC_OscInitTypeDef' RCC_OscInitStruct.MSIState = RCC_MSI_ON;

../Src/main.c(177): error: use of undeclared identifier 'RCC_MSI_ON' RCC_OscInitStruct.MSIState = RCC_MSI_ON; ^ ../Src/main.c(178): error: no member named 'MSICalibrationValue' in 'RCC_OscInitTypeDef'; did you mean 'HSICalibrationValue'? RCC_OscInitStruct.MSICalibrationValue = 0; ^~~~~~~ HSICalibrationValue ../Drivers/STM32F3xx_HAL_Driver/Inc\stm32f3xx_hal_rcc.h(289): note: 'HSICalibrationValue' declared here uint32_t HSICalibrationValue; /*!< The HSI calibration trimming value (default is RCC_HSICALIBRATION_DEFAULT). ^ ../Src/main.c(179): error: no member named 'MSIClockRange' in 'RCC_OscInitTypeDef' RCC_OscInitStruct.MSIClockRange = RCC_MSIRANGE_6;


../Src/main.c(179): error: use of undeclared identifier 'RCC_MSIRANGE_6'
RCC_OscInitStruct.MSIClockRange = RCC_MSIRANGE_6;
                                  ^
../Src/main.c(181): error: use of undeclared identifier 'RCC_PLLSOURCE_MSI'
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_MSI;
                                  ^
../Src/main.c(182): error: no member named 'PLLM' in 'RCC_PLLInitTypeDef'
RCC_OscInitStruct.PLL.PLLM = 1;
~~~~~~~~~~~~~~~~~~~~~ ^
../Src/main.c(183): error: no member named 'PLLN' in 'RCC_PLLInitTypeDef'
RCC_OscInitStruct.PLL.PLLN = 40;
~~~~~~~~~~~~~~~~~~~~~ ^
../Src/main.c(184): error: no member named 'PLLP' in 'RCC_PLLInitTypeDef'
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV7;
~~~~~~~~~~~~~~~~~~~~~ ^
../Src/main.c(184): error: use of undeclared identifier 'RCC_PLLP_DIV7'
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV7;
                             ^
../Src/main.c(185): error: no member named 'PLLQ' in 'RCC_PLLInitTypeDef'
RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2;
~~~~~~~~~~~~~~~~~~~~~ ^
../Src/main.c(185): error: use of undeclared identifier 'RCC_PLLQ_DIV2'
RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2;
                             ^
../Src/main.c(186): error: no member named 'PLLR' in 'RCC_PLLInitTypeDef'
RCC_OscInitStruct.PLL.PLLR = 2;
~~~~~~~~~~~~~~~~~~~~~ ^
../Src/main.c(200): error: use of undeclared identifier 'FLASH_LATENCY_4'
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_4) != HAL_OK)
                                            ^
../Src/main.c(204): error: use of undeclared identifier 'RCC_PERIPHCLK_USART2'
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USART2;
                                     ^
../Src/main.c(205): error: no member named 'Usart2ClockSelection' in 'RCC_PeriphCLKInitTypeDef'
PeriphClkInit.Usart2ClockSelection = RCC_USART2CLKSOURCE_PCLK1;
~~~~~~~~~~~~~ ^
../Src/main.c(205): error: use of undeclared identifier 'RCC_USART2CLKSOURCE_PCLK1'
PeriphClkInit.Usart2ClockSelection = RCC_USART2CLKSOURCE_PCLK1;
                                     ^
../Src/main.c(212): error: call to undeclared function 'HAL_PWREx_ControlVoltageScaling'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
if (HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1) != HAL_OK)
    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

Thank you for your kind help!

—
Reply to this email directly, view it on GitHub
<https://github.com/tinymlcontest/tinymlcontest2023_demo_evaluation/issues/1>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZ73JEWLMZAED6JLT6PFROTX2GYZ7ANCNFSM6AAAAAA4WOHMBY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
qhy991 commented 9 months ago

Thanks, anyway.