FTL board file generation without Eclipse

Use this forum for requesting small changes in ChibiOS. Large changes should be discussed in the development forum. This forum is NOT for support.
elagil
Posts: 92
Joined: Tue Sep 19, 2017 7:38 am
Has thanked: 8 times
Been thanked: 7 times

FTL board file generation without Eclipse

Postby elagil » Mon Apr 09, 2018 1:33 pm

Hello!

I am trying to use ChibiOS 18.2 and want to move away from Eclipse. I have to regenerate the board files for this new version but need to process the .ftl files for the board generator somehow. Is there a way to run freemarker without eclipse (standalone command line)? I have the .jar file already but it does not seem to be designed to be used as-is.

Thanks in advance,
Adrian

elagil
Posts: 92
Joined: Tue Sep 19, 2017 7:38 am
Has thanked: 8 times
Been thanked: 7 times

Re: FTL board file generation without Eclipse

Postby elagil » Mon Apr 09, 2018 1:48 pm

I just found out about FMPP:

http://fmpp.sourceforge.net/qtour.html

Using this command, you can easily generate your own board files without eclipse:

Code: Select all

fmpp -C board.fmpp


Requriements for this to work:
- fmpp is in path variable
- the template files are reachable from the location where you execute fmpp. I just copied the template files over to my working directory

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: FTL board file generation without Eclipse

Postby Giovanni » Mon Apr 09, 2018 3:35 pm

Hi,

All generators are usable without Eclipse using FMPP, now are part of the ChibiOS tree. Of course Eclipse support will continue.

Giovanni

electronic_eel
Posts: 77
Joined: Sat Mar 19, 2016 8:07 pm
Been thanked: 17 times

Re: FTL board file generation without Eclipse

Postby electronic_eel » Thu Aug 23, 2018 10:17 pm

Hi,

since the ChibiStudio plugins don't support current releases of Eclipse and I also prefer to edit the pure XML, I wanted to use fmpp to create the board files without any Eclipse. I copied the source files from a similar board in /os/hal/boards/*/cfg/, adapted them and tried to use fmpp to create the board files.

The board.fmpp looks like this:

Code: Select all

sourceRoot: ../../../../../tools/ftl/processors/boards/stm32f0xx/templates
outputRoot: ..
dataRoot: .

freemarkerLinks: {
    lib: ../../ChibiOS/tools/ftl/libs
}

data : {
  doc1: xml(board.chcfg)
}


The problem is that the ChibiOS source tree below /tools/ftl/processors/ does not contain a "boards" directory and no templates. After searching around a lot I found them in the chibistudio_trunk-branch in the svn.

I had to check that out into a dir outside the ChibiOS-tree like this:

Code: Select all

svn checkout https://svn.code.sf.net/p/chibios/svn2/branches/chibistudio_trunk/tools/chibios_config_wizard

then I had to adapt the "sourceRoot" definition in the fmpp file to reference this dir. This is a bit cumbersome.

Is there a special reason that the board template files are part of ChibiStudio and not part of ChibiOS? Wouldn't it make more sense to put them in tools/ftl/processors/boards/ in the ChibiOS-tree like the fmpp-file suggests?

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: FTL board file generation without Eclipse

Postby Giovanni » Fri Aug 24, 2018 5:08 am

Hi,

ChibiOS does include those files. Also checking out from subversion includes those.

Are you using the community git mirror? probably there is a problem with that.

Giovanni

electronic_eel
Posts: 77
Joined: Sat Mar 19, 2016 8:07 pm
Been thanked: 17 times

Re: FTL board file generation without Eclipse

Postby electronic_eel » Fri Aug 24, 2018 11:42 am

Hi,

thanks for your quick and helpful reply.

Giovanni wrote:Are you using the community git mirror? probably there is a problem with that.

Yes, you are right. I'm using the mirror on github as including it in my project as git submodule is very convenient.

I looked at this case in more detail and it seems like the tools/ftl/processors/boards directory is defined as "external" in the subversion tree. The external points to the chibistudio_trunk branch, so it always gets the data from there. But the external-feature from subversion isn't compatible with git, so stuff in external trees isn't transferred over to git.

I looked at the list of externals in the svn trunk and it is just the ftl-boards and the "community" folder. The community folder has it's own git tree, so no problem. I, and probably other git users too, would prefer it if the external were defined the other way round, meaning that the actual board templates live in trunk, and the chibistudio_trunk branch refers to them as external. So they would be more easy to access from the ChibiOS-git and harder to access from a chibistudio-git.

It would be nice if you consider changing that. Thanks.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: FTL board file generation without Eclipse

Postby Giovanni » Fri Aug 24, 2018 12:53 pm

Moving in "change request".

Giovanni


Return to “Small Change Requests”

Who is online

Users browsing this forum: No registered users and 8 guests