But does it work?

MyUSB Library, Projects, University Add comments

I’m now into the second of my five last days at University this year. Amazing - it’s been a whole year already! I really feel like I’ve only just started at this place, so it’s scary to know I’m one fifth the way to a career as an EE and CS engineer.

Both my Java and Systems (that’s C/C++) assignments have been handed in, the latter of which is due for an execution test this afternoon to validate that it does in fact do what it is supposed to do. I’ve personally no idea - the whole assignment’s been a real disaster from the start (with the lecturer posting the solutions instead of the template) and no one I’ve talked to has figured out what values to input into the given program formulas to test the output. I’ll be passing the assignment however, as the code’s good and all the tasks are done, even if the exact implementation may be a little wonky.

I’m actually rather enjoying playing the role of a teaching assistant. I’ve found no issues this year in the programming side of the course, and I’ve picked up both Java and C++ very quickly. Having people I’ve never met come up and ask me a question, and then being able to answer the question thoroughly and with the use of diagrams on a whiteboard and marker gives quite a bit of personal satisfaction. I’ve struggled with the Physics and Maths side of things this year, which is an area outside my experience, so being regareded as the come-to guy for something is a nice change. Eventually I expect to get an actual TA job at my Uni in my third or fourth years, helping out the first years in the programming labs.

Next week SWATVAC starts, which is the study break before exams. I’ve got a lot of things to study! When it’s all over I’ll be finishing off MyUSB, as I thoroughly miss working with AVRs.

Speaking of MyUSB, from the recent discussions on AVRFreaks about discarding unused functions at the linking stage, I think I might have a way of re-implementing the USB event hook system to a similar way that the ISR system works in GCC. By using the weak attribute I can create overrideable functions, something I’ve experimented with before. However I’ve had the problem of the overridden library functions still making their way into the resulting binary, even if they’re unused. But by using a few strategic GCC command line arguments I might be able to force the linker to discard the unused functions, eliminating the code cost.

Such an implementation would require the extra command line arguments to be documented, as the rest of the implementation is now in the wiki. The implementation would be along the lines of the following:

MYUSB_EVENT(USB_Connected)
{
// Event code here
}

Rather than the existing method of changing the hook #define lines in the config directory. I think this is a better idea - anyone else care to comment?

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in