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

Support STM32 #30

Open
vovagorodok opened this issue Aug 8, 2023 · 1 comment · May be fixed by #29
Open

Support STM32 #30

vovagorodok opened this issue Aug 8, 2023 · 1 comment · May be fixed by #29
Assignees
Labels
enhancement New feature or request

Comments

@vovagorodok
Copy link
Owner

#29

@vovagorodok vovagorodok added the enhancement New feature or request label Aug 8, 2023
@vovagorodok vovagorodok self-assigned this Aug 8, 2023
@vovagorodok vovagorodok linked a pull request Aug 8, 2023 that will close this issue
@vovagorodok
Copy link
Owner Author

vovagorodok commented Aug 8, 2023

Error:

Compiling .pio/build/nucleo_wb55rg_p/lib9d5/ArduinoOTA/utility/stm32_flash_boot.c.o
.pio/libdeps/nucleo_wb55rg_p/ArduinoOTA/src/utility/stm32_flash_boot.c: In function 'copy_flash_pages':
.pio/libdeps/nucleo_wb55rg_p/ArduinoOTA/src/utility/stm32_flash_boot.c:53:10: error: 'FLASH' undeclared (first use in this function)
   53 |   while (FLASH->SR & FLASH_SR_BSY);
      |          ^~~~~
.pio/libdeps/nucleo_wb55rg_p/ArduinoOTA/src/utility/stm32_flash_boot.c:53:10: note: each undeclared identifier is reported only once for each function it appears in
.pio/libdeps/nucleo_wb55rg_p/ArduinoOTA/src/utility/stm32_flash_boot.c:53:22: error: 'FLASH_SR_BSY' undeclared (first use in this function)
   53 |   while (FLASH->SR & FLASH_SR_BSY);
      |                      ^~~~~~~~~~~~
.pio/libdeps/nucleo_wb55rg_p/ArduinoOTA/src/utility/stm32_flash_boot.c:70:40: error: 'FLASH_BASE' undeclared (first use in this function)
   70 |   uint8_t startSector = (flash_offs == FLASH_BASE) ? 0 : 1; // 1 if bootloader is in sector 0
      |                                        ^~~~~~~~~~
.pio/libdeps/nucleo_wb55rg_p/ArduinoOTA/src/utility/stm32_flash_boot.c:71:56: error: 'SMALL_SECTOR_SIZE' undeclared (first use in this function)
   71 |   uint8_t endSector = 1 + startSector + ((count - 1) / SMALL_SECTOR_SIZE); // size of the first 4 sectors is 0x4000 kB
      |                                                        ^~~~~~~~~~~~~~~~~
.pio/libdeps/nucleo_wb55rg_p/ArduinoOTA/src/utility/stm32_flash_boot.c:76:76: error: 'LARGE_SECTOR_SIZE' undeclared (first use in this function)
   76 |       endSector = 5 + (((count - 1) + (startSector * SMALL_SECTOR_SIZE)) / LARGE_SECTOR_SIZE);
      |                                                                            ^~~~~~~~~~~~~~~~~
.pio/libdeps/nucleo_wb55rg_p/ArduinoOTA/src/utility/stm32_flash_boot.c:80:5: warning: implicit declaration of function 'CLEAR_BIT' [-Wimplicit-function-declaration]
   80 |     CLEAR_BIT(FLASH->CR, FLASH_CR_SNB);
      |     ^~~~~~~~~
.pio/libdeps/nucleo_wb55rg_p/ArduinoOTA/src/utility/stm32_flash_boot.c:80:26: error: 'FLASH_CR_SNB' undeclared (first use in this function)
   80 |     CLEAR_BIT(FLASH->CR, FLASH_CR_SNB);
      |                          ^~~~~~~~~~~~
.pio/libdeps/nucleo_wb55rg_p/ArduinoOTA/src/utility/stm32_flash_boot.c:81:18: error: 'FLASH_CR_SER' undeclared (first use in this function)
   81 |     FLASH->CR |= FLASH_CR_SER | (sector << FLASH_CR_SNB_Pos);
      |                  ^~~~~~~~~~~~
