-
-
Notifications
You must be signed in to change notification settings - Fork 792
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
MightyCore Boards Support #585
Comments
@peekpt @MCUdude , please re-test with the latest http://docs.platformio.org/en/latest/installation.html#development-version |
I've just started using the PlatformIO IDE (Atom), and just discovered that there are noe BOD option or clock frequency option available for the MightyCore compatible microcontrollers. Is it possible to add this in a separate menu, like it it on the Arduino IDE, or does it have to be like: Oh, I almost forgot. You forgot to add the ATmega8535 to the list 😉 |
@MCUdude You can specify an own frequency. See http://docs.platformio.org/en/latest/projectconf.html#board-f-cpu |
I think you can add a Json configuration to your git project |
@MCUdude do you have this board? |
Yes I do. The ATmega8535 is the smallest (8kB, 512b of RAM) microcontroller that MightyCore supports |
There's a LOT of combinations with this board. Supported Voltages: |
I don't think a "Supported voltages" menu is the best way to do it. Some of the low power ones can run down to 1.8v @ 1MHz, but it doesn't mean you have to. I suggest a BOD (Brown out detection) menu and a clock menu |
We don't use fuses. They are used only to flash bootloader (where PlatformIO doesn't allow it)
We will add support for this board. |
OK, so it's not possible to burn the fuses in PlatformIO Atom? Hmm, this might be an issue. When you buy a brand new AVR microcontroller, the 1MHz internal oscillator is enabled by default, and the fuse settings need to be changed to run with an external oscillator. That means you can't rely only on PlatformIO, you'll have to install Arduino IDE or Avrdude to set the fuses and burn the bootloader (if I've understood correctly) |
@MCUdude PlatformIO contains |
The ATmega8535 has been added. Please test it with http://docs.platformio.org/en/latest/installation.html#development-version |
@MCUdude do you need any help with fuses? You need extra_script and additional target. |
Well I'm on mac and use AVRFuses,it's a great little tool. @MCUdude platformio is great and simple and easy to use, please don't give up on it. I tested for a while various eclipse plugins and I find Platformio to be the most lightweight and productive and you can add plugins to it. Code linter works well to. It has the ability to work on eclipse and vim and the best it's has a bash interface. With CLI you can code on a shell with vim nano, emacs, without the worry of compiling commands and updating libs and plats and boards. You can add plugins for git, for symbols etc... |
Oh, this is starting to get heavy! I know very well how the Arduino IDE handles fuses, serial ports and bootloader burning, but I have no experience with PlatformIO. Still I feel the urge for migrating for something more professional; an IDE that actually helps you while writing code. I was hoping that there was possible to just select your preferred clock frequency and BOD option in the GUI, and then set the fuses using your preferred programmer. If this was an option I see no reason why (Arduino) beginners shouldn't start 'using PlatformIO right away. @peekpt I'm on mac as well. I'm comfortable using the command line, but I'm not "a make file person", and prefer to do my work in an IDE. I've been using Arduino IDE for the past years, but It feels very limiting, so I've been using an external text editor (BBEdit) instead, and just did the uploading in Arduino IDE. |
once everything is configured properly you still could use BBEdit and type "pio run" to compile and upload, easy as that. |
I'm happy for any help I can get. I want to create a simple guide on my Github repo for using the MightyCore with PlatformIO for those who have never heard of PlatformIO. Is there anything I can add to my repository to make the setup process even simpler (preconfigured files etc.)? I think this will lower the bar significantly for the ones that feel like the Arduino IDE is too basic. What I know so far:
Loose ends:
|
You can set various targets in platform.ini
did you check this sublimetext integration? http://docs.platformio.org/en/latest/ide/sublimetext.html#integration |
It will automatically find the serial port for you but you can specify on platformio.ini
|
Thanks! That makes sense 😃 Is it possible for the IDE to automatically add the fields:
to the platformio.ini file when using one of the MightyCore supported microcontrollers. If the user are going to change the clock frequency the upload speed needs to be changed too. |
@MCUdude I recommend starting from PlatformIO CLI. PlatformIO IDE, Eclipse, Deviot Plugin for Sublime Text and etc., they use PlatformIO CLI in the core. Later, we will discuss IDEs. Let's start from the scratch... From the PlatformIO CLI...
|
Loose ends:
http://docs.platformio.org/en/latest/projectconf.html#board-f-cpu
We don't have option for that. Nevertheless, user has ability to create own board preset and specify own settings ( Just copy one of existing data from https://github.com/platformio/platformio/blob/develop/platformio/boards/mightycore.json
Tell me please the full
http://docs.platformio.org/en/latest/platforms/atmelavr.html#upload-using-programmer
P.S: The problem here is that we don't support only Arduino or AVR based boards. PlatformIO supports 250+ different embedded boards. We can't create GUI for all features from hundreds boards. In this case, we allow users to customize build process using |
Wow, this stuff is REALLY great! 😃 thanks a lot!
I don't know what a target would look like in PlatformIO, nor how to use one, but if you explain it, I'll be really grateful! There are several quirks related to the bootloader burning. First AVRdude set the correct fuses with one command, then the bootloader is uploaded using another command. I'm away for the weekend, so I'm not able to recreate the exact AVRdude commands. But let's pretend that the commands below are correct. After the fuses are set, AVRdude uploads the bootloader: The problem is that many of the same microcontrollers (e.g ATmega1284 and ATmega1284p) got different device signatures, and therefore needs a different part number. How do we deal with that? I created another menu option for the affected microcontrollers. |
|
@MCUdude I finally received my chips atmega644pa for a personal project. I'm using your mighty core standard mapping. I leave my config. So far I2c works, SPI works. But I had to burn boot loader on Arduino App, used BOD 2.7v for 3.3v vcc. I used usbasp via ISP method, no problem.
I am running 8MHz@3v3, I could not connect more than 57600 speed. I am using a cp2102 chip. |
https://github.com/MCUdude/MightyCore
Please consider to add support for this boards which supports:
-ATmega1284, ATmega644, ATmega324, ATmega164, ATmega32, ATmega16 and ATmega8535
-Optiboot 6.0
-Multiple voltages and freqs.
Please consider to add this bunch of boards from MightyCore to your database, since the support for ATmega644/1284 from other boards are like sanguino, microduino are not updated anymore.
Thank you!
The text was updated successfully, but these errors were encountered: