[jhc] [BUG] Poke should use volatile.

Kiwamu Okabe kiwamu at gmail.com
Wed Mar 6 15:43:43 CET 2013

Hi, John.

On Wed, Mar 6, 2013 at 11:17 PM, John Meacham <john at repetae.net> wrote:
> Interesting. Perhaps  something like
> foreign import "volatile &periphBase" :: Ptr Word32
> which will declare
> extern volatile uint32_t periphBase in the file, then you would just
> have a linker symbol periphBase at 0x4000000. (or just import a value
> with zero and do pointer arithmetic like you do)

Ah. It's nice for Cortex-M3!

But I would like to rewrite NetBSD kernel with jhc and Haskell code.


NetBSD doesn't touch raw memory directly. It has own bus driver.
I would like to rewrite the bus driver with jhc.
How do I write the code with extern volatile style?

Kiwamu Okabe

More information about the jhc mailing list