Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

driver with task/isr. #85

Open
mbriday opened this issue May 15, 2020 · 4 comments
Open

driver with task/isr. #85

mbriday opened this issue May 15, 2020 · 4 comments

Comments

@mbriday
Copy link
Contributor

mbriday commented May 15, 2020

The goil templates allows to declare a driver through the LIBRARY object (in config.oil file). However, the LIBRARY object embeds a path and a set of functions (header/code).

it is useful for basic drivers, but it may be improved with the support of an OIL subset (isr, tasks, alarms,…) for more complex drivers.

@mbriday
Copy link
Contributor Author

mbriday commented May 16, 2020

In fact, we just need to declare an extra OIL file, like that:

  LIBRARY serial {
    PATH = "cortex/armv7em/stm32f303/lib";
	CHEADER = "serial.h";
	CFILE   = "serial.c";
	OILFILE = "serial.oil";
  };

@jlbirccyn
Copy link
Member

jlbirccyn commented May 16, 2020

Yes but since goil has no idea of the meaning of the OILFILE attribute, serial.oil will not be included and an OIL file cannot be included by a goil template because when the template code is executed the OIL parsing is finished. So we have to be able to specify that the OILFILE attribute corresponds to an include and that means modifying goil.

So it is not something that can "just" be done 🙂

@mbriday
Copy link
Contributor Author

mbriday commented May 16, 2020

Yes, we need to call the parser again.
Will it be possible to extend gtl so that it can call the parser ?

@jlbirccyn
Copy link
Member

jlbirccyn commented May 16, 2020

Everything is possible but it is a lot of work. We have to parse an OIL file and do not call GTL, instead return the whole dataset normally passed to root.goilTemplate. Get the result in a map (at least the data type already exist in GTL. GTL has to know about the OIL parser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants