Тёмный

STM32 project managed with CMake | VIDEO 46 

Matej Blagšič
Подписаться 8 тыс.
Просмотров 21 тыс.
50% 1

In this video I show you my minimal CMake configuration which requires very few modifications to adapt to different STM32 microcontrollers. I also demonstrate this in the video.
The configuration was inspired by following article and youtube video and I recommend you to have a look:
dev.to/younup/cmake-on-stm32-...
• Andreas Reischuck "Cro...
Timestamps:
0:00 Introduction
1:57 Overview of sample project
3:46 Modifying CubeMX generated Makefile for the project
5:58 CMake files
7:08 CMake gcc-arm-none-eabi toolchain walkthrough
11:47 CMakeLists.txt walkthrough
24:58 Manual CMake configuration launch, configuration inspection and build
30:34 Automation using top level Makefile walkthrough
33:22 Ending remarks
Project files:
github.com/prtzl/Embedded_vid...

Наука

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

 

28 июн 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 48   
@samisoftware8008
@samisoftware8008 2 года назад
Out of words, haven't seen such an useful video on cmake. You are not only expert but have a good sense how and what to explain.
@gfcwfzkm
@gfcwfzkm 2 года назад
I just discovered your channel and I can't understand why the YT algorythm isn't boosting you more. Your guides are amazing and I'm very much looking forward to learn STM32 & their tools with your videos! Thanks for doing them!
2 года назад
Thank you for kind words. I'm glad that you find my content helpfull which is my intent. If you find any video lacking in certain explanation regarding a topic or I dont have a video for a topic published, please do comment.
@rick_er2481
@rick_er2481 2 года назад
@ STM32 Ethernet PHY with LwIP do you have knowlegde about this topic? I thinks its an interesting topic for DIY IoT in combination with MQTT etc. Thankyou
@user-hs2co3we4o
@user-hs2co3we4o 2 года назад
Amazing channel, really comprehensive guides explaining every step of the way, the reasons for every choise as well as the alternatives. Your build playlist definitelly saved me more than a week of work trying to figure all this on my own
@danielya8634
@danielya8634 7 месяцев назад
I always use plain Makefiles. Sometimes one for whole project, sometimes the GUI generated one includes the custom Makefile where own sources are. The extra abstraction layer of Cmake probably would make sense when using other compilers. For my embedded it is always gcc
@jefflongo
@jefflongo 2 года назад
Awesome video! Really thorough and beginner friendly.
@TimmyWhiskers
@TimmyWhiskers 2 года назад
Great stuff again! Can't wait for the next video!
@sebaschtl9710
@sebaschtl9710 11 месяцев назад
thank you so mutch. it is so nice explained. I was happy to heare that you also discribe the side effects of common configurations and there potetial errors! So usefull. you show the big picture of build system. just great, i want to learn more from you.
@isokemisoke
@isokemisoke 2 года назад
These videos are really super good and that's why I pay the money for the internet. Thank you !
@fw3mbedded598
@fw3mbedded598 Год назад
what a wonderful explanation .. no one explained better than you .. thanks a TON
Год назад
Thanks for the comment. I'm glad my video helped you :)
@vladkosten3671
@vladkosten3671 Год назад
I just want to say thank you so much for your videos
@daviherculano8768
@daviherculano8768 2 года назад
Thanks a lot! Great video.
@rick_er2481
@rick_er2481 2 года назад
Awesome, thanks!
@szymonpiotr5898
@szymonpiotr5898 2 года назад
For windows user: 1. Default make generator is Nmake. Cmake use default generator, so have to use cmake with additional '-G' flag. In Makefile in ur project (not "PROJECT") folder have to write one more line "-G "MinGW Makefiles" \" 2. It is worth pointing out, that to use cmake u have to install mingw32-make (u can use ninja also, but then u dont use make). First I installed "Make-3.81 for Windows", but can't choose that make in cmake as available generator. Maybe is possible to use "GnuWin32 make" as MinGW, but I failed. Matej Great Job thanks a lot! Greatings from Poland :)
2 года назад
Thank you for providing notes for windows users as well. Regards!
@kumar2501
@kumar2501 2 года назад
i Love this tutorial awesome
@jrohit1110
@jrohit1110 8 месяцев назад
Nice Explanation :D ...Although this is the first time I have seen someone use a Makefile to drive CMake 😆. Usually it is the other way around.
7 месяцев назад
I used the Makefile to run CMake to run more Makefiles :)
@EdwinFairchild
@EdwinFairchild 4 месяца назад
when you make that Cmake file, does the backslah or forward slash matter, in other words is the file OS dependent when it comes to paths
@elyortuxtamuratov3140
@elyortuxtamuratov3140 2 года назад
thank you very much))))))))))))))
@fritzcanaway6186
@fritzcanaway6186 2 месяца назад
can someone tell how to install this to project into the stm32 device?
@nikachikovani2687
@nikachikovani2687 Год назад
Hi, How to make target compile option flags visible for all other cmake target libraries in my project ? I don't want to add flags in my toolchain file to make it global. Can I do it in my top level Cmakelist.txt file somehow ?
Год назад
You can add those options in the global file before sourcing/including other libraries in subdirectories. This way they will inherit the settings as well. You can also add some local depending on the library.
@swatikumari-fj5ju
@swatikumari-fj5ju Год назад
I am trying to build cortex M4 in visual Studio for stm32mp157c-dk2 target, using zephyr rtos If any reference plzz suggest.
Год назад
I was working on a project that used the 2 core stm32mp1 from Ka-Ro and used their yocto linux template for building custom operating system. Apart from that I don't have any direct experience.
@imlassuom
@imlassuom 2 года назад
libsupc++ and at the same time no-rtti, is that OK!?
2 года назад
Yes, I missed that, thank you!
@thangduong8799
@thangduong8799 2 года назад
greatt but please can you share some books ablout stm32 or where can I learn more about embedded and stm32. thank you so much
2 года назад
I haven't read any books on stm32 or embedded in general so I'm unable to recommend. Only book I have used was on C++11 and some uni courses on embedded design and electronics. Most of what I know is self taught and working on projects at companies around very experienced people. STM32 datasheets and reference manuals are great to study workings of peripherals along with websites like Analog Elektronics.
@thanhtrinhlinh6232
@thanhtrinhlinh6232 2 года назад
"The C compiler is not able to compile a simple C test program" - I got this error, I already installed three tools that you listed in Readme.md, and the program is successfully compiled by a makefile that is manually written by myself. But when I tried with the CMake, I got the error. Do you know how to solve it? Thanks!
2 года назад
I explain at 10:23 that without including `CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY` cmake will try to test the compiler, but with no cpu model it fails. If you're using the example on github, which is now in `Example` folder, it should compile with no problem. I assume that you forgot to add the toolchain file or just copied a part of it and that's where the cmake configuration hanged.
@thanhtrinhlinh6232
@thanhtrinhlinh6232 2 года назад
@ I used the project "046_BUILDING-PT5-cmake", I didn't change anything there and then I got the error
@thanhtrinhlinh6232
@thanhtrinhlinh6232 2 года назад
@ I already added the "CMAKE", "Arm toolchain" and "cygwin" path to "Environment variables".
2 года назад
@Thanh Trinh Linh I see that cygwin is a windows utility. I don't know how you installed gcc-arm-none-eabi on your computer, but I tried the same on ubuntu, fedora and arch and found, that arch and fedora carry `newlib` package separately and without it you get the same error as you had ... but it also mentioned somewhere that it could not find newlib. Maybe try looking into that. Also I updated my `stm32-cmake` repository readme: github.com/prtzl/stm32-cmake Edit: I also tested the problem and working behaviour on the original `046_BUILDING-PT5-cmake` project from the video and it was the same as with `stm32-cmake` repository. There are no major differences.
@thanhtrinhlinh6232
@thanhtrinhlinh6232 2 года назад
@ It seems to have so many problems with using CMAKE and GCC-arm -embedded-toolchain on windows environment.
@rawinpinkoh5823
@rawinpinkoh5823 2 года назад
Im working on the project about this and YT algorithm blessed me with your video! Thx!. Although I have a question. With your Cmake files, I can compile and build the software and flash it into the board just fine. But when I try to use FreeRTOS, it seems like the CMSIS stuff refuse to compile for some reason. The error I got looks something like this /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: CMakeFiles/NUCLEOH7_CMAKE.dir/Core/Src/main.c.obj: in function `main': /home/rawinza555/Freertos_Make/TestFreeRTOSMake/Core/Src/main.c:123: undefined reference to `osKernelInitialize' Could you help me identify what's wrong? I set the source file and include path based on what's on makefile from CubeMX
2 года назад
Looks like the linker is complaining that it cannot find it. Maybe you don't compile all the files that you would need. Can you check if you have all the files included?
@rawinpinkoh5823
@rawinpinkoh5823 2 года назад
@ I believe I did it right. Is there a way I can send you my github repo? I really appreciate your help here. I can use make to compile the code and it flashed and run just fine.
2 года назад
You can share the link and I could take a look.
2 года назад
@Rawin Pinkoh I found your repository before youtube delted it, I don't know why. I forked it to my github and applied changes. Now it compiles with no problem. Please review the readme I added and comment in CMakeLists.txt file. Regards. github.com/prtzl/STM32-CMAKE-FREERTOS
@rawinpinkoh5823
@rawinpinkoh5823 2 года назад
@ Thanks for the help! May the youtube algorithm god bless your channel even further!
Далее
Build STM32 CMake projects on Windows | VIDEO 48
13:47
Building with Make and CubeMX | VIDEO 42
23:53
Просмотров 16 тыс.
Игровой Комп с Авито за 4500р
01:00
DMA on STM32 HAL with 2 example projects | VIDEO 36
1:03:17
Better CMake Part 1 -- Basic Project Setup and Usage
11:31
CMake - the essential package
27:54
Просмотров 9 тыс.
CMake vs Make - A developer's perspective
8:16
Просмотров 3,9 тыс.
Самый СТРАННЫЙ смартфон!
0:57
Просмотров 32 тыс.