Тёмный
No video :(

Getting started with AVR and platformio 

Uwe Zimmermann
Подписаться 1,4 тыс.
Просмотров 13 тыс.
50% 1

Опубликовано:

 

29 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 38   
@msfmusic
@msfmusic 3 года назад
you can upload the hex to AVR inside platformio, just click the small icon in the bottom next to the compiling icon on the right side.
@uwezimmermann5427
@uwezimmermann5427 3 года назад
it depends on the actual programmer/bootloader you use...
@jeugenejohn4636
@jeugenejohn4636 2 года назад
Really useful. Thanks for uploading
@danieltheshark
@danieltheshark 3 года назад
thank you. have a great day
@danieltheshark
@danieltheshark 3 года назад
@Shizue Leist ????
@edisetiyono3644
@edisetiyono3644 2 года назад
MANTAP
@uwezimmermann5427
@uwezimmermann5427 2 года назад
???
@riccardoanzil5998
@riccardoanzil5998 2 года назад
Nice and useful!! 😀 I am considering using PlatformIO as a replacement for my MPLAB IDE for PIC32 micros. This is for coding of our custom PCBs (NOT standard dev kits). Few quick questions: 1) Is it possible to replace the ENTIRE MPLAB IDE with PlatformIO? 2) How easy (or not) is it to set it up specifically for the PIC32 family? 3) is there anything that MPLAB does that PlatformIO does not and/or that I should be aware of if switching over? Thank you 😀😀
@uwezimmermann5427
@uwezimmermann5427 2 года назад
Interesting, but I do not know anything about PIC-programming. I'm an AVR-fanboy...
@damascussteel672
@damascussteel672 3 года назад
Thank you 👍
@antoni9001
@antoni9001 3 года назад
Thank you a lot. It works! :))
@avr_stm_pro2955
@avr_stm_pro2955 3 года назад
Class 🙂👍👍👍👍
@juliuskieninger5422
@juliuskieninger5422 3 года назад
Hey Uwe, thanks for the video. It helped a lot. One problem though. Apparently avrdudes is not running on Mac OS. You mentioned in the video that you would show how to upload the hexfile via terminal. Is this something you want to show in a separate video or did you just forget? Would be realy helpful. Best regards
@uwezimmermann5427
@uwezimmermann5427 3 года назад
Hi Lo Li - you can find that description in the third video of this series: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Ss9WHAg1NtY.html But I will also test more - because it should be possible from within PlatformIO...
@juliuskieninger5422
@juliuskieninger5422 3 года назад
@@uwezimmermann5427 Ah thanks! Yes, that would be really helpfull. I found that way quite interesting: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-cBhJWw7txys.html&ab_channel=ZeroAmps
@Kirchert919
@Kirchert919 2 года назад
Hey, I'm working on a school project, where we program an arduino board, mega2560. We are required to have at least three tasks running using FreeRTOS. We are introduced to work in atmel studio, but I feel like its pretty "old school" and I would like to work in clion with platformio in pure c with no arduino libaries. Do you have any experience with FreeRTOS and platformio ? Thanks
@uwezimmermann5427
@uwezimmermann5427 2 года назад
Sorry, no I have no experience with FreeRTOS and personally I don't think that an RTOS is needed on these types of platforms. Instead I heavily utilize interrupts and state machines.
@viktoracevedo6
@viktoracevedo6 2 года назад
Is it possible to configure platformio to upload the code to the board from the platformio?
@uwezimmermann5427
@uwezimmermann5427 2 года назад
If you are using a standard bootloader on your board, this is straight forward by just clicking on the upload-button at the bottom status line menu of platformio. In the case of non-Arduino code you need to put the bootloader manually into the correct mode by resetting your microcontroller. Since platformio uses avrdude it should be possible to support other programming devices as well - but I haven't figured out a way to modify the command line paramters and it does not seem to be anything the platformio-developers are going forward to implement - they stayed at the "alternative to Arduino-IDE" level of implementation. However, I personally feel that I have more control over the whole process with an external tool like avrdudess, where I can easily check the connection, change the fuses, etc.
@urielpelaezcdmx
@urielpelaezcdmx 3 года назад
PlataformIO IDE is another tool to work with Atmel Arduino cards, but which advantage has over Atmel Studio 7 software? 🤔
@uwezimmermann5427
@uwezimmermann5427 3 года назад
I could possibly see two advantages here: a) PlatformIO/Visual Studio Code is available for all computer platforms. For reasons I cannot understand many of mys students use Apple computers and all the possibilities to run Windows applications have been shut down by Apple, one after another. b) Visual Studio Code could be one IDE for everything, running you Jupyter notebooks in the same environment as you microcontroller programming could be a nice idea. Even though it sometimes is quicker to switch between different programs than between different files/projects in the same "Studio"
@vitaliysutyk4476
@vitaliysutyk4476 Год назад
Ok!!!
@dariushfarajzadeh9138
@dariushfarajzadeh9138 2 года назад
Im having problems that there is not any library for anything and I realy don't know how it works. I used to code with CodeVisionAvr and now I realy don't know how the libraries and headers work here
@uwezimmermann5427
@uwezimmermann5427 2 года назад
See, I don't even know what CodeVisionAvr is, have no problems finding the libraries I need or program things from scratch. I started on Atmel Studio and have never used Atmels own library framework. I don't want to brag about something with this statement, just say that relying on a closed framework is perhaps not the best way to go ahead with microcontrollers - at some point in time you might be forced to switch to another platform, e.g. because Microchip decides to drop the AVR-series (which luckily didn't happen when they took over Atmel). You will find a lot of genuine libraries for avr-gcc if you just google with this added search term. It is also often not difficult to take an open-source Arduino-library and either get parts out of it or even modify it to run without the Arduino framework in the background.
@dariushfarajzadeh9138
@dariushfarajzadeh9138 2 года назад
@@uwezimmermann5427 I'm from Iran and yeah thats exactly what is happening.(sorry for my bad English by the way) I was trying to drive Sht31 sensor but found out that there is no source of library available for CodeVisionAvr CodeVisionAvr is the most famous IDE for avr here. It is made by HP company . It contains libraries and sources for pretty much anything you want to do (but because of being old and not used by almost no one else, there is no library or source code available for new sensors like sht31 in my case sadly) you can simply add I2c librsry by writing #Include or whatever library available you want. And it has a CodeWizard thing which kind of destroys the nightmare of dealing with the registers manually( writing them ) it makes the registers more understandable for beginners. But later on you may have to change them manually again so I dont get the point of that realy And the way it works here is : When you compile the project it gives you the hex and cof files ( you can use cof file in Proteus to debug the line by line of your code) And we use ProgIsp (which again you might not heard of but I found out that It is the same thing like AVRDUDESS and works the same) to upload the hex file into microcontroller And it is easier to teach in Iran I think Perhaps thats the reason why it is so famous On the other hand : I uses the oldest version of C ANSI C it was I think The editor is awful The compiler is not standard It dosn't supports 64bit variables(I realy dont know even its needed or not) but gcc does support I think. And no one except Irannians use it (Because it is highly expensive .but its not a big deal for Irannians as you may know Iran does not realy care about Copyrights ) All these points plus that I can not drive sh3x series forced me to switch to something else . I have found some ways to use avr-gcc in VS code. Thr first one was : adding Microsoft C/C++ to vscode and then make a man.c file and a MakeFile to compile the code with avr-gcc I think (which was a real nightmare for me) And the second way was adding platform io like shown in your videos which was realy helpful and easy thanks . But I don't knoe how the way it works here . Like I've moved on in to another planet lol. Every library I found is based on Arduino Framework which is not my type. Can you please make some tutorials about driving lcds or I2c protocols and other stuff in platform io not using arduino framework ? I want to know the way the libraries and other things work here Thanks again and sorry for such a long comment😅
@uwezimmermann5427
@uwezimmermann5427 2 года назад
@@dariushfarajzadeh9138 I am actually happy to get any feedback on my videos - as you can see, this is still kind of rare... I had some quite busy weeks, teaching and examining three university courses in parallel lately, but I hope and plan to do some more publicly available stuff in the near future - after all I now have already more than 500 followers... I see that the SHT31 is an I2C perpheral - in this case I would start with the I2C-library from Peter Fleury and the I2C register descriptions in the datasheet of the SHT31. Peter Fleury also wrote a library supporting almost all text-LCDs, including some quite good examples: www.peterfleury.epizy.com/avr-software.html
@dariushfarajzadeh9138
@dariushfarajzadeh9138 2 года назад
@@uwezimmermann5427 thanks a lot for the library In my case I'm kind of looking for beginner tutorials because when I swithced to platform IO I feel like a person who never touched the keyboard and doesn't know anything Like I'm realy looking for the very elementry, primary steps!
@doquockhoa
@doquockhoa Год назад
can you tell me how to define F_CPU ? thanks 
@uwezimmermann5427
@uwezimmermann5427 Год назад
did you see my follow-up video on the topic? ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-BKO1rYMPF_k.html you enter it as "board_build.f_cpu = 1000000UL" (for f=1MHz) in the settings in platformio.ini
@doquockhoa
@doquockhoa Год назад
@@uwezimmermann5427 thank you very much
@AY1900
@AY1900 3 года назад
How you can get hex file when compiling?
@uwezimmermann5427
@uwezimmermann5427 3 года назад
The standard settings in the compiler normally produces the .hex file automagically. This is the standard file type which avrdude uses and since Arduino in the background uses avrdude both in their own IDE as well as in PlatformIO there should always be a .hex file if the compilation went through without error.
@user-kg9qk8rt1e
@user-kg9qk8rt1e 2 года назад
вы бы открывали combobox и показывали бы что там внутри! какие варианты доступны.. так лень устанавливать vscode и глядеть самому - что там!!
@uwezimmermann5427
@uwezimmermann5427 2 года назад
Google translates this to "you would open a combobox and show what's inside! what options are available .. so too lazy to install vscode and see for yourself - what's there !!" Sorry, but I don't understand your question.
@EdwardYamunaque
@EdwardYamunaque 3 года назад
HOW WOULD IT BE IF I PROGRAM IT IN ASSEMBLY??
@uwezimmermann5427
@uwezimmermann5427 3 года назад
you can include assembler instruction inline in AVR GCC-code. Plain assembler I don't know, because I do not see a need to go back to this level of programming with AVR-controllers. AVR GCC is a compiler giving pretty efficient code.
@rosachunga2674
@rosachunga2674 3 года назад
@@uwezimmermann5427 Gracias por la respuesta, mis máquina que he instalado las he programado en Asm, me parece más fácil que lenguaje c, lo malo que no puedo autocompletar código en atmel studio 7...
@uwezimmermann5427
@uwezimmermann5427 3 года назад
@@rosachunga2674 I don't speak Spanish and I hope the google translation is somewhat correct. Assembler language for AVR-processors is not easier than the simple C-code which you need. Using AVR GCC you don't have to keep track of the different register types, all hardware addresses are using the exact same mnemonics as the datasheets and Atmel/Microchip gives exampels in C in the datasheet. However, if you really like your ASM so much, then when starting a new project in Atmel Studio (now Microchip Studio) just choose "Assembler" to the left in the menu instead of C/C++. It's there and it everything is automatically installed.
Далее
ATmega328 and PlatformIO - no Arduino!
16:21
Просмотров 11 тыс.
БАБУШКА УМЕЕТ ВОДИТЬ?? #shorts
00:32
Просмотров 354 тыс.
PlatformIO: All you need to know in 10 Minutes!
10:56
Просмотров 306 тыс.
Getting Started with PlatformIO
51:54
Просмотров 618 тыс.
Getting started with AVR and Atmel Studio 7
9:02
Просмотров 23 тыс.
Get started with PlatformIO and the ESP 32
9:17
Просмотров 3,7 тыс.
YOU can Learn the ESP32 in 15 Minutes:  Hello World!
22:52
Getting Started with ESP32 - Step-By-Step Tutorial
19:50
БАБУШКА УМЕЕТ ВОДИТЬ?? #shorts
00:32
Просмотров 354 тыс.