.pio/libdeps/nucleo_wb55rg_p/ArduinoOTA/src/utility/stm32_flash_boot.c:81:44: error: 'FLASH_CR_SNB_Pos' undeclared (first use in this function)
   81 |     FLASH->CR |= FLASH_CR_SER | (sector << FLASH_CR_SNB_Pos);
      |                                            ^~~~~~~~~~~~~~~~
.pio/libdeps/nucleo_wb55rg_p/ArduinoOTA/src/utility/stm32_flash_boot.c:82:18: error: 'FLASH_CR_STRT' undeclared (first use in this function)
   82 |     FLASH->CR |= FLASH_CR_STRT;
      |                  ^~~~~~~~~~~~~
.pio/libdeps/nucleo_wb55rg_p/ArduinoOTA/src/utility/stm32_flash_boot.c:96:3: warning: implicit declaration of function 'SET_BIT' [-Wimplicit-function-declaration]
   96 |   SET_BIT(FLASH->CR, FLASH_CR_PG);
      |   ^~~~~~~
.pio/libdeps/nucleo_wb55rg_p/ArduinoOTA/src/utility/stm32_flash_boot.c:96:22: error: 'FLASH_CR_PG' undeclared (first use in this function)
   96 |   SET_BIT(FLASH->CR, FLASH_CR_PG);
      |                      ^~~~~~~~~~~
.pio/libdeps/nucleo_wb55rg_p/ArduinoOTA/src/utility/stm32_flash_boot.c:108:5: warning: implicit declaration of function 'NVIC_SystemReset' [-Wimplicit-function-declaration]
  108 |     NVIC_SystemReset();
      |     ^~~~~~~~~~~~~~~~
Compiling .pio/build/nucleo_wb55rg_p/libfca/CRC/CrcFastReverse.cpp.o
Compiling .pio/build/nucleo_wb55rg_p/libfca/CRC/FastCRC32.cpp.o
Compiling .pio/build/nucleo_wb55rg_p/lib5b2/SPI/SPI.cpp.o
Compiling .pio/build/nucleo_wb55rg_p/lib5b2/SPI/utility/spi_com.c.o
*** [.pio/build/nucleo_wb55rg_p/lib9d5/ArduinoOTA/utility/stm32_flash_boot.c.o] Error 1
Compiling .pio/build/nucleo_wb55rg_p/lib7a8/STM32duinoBLE/BLEAdvertisingData.cpp.o
.pio/libdeps/nucleo_wb55rg_p/ArduinoOTA/src/InternalStorageSTM32.cpp: In member function 'virtual int InternalStorageSTM32Class::open(int)':
.pio/libdeps/nucleo_wb55rg_p/ArduinoOTA/src/InternalStorageSTM32.cpp:73:19: error: 'struct FLASH_EraseInitTypeDef' has no member named 'PageAddress'
   73 |   EraseInitStruct.PageAddress = flashWriteAddress;
      |                   ^~~~~~~~~~~
.pio/libdeps/nucleo_wb55rg_p/ArduinoOTA/src/InternalStorageSTM32.cpp: In member function 'virtual size_t InternalStorageSTM32Class::write(uint8_t)':
.pio/libdeps/nucleo_wb55rg_p/ArduinoOTA/src/InternalStorageSTM32.cpp:93:27: error: 'FLASH_TYPEPROGRAM_WORD' was not declared in this scope; did you mean 'FLASH_TYPEPROGRAM_FAST'?
   93 |     if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_WORD, flashWriteAddress, addressData.u32) != HAL_OK)
      |                           ^~~~~~~~~~~~~~~~~~~~~~
      |                           FLASH_TYPEPROGRAM_FAST
*** [.pio/build/nucleo_wb55rg_p/lib9d5/ArduinoOTA/InternalStorageSTM32.cpp.o] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant