larsbrinkhoff / lbForth

Self-hosting metacompiled Forth, bootstrapping from a few lines of C; targets Linux, Windows, ARM, RISC-V, 68000, PDP-11, asm.js.
GNU General Public License v3.0
414 stars 113 forks source link

AVR Build Documentation #72

Closed tomberek closed 6 years ago

tomberek commented 6 years ago

Documentation of building for AVR needs improvement or infrastructure ported from other targets.

larsbrinkhoff commented 6 years ago

Hello,

lbForth does not yet target the AVR, but a cross compiler is nearly complete. Is that what you are referring to?

Time permitting, I will do the finishing touches in http://github.com/larsbrinkhoff/xForth, and work them into mainline lbForth.

tomberek commented 6 years ago

Let me know if there are specific tasks that I can help with, or testing.

larsbrinkhoff commented 6 years ago

Thank you, it would be good to have a beta tester.

larsbrinkhoff commented 6 years ago

See larsbrinkhoff/xForth#23 and larsbrinkhoff/xForth#42.

larsbrinkhoff commented 6 years ago

There's now a brief manual:
https://github.com/larsbrinkhoff/xForth/blob/master/doc/manual.md

It certainly needs more work, but it's a start. I'm closing this, but feel free to open a new issue if there's something in particular you think is missing.

tomberek commented 6 years ago

I was able to figure some of that out. I could not figure out porting instructions.

To port to a new chip: 1) implement these words... 2) place then here and link them like this. 3) modify memory layout like this... 4) etc.

larsbrinkhoff commented 6 years ago

Right, it's a user manual and doesn't delve into the internals. But I encourage users to make changes, so I should add a chapter about that.

Are you looking to make a port to a new device?

tomberek commented 6 years ago

Yes, I'd like to help with the AVR port, but am not quite sure where to start and initial steps. If you can lay out a few of the steps or needed tasks I can work my way through it.

larsbrinkhoff commented 6 years ago

The cross compiler AVR port is finished. You can view the code here: https://github.com/larsbrinkhoff/xForth/tree/master/target/avr

As for lbForth, it's not suitable for running in a small microcontroller. It depends on there being a host OS providing a file system.

larsbrinkhoff commented 6 years ago

@tomberek If you like, you can check https://github.com/larsbrinkhoff/xForth and see if you can build it, compile some code, and run in an AVR target. There's a blinky sample in "test/trinket.fth".