Re "Data access misaligned address violation". Yes I have seen a lot of those in my past Blackfin work. Unlike the x86, the Blackfin needs shorts to be stored on even addresses and ints to addresses that are a multiple of 4. This problem often occurs when reading or writing shorts or ints using a ptr to an array of char, like:
char array[]; *(short*)(array + 1) = 0x1000 - David On Mon, 2012-12-17 at 10:02 -0700, Steve Strobel wrote: > On Fri, Dec 14, 2012 at 11:42 PM, Bruce Perens <[email protected]> > wrote: > > I suspect it would be easier to write a fixed-point > implementation for a generalized > microprocessor than a floating-point one for a DSP chip other > than Blackfin. > > > Do you mean to suggest that writing a specialized port for the > Blackfin would be easier than for some other DSPs? Why would that > be? > > > > That question is especially relevant to me, as I just started last > Friday trying to get Codec2 to run on Blackfin with the goal of > evaluating how much work it would be to get it to run real-time > (hopefully duplex, two or more channels would be even better). The > Blackfin doesn't have hardware floating point support and I expect > that the stock floating point emulation will be too slow, so I will be > looking for ways to speed it up. I have been collecting ideas from > this list and elsewhere, hoping to find a combination of them that > will be fast enough for now. Of course, a fixed-point port will be a > huge improvement long-term, but I have neither the skill nor the > funding to tackle that big of a job right now. > > > Steve > > > > > P.S. Getting codec2 to run on my Linux dev box was as simple as could > be. I was also able to cross-compile it for Blackfin, but the process > was a bit messy, as it first complained of an undefined reference to > _rpl_malloc, then had trouble with generate_codebook because it was a > Blackfin rather than x86 executable. I worked around those issues > like this: > > > export ac_cv_func_malloc_0_nonnull=yes > ./configure --host=bfin-uclinux --build=i686-linux > LDFLAGS='-Wl,-elf2flt' CFLAGS=-O2 > make # will fail on generate_codebook > cp ../codec2-dev-x86/src/generate_codebook ./src > make # uses incremental build to continue where left > off > > > Ideally ./configure would deal with both of those issues, but I get > lost pretty fast when dealing with the auto-tools, so will keep using > the workarounds for now. > > > c2enc now runs on Blackfin with no command-line args (printing the > usage info) and crashes with "Data access misaligned address > violation" when fed a file like this "./c2enc 1400 hts1a.raw > hts1a_1400.c2". I don't yet know whether I am overrunning the stack > or if there is another problem; I will be working on that today. Any > suggestions about how to troubleshoot it would be great. > > > > -- > Steve Strobel > Link Communications, Inc. > 1035 Cerise Rd > Billings, MT 59101-7378 > (406) 245-5002 ext 102 > (406) 245-4889 (fax) > WWW: http://www.link-comm.com > MailTo:[email protected] > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ Freetel-codec2 mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/freetel-codec2 ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Freetel-codec2 mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freetel-codec2
