-
Notifications
You must be signed in to change notification settings - Fork 22
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
DXCore uart upload with optiboot #41
Comments
Due to dubious decisions made by Microchip,. binaries m form optiboot and non-optiboot ae not compatible (thesectionstart business). It's recently been complicated by my realization that 99% of AVRs getting into a "bad state" tat requires power cycle or reset pin reset to recover from the cause is a "dirt reser"where execution ends up a 0x0000 without a reset having occurred, which is virtually guaranteed not to work. Since these are caused by user error, we can't prevent them, but it's the reason forthe two key behaviors involved in this:
This is one of the very frustrating things about trying to develop with so many PIO users. I have no control over what defines are passed there. Yet that is a key part of my toolbox in arduino-land which I lean on very heavily -Tjere are cases where I require one ou of a number of defines is part of my toolbox on Arduino, and I use it very heavily. I realize I need certain board definitions to have some define so I add it to platform.txt or use a regex to add t to the appropriate boards and then it just works, But it doesn;'t seem possible to make PIO do that sort of thing by default. and mot using it myself, I don't really even know wat to tell people to do..... |
i think that it was doing a bootloop like you said, sometimes the serial wasn't working at all and sometimes was spewing just a "t" It is possible to do a default platformio.ini i think but sure, would love to see a little menu when creating the project to generate platformio.ini file with parameters set like in arduinoIDE . Anyways, Thank you a lot for your work . |
Thanks matou78. Finally I can flash via USB and bootloader. I have been missing these settings. |
happy that it helped :) |
Hello everyone
Found something that i think should be documented or fixed.
I started to play a little with the AVRxxDAxx chips using platformIO .
Using DXCore with arduinoIDE everything is working , but with plaformIO nothing worked (updi upload,bootloader burn,uart upload)
maxgerhardt on the platformIO forum helped me to find few problems,
This topic will be only about the UART upload with optiboot already on the chip
when i first started , i made a little program to tests the serial monitor and a blinking LED
I uploaded it through UART but nothing was happening
I took a look in logs from platformIO and arduinoIDE ( with verbose activated ), found some things that didn't match .
Found a flag named -DUSING_OPTIBOOT .
(As I'm a noob in this things, before i found a better solution )
I went inside of the .json board file and found same style of flags so added it there ... and voila, worked perfectly.
After few tries everything was working nicely, then google helped me a little and found that in platformio.ini, we can add something called "build_flags"
This is what looks like my settings to upload through UART, working only with optiboot already on the chip ( burned it with arduinoIDE)
Is there a way to put it somewhere so people don't loose 2 weeks searching as i did ? or maybe put it directly in the config files .
Thanks
PS :
If interested, i uploaded the verbose logs at https://github.com/matou78/temp
The text was updated successfully, but these errors were encountered: