-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
board = ATmega328PB causes incorrect linkage #339
Comments
Hi @norventa, it's an issue tracker, not a support forum. Nonetheless, is there a chance that ATmega328PB uses a different interrupt vector name for the |
Hi Valerii,
ATmega328PB uses the same vector name as ATmega328 as well as ATmega328P etc. That is why I think this is a bug. Shouldn’t platformio select the correct libs?
From: Valerii Koval ***@***.***>
Sent: 10 February 2025 12:07
To: platformio/platform-atmelavr ***@***.***>
Cc: norventa ***@***.***>; Mention ***@***.***>
Subject: Re: [platformio/platform-atmelavr] board = ATmega328PB causes incorrect linkage (Issue #339)
Hi @norventa <https://github.com/norventa> , it's an issue tracker, not a support forum. Nonetheless, is there a chance that ATmega328PB uses a different interrupt vector name for the Data Register Empty event? Maybe USART0_UDRE? So the ISR should be like this: ISR(USART0_UDRE_vect, ISR_BLOCK)?
—
Reply to this email directly, view it on GitHub <#339 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AI5U7EYBKJULMU4ESZLT2DT2PCI75AVCNFSM6AAAAABWXWIR3GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNBXG44TONBVGU> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/AI5U7E4NB5XGVUZ2P7DCCG32PCI75A5CNFSM6AAAAABWXWIR3GWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTU52IXM6.gif> Message ID: ***@***.*** ***@***.***> >
|
Hi Valerii,
I stand corrected. ATmega328PB has two UARTs so 0 & 1 are appended to its register names. I didn’t realize that.
From: Valerii Koval ***@***.***>
Sent: 10 February 2025 13:17
To: platformio/platform-atmelavr ***@***.***>
Cc: norventa ***@***.***>; Mention ***@***.***>
Subject: Re: [platformio/platform-atmelavr] board = ATmega328PB causes incorrect linkage (Issue #339)
ATmega328PB uses the same vector name as ATmega328 as well as ATmega328P etc. That is why I think this is a bug.
Could you please elaborate on why you think the vector name is the same for both targets? I've just took a look at the datasheet for ATmega328PB and it seems there is no mention of USART_UDRE, only USART0_UDRE:
image.png (view on web) <https://github.com/user-attachments/assets/6b46369c-3582-4f1e-995d-1b7cc3d981e0>
Shouldn’t platformio select the correct libs?
What libs do you mean? In the code you're using headers bundled with the toolchain.
—
Reply to this email directly, view it on GitHub <#339 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AI5U7E53ZYQVQ74QX42OHHL2PCRGFAVCNFSM6AAAAABWXWIR3GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNBXHE3DEOJRGI> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/AI5U7E6FG5KZMS7QKC56TJD2PCRGFA5CNFSM6AAAAABWXWIR3GWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTU52S2SA.gif> Message ID: ***@***.*** ***@***.***> >
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What kind of issue is this?
All issues (building, uploading, adding new boards, etc.) related to PlatformIO development platforms
should be reported to appropriate repository related to your hardware
https://github.com/topics/platformio-platform
Configuration
Operating system:
Windows ATmega development using vscode and platformio extension.
PlatformIO Version (
platformio --version
):3.3.4
Description of problem
Using board = ATmega328PB in platformio.ini causes incorrect linkage to USART_UDRE_vect.
All compiles ok but gives warning that USART_UDRE_vect is misspelt. When running program on a ATmega328PB the interrupt handler misbehaves. Using board = ATmega328P in platformio.ini all works fine.
Steps to Reproduce
Actual Results
There will be a series of blinks shown on the LED but no long blinks.
Expected Results
Thre should be two long blinks after the short ones.
If problems with PlatformIO Build System:
The content of
platformio.ini
:Source file to reproduce issue:
The text was updated successfully, but these errors were encountered: