-
Notifications
You must be signed in to change notification settings - Fork 182
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
_BV was not declared in this scope while trying to compile Marlin #147
Comments
I have no experience with the Marlin FW. What happens if you add |
I get exactly the same error |
OK, I got around it by manually defining _BV in the power.h file. So, basically, adding A member of the arduino forums made me notice that MightyCore code is using the standard arduino pinout. I need to change this to the Sanguino pinout (Tools > Pinout > Sanguino). |
i've tried it (Marlin bugfix-2.0.x) with Ender 3 (board v1.1.4). good place to put fix is: #ifndef _BV MightyCore/ATmega1284 setup:
bootloader burned via USBasp, Marlin firmware uploaded via usb. It works ok. ;) |
Same here. I updated my comment to reflect the fact that I was doing it wrong. I enabled BOD to 2.7 and it works OK too |
I'm curious; I've recently upgraded my old DIY Prusa i3 from 2014 with a brand new 32-bit board. I've also used PlatformIO to build the latest Marlin. But why are you using MightyCore for building for the ATmega1284P? I mean, that's completely fine, but I thought Marlin favored the Sanguino core? Is it to save flash? |
_BV should be defined by the core, it is widely used in existing code. I would characterize this a bug in the core. |
What's weird is that _BV works great in Arduino IDE and in PlatformIO projects. There's something with the Marlin build that's causing this. However, I haven't really looked into it.
In the core like in this core? |
Wait, I assumed the Marlin FW was being compiled within the Arduino IDE
context - is it not?
…On Sun, May 24, 2020 at 10:20 AM Hans ***@***.***> wrote:
What's weird is that _BV works great in Arduino IDE and in PlatformIO
projects. There's something with the Marlin build that's causing this.
However, I haven't really looked into it.
I would characterize this a bug in the core.
In the core like in *this* core?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#147 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTXEW3BH5D2TYCJUQZGJQTRTEUMNANCNFSM4H6V6XPA>
.
--
____________
Spence Konde
Azzy’S Electronics
New products! Check them out at tindie.com/stores/DrAzzy
GitHub: github.com/SpenceKonde
ATTinyCore: Arduino support for almost every ATTiny microcontroller
Contact: [email protected]
|
For 8-bit AVR boards you can use both. For 32-bit you can only use PlatformIO. However, I don't see any reason not to use PlatformIO for a project as large as this. PlatformIO/VSCode is much better at handling multiple files. |
You can say that again (having just thrown two weeks of precious
quarantimes into the rathole called jtag2updi, when I *wanted* to be
working on 'da core y'all been waiting for - compiling with Arduino IDE
since I now know that shitshow like the back of my hand - and exiting it every time I make changes in the wrong editor to make sure it picks them up! )
I have such amazing plans for Delta Alpha Charlie oscar romeo echo - that
shit is gonna be fucking BALLER! That memory section shit, aw man - that
was the missing piece of the puzzle! I'm gonna use the "fast IO" trick to
make a fast-pinmode (I'm gonna bring that to megaTinyCore, and you can ofc
steal it too - but I can make even normal pinmode calls faster on these new
parts because of that pinctrl setting register (i find it HILARIOUS that
they put warnings about how confusing the set and clear registers were,
considering the bloody important stuff they neglected to put such a warning
by and which is like, mad counterintuitive - like, FFS they didn't warn
people about the wacky behavior of the third byte in the UPDI address
pointer, they don't tell people that bits 1 and 7 in the ASI status
register mean something, or even how to check the silicon rev* - yet they
warn people about the set and clear registers? What?!)
Maybe that's a little pejorative - it was a rabbit hole for the first 3-4
days, but since then, it's been a straight up rathole, and I am so sick of
it (that's why I haven't been around - though the new jtag2updi will be way
better than the old one. It doesn't glitch out and hang like it used to,
and it also doesn't run first dozen milliseconds or so of the sketch
several times during the programming process either, and it programs
DA-series parts, and it has a proper debug channel (via SPI if the thing
it's running on doesn't have a second USART - could *not* have made it work
without that! I mean, I made rudimentary debug work on tinyAVR 0-series and
1-series parts via pinswapping, but that... was not fit for purpose in
real-world conditions...). It also disables response signature during burst
writes to improve throughput.
* A particularly egregious omission, what with the silicon errata for the
current rev of you know what parts being enough to bring a grown man to
tears!
…On Sun, May 24, 2020 at 1:02 PM Hans ***@***.***> wrote:
For 8-bit AVR boards you can use both. For 32-bit you can only use
PlatformIO. However, I don't see any reason not to use PlatformIO for a
project as large as this. PlatformIO/VSCode is much better at handling
multiple files.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#147 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTXEW5FUXHNWVEOVLUUJZLRTFHLVANCNFSM4H6V6XPA>
.
--
____________
Spence Konde
Azzy’S Electronics
New products! Check them out at tindie.com/stores/DrAzzy
GitHub: github.com/SpenceKonde
ATTinyCore: Arduino support for almost every ATTiny microcontroller
Contact: [email protected]
|
The problem is caused by dependency cycles in MightyCore(?). I don't know where all of them are but at least between The solution was simply to remove the If you enable verbose compilation in Arduino you can just copy/paste any (failing) gcc command and add the |
The error log is extensive, but it simply complains about _BV being out of scope. This can be reproduced by compiling Marling on branch bugfix-2.0.x (I haven't tried the 1.1 branch)
#######
Workaround:
Locate the
packages
directory (linux: inside~/.arduino15
) and find theArduino.h
file insideMCUdude_corefiles
directory.~/.arduino15/packages/MightyCore/hardware/avr/2.0.4/cores/MCUdude_corefiles/Arduino.h
(update the version as needed)
Add this:
#######
Error log when not using the workaround:
The text was updated successfully, but these errors were encountered: