Hello e2e,
I'm starting a project with the OMAP-L138 LCDK and I'll need to communicate with a peripheral via RS232. I plan to do this from the ARM processor through UART1. I have some existing code that runs on a Linux desktop that I had hoped to use, but haven't had much luck getting it to compile in CCS V6. I had issues with finding the right header files. I'm new to the embedded world, but my thought was that since the ARM will be running Linux, I'd be able to use my existing code without much difficulty. The code is pretty standard serial stuff:
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <termios.h> int main () { struct termios options; unsigned int fd = -1; fd = open("/dev/ttyS1", O_RDWR | O_NOCTTY | O_NDELAY);
// etc, etc... }
My questions are:
(1) Would this be the right approach for getting RS232 communications on the ARM? If so, should I be getting the header files from my mcsdk directory (mcsdk_1_01_00_02)? Or is there another approach I should use
(2) I see that there is a Starterware uart example, but I've also read that the Starterware code is written for running without an OS. Is this correct and does it mean that it's not useful for my purposes?
(3) I looked through the technical reference guide (spruh77a) and in the uart initialization section it refers to me to a "device-specific data manual". What is this referring to and where might I find it?
Thanks so much for any guidance!