Difference between revisions of "EmbeddedHaskell"

From base48
Jump to: navigation, search
(init)
 
(formatting, ion, haskell embedded blog)
Line 1: Line 1:
== Embedded Haskell ==
 
 
 
"Life is too short to C" -- Adluc
 
"Life is too short to C" -- Adluc
  
Line 7: Line 5:
 
to catch errors sooner and get close to 'if it compiles it works' experience for embedded
 
to catch errors sooner and get close to 'if it compiles it works' experience for embedded
 
world.
 
world.
 +
 +
== Links ==
 +
 +
* Haskell embedded blog https://haskellembedded.github.io/
 +
 +
== Frameworks ==
  
 
=== Ivory Tower ===
 
=== Ivory Tower ===
Line 89: Line 93:
 
}}
 
}}
  
=== Copilot ===
+
== Copilot ==
  
 
* https://leepike.github.io/Copilot/
 
* https://leepike.github.io/Copilot/
  
=== Atom ===
+
== Atom ==
  
 
* https://github.com/tomahawkins/atom
 
* https://github.com/tomahawkins/atom
 +
 +
== Ion ==
 +
 +
* https://github.com/HaskellEmbedded/ion

Revision as of 00:26, 16 March 2017

"Life is too short to C" -- Adluc

There are now serveral ways to generate C code for embedded applications with domain specific languages embedded in Haskell. This allows us to use type system and powerful compiler to catch errors sooner and get close to 'if it compiles it works' experience for embedded world.

Links

Frameworks

Ivory Tower

The Ivory Language is an eDSL for safe systems programming. You can think of Ivory as a safer C, embedded in Haskell.

The Tower Language is an eDSL for composing Ivory programs into real-time systems. Tower programs specify communication channels, tasks, and signal handlers, and generate Ivory code which implements scheduling and communication for real-time operating systems.

Repositories

Papers

Projects

Local projects

CAN4DISCO
ODrive experimental firmware

Working with Ivory Tower

Prepare environment

Install stack first - http://docs.haskellstack.org/en/stable/install_and_upgrade/

mkdir embedded
cd embedded
git clone  https://github.com/GaloisInc/ivory/
git clone  https://github.com/GaloisInc/tower/
git clone https://github.com/GaloisInc/ivory-tower-stm32/
Running UART test

Test application located in

cd ivory-tower-stm32/ivory-bsp-tests
# set platform to f4 discovery
cat > default.conf
[args]
platform="f4discovery"

make bsp-uart-test
cd bsp-uart-test
# now look around carefuly
# oO
# Oo
# ...
# then flash it
arm-none-eabi-gdb --ex 'target extended-remote /dev/f4gdb' \
  --ex 'monitor swdp_scan' \
  --ex 'attach 1' \
  --ex 'load' image'

# try talking to /dev/f4uart
# bsp-uart-test app accepts '0' '1' chars which should toggle led
screen /dev/f4uart 115200

Copilot

Atom

Ion