Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ARM Linux Programming for Beginner

Status
Not open for further replies.

Sobakava

Full Member level 6
Full Member level 6
Joined
Mar 27, 2002
Messages
350
Helped
8
Reputation
16
Reaction score
8
Trophy points
1,298
Activity points
3,342
arm linux programming

I'm newbie on programming ARM on Linux.

I've a board with AT91RM9200, it boots from ethernet
with ftptp.exe at PC side... There are bin files and ramdisk image at PC...
it loads linux from PC using U-boot then runs arm linux....

I see the actions using Hyperterminal on serial port.
after linux boots, I can use simple Linux commands from command line using HyperTerminal...

Now, I want to develop simple software for it... For instance blinking IO pins or sending some characters from other serial port...

I plan to use ARM- GCC tools... I've Windows on my PC and I can install Linux if needed. I already built Macroigor compatiple in-circuit-debugger also.

Could anyone explain me how to write led-blinking code to this system?

As I understand, after I compile and link my source code at PC using cross-platform tools, I've copy the executable to ramdisk of ARM board and run it from command line... right?

I wish someone could explain this and give me some very basic ready to compile source code....

Regards
 

arm linux programming

Hi,
I have many experiences with another ARM based network processor board (ADI coyote).
First of all I suggest you to work on uclinux instead of wanting to write a program directly.
There is also some communities for it like **broken link removed**.
**broken link removed**
This linux support your processor and possibly your board.
Then try to write application for that linux. It is simpler.
Then you must compile that linux for your board in following steps:
1. Download uClinux and ARM crossplatform toolchain
2. Untar them and install on a safe place (in Linux)
3. Then in uClinux directory type : make xconfig
4. Configure kernel and uclinux for your need
5. Use make dep and make to produce the OS image
6. Then use hyper terminal to transfer that file to your board flash
7. And Run the board
8. You have a linux now working that you can copy any application to it using FTP

I think that this way is the easiest way.
Please do not hesitate to ask me any questions.

Kasra
 

arm linux board

Hello,

I am using EP9312 processor and i downloaded metrowerks codewarrior studio ISA edition and dont know idea how to start.
can any one tell?

Bakhat
 

write application arm linux fd=open

I wrote the programme for accessing the serial port of EP9312. But when i run the programme the following error comes;

"open_port: unable to open /dev/ttyS1-: no such a device"

i cannot understand why? i also changed the device file to ttyS0 but Problem remain same.
The source code is given below;

#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <termios.h>
//int open_port();
int main()
{ struct termios options;
int i;
int n;
int fd;
//int open_port(void)
// {
fd=open("/dev/ttyS1", O_RDWR | O_NOCTTY | O_NDELAY);
if (fd==-1)
{
perror("open_port: unable to open /dev/ttyS1 - ");
}
else
fcntl(fd, F_SETFL, 0);
//return (fd);
// }
tcgetattr(fd, &options);
cfsetispeed(&options,B19200);
cfsetospeed(&options,B19200);
options.c_cflag |= ( CLOCAL | CREAD);
tcsetattr(fd, TCSANOW, &options);
for (i=0; i<=10; i++)
{
n= write(fd, "ALLAH O AKBER\n", 14);
write(fd, "Hello World\n", 12);
if (n<0)
fputs("write() of 4 bytes failed!\n", stderr);
}
return 0;
}

I complaid this code with ARM cross compiler provided by cirrus logic cross compiler 2.95.3
This Program work well on redhat linux 9.

Waiting for your reply

Bakhat
 

arm programing beginner

Hi Check the following link for serial comm

**broken link removed**
 

programming arm on linux

HI,
Thanks for guidance, Ialready have that information. But the problem is this that the file /dev/ttyS1 cannot be opened and the error is "No such a device". I cannot understand it why, every thing works well on PC but it dont work on EP9312.

BY,

Regards

Bakhat
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top