Project

General

Profile

Where are some standard C/C++ functions? toupper, vprintf? for the DSP 5.4

Added by Edwin McKay about 8 years ago

I am porting some C/C++ code from a Diab compiler suite and am having troubles finding the correct includes for these common items. The old code worked and compiled fine. I have found, what I think are the correct files, but some functions are not found. I have tried various combinations of:
#define _STD_USING // needed to define this for tolower, toupper and size_t ?
#define _GLOBAL_USING
#include <cstring>
#include <string.h>
#include <cstdio>
#include <cctype>
#include <stdarg.h>

but toupper, tolower and vprintf are not found/defined.

Anyway I will continue looking.


Replies (4)

RE: Where are some standard C/C++ functions? toupper, vprintf? for the DSP 5.4 - Added by Edwin McKay about 8 years ago

Our group in Cal. are using the Mity board as well. In their code they create some objects for Serial port comms:
xPort->Com = new MityDSP::tcDspFpgaSerial((void *)RS232_SERIAL_BASE,
baud, DBitsCfg, SbitsCfg, PrtyCfg, false);

and

tempDSPSerial = MityDSP::tcDspSerial::GetInstance(MityDSP::tcDspSerial::UART0);

These routines come from the MDK, I was looking for some documentation on these, but can not find anything relevant. I am sure it is there, but there are over 60 pdf files and perhaps 100's of HTML files. Any guidance would be helpful.

RE: Where are some standard C/C++ functions? toupper, vprintf? for the DSP 5.4 - Added by Jonathan Cormier about 8 years ago

These classes can be found here:
MDK_2014-01-13/sw/DSP/lib/core/DspSerial.cpp
MDK_2014-01-13/sw/DSP/lib/core/DspSerial.h
MDK_2014-01-13/sw/DSP/lib/core/DspFpgaSerial.cpp
MDK_2014-01-13/sw/DSP/lib/core/DspFpgaSerial.h

You can use doxygen to generate the documentation. Note I had to comment out the HTML_FOOTER and HTML_STYLESHEET lines in the Doxyfile file.

cd /home/mitydsp/MDK_2014-01-13/sw/DSP/lib/core
mkdir -p /home/mitydsp/MDK_2014-01-13/sw/docs/html/DSP/core
doxygen
gnome-open /home/mitydsp/MDK_2014-01-13/sw/docs/html/DSP/core/index.html

You can then search for tcDspSerial in the search box on the page.

RE: Where are some standard C/C++ functions? toupper, vprintf? for the DSP 5.4 - Added by Edwin McKay about 8 years ago

ok, so nothing else. I had to fiddle with the permissions of the folders, but the doxygen worked.
Thanks.

RE: Where are some standard C/C++ functions? toupper, vprintf? for the DSP 5.4 - Added by Jonathan Cormier about 8 years ago

Not that I'm aware of but I'm not as familiar with this product as others.

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