STM32 CubeMX to ChibiOS board file generator

This forum is about you. Feel free to discuss anything is related to embedded and electronics, your awesome projects, your ideas, your announcements, not necessarily related to ChibiOS but to embedded in general. This forum is NOT for support.
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: STM32 CubeMX to ChibiOS board file generator

Post by mobyfab »

Hey,

you're doing it wrong ;)
-g is used to point to the GPIO file directly, not a folder. In your case it should be "GPIO-STM32F103x8_gpio_v1_0_Modes.xml" (find the file in cubemx folder and paste it in the same folder as the script)
use -h to get information about the parameters.

I just updated the script, can you retest? (not the compiled version, you need python)
access777
Posts: 8
Joined: Fri Apr 21, 2017 4:10 pm
Has thanked: 2 times
Been thanked: 1 time

Re: STM32 CubeMX to ChibiOS board file generator

Post by access777 »

I will try now, Thanks a lot
UPD
I can't find any xml files in my CUBE project. Where I could find it?
Screenshot_4.png

UPD_2
Ok. It have done
C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\db\mcu\IP
UPD_3
Oops. We made one step and have stoped again. Excuse me. Could you give more wide instructions. For those stupid like me ... and I have no python, and don't know, how to use it :(
Screenshot_5.png

Screenshot_5a.png
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: STM32 CubeMX to ChibiOS board file generator

Post by mobyfab »

You did not specify your .ioc file... that's never going to work. (did you try -h as I advised?)
can you upload your .ioc file somewhere for me to test it?

Thanks
access777
Posts: 8
Joined: Fri Apr 21, 2017 4:10 pm
Has thanked: 2 times
Been thanked: 1 time

Re: STM32 CubeMX to ChibiOS board file generator

Post by access777 »

Yes! With plesure!
I want look at the example how to use your script. I don't understood what shall i do with it. I'm a beginner in MC programming.
F103C8_miniboard.zip
(1.58 KiB) Downloaded 805 times

And yes, I have tested the script with -h. But I still don't understand what should I use with it as the parameters... Please, give some examples with the comments
Screenshot_6.png
Screenshot_6.png (11.39 KiB) Viewed 14460 times
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: STM32 CubeMX to ChibiOS board file generator

Post by mobyfab »

I just saw this is for an F1 device, which is not supported because they use the old GPIO IP.

Updated (v0.3) .exe here:
https://drive.google.com/open?id=0BzWyT ... TJXTzlYTEE

You can try with anything except F1xx devices.
User avatar
Chudik
Posts: 152
Joined: Fri Jan 16, 2015 7:51 am
Has thanked: 7 times
Been thanked: 1 time

Re: STM32 CubeMX to ChibiOS board file generator

Post by Chudik »

mobyfab wrote:You can try with anything except F1xx devices.

Hi, do you make updates for your generator?

Thinking about getting back to ChibiOS, but don't want to lose convenience of defining peripheral with CubeMX.
Do you convert only pin mapping or peripheral settings as well?
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: STM32 CubeMX to ChibiOS board file generator

Post by mobyfab »

Hi,

It has been updated a number of times but still doesn't support F1 devices.
There's a new script I wrote (mx2conf.py) that enables the drivers and peripherals as well. You still need to configure clocks manually.
User avatar
Chudik
Posts: 152
Joined: Fri Jan 16, 2015 7:51 am
Has thanked: 7 times
Been thanked: 1 time

Re: STM32 CubeMX to ChibiOS board file generator

Post by Chudik »

mobyfab wrote:There's a new script I wrote (mx2conf.py) that enables the drivers and peripherals as well. You still need to configure clocks manually.

Very interesting.
I don't worry about F1 family. I guess, It is interesting for those, who uses dirt cheap F1 boards from aliexpress.
I'm more interested in F4, F7, L4 and newer devices. And executable files :D Even if they require command line :)

Configuring clock is one time process - it should not take too much time to do it manually, but all peripherals parameters could changes several times during design. That is biggest pain in the ass :) Especially during designing custom board, not using of the shelf ones.
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: STM32 CubeMX to ChibiOS board file generator

Post by mobyfab »

Post Reply