MK3EBCODE

From EvTechWiki

Jump to: navigation, search

Back to: MK3EB MK3EBNetworking PSUEDO

Contents

Actual code

This section of the wiki is where the rubber begins to hit the road, developmentally speaking. Up until now I've been designing a hypothetical network protocol for some mostly hypothetical hardware. Now, it's real nuts & volts with real hardware. We'll see how well the theoretical holds up. (The rest of you can follow along just by watching the changes page ;-))

Writing in C for a microcontroller is not without its own set of challanges - see MK3EBCChallenges for details.


Step 1: Unix

For the moment, we're sticking to the assumption that with the exception of the bootloader, the project will be written in C. None of the research I've done to date indicates that this is not possible. I may inline some functions in assembly if neccesary.

However, this opens up a interesting option: Some of the hardest to debug functions don't need to be debugged on the micro at all! So, I'm going to build the core packet assembly functionality in C on the unix server that this wiki runs on. One advantage of this is that you at home can follow along if you like here. There's also a wiki page that will probably be out of date most of the time that explains what these files are: MK3EBCodeFiles

Simulation thoughts

Step 2: Perl

The Perl library to interface with the EVILbus is also in the process of being written. It has a plugin capable of talking to the simulated packet traffic in files. You can watch it develop at perl-api although most of it is being written in other places right now. See MK3EBPerlAPI for something resembling documentation.

Step 3: C for regs

Much of the code written in Step 1 is designed to be ported almost directly to the regs themselves. All of the packet code, hamming code, CRCs, etc, is designed to be as portable as possible. Once this is all written, I will compile it up and see how big the minimum case is, and then I will know if I need to write the bootloader in assembly or if it can also be written in C. (see MK3EBCChallenges)

No one else is likely to be that interested in the scratchpad.

Subversion

All the mk3eb code is now kept in my subversion server. The branch of note is http://qm.sheer.us/svn/ev/mk3eb. It is anonymous-read, but a account is required to update. In the extremely unlikely event that you'd like to join in the process of building the code, please email Sheer and I will create a subversion account for you.

Personal tools