User forums > Embedded development

Adding a new project type for a new embedded device/board

(1/2) > >>

jimbo:
Hello all,

I am investigating using Code::Blocks for embedded development for a microcontroller. We are looking to provide a full IDE that makes the development process as simple as possible, with Project Wizards etc to provide up front code generation, and Code::Block to provide the editing and debugging facility (probably using OpenOCD, with compiler support via a standard gcc). Code::Block is top of the list because it's multiplatform, and works well on low memory ARM systems, unlike Eclipse which has no recent ARM host support, and is quite the memory hog.

I've spent a couple of days trawling around various IDE's; Code::Blocks seemed the simplest to write plugins for (TBH, I know C++, not Java!) and I have been impressed by its performance on low end machines.

So really, my question is, is there a set of docs that helps with the process of developing this entire toolchain and packaging it up in project form so our users can simply go "New->Project->'Microcontroller'" and be guided through the entire process of getting an initial build going and downloaded to the MCU?

Thanks

Jimbo.

oBFusCATed:
Not much. But we could help with info about areas where you're not able to do what you want.
Also we're open to improve areas of C::B which aren't good enough.

To get going you need two things:
1. a way to setup the compiler and other build tools in the compiler settings.
2. a wizard script which creates projects

Compilers theses days are described using xml files and wizards are written in squirrel. For both it is best to use existing files as guides.
You can look at my arduino wizard scripts https://github.com/obfuscated/cb_arduino_template for an example.

jimbo:
Thanks for the response.

I was wondering if my Google-Fu was failing me as I hadn't found much, so useful to have the clarification! I had taken a quick look through some of the other scripts to get an idea, didn't seem too horrendous! Will have a go through your one now.

Compiler is going to be gcc ARM cross compiler, probably Cortex M0, so not dissimilar to stuff already there.

It's a few months till we need to get really cracking on this, but if we choose Code::Blocks, I am sure I'll be back with more questions.

Jimbo

jimbo:
Actually do have some more immediate questions, if you have time.

Been playing with the Squirrel scripts for wizards, which seems fairly clear, and saw in your Arduino example that you have what looks like custom dialogs and panes, defined in a xrc file. How do you generate those files? With an editor, or are they defined by hand?

I am presuming that the wizard.xrc file contents are automagically included in the Squirrel namespace (if that is what its called), so its content acts just like any other library of squirrel code. Hence you can, for example, use "processorChoice" from the wizard.xrc without any boiler plate loading code?

Do you know if there is already a predefined page with a list box style selector for multiple selection (for example, if you want to custom define which peripheral source files you want to include). I'll be taking a look anyway, but not entirely sure where to look for available features. That sort of page would mean we probably would not need a custom page straight away.

Thanks

Jimbo.


edit: answered my own question for part three - no there isn't, but your example Arduino code  does much that I think we would need so is a great starting point. I was a bit confused until I copied the latest github code to my code::blocks installation - I was comparing the old UI with the latest source....doh.

oBFusCATed:

--- Quote from: jimbo on September 25, 2018, 03:39:18 pm ---Been playing with the Squirrel scripts for wizards, which seems fairly clear, and saw in your Arduino example that you have what looks like custom dialogs and panes, defined in a xrc file. How do you generate those files? With an editor, or are they defined by hand?

--- End quote ---
I don't remember. Probably we're using the wxSmith C::B plugin. There are other tools which can edit UI graphically. The file is regular wxWidgets xrc file, so if you search for it you should be able to find info.


--- Quote from: jimbo on September 25, 2018, 03:39:18 pm ---I am presuming that the wizard.xrc file contents are automagically included in the Squirrel namespace (if that is what its called), so its content acts just like any other library of squirrel code. Hence you can, for example, use "processorChoice" from the wizard.xrc without any boiler plate loading code?

--- End quote ---
It is not squirrel code, it is just a xml file with description of UI elements. Search the code of the scriptedwizard plugin to see how it works, unfortunately this is the best documentation. :(


--- Quote from: jimbo on September 25, 2018, 03:39:18 pm ---Do you know if there is already a predefined page with a list box style selector for multiple selection...
--- End quote ---
I don't know unfortunately.

Navigation

[0] Message Index

[#] Next page

Go to full version