We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

QtCreator BareMetal development

00:00

Formal Metadata

Title
QtCreator BareMetal development
Subtitle
See QtCreator, OpenOCD and qbs in action.
Title of Series
Number of Parts
199
Author
License
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
QtCreator gained the ability to talk with these really small ARM Boards with CortexM processor. This presentation will show how easy it is to get into development on these boards with a GCC toolchain, OpenOCD and QtCreator with BareMetal plugin. The presentation will walk through all the needed parts needed for embedded development with an CortexM4 ARM processor. The talk focuses on OpenOCD in combination with the BareMetal and QbsProject Plugin of QtCreator. OpenOCD is an opensource hardware debugger which as multiple backends for different debugging hardware. QtCreator is a powerful IDE which has all the bells and whistles of an IDE. It is the main develoment IDE for the Qt toolkit and has a focus on C++ and C development. QtCreator is based on plugins. The two new plugins used in this presentation is the BareMetal plugin for talking with the OpenOCD (or other gdbserver based) hw-debugger and the QbsProjectmanager which is the new qbs build system based software builder based on JavaScript project descriptions. There will be a live demonstration of using an STM32F4 board
CASE <Informatik>Multiplication signSoftware developerLimit (category theory)DebuggerLecture/Conference
Computer hardwareElectronic mailing listDebuggerSoftware developerCASE <Informatik>Address spaceCompilerSoftware development kitPlastikkarteState of matterBinary codeBitCubeSoftware testingPhysical systemPlug-in (computing)Compilation albumDifferent (Kate Ryan album)Multiplication signBus (computing)Device driverComputer fileLink (knot theory)Transportation theory (mathematics)Set (mathematics)Presentation of a groupView (database)Descriptive statisticsStructural loadComputer programmingSemiconductor memoryVariable (mathematics)Queue (abstract data type)Latent heatIntegrated development environmentServer (computing)Endliche ModelltheorieScripting languageMessage passingProjective planeComplete metric spaceOpen setFreewareProduct (business)Data managementAndroid (robot)SpacetimeRight angleFocus (optics)BuildingSoftwareSelectivity (electronic)CodeCopyright infringementFront and back endsLinker (computing)ChainIP addressWindowPowerPCComputing platformKey (cryptography)Run-time systemAbstractionLevel (video gaming)Stack (abstract data type)Functional (mathematics)Mereology1 (number)Type theoryOpen sourceMappingTouchscreenActive contour modelPlotterWebsiteCategory of beingPosition operatorMusical ensembleService (economics)Video gamePattern languageDataflowInsertion lossProcess (computing)QuicksortDivergencePerturbation theoryDisk read-and-write headFlagModul <Datentyp>Form (programming)GradientPoint (geometry)Vapor barrierForestTouch typingAreaSpeech synthesisIn-System-ProgrammierungDivisorProgram flowchart
Transcript: English(auto-generated)
Hey, you're right like is it okay sound like that or is it for you guys here, okay great
It is still too much lights, okay But don't fall asleep, please I do my best
Yeah, probably this way is better Okay So we'll go to the next talk Well, I'm not going to talk too long. I'm going to let him do the talking He's going to tell us about how to do things with Qt Creator
That we normally don't do Yes. Hello Yes, I'm into embedded development for quite some time and Well, I've been using Qt Creator for quite quite a while
For Linux development, which is quite nice and has quite nice for remote embedded Linux deployment works quite good and Then we have some of these boards lying around I got these at a fair and It's pretty cheap. I think it's about 50 bucks 15 bucks
Euros in this case and it has an Debugger chip which is connected directly and you can start right on with this solution. I'm going to present so what I'm going to talk about is
I'm using open OCD Qt Creator cubes and cubes project manager which are plugins to the Qt creator and the bare metal plugin which is also a plug-in to the Qt Creator and Just to know how much in detail have to go through this stuff
So who's who's not who's use or knows open OCD? guys, okay and Qt Creator okay Okay, and Has anybody used cubes cubes project miniature bare metal plugin great
Okay So what's Qt Creator about I just do a little bit for all these who don't know Qt Creator well, it's a multi-platform IDE and
That was a requirement I had for for choosing a desktop and Development environment and Key requirements where code completion nice refactoring solution and debugging working and
One thing which I personally really like Is to have a full open source development stack for political and technical reasons so
I Just going to talk about open OCD it's versatile hardware debugger it has multiple back ends and I think it's called transports and these back ends so you have I think it's an ST link on this board or there's for the
Jlink their drivers or drivers for Well the bus pirate and and very really different stuff so If you have happened to do some FPGA development you probably have these Altera bus blaster Lying around they also back ends for this open OCD hardware
It's pretty slow by the way But it works so you can get if you have some some hardware laying around Chances are pretty high jtech hardware that you can do hardware debugging with open OCD
Open OCD front-end is an GDB server so that's the way and the Qt Creator is talking to it the community is very friendly of it and It's scriptable so You normally have some have to do some board specific stuff like
How am I doing the resets? The reset and stuff like that and so you can script it or you can script your own reset handlers if you your hardware needs special handling so you need to Make sure that it's coming up clean
This can be done. We are here tickle scripting and You can also use Open OCD for in system programming, but that's I'm not touching it any further. It's just for completeness Yes, and Well this GDB server is the back end for debugging and
The IDE it's a Qt Creator I'm talking about and Qt Creator internally has a nice modular design. It's based on plugins and So it's easy to extend it also has some other
development stuff Other development stuff like Android development, which is pretty new I think and a better Linux and of course you can do desktop Qt
Development what it's originally sort of for and It has support for different build systems, so While I'm only focused on the GCC Build environment or it also has support for other compilers for different platforms
Oh I just switch compilers and build systems. Sorry and It also has support for this different build systems like cube make cubes C make make I
Don't know That's probably about it And it has back ends for different debug us And it has a nice Abstraction of devices so you can configure your own devices, which I'm only also using
Which is presented later on and All this stuff up here is combined via kits So you can just have different cross compilers Configured in your Qt Creator, so if you have different other boards lying around and one is for example in
Foul 7a the other one is in power PC You can just have different tool chains configured as a as in one kit and So you can easily switch and compile for different kits. It's quite nice Yeah, so if you have any questions just
Pop up normally in the end the question gets easily lost So if you have any if anything is unclear just ask Okay One of the build systems Qt Creator supports is a Qt build system. Is it right? Is it Qt's build system? I guess
Was not sure about the Qt part It's a JavaScript based build system, and it's using the QML runtime environment and It's quite neat because it's this JavaScript can be passed
Well quite easily because it's JavaScript, and it's mainly a JSON description kind of JSON description and of Your stuff I am going to show it later on in the live presentation It's pretty compact, so I've done different
I've built different Projects and Well you need about one screen of Text to describe your build normally which is quite neat for an embedded cross build You normally need much more so for example CMake I think
It's quite a double of the size for describing the same stuff Yeah Yeah, it has lots of intelligence kind of build in into it so it just knows by the file ending what to do and does it automatically and you don't have to care much about it and
It's integrated into the Qt Creator We are the cubes project manager this stuff is I would say pretty pretty new I think it's a 3.0. Release which is a newest release
Where this was I think the first time? Yeah, and it's still marked as experimental so you have to explicitly activate it, but I'm showing it later on and
Yeah one thing What was missing to Qt Creator was bare metal stuff, so it has a nearly had nearly everything in place so the compiler support debugger support nice code completion and well
But one thing that was missing was that it was not able to directly talk to the GDB server to a hardware GDB server which has some subtle differences in the way it has to be talked to and That's why I wrote the bare metal plug-in for Qt Creator
it essentially If you enable the bare metal plug-in you have two Two things you see for one thing is you get a bare metal device. That's where you define
your hardware debugger, and you get a bare metal kit that's The associated kit where you can just define your compiler and stuff like that as it's normally defined in Qt Creator Bare metal itself is pretty basic right now, so
mainly you can just Select the network port and the IP address Where the GDB server is listening so you don't have to have it on the same host you can just have it over network anywhere
running and it has a window where you can type in your GDB commands, which is pretty basic, but very versatile because you can well Every year hardware debugger I used beside OpenOCD
Which are commercial ones It's also able to be used with this bare metal plug-in Yeah, okay, and now I'm going to switch to the live presentation
Oops, so I'm going to start So I'm just going to show you the the settings so
For example down here You have a bare metal device configured probably bare metal device. It's an st-link v2 and down here You can configure the the port for the where the debugger is running currently hopefully I have the
Debugger running which is also not started automatically So you have to make sure if you're using it that the debugger is running somewhere But normally you just have to start it once your hardware is connected, and then you can just use it
so down here are the commands for OpenOCD typical commands to get the Program loaded is to reset the device load up
the binary into the hardware and just do and reset again to make sure that Well, it's it's in a proper state after loading normally, it's not needed, but well and Then you that's all you need for for
Getting the device programmed and up and running on this side and then You have These kits for example, I have a bare metal device over here and
Here I'm using Yes, I'm using a bare metal device, I'm just saying okay It's the st-link debugger which is placed on here, and I'm talking to over OCD I'm using an ARM compiler. Oops, that's me. That's the wrong one and
I don't need any cute in this case Which would a little bit too large for these kinds of devices? okay, and you can configure the Compilers like this. It's I think it's pretty straightforward and the debuggers are also
defined And Straightforward and Okay, and This should be it and then you can load a project. Where is it? Oops wrong and right here
Visible yeah, nearly so this is cubes build system description. So I
I Had to add to some support for assembly to the cubes build system. So
As It has main focus was building for desktop stuff the support for building assembly files files What not was not in? cubes, so I added it to the cube system and that's one thing that's
making me some problems right now, but You'll see later Yeah, and over here well you just say give it a compiler flex the linker flex You include path is I don't know if the dot is really needed right now But well, it's there and then you can use wildcards for example for your files, which is quite neat
So you don't have to enter all these files by hand. You can just say okay. I'm having all the dot C files in this directory and want to have them included in my project and then you see it over there and
You can also define some variables for example if you have an external path you can just define JavaScript variables and use them to construct your Paths if you have some complicated pass it is it should make us makes it much easier to to handle this stuff
So I think I'm currently working on a different project it's a little bit more complicated than this simple one, and that's and free art or space project, which is and Over here you see the cubes files is not much larger than that
pulling in some more includes, but due to the wildcards which can be used is still quite compact for for the files which are pulled in Using wildcards is kind of a double-edged sword in this kind because if you're using wildcards Qt Creator
can't manage these files by itself, so you Just have to make sure that the white cards are correct on the paths are correct If you're not using wildcards Qt Creator can add this stuff into the files list for you and
Manage these files, but I don't think it's doing it if they're white cards in there So yeah I Think it's it's easy enough so that you can just describe your build pretty pretty easily and get something up and running
quite quick okay, and Well the feed address. I'd like to have it running, but unfortunately, I didn't have had enough time to get it up and running and So I'm going to use the test project over here
to start debugging I can switch on the debugger oh Okay, it's switched on I'm just going to see if I'm having the hardware debugger running. Oh, no. It's not running So I have to start open OCD in the background
oops So well, okay. No he's he's up and running Mmm. He doesn't like to be hibernated or something like that
So it's compiling. Oh, I guess I forgot to Set and breakpoint so it's I Would like to have a more complicated project up and running
but well I went out of time and I don't have this up and running so you see okay. You have your variable variables you can set breakpoints and Well, it's if you use the queue creator. You can just press normal buttons after you configure it and
you're ready to go and You have all this nice stuff queue creator gives you like like code completion code model stuff which There has been a talk today from You probably have seen it
Yes, okay Are there any questions something you want to see before I stop the live presentation and switch back to Yeah
So the question is if it is it possible to have a peripheral view right?
Yeah Yeah, I think it would be possible, and I also talked with the queue creator guys How to it might be possible to implement it, but right now. It's not it's on the wish list see later on
but I think the large thing missing from the solution for having a and Product which is comparable to commercial ideas
Yes, so so the comment was that it's quite would be quite neat to have a device view somewhere within the queue creator and
Yeah, but unfortunately it's not there, but it's on my wish list too, so Yeah, we'll see what the future brings. I don't know I can do no promises, but well I'll get some time to work on this stuff. Probably there will be something happening
So you can can in queue creating can just switch to assembly view and then So I just switch of the debugger so up here. You see the debugger stuff. You normally what don't want to see it it's just for
debugging the debugging session and normally you don't want to do that, but well and Then you can step through the assembly memory map. I don't know I
Well one thing was the stuff if but you haven't device maps Yeah, okay, you can you can give a you can create in cubes you can create
Compiler setting where you just say create me a map and then it creates a file And you can just look at it, so well you got it somehow Well that was the question before Oh
Yes Yes, you have a you have you can be looking into memory up here the debugger so you can Over here For example if you want to look at this stack stuff and so on so That's the debug function in here, which is already there from from the queue creator
in this so there's Okay, okay, so if you have more questions. I'm sorry. I think I just got that got the time off so I
Just Going to switch how much time do I have left? Okay? Where's my hey? So okay future improvements Support for all build system cute creator supports so currently only Q make and cubes is supported and
See make and make I don't know I haven't tested it. I haven't time to test it, but it would be nice to have it To have a variable support and the command window which is entered into the
device view for the bare metals so you can if you have some Special commands where you need the binary Which some esoteric? hardware debuggers need that it would be nice to have a fast restart button, so on some devices downloading quite slow, so it would be nice to have a restart button and
One question was over here, and that's also Something which would be nice to have a was a would be a memory device view by a hardware description yeah, and other stuff You can do with cute creator. Well
That's just some Completely different something completely different okay. Thanks for listening