ts-7000
[Top] [All Lists]

Re: [ts-7000] Re: pointer weirdness

To:
Subject: Re: [ts-7000] Re: pointer weirdness
From: David Hawkins <>
Date: Wed, 12 Sep 2007 18:39:37 -0700
Hi Yan,

> Ooooh boy.
> 
> That's what started this whole mess.  The particular monster I am
> fighting started with the keypad driver.  Then various chunks got
> grafted in from other programs, with pointers, PEEK/POKE, and other
> sundry stuff, all with different programming styles and methods.  Now
> it's a nearly unmaintainable 1,000 lines of code.
> 
> It all worked, though - mostly.
> 
> So I decided to "clean up the code" at which point the whole house of
> cards came down and the driver quit working.

I hate that when that happens ... its happened to us all.

Now I tend to keep two code sets;
1) Low-level tests that test specific functionality,
    eg. loopback test on a uart, toggle I/O etc.
    These are all written, as much as possible, as single
    file programs.

2) Full function code;
    C/C++ making full use of libraries etc.

Then when stuff breaks, I can start off with a 'small
pile of cards', rather than a big mess of cards ;)

> I'll follow up on the assembler tomorrow.  I'll also read up on
> readb/writeb and friends; I forgot about those.

Yeah, I'm not sure if it'll help in this case.
If TS have found that a specific assembly instruction
is required, then you may want to rename their PEEK
and POKE as fpga_in_le16(), fpga_out_le16(), or 'be' if
the processor is running in big-endian mode (I forget).
At least then the code will look more standard than
with PEEK and POKE scattered through-out.

Cheers,
Dave







 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU