-
Notifications
You must be signed in to change notification settings - Fork 55
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
new board defined but don't show in meniu #58
Comments
Isn't possible to burn a bootloader with PlatformIO 2 (The core of Deviot), but I've just found a solution with the next version ( 3 ) that will be release soon. Please read this: https://community.platformio.org/t/burn-bootloader-to-attiny85-via-arduinoasisp/662/9
You can confirm it's installed reading the info in the status bar. You'll see
You file should looks like: [env:pro16MHzatmega328]
platform = atmelavr
framework = arduino
board = pro16MHzatmega328
extra_script = extra_script.py
Import("env")
env.Replace(
SETFUSECMD='$UPLOADER $UPLOADERFLAGS -P $UPLOAD_PORT -b $UPLOAD_SPEED -Ulock:w:0xFF:m -Uefuse:w:0xFF:m -Uhfuse:w:0xD7:m -Ulfuse:w:0xE2:m',
UPLOADBOOTCMD='$UPLOADER $UPLOADERFLAGS -P $UPLOAD_PORT -b $UPLOAD_SPEED -Uflash:w:$SOURCES:i -Ulock:w:0xFF:m'
)
bootloader_path = "/Users/antonkluev/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.1.1/bootloaders/empty/empty_all.hex"
uploadboot = env.Alias(
"uploadboot", bootloader_path,
[env.VerboseAction(env.AutodetectUploadPort, "Looking for upload port..."),
env.VerboseAction("$SETFUSECMD", "Setting fuses"),
env.VerboseAction("$UPLOADBOOTCMD", "Uploading bootloader $SOURCE")])
AlwaysBuild(uploadboot) You'll need to change the The This last step may be a little confusing, as Deviot is not supporting this feature natively, you need to run PlatformIO CLI to end the upload Open your terminal and navigate to the folder where the Run the command If all run fine, I'll start to implement this feature to the next release so it will be simpler to do it. NOTE: If after run the command you see an error like 'not recognized', install platformio from the console with this command: |
Maybe I do not understand well or I did it well. I have already installed optiboot using Arduino IDE. Now I want to install just a sketch using Sublime + Deviot but into an Pro Mini with optiboot already installed. Can I use an existing board? For example Arduino Pro or Pro Mini (5V, 16 MHz) w / ATMEGA328? Or it's need to define a new board because i have optiboot bootloader. |
In that case you don't need to define a new board, you should be able to upload the sketch just selecting Let me know if find any problem doing this |
Not working! I have this error: System wide configuration file is "/home/dev/.platformio/packages/tool-avrdude/avrdude.conf" Using Port : /dev/ttyUSB0 |
I can see the upload speed is set to Try changing the upload speed: Your file should looks like: [env:pro16MHzatmega328]
platform = atmelavr
framework = arduino
board = pro16MHzatmega328
upload_speed = 115200 Try to upload with that config and tell me if it works. |
I have same error. L.E. i see an problem with config file. After each build or upload line added disappear. So, it's very possible that option "upload_speed = 115200" is ignored. |
Please download the develop branch, I've add a fix to avoid this issue. You only need to extract the zip and replace the Let me know if that fix both issues |
|
After read more i found this link on platformio website: |
Your file must be well formated: {
"optibootPro16MHzatmega328": {
"build": {
"core": "arduino",
"extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_PRO",
"f_cpu": "16000000L",
"mcu": "atmega328p",
"variant": "eightanaloginputs"
},
"frameworks": ["arduino"],
"name": "Arduino Pro Mini Optiboot ATmega328 (5V, 16 MHz)",
"platform": "atmelavr",
"upload": {
"disable_flushing": true,
"maximum_ram_size": 2048,
"maximum_size": 32256,
"protocol": "arduino",
"require_upload_port" : true,
"speed": 115200
},
"url": "http://arduino.cc/en/Main/ArduinoBoardProMini",
"vendor": "Arduino"
}
}
When ST start again will generate the file automatically again, now you will see the new board in the list In the next release I'll add a option to force reload the boards list |
For some strange reason i don't see new board in list. But if i change build config file to this: [env:pro16MHzatmega328]
platform = atmelavr
framework = arduino
board = optibootPro16MHzatmega328
[platformio]
src_dir = /home/dev/Arduino/porti/Gate then was able to build and upload sketch to my board. So new board is know, but not show in menu. L.E. sorry, it's ok. New board appear in list. Need to keep exact steps how u explained. |
Good to hear, I forgot to mention ST loads all the plugins first, so it take some seconds to re-generate the file again. I'll considerate to show a text in the console when a new board is found |
Will be nice! |
INFO: Since PlatformIO 3 your JSON file must be formated in this way: {
"build": {
"core": "arduino",
"extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_PRO",
"f_cpu": "16000000L",
"mcu": "atmega328p",
"variant": "eightanaloginputs"
},
"frameworks": ["arduino"],
"name": "Arduino Pro Mini Optiboot ATmega328 (5V, 16 MHz)",
"platform": "atmelavr",
"upload": {
"disable_flushing": true,
"maximum_ram_size": 2048,
"maximum_size": 32256,
"protocol": "arduino",
"require_upload_port" : true,
"speed": 115200
},
"url": "http://arduino.cc/en/Main/ArduinoBoardProMini",
"vendor": "Arduino"
} The name of the environment will be get from the file name, in this case, it should be: |
Hi!
I try to define a new board to use with optiboot bootloader.
Edited boards.txt in "/home/dev/.platformio/packages/framework-arduinoavr/" and added this lines:
`################################################################
atmega328o.name=Optiboot Arduino Pro Mini 5V 16Mhz w/ ATmega328
atmega328o.upload.protocol=arduino
atmega328o.upload.maximum_size=32256
atmega328o.upload.speed=115200
atmega328o.bootloader.low_fuses=0xff
atmega328o.bootloader.high_fuses=0xde
atmega328o.bootloader.extended_fuses=0x05
atmega328o.bootloader.file=optiboot/optiboot_atmega328.hex
atmega328o.bootloader.unlock_bits=0x3F
atmega328o.bootloader.lock_bits=0x0F
atmega328o.build.mcu=atmega328p
atmega328o.build.f_cpu=16000000L
atmega328o.build.core=arduino:arduino
atmega328o.build.variant=arduino:standard
atmega328o.bootloader.tool=avrdude
atmega328o.upload.tool=avrdude
atmega328o.build.board=AVR_PRO
`
I closed sublime text and restart but i can't find board in list. What is wrong?
The text was updated successfully, but these errors were encountered: