Project

General

Profile

HelloWorldDSP.out syntax error

Added by Marc Lichtman over 13 years ago

Hi,

I'm to the very last step of the DSP Hello World guide, but when I run ./HelloWorldDSP.out on the board, it gives me the error

./HelloWorldDSP.out: line 2: syntax error: "|" unexpected

I followed the guide for setting up CCS, so I'm not sure what could be wrong.

-Marc


Replies (10)

RE: HelloWorldDSP.out syntax error - Added by Michael Williamson over 13 years ago

Hi Marc,

The HelloWorldDSP.out is a DSP executable. It must be loaded by an ARM executable that uses the DSPLINK interface. The wiki instructions call for:

root@mityomap# ./HelloWorldDSP HelloWorldDSP.out

This runs the ARM executable, passing it the DSP executable that it should load and run. Is this what you did?

RE: HelloWorldDSP.out syntax error - Added by Marc Lichtman over 13 years ago

Oh ok, that clears up my confusion on how the DSP actually gets loaded with the executable. I dident realize HelloWorldDSP was an ARM executable, because I was stuck in the linux section of the guide where it asks you to

•Build DSPLink for the ARM
◦Change directory to $DSPLINK
◦Execute the command:mitydspl138@vm$ ./build_arm.bash

But when I do that I get the error:

make PROFILE=DEBUG C /home/mitydsp/DaVinci-PSP-SDK-03.20.00.01/src/kernel/linux-03.20.00.01 SUBDIRS=/home/mitydsp/Downloads/dsplink_linux_1_64/dsplink/gpp/src ARCH=arm CROSS_COMPILE=/home/mitydsp/toolchains/git/arm-2008q3/bin/arm-none-linux-gnueabi modules
make: * /home/mitydsp/DaVinci-PSP-SDK-03.20.00.01/src/kernel/linux-03.20.00.01: No such file or directory. Stop.
make: *
[debug] Error 2

RE: HelloWorldDSP.out syntax error - Added by Gregory Gluszek over 13 years ago

Hi Marc,

With the latest MDK you should not actually need to rebuild DSPLink (I'm updating the DSP Hello World wiki to reflect this now).

The kernel object for dspplink is located at MDK_2011-03-31/images/modules/dsplinkk.ko and the library to link against is located at MDK_2011-03-31/lib/ARM/Release/dsplink.lib.

However, if you really do want to rebuild DSPLink you will also need to rebuild the kernel. You can find a copy of it at MDK_2011-03-31/sw/ARM/linux/linux-davnci and instruction on rebuilding it at http://support.criticallink.com/redmine/projects/arm9-platforms/wiki/Linux_Kernel

You will then need to modify $DSPLINK/setenv-bash so that export ARM_BASE_BUILDOS=~/projects/linux-davinci point to your built kernel. Rerun the setenv-bash script and then the build_arm.bash script should work fine.

\Greg

RE: HelloWorldDSP.out syntax error - Added by Marc Lichtman over 13 years ago

I would prefer not to rebuild DSPLink. Is there somewhere I can find the HelloWorldDSP executable?

-Marc

RE: HelloWorldDSP.out syntax error - Added by Gregory Gluszek over 13 years ago

Hi Marc,

With the latest MDK there is no need to rebuild DSPLink. I've updated the DSP Hello World wiki page to outline where the libraries are located that you need to link against in order to build the Hello World example for the ARM. I've also attached the built executables in case that helps as well. Copy these two files to the ARM, then run:

root@mityomapl138:~# ./HelloWorld HelloWorldDSP.out

Then, as you build the ARM and DSP sides on your own, you can substitute them in to verify your build setup.

\Greg

HelloWorldDSP.out (427 KB) HelloWorldDSP.out DSP executable (to be passed as an input argument to the ARM programm)
HelloWorld (235 KB) HelloWorld ARM executable.

RE: HelloWorldDSP.out syntax error - Added by Marc Lichtman over 13 years ago

Greg,

Is there anywhere in the wiki that explains how to set up the dsplink driver on the ARM? When I run ./HelloWorld HelloWorldDSP.out it fails to open the driver, which should be located in /dev/dsplink according to the error I get (posted below).

root@mityomapl138:/var/volatile/tmp# ./HelloWorld HelloWorldDSP.out
Loading file HelloWorldDSP.out
dsplink driver open: /dev/dsplink: No such file or directory
Error running PROC_setup : 0x80008008
Starting application.
Msgq <GPPMSGQ1> open: 0x80008002

-Marc

RE: HelloWorldDSP.out syntax error - Added by Gregory Gluszek over 13 years ago

Hi Marc,

Before you run the application, run the command:

root@mityomapl138:~# insmod dsplinkk.ko

\Greg

RE: HelloWorldDSP.out syntax error - Added by Mike Costa about 13 years ago

those binaries were a great sanity check for me. you guys might consider posting them to the quick start page.

Mike

Reflections after building DSP "Hello, world!" - Added by Peter Simpson about 13 years ago

I managed to compile the DSP Hello World...*finally*.

(Using Version: 4.2.4.00033 of CCS on WinXP)

I noticed a few of issues when following the guide at:
http://support.criticallink.com/redmine/projects/arm9-platforms/wiki/DSP_Hello_World

- the option 'Empty DSP/BIOS v5.x Project' under 'Empty Projects' doesn't appear in the dropdown box.
- Which version of the MDK should I be using? It would be very helpful if you could include a link to a download URL for the MDK...it's not easy to find on your site. I ended up copying it out of the Linux virtual machine.
- some of the library search paths are missing: particularly the EDMA3 libraries were hard to find (they're in C:/Program Files/Texas Instruments).
- the function SendMessage() in the sample program appears to require both a pointer to the buffer and a UINT16 length argument

Regards,
Peter

RE: HelloWorldDSP.out syntax error - Added by Michael Williamson about 13 years ago

Hi Peter,

Thank you for your feedback. We'll try to update the Hello World page and address your comments. The challenge of course is that many tools (e.g., CCS from TI and eclipse in general) continue to migrate and change and we may not always realize that the web page has become dated.

The MDK can be downloaded off the files tab of this project webpage, and is documented a bit on the Board_Support_Package wiki page. In the recent version of the MDK, the UINT16 length argument was removed from the API. It's not clear if the files on the wiki page have been updated for that. Recent copies of the MDK should include the example programs for this application and others in the extracted tree.

-Mike

    (1-10/10)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)