ARM S3C4510B 8 ARM ADS ARM ADS(ARM Developer Suite) CodeWarrior IDE ADS AXD ADS ADS AXD 8.1 ADS ARM ADS ARM Developer Suite ARM ARM ADS 1.2 ADS1.1 ADS1.0 Windows NT4 Windows 2000 Windows 98 Windows 95 Windows XP Windows Me ADS ARM GUI (Code AXD) Warrior ARM RISC ADS 8.1.1 ADS armcc armcc ARM C Plum Hall C Validation Suite ANSI C armcc ANSI C 32 ARM armcc armcc help armcc armcc armcc [options] file1 file2... filen option fiel1,file2 filen -c -C ( C) -D<symbol> symbol 1 -E C
ARM S3C4510B -g<options> -I<directory> directory #include -J<directory> directory #include -o<file> -O0 -O1 O -O1 -O2 -S -U<symbol> -W<options> ADS armcpp armcpp ARM C++ ISO EC++ 32 ARM tcc tcc Thumb C Plum Hall C Validation Suite ANSI tcc ANSI C 16 Thumb tcpp tcpp Thumb C++ ISO C++ EC++ 16 Thumb armasm armasm ARM Thumb. ARM Thumb armlink armlink ARM ARM ELF armsd armsd ARM Thumb C 8.1.1.1 armcc 4 ARM C C++ compiler [PCS-options] [source-language] [search-paths] [preprocessor-options] [output-format] [target-options] [debug-options] [code-generation-options] [warning-options] [additional-checks] [error-options] [source] ARM C C++ compiler armcc tcc armcpp tcpp PCS-options source-language C ANSI C C++ ISO C++ search-paths ( )
ARM S3C4510B preprocessor-options output-format target-options ARM debug-options code-generation-options warning-options additional-checks error-options source C C++.s ) -via filename filename filename -via finlename2 input.txt armcpp armcpp -via input.txt source.c ( ADS 8.1.1.2 armlink armlink (image) ELF(Executable and linking format) (Section) RO Read-only RW Read-write. ZI Zero-initialized (input section) 0 (output section) RO RW ZI (Regions) 1 3 Read Only Position Independent(ROPI) Read Write Position Independent(RWPI) ( )
ARM S3C4510B armlink armlink [-help] [-vsn] [-partial] [-output file] [-elf] [-reloc][-ro-base address] [-ropi] [-rw-base address] [-rwpi] [-split] [-scatter file][-debug -nodebug][-remove?ro/rw/zi/dbg] -noremove] [-entry location ] [-keep section-id] [-first section-id] [-last section-id] [-libpath pathlist] [-scanlib -noscanlib] [-locals -nolocals] [-callgraph] [-info topics] [-map] [-symbols] [-symdefs file] [-edit file] [-xref] [-xreffrom object(section)] [-xrefto object(section)] [-errors file] [-list file] [-verbose] [-unmangled -mangled] [-match crossmangled][-via file] [-strict] [-unresolved symbol][-mi -LI -BI] [input-file-list] -help -vsn armlink -partial -output file armlink -elf ELF armlink -reloc -reloc -rw-base -split -ro-base address RO(Read-Only ) address RO 0x8000 -ropi RO armlink armlink ARM armlink
ARM S3C4510B ROPI armlink ROPI -rw-base address RW(Read/Write ) -split RW address -rwpi RW ZI(Zero Initialization 0) -rw-base 0 -rw-base 0 / armlink / sb RO RW RWPI armlink RWPI -split RO RW 2 RO 0x8000-ro-base RO -rw-base -rw-base -rw-base 0 -scatter file file user_initial_stackheap() -debug -nodebug armlink armlink fromelf -nodebug fromelf fromelf -remove (RO/RW/ZI/DBG)
ARM S3C4510B ENTRY RO RO RW RW ZI ZI DBG DEBUG / ADS -remove (RO/RW/ZI/DBG) -remove -remove(ro/rw/zi/dbg) -noremove -entry location ARM PC ( location 1. -entry 0x0 2. -entry int_handler int_handler armlink offset+object(section) -entry 8+startup(startupseg) 0 object(section) object -keep section-id section-id 1 symbol symbol symbol symbol -keep int_handler
ARM S3C4510B int_handler _handler -keep *_handler 2 object(section) section vectors.o vect -keep vectors.o(vect) vectors.o vec -keep vectors.o(vec*) 3 object dsp -keep dsp*.o -first section-id section-id: 1 symbol symbol symbol 2 object(section) -first init.o(init) 3 object -first init.o -first RO RW ZI RO RW ZI RO RW ZI -last section-id RW section-id 1. symbol symbol symbol -last checksum 2. object(section) section
ARM S3C4510B -last checksum.o(check) 3. object -first ; -last RO RW ZI ZI RW RW ZI RO -libpath pathlist ARM C C++ ARMLIB pathlist path1, path2,... pathn ARM ARM ARMLIB -scanlib ( ARM C C++ ) -noscanlib -locals -nolocals -callgraph HTML 1. (ARM Thumb ) 2. func 3. func 4. func 1. interworking veneers 2. 3. ( weak ) 1. 2. -info topics topics
ARM S3C4510B 1. sizes RO RW ZI Debug ) 2. totals ( RO RW ZI Debug ) 3. veneers armlink veneers 4. unused -remove -info sizes,totals -info sizes, totals( ) -map -symbols -symdefs file file symdefs file -edit file steering steering -xref -xreffrom object(section) -xrefto object(section) -errors file file -list file -info -map -symbols -xref -xreffrom xrefto file
ARM S3C4510B file -verbose -unmangled xref -xreffrom -xrefto -symbols unmangled C++ unmangle C++ -mangled -xref -xreffrom -xrefto -symbols mangled C++ unmangle -via file file armlink -via via -strict -unresolved symbol symbol Symbol symbol input-file-list symdef symbol 1. 2. armlink 1. 2. armlink main.o mylib(stdio.o) mylib(a*.o). mylib a stdio.o 3. 8.1.2 ARM ARM C/C++ 8.1.2.1 ADS C C++
ARM S3C4510B ANSI C C 1 ISO C 2 semihosted (semihosting ARM / ) C 3 C C++ ARM C C++ C++ C++ ISO C++ C++ C C++ 1 2.01.01 Rogue Wave Standard C++ 2 C++ 3 Rogue Wave C++ ANSI C ARM semihosted Semihosting (Software Interrupt) semihosting SWI SWI Semihosted ARMulator Angel Multi-ICE ADS ARM ARMulator C C C (big endian: ) (little endian: FPA VFP (PID) C C++ C C++ ANSI C 8.1.2.2 ADS lib ADS e:\arm\adsv1_2 e:\arm\adsv1_2\lib armlib cpplib ARM armlib
ARM S3C4510B ARM C e:\arm\adsv1_2\include cpplib Rogue Wave C++ C++Rogue Wave C++ C++ ARM C++ e:\arm\adsv1_2\include ARMLIB ARM C ARM C++ -libpath ) directory(directory armlib cpplib 1. ARM C 2. ARM 3. ANSI C 4. Rogue Wave Standard C++ Rogue Wave Software Inc. ARM 8.1.3 GUI (Code AXD) Warrior 8.1.3.1 CodeWarrior CodeWarrior for ARM ARM RISC,. ARM RISC, ARM, CodeWarrior,, CodeWarrior (IDE) ADS CodeWarrior IDE ARM Thumb C C++ ARM CodeWarrior IDE 1. 2. CodeWarrior IDE ARM 8.1.1 CodeWarrior IDE target (Target system) ARM ARM (Build target) (
ARM S3C4510B ) CodeWarrior IDE ARM7TDMI CodeWarrior IDE CodeWarrior IDE ADS CodeWarrior IDE Metrowerks CodeWarrior IDE 4.2 ADS ARM CodeWarrior IDE ARM 8.1.1 8.1.4 ARM ARM Thumb ARM CodeWarrior IDE ARM CodeWarrior IDE ARM (AXD) CodeWarrior IDE CodeWarrior IDE CodeWarrior IDE CodeWarrior IDE For ARM CodeWarrior IDE For ARM 1. View Processes Expressions Global Variable Breakpoints Registers 2. Project Precompile ARM 3. Debug 4. Browser New Property New Method New Event Set 5. Help menu ADS CodeWarrior Help Index Search Online Manuals CodeWarrior IDE 8.1.3.2 ADS debug agent
ARM S3C4510B ADS 3 AXD(ARM extended Debugger) ARM armsd(arm Symbolic Debugger) ARM Windows Unix ARM ADW/ADU(Application Debugger Windows/Unix) Debug target PC PCB 1. 2. 3. 4. Debug agent Debug agent Debug agent ARM Multi-ICE(Multi-processor in-circuit emulator) ARMulator Angel Multi-ICE ARM JTAG ADS AXD Windows UNIX C C++ Windows UNIX AXD 8.1.4 ADS fromelf ARM ELF plain binary(bin ), Motorola 32-bit S-record format(motorola 32 S ), Intel Hex 32 format(intel ) 32 Verilog-like hex format(verilog 16 ) FromELF armar ARM ELF ELF Flash downloader ARM Flash
ARM S3C4510B 8.1.5 ADS ARM ARMulator ARM ARM AXD ARM ARM Thumb 8.2 ADS CodeWarrior Flash.bin 8.2.1 CodeWarrior New File New 8.1 8.1 7 ARM Executabl Image ARM ELF ARM Object Library ARM armar Empty Project Makefile Importer Wizard Visual C nmake GNU make CodeWarrior IDE
ARM S3C4510B Thumb ARM Executable Image ARM Thumb ELF Thumb Executable image Thumb ELF Thumb Object Library Thumb armar ARM Executable Image Project name: ledcircle Location: Set ledcircle ledcircle.mcp 8.2 files,link order,target files Add Files 8.2 File New 8.1 File File name Init.s ************************************************************** Chinese Academy of Sciences, Institute of Automation File Name Description Author Date Init.s JuGuang.Li ************************************************************** IMPORT AREA ENTRY Main Init CODE READONLY LDR R0, =0x3FF0000 LDR R1, =0xE7FFFF80 ; SYSCFG, 4K Cache,4K SRAM STR R1, [R0] LDR SP, =0x3FE1000 BL Main ;SP 4K SRAM
ARM S3C4510B B. END IMPORT Main AREA Init ENTRY SYSCFG S3C4510B 8K SRAM 4K Cache 4K SRAM 4K SRAM 0x3FE,0000 (0x3FE,1000-1) S3C4510B SP 0x3FE,1000 Main Init.s main.c C //***************************************************************** //Chinese Academy of Sciences, Institute of Automation //File Name //Description //Author //Date main.c JuGuang.Li //*************************************************************** #define IOPMOD (*(volatile unsigned *)0x03FF5000) //IO port mode register #define IOPDATA (*(volatile unsigned *)0x03FF5008) //IO port data register void Delay(unsigned int); int Main() { } unsigned long LED; IOPMOD=0xFFFFFFFF; IOPDATA=0x01; for(;;){ LED=IOPDATA; LED=(LED<<1); IOPDATA=LED; Delay(10); if(!(iopdata&0x0f)) } return(0); IOPDATA=0x01; void Delay(unsigned int x) { unsigned int i,j,k; for(i=0;i<=x;i++) } for(j=0;j<0xff;j++) for(k=0;k<0xff;k++); // IO I/O I/O 0x1 I/O P0~P3 LED ( if I/O 4 1 1 0xFF I/O 0
ARM S3C4510B 1 I/O ) target DebugRel target Realse Debug target DebugRel Debug Release DebugRel 8.2 Project Add Files 8.3 DebugRel 8.3 8.2.2 Edit DebugRel Settings ( ) 8.2 1. target Target Name Linker ARM Linker armlink
ARM S3C4510B 8.4 DebugRel None ARM Librarian ARM ARM Linker Pre-linker CodeWarrior IDE Post-Linker Flash ARM fromelf FromELF ELF 2. Language Settings ARM 8.1 armasm ARM ARM7TDMI S3C4510B ARM C armcc 8.5 8.1 CodeWarrior DOS 3. Linker ARM Linker 8.6 Output Linktype Partial Simple ELF Scattered scatter ELF
ARM S3C4510B 8.5 8.6 Simple Simple Simple image RO Base RO 0x8000 SDRAM SDRAM RW Base RW ZI split RW Base RW ZI Ropi RO
ARM S3C4510B armlink Rwpi RW ZI / Region$$Table ZISection$$Table sb RW Base 0 Split Image RO RW 2 RO RW RW Base RW Base -RW Base 0 Relocatable Options Image entry point -entry 0x0 -entry int_handler armlink offset+object(section) -entry 8+startup(startupseg) ELF main Image dose not have an entry point(not specified or not set due to multiple choice) ARM Linker Linker ARM fromelf 8.7 fromelf 8.1 ELF ROM Target Post-linker Output format Plain binary Flash Output file name Choose... make CodeWarrior IDE fromelf
ARM S3C4510B make 8.7 ARM fromelf CodeWarrior IDE Project make 8.8 8.8 ledcircle _data ledcircle_data DebugRe DebugRel make S3C4510B Flash 8.2.3 ADS
ARM S3C4510B CodeWarrior IDE CodeWarrior IDE ADS ADS ( UltraEdit) 8.2.1 Init.s main.c 7 makefile makefile makefile ( makefile ads_mk.mk) PAT = e:/arm/adsv1_2/bin CC LD = $(PAT)/armcc = $(PAT)/armlink OBJTOOL = $(PAT)/fromelf RM = $(PAT)/rm -f AS = $(PAT)/armasm -keep -g ASFILE = e:/arm_xyexp/init.s CFLAGS = -g -O1 -Wa -DNO_UNDERSCORES=1 MODEL = main SRC = $(MODEL).c OBJS = $(MODEL).o all: $(MODEL).axf $(MODEL).bin clean %.axf:$(objs) Init.o @echo "### Linking..." $(LD) $(OBJS) Init.o -ro-base 0x8000 -entry Main -first Init.o -o $@ -libpath e:/arm/adsv1_2/lib %.bin: %.axf $(OBJTOOL) -c -bin -output $@ $< $(OBJTOOL) -c -s -o $(<:.axf=.lst) $< %.o:%.c @echo "### Compiling $<" $(CC) $(CFLAGS) -c $< -o $@ clean: $(RM) Init.o $(OBJS) ADS make 7 make ADS bin ADS e:\arm\adsv1_2 make e:\arm\adsv1_2\bin command console 8.9
ARM S3C4510B 8.9 command console e:\arm_xyexp\ledcircle main.axf main.bin CodeWarrior IDE.axf AXD 8.3 AXD AXD(ARM extended Debugger) ADS CodeWarrior IDE AXD ARMulator ARMulator AXD AXD AXD 8.2 ledcircle.axf main.axf ELF 1. AXD File Load image Load Image.axf 8.10
ARM S3C4510B 8.10 axd Execute Go Execute Step F10 Execute Toggle Breakpoint F9 AXD AXD 2. IOPMOD IOPDATA Processor Views Memory 8.11 8.11 Memory Start address 64 I/O I/O 32 0x3ff5000 I/O 8.11 0xE7FF0010 I/O 0x3FF5008 8.11 IODATA 0x E7FF0010
ARM S3C4510B for 8.12 8.12 0x3FF5000 I/O 0xFFFFFFFF 0x3FF5008 I/O 0x00000001 3. for Delay(10); F9 F5 Delay Execute Step In F8 8.13 4. Delay i Processor Views Watch, 8.14 watch i Add to watch 8.14 i watch Tab1 i 8.13
ARM S3C4510B 8.14 8.15 watch Format 8.15 Delay Execute Run to Cursor Delay 8.4 ADS ADS 2 armcc armlink CodeWarrior IDE CodeWarrior IDE
ARM S3C4510B 7 make ADS makefile ADS AXD