
This package is a collection of programs that we use at Eaton to interact with, debug, and analyze data from vehicle ECUs (Electronic Control Unit: automotive speak for an embedded computer). The motivation to put this stuff on hackage is to encourage the use of Haskell in automotive electronics and to help standardize open data formats and protocols -- the most common formats and protocols in this industry are proprietary. (The other motivation for hackage is it makes it easy for us to distribute tool updates to our engineers and technicians in the field. :-) ) Most of these programs in this package read or write data on a CAN bus. At work we use Kvaser CAN cables, so these tools link in Kvaser's open source CAN driver library, canlib. However, we anticipate adding several tools that have nothing to do with CAN -- they could be general data analysis programs that could be applicable to other fields, not just automotive. My question is, is it possible for a user to select which programs to install within a given package? I could see where someone would want to install a data analysis tool, but not want to bother with separately installing Kvaser canlib. I had considered different packages for the individual tools, but that would get messy pretty quick, especially since many tools share a lot of common code. Another question: Can we get a Hackage category specifically for the use of Haskell in embedded systems? I didn't see anything that stood out. And one last question: The Kvaser canlib library has a different name depending on if the machine is Linux or Windows. What is the best way to configure the build based on the platform? Current I have the library name hard coded in the extra-libraries field in the cabal file. -Tom http://hackage.haskell.org/package/ecu http://github.com/tomahawkins/ecu

On 10 September 2010 05:11, Tom Hawkins
Another question: Can we get a Hackage category specifically for the use of Haskell in embedded systems? I didn't see anything that stood out.
Hi Tom Don't you just pick a category yourself in the Cabal file and Hackage creates it when you upload? Category: Embedded This is a bit prone to spam I suppose, but could be even worse for bad spellers (like myself). Even at the moment, there seems to be some discrepancy between categories named with the plural or the singular. Best wishes Stephen

Stephen Tetley schrieb:
On 10 September 2010 05:11, Tom Hawkins
wrote: Another question: Can we get a Hackage category specifically for the use of Haskell in embedded systems? I didn't see anything that stood out.
Hi Tom
Don't you just pick a category yourself in the Cabal file and Hackage creates it when you upload?
Category: Embedded
This is a bit prone to spam I suppose, but could be even worse for bad spellers (like myself). Even at the moment, there seems to be some discrepancy between categories named with the plural or the singular.
That's why I suggest a warning of Cabal when you are going to upload a package that opens a new category.

On Thu, Sep 09, 2010 at 11:11:33PM -0500, Tom Hawkins wrote:
to other fields, not just automotive. My question is, is it possible for a user to select which programs to install within a given package? I could see where someone would want to install a data analysis tool, but not want to bother with separately installing Kvaser canlib. I had considered different packages for the individual tools, but that would get messy pretty quick, especially since many tools share a lot of common code.
And one last question: The Kvaser canlib library has a different name depending on if the machine is Linux or Windows. What is the best way to configure the build based on the platform? Current I have the library name hard coded in the extra-libraries field in the cabal file.
You want conditional configurations in the .cabal file. See http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/authors.ht... For the OS issue you can do something like if os(windows) Build-depends: canlib-windows else Build-depends: canlib or whatever. For user-selectable programs, create some flags and use the flags to specify which executables are buildable. Then the user can just pass a flag to cabal install and get the executables they want. -Brent

Brent Yorgey schrieb:
You want conditional configurations in the .cabal file. See
http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/authors.ht...
For the OS issue you can do something like
if os(windows) Build-depends: canlib-windows else Build-depends: canlib
or whatever.
Would it be better to write canlib in a way that works on both Windows and Unix? Otherwise all packages that import canlib have to add this switch.

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 9/11/10 13:46 , Henning Thielemann wrote:
Would it be better to write canlib in a way that works on both Windows and Unix? Otherwise all packages that import canlib have to add this switch.
The phrasing of the original request leads me to believe that this is outside of the OP's control. - -- brandon s. allbery [linux,solaris,freebsd,perl] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyNWNoACgkQIn7hlCsL25U55ACgkDoFO8buGrzINsRowfF7+aZ4 LrcAoLeysSsP5jzhl92kpKFnHx5GwWTA =x2Bx -----END PGP SIGNATURE-----

Brandon S Allbery KF8NH schrieb:
On 9/11/10 13:46 , Henning Thielemann wrote:
Would it be better to write canlib in a way that works on both Windows and Unix? Otherwise all packages that import canlib have to add this switch.
The phrasing of the original request leads me to believe that this is outside of the OP's control.
Then a canlib-auto package on top of canlib and canlib-windows would still be an option.
participants (5)
-
Brandon S Allbery KF8NH
-
Brent Yorgey
-
Henning Thielemann
-
Stephen Tetley
-
Tom Hawkins