Hi all, I'm just starting on the development on the arm7 processor (SAMSUNG S3C44BOX). I want to use linux as my devel platform (my laptop has ubuntu installed on it). I've few questions: 1) is the arm project manager (APM) available for linux (I googled for it but coudnt find any useful info, I think its not available 2) I've installed the arm toolchain (arm-elf-gcc and others version 2.95.3), my question is can we only use this toolchain to develop applications. I heard that in the APM we can use, for example, for GPP port D rPCOND, can we use the same variables as in the APM. Please let me know where I should start. There is no OS installed on the arm board. I would like to write some programs in C (on my laptop, compile it ) and then download them onto the board. Thanks.
I am currently developing on Ubuntu for ARM7 (LPC2124) core and i am certainly finding it easier than under Windows. 1. Have never used it, but doubt it. I have been mainly using gedit text editor for source file. I build using terminal using a well laid out and commented makefile. I have found this setup prevents confusion with no unknown/hidden build options or files. As far as IDEs go I have tried to use Eclipse several time for C or ARM development but it is just too clunky, slow and inflexible imho. Recently i found a new IDE called Codelite, that i am currently testing, it has a few rough edges but has a promising outlook and is really flexible and quick. 2. Have you really installed arm-elf-gcc v2.95.3? I have read many times that gcc versions of at least v4 are recommended. My toolchain consists of arm-elf-gcc 4.3.4. I do not know your level of experience but you do not need an OS as such to work on the board, look for some demo apps that flash LEDs etc. There are a lot of RTOSs if that is what you mean and one i would recommend and currently implementing is ChibiOS/RT. A caveat though, get the basics of ARM7 sorted before attempting any RTOS.
Cas, Thanks for your reply. I have installed the arm 4.3.3 earlier (using the build details here- http://www.gnuarm.com/). I was having some trouble to compile the uClinux kernel(2.4 I obtained along with the distribution cd (SAMSUNG S3C44BOX). Also I'm required to write device drivers (for a course at school), so I had to compile the kernel. It was giving me error "arm/clone.S:34:Error: undefined symbol 'EINVAL' in operation". So I had to use the arm v2.95.3 tool chain which has been tested. Can you please tell me if arm v4.3.3 can be used to compile uClinux 2.4. Thanks.
Sorry I forgot to ask this in the previous post... Can you please point me to some sample codes where we use the registers in the arm processor (like the GPP control reg's ), or suggest some books which help us understand the intricacies of the arm processor. Thanks.
I have no experience of Samsung ARM7 cores nor using uClinux so the best i can suggest is to search for documents and technical manual for the S3C44B0 processor, manufacturer docs should detail the register addresses and functions. a useful link for porting: http://porting-uclinux.blogspot.com/2009/09/porting-uclinux-to-armulator.html
bhargava wrote: > It was giving me error "arm/clone.S:34:Error: > undefined symbol 'EINVAL' in operation". So I had to use the arm v2.95.3 > tool chain which has been tested. That was probably a large backward step for what is no doubt a very simple problem. You should apply the same debugging approach that you would if an error appeared in your own code. This is not a toolchain error. On the face of it line 34 of the assembler file clone.S references a symbol EINVAL without a definition. The obvious solution is to provide the definition! EINVAL is an errno.h macro for "invalid argument". By convention the GNU toolchain treats a file with externsion .S (capital S) as an assembler file that is first passed through the C pro-processor. This means that to resolve this problem, you should simply #include <errno.h>. It may work with 2.95 because of some other header indirectly including errno.h, which 4.x does not.
Clifford, Thanks for the suggestion. I did not pay attention to the error earlier. I tried to recompile the uClinux (2.4) again using the 4.3.3 tool chain. Now, I used the <linux/errno.h> header in the clone.S file, and I passed through that stage with no errors I had to edit quite a few file for such kind of errors. I'm now struck at this point where it shows me the following error:
1 | C
|
2 | make[1]: Entering directory `/home/bhargava/Desktop/uClinux-dist/linux-2.4.x' |
3 | unset GCC_EXEC_PREFIX; gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o scripts/split-include scripts/split-include.c |
4 | scripts/split-include.c: In function ‘main’: |
5 | scripts/split-include.c:133: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result |
6 | scripts/split-include include/linux/autoconf.h include/config |
7 | arm-elf-gcc -D__KERNEL__ -I/home/bhargava/Desktop/uClinux-dist/linux-2.4.x/include -gstabs+ -Wall -Wstrict-prototypes -Wno-trigraphs -O1 -g -fno-strict-aliasing -fno-common -pipe -fno-builtin -D__linux__ -DNO_MM -mapcs-32 -mtune=arm7tdmi -mshort-load-bytes -msoft-float -gstabs+ -O2 -c -o init/main.o init/main.c |
8 | cc1: error: unrecognized command line option "-mapcs-32" |
9 | cc1: error: unrecognized command line option "-mshort-load-bytes" |
10 | make[1]: *** [init/main.o] Error 1 |
11 | make[1]: Leaving directory `/home/bhargava/Desktop/uClinux-dist/linux-2.4.x' |
12 | make: *** [linux] Error 1 |
I googled for answers but with little luck. I think -mapcs-32 and -mshort-load-bytes command line options are obsolete now.This is the first major piece of software that I'm building (make). So I've no clue how the options have to be configured. Is there any way to remove these options and proceed through the make process. Thanks.
Bhargava Yammanuru wrote: > cc1: error: unrecognized command line option "-mapcs-32" > cc1: error: unrecognized command line option "-mshort-load-bytes" You should check the manuals for the two different versions you used to see what these options did, and if they are supported in the new version. Manuals for all versions of GCC since 2.95 are at http://gcc.gnu.org/onlinedocs/ -mapcs-32 forces use of a 32bit program counter. Old obsolete (i.e. no longer manufactured) ARM parts has a 26 bit program counter. GCC nolonger supports these obsolete parts, so a 32bit program counter is always used. You can safely remove this option. Similarly -mshort-load-bytes is obsolete. I believe also that it is only relevant to older ARM architectures. Of course there is never anything to prevent you from simply removing options that the compiler rejects and trying it. It won't explode!
Clifford Slocombe wrote: > Manuals for all versions of GCC since 2.95 are at > http://gcc.gnu.org/onlinedocs/ Thanks, Clifford. > Of course there is never anything to prevent you from simply removing > options that the compiler rejects and trying it. It won't explode! Of course it won't explode, but how do I remove these options. Which file (or what are the most probable files) has to be edited to remove these command line options.
1 | |
2 | make[1]: Entering directory `/home/bhargava/Desktop/uClinux-dist/linux-2.4.x' |
3 | |
4 | arm-elf-gcc -D__KERNEL__ -I/home/bhargava/Desktop/uClinux-dist/linux-\ 2.4.x/include -gstabs+ -Wall -Wstrict-prototypes -Wno-trigraphs \ |
5 | -O1 -g -fno-strict-aliasing -fno-common -pipe -fno-builtin -D__linux__ \ |
6 | -DNO_MM -mapcs-32 -mtune=arm7tdmi -mshort-load-bytes \ |
7 | -msoft-float -gstabs+ -O2 -c -o init/main.o init/main.c |
I tried greping in the uClinux-dist/linux-2.4.x directory, but I did not find any references (yet), but because of deadlines at school I had to stop greping process. If you can tell me the files to look for, it will be immense help to me. Thanks.
> If you can tell me the files to look for, it will be immense help to me. > Thanks. Normally gcc options are defined within the makefile but uClinux may be different. I was just re-reading your posts and I have to ask, does your school project require you use uClinux? It seems, from my perspective, a very complicated project to begin embedded development with. The reason I mention this, is that I am working on a project dealing with small RTOS's and they are complex on an ARM processor. I have spent a lot of time learning, with non-OS code, about the ARM7 architecture, much more than actually implementing any RTOS theory. Clifford do you have any thoughts on this?
Calum Lind wrote: > Normally gcc options are defined within the makefile but uClinux may be > different. Thanks, Calum (cas). I'll look at the Makefile and post updates here. > I was just re-reading your posts and I have to ask, does your school > project require you use uClinux? yes, we need to write few drivers and other things, a huge list to things to do :( Thanks.
Cas, Do you use minicom to transfer executables to your arm board. I was able to transfer the kernel image to the board using the Ethernet. As suggested by you I want to learn working on the ARM board without the ROTS whenever I've time. So I started with the ubiquitous hello world. I'm having trouble to transfer the hello world executable to the arm board using minicom. The problem is all the people (who are working on the ARM7 board) I know are working on windows (use hyper-terminal, APM). So I've to rely on forums like these. So I'm sorry if these questions seem naive. I set minicom and then used loadb
1 | loadb 0x0c008000 |
Then the following is displayed
1 | ## Ready for binary (kermit) download ...
|
then I used ctrl+A S and selected kermit and then selected the file to be transferred, nothing happens after that. It just shows the above message. What am I doing wrong? Any ideas ???
Im afraid this is not the same development route as myself, as it suggests uboot is installed, so I am not much help. However minicom should work fine as a Hyperterminal replacement so the issue might be the kernel you loaded. The basics I talked about are bare-metal development where I use startup code, linker script, source code all compiled into a binary which I flash to my target using JTAG or Serial(ISP). Simplest guide I could find is here: http://balau82.wordpress.com/2010/02/14/simplest-bare-metal-program-for-arm/
While looking for something else i came across this page that could be of some help to you: http://blog.stranadurakov.com/2009/08/04/how-to-arm-linux/
Thanks for the link Cas, I was able to complete till this part I was having question about transferring the binary onto the board and making the arm cpu execute the code.
Hi: I am new to this post. I am interested also in programming a s3c44box chip of samsung (contains an arm7tdmi) from a linux host. I have an Olimex ARM-USB-TINY connector which I plan to connect to my development board, which is a S3CEV40 (supplied by embest). My question is, can you help me in setting up a gdb/openocd to programm and debug code on chip? Can you point me out on a starting point for it? Thanks in advance. Christian
Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
Log in with Google account
No account? Register here.