Need help error Bluepill on Multiwii

Post Reply
reednoel4u
Posts: 1
Joined: Wed Jan 01, 2025 5:11 am

Need help error Bluepill on Multiwii

Post by reednoel4u »

Hi Guy,
I learning arduino and make drone with Multiwii 7 year ago with arduino nano.
I know that Avr 8 bit and STM32 32 bit, faster for respond!
I trying to flash code multiwii to stm32, so had error. please help me to fix with many thanks.

Compilation error: avr/eeprom.h: No such file or directory
Compilation error: avr/io.h: No such file or directory


Regards
Reed Noel
ag123
Posts: 1898
Joined: Thu Dec 19, 2019 5:30 am
Answers: 30

Re: Need help error Bluepill on Multiwii

Post by ag123 »

porting a complex app to stm32duino for a starter is normally jumping in the deep end.

the wiki for 'official' stm core is here
https://github.com/stm32duino/Arduino_Core_STM32/wiki
some faqs are here
viewtopic.php?t=3
viewtopic.php?t=301
note that for the 'libmaple' core, it is community maintained and questions about it depends on passer-by here who may or may not answer about it.
it is actually quite similar with 'official' core, community responses are voluntary

the 'official' core has an eeprom library that use on chip flash if there is available unused flash
https://github.com/stm32duino/Arduino_C ... ies/EEPROM

if "avr/io.h" is AVR device-specific IO definitions
https://www.nongnu.org/avr-libc/user-ma ... r__io.html

then that it won't work out of the box trying to run it in stm32, you would need to find equivalent functionality in stm32 and revise the codes

And the 'better' chips and boards are like (this is pretty fast! has lots of memory, and flash 1 MB lots of on chip pheripherals and is pricier
stm32f405
https://www.adafruit.com/product/4382
https://learn.adafruit.com/adafruit-stm ... er-express
it isn't surprising that some drone implementations use them
https://www.aliexpress.com/w/wholesale- ... drone.html
but drone projects are *not for beginners*

nucleo stm32f411
https://www.st.com/en/evaluation-tools/ ... 411re.html

weact has quite a number of stm32 boards e.g. stm32f411
https://github.com/WeActStudio/WeActStu ... iSTM32F4x1
https://weactstudio.aliexpress.com/stor ... 0002516665

there are actually more board makers including
https://store.micropython.org/
olimex
and if you search Aliexpress, Ebay, Amazon, you would find more, be wary that there are 'clones' especially for stm32f103
'clones' are normally not stm32, they are 3rd party chips that claims to be 'compatible' with stm32, but you are on your own with those chips if you want to use them.

A thing is for WeAct boards, some (many) of them do not have a ready variant (board files with pins, pheriperials configurations e.g. serial etc) for them and even a beginner would need to create your own variant for it.
WeAct STM32F411 mostly has pre-defined variant in 'stm' stm32duino core
https://www.aliexpress.com/item/1005001456186625.html
https://stm32-base.org/boards/STM32F411 ... -V2.0.html
https://www.st.com/en/microcontrollers- ... l#overview
https://www.st.com/resource/en/datashee ... f411ce.pdf
stm32f411ceu6 is (much) faster than stm32f103 (for the same hz),
stm32f411ceu6 has 'art accelerator' (on chip cache), has FPU, has more memory like 128k sram and 512k flash !
can be programmed simply using a usb (phone) cable
and is a better board for beginners to get started with
GonzoG
Posts: 491
Joined: Wed Jan 15, 2020 11:30 am
Answers: 36
Location: Prudnik, Poland

Re: Need help error Bluepill on Multiwii

Post by GonzoG »

Your program was written for AVR MCUs using AVR only libraries.
You'll need to rewrite those parts.
Post Reply

Return to “Let us know a bit about you and your projects”