-
Notifications
You must be signed in to change notification settings - Fork 51
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
millis/micros timer disabled wedges DD part #485
Comments
Are you on Arduino IDE or PIO/etc? Most PIO errors come from PIO's imperfect emulation of arduino, specifically the stuff in boards.txt that creates submenus - on PIO, you aren;t forced to select something from every menu, even if it's just leaving the default. But on PIO, people just don't specify menus where they want the default, and that has caused tons of problems lately. It has always done this, but suddenly people are noticing for some reason, and I've been having to go back and modify boards.txt to assign all default values as board defaults, instead of putting it in the menu section, and only have parameters be passed on non-default selections. |
Hmm... The asm listing doesn't contain anything obviously ugly, and excludes some possibilities. No interrupts should be happening, and I don't think any are. So what's going on? On previous versions of DxCore, you could get bizzare broken behavior on PIO by omitting menu selections, because PIO does not assign any default value to the menu (which is a cant-happen in the Arduino IDE - but not a cant-happen in arduino-cli (!!!).
Perfectly innocuous looking. Is that what the section of assembly listing near loop comes out looking like for you? |
Using the Arduino builder via GNU Make, which is essentially identical to using the IDE directly. Here's the new sketch
|
Hi! I'm not sure, what I should see, but my bare metal AVR64DD32 shows:
on the serial monitor and PC3 pulses with 5Hz [16MHz internal, Optiboot and millis selected on TCB1 (selected because of "14pin"), Arduino1.8.19 on 64bit Linux Mint]. Yes, I changed Output to Startup in the setup() :-) |
With Optiboot it bootloops, due to crash... |
Yapp, confirmed. When I disable the timer, nothing happens after uploading. Also after changing to "No Bootloader" the same. No pulses, no serial output. |
This is weird as fuck, man. It's bloody obvious in the asm what the problem is: Every callback that we provide, when compiled with millis disabled, compiles to a call to 0x0000 " 0x950E 0000 or 0e 94 00 00 in the byte order it is in in the flash. It's declared weak. I can use other weakly defined functions and choose to override or not override them. But not these functions. it's a weak symbol so you can override it, but for some reason, I can't seem to make it both function correctly as a weak function (allowing it to be overridden, and using the included weak definition if it's called when it's not defined), and not get rendered as a call to 0 when millis is disabled, and I'm still pondering why. |
It seems like weak definitions weren't working properly, and calls to those functions instead of compile errors were turned into runtime ones, "handled" the same way every other unrecoverable error is - calling (or jumping) to 0, triggering a bootloop, because that's how we call the startuip callbacks |
Next bug :-D, unless you managed to fix it while fixing this one ;-) |
Nope, that one was also rather tricky. Turned out that somehow the version
of analog wrote that was used in testing the last change was left in, so
pins wouldnt pwm ubless you set the pind output or are on DD or later
**and nobody reported it for months**
…____________
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: ***@***.***
On Sat, Oct 7, 2023, 09:32 Andrew Kroll ***@***.***> wrote:
Next bug :-D, unless you managed to fix it while fixing this one ;-)
—
Reply to this email directly, view it on GitHub
<#485 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTXEWZNBDGY4Z6GMDQNSXLX6FKWZAVCNFSM6AAAAAA5KQJRCCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJRG4YTIMRQGQ>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Compile with timers disabled, and the MCU wedges.
Happens on 64DD14 part, probably happens on others.
Something isn't happy :-)
The text was updated successfully, but these errors were encountered: