140 likes | 237 Views
M32C - Can I have Ham with that please…. Robert Pointon EmBounded Project Meeting Neu-Isenburg bei Frankfurt. Overview. Renesas M32C hardware. Renesas tools. Hume tools - making Ham run. Demo! Onward to compilation…. Renesas M32C. Described as “16/32-Bit Microcomputer”.
E N D
M32C - Can I have Ham with that please… Robert Pointon EmBounded Project Meeting Neu-Isenburg bei Frankfurt
Overview • Renesas M32C hardware. • Renesas tools. • Hume tools - making Ham run. • Demo! • Onward to compilation…
Renesas M32C • Described as “16/32-Bit Microcomputer”. • 24 Kbytes Ram, 512 Kbytes Flash Rom. • 32Mhz clock speed. • I/O - Timers, Ports, A-D, D-A, UART… • 54 Interrupts. • 608 Memory-mapped ports.
M32C Tools • PC Tools: • IAR Compiler - bugs, weirdness… • Debugger - can load program, step, inspect variables, etc. • FlashStart - burn program to Flash Rom. • Notes: http://www.macs.hw.ac.uk/~rpointon/m32c/
Hume Tools • phamc: hume to ham (Haskell program). • hami: ham interpreter (C program). • Current way: • trans: ham to C data. • Compile with hami and run.
hami • ehami - Embounded / Expermental / Extended hami. • Minimal dependency on C libraries. • Modular design. • Separates writable vs read-only memory. • Rich and modular I/O. • Flexible to aid experimentation.
Demo Hardware • Leds are programmed as an 8-bit output. • Buttons provide interrupts. • Timer within M32C provides interrupt.
Demo Program • 2 Boxes. • 1 memory I/O. • 4 interrupts. • < 16 Kbytes code for everything.
Demo Program • 16 lines of C initialization code • Could be replaced by an additional initialization box with 12 memory-mapped I/O devices… • Where do we draw the line? • Lots of awkwardness getting code onto the M32C board - but making process...
hamc/cham? • Starting December. • Possible Path forward: • Continue with ehami and incrementally replace interpreted pieces with compiled pieces. • Begin by replacing the host (functional) language.
Tool Chain Questions • Who will work on the frontend - parser, macro, namepass issues? • Who will work on phamc to generate ham code? • How to pass the results of your analyses into the compiler? • How (and what data) to collect from compiled programs?
Compilation Questions • How similar to the original Hume should backend code resemble? • Compile to C or machine code? • C is cross platform. • Machine code we can control & cost.
Runtime Questions • Is wire pack/unpack a good idea? • Do we need support for single-step, breakpoint, reset? • Scheduling? • …