**** Build of configuration Debug for project CAN_test **** make all Building file: ../can.c Invoking: ARM Windows GCC C Compiler arm-elf-gcc -O0 -fsigned-char -c -msoft-float -MMD -MP -MF"can.d" -MT"can.d" -mcpu=arm7tdmi-s -mthumb-interwork -g -ggdb -o"can.o" "../can.c" Finished building: ../can.c Building file: ../fio.c Invoking: ARM Windows GCC C Compiler arm-elf-gcc -O0 -fsigned-char -c -msoft-float -MMD -MP -MF"fio.d" -MT"fio.d" -mcpu=arm7tdmi-s -mthumb-interwork -g -ggdb -o"fio.o" "../fio.c" Finished building: ../fio.c Building file: ../irq.c Invoking: ARM Windows GCC C Compiler arm-elf-gcc -O0 -fsigned-char -c -msoft-float -MMD -MP -MF"irq.d" -MT"irq.d" -mcpu=arm7tdmi-s -mthumb-interwork -g -ggdb -o"irq.o" "../irq.c" Finished building: ../irq.c Building file: ../main.c Invoking: ARM Windows GCC C Compiler arm-elf-gcc -O0 -fsigned-char -c -msoft-float -MMD -MP -MF"main.d" -MT"main.d" -mcpu=arm7tdmi-s -mthumb-interwork -g -ggdb -o"main.o" "../main.c" Finished building: ../main.c Building file: ../startup.S Invoking: ARM Windows GCC Assembler arm-elf-as -ahls -mapcs-32 -o"startup.o" "../startup.S" ARM GAS ../startup.S page 1 1 /* ************************************************************************************************ 2 3 crt.s STARTUP ASSEMBLY CODE 4 ----------------------- 5 6 7 Module includes the interrupt vectors and start-up code. 8 9 ************************************************************************************************* 10 11 /* Stack Sizes */ 12 .set UND_STACK_SIZE, 0x00000004 /* stack for "undefined instruction" interrupts is 4 bytes */ 13 .set ABT_STACK_SIZE, 0x00000004 /* stack for "abort" interrupts is 4 bytes */ 14 .set FIQ_STACK_SIZE, 0x00000004 /* stack for "FIQ" interrupts is 4 bytes */ 15 .set IRQ_STACK_SIZE, 0X00000080 /* stack for "IRQ" normal interrupts is 4 bytes */ 16 .set SVC_STACK_SIZE, 0x00000004 /* stack for "SVC" supervisor mode is 4 bytes */ 17 18 19 20 /* Standard definitions of Mode bits and Interrupt (I & F) flags in PSRs (program status registers) 21 .set MODE_USR, 0x10 /* Normal User Mode */ 22 .set MODE_FIQ, 0x11 /* FIQ Processing Fast Interrupts Mode */ 23 .set MODE_IRQ, 0x12 /* IRQ Processing Standard Interrupts Mode */ 24 .set MODE_SVC, 0x13 /* Supervisor Processing Software Interrupts Mode */ 25 .set MODE_ABT, 0x17 /* Abort Processing memory Faults Mode */ 26 .set MODE_UND, 0x1B /* Undefined Processing Undefined Instructions Mode */ 27 .set MODE_SYS, 0x1F /* System Running Priviledged Operating System Tasks Mode */ 28 29 .set I_BIT, 0x80 /* when I bit is set, IRQ is disabled (program status registers) 30 .set F_BIT, 0x40 /* when F bit is set, FIQ is disabled (program status registers) 31 32 33 .text 34 .arm 35 36 .global Reset_Handler 37 .global _startup 38 .func _startup 39 40 _startup: 41 42 # Exception Vectors 43 44 0000 18F09FE5 _vectors: ldr PC, Reset_Addr 45 0004 18F09FE5 ldr PC, Undef_Addr 46 0008 18F09FE5 ldr PC, SWI_Addr 47 000c 18F09FE5 ldr PC, PAbt_Addr 48 0010 18F09FE5 ldr PC, DAbt_Addr 49 0014 0000A0E1 nop /* Reserved Vector (holds Philips ISP checksum) */ 50 0018 20F11FE5 ldr PC, [PC,#-0x120] /* see page 71 of "Insiders Guide to the Philips ARM7-Base 51 001c 14F09FE5 ldr PC, FIQ_Addr 52 53 0020 00000000 Reset_Addr: .word Reset_Handler /* defined in this module below */ 54 0024 00000000 Undef_Addr: .word UNDEF_Routine /* defined in main.c */ 55 0028 00000000 SWI_Addr: .word SWI_Routine /* defined in main.c */ 56 002c 00000000 PAbt_Addr: .word UNDEF_Routine /* defined in main.c */ 57 0030 00000000 DAbt_Addr: .word UNDEF_Routine /* defined in main.c */ _ARM GAS ../startup.S page 2 58 0034 00000000 IRQ_Addr: .word IRQ_Routine /* defined in main.c */ 59 0038 00000000 FIQ_Addr: .word FIQ_Routine /* defined in main.c */ 60 003c 00000000 .word 0 /* rounds the vectors and ISR addresses to 64 bytes total */ 61 62 # Reset Handler 63 64 Reset_Handler: 65 66 .extern TargetResetInit 67 0040 88D09FE5 ldr SP, =_stack_end @ temporary stack at Stack_Top 68 0044 88009FE5 LDR R0, =TargetResetInit 69 0048 0FE0A0E1 MOV LR, PC 70 004c 10FF2FE1 BX R0 71 72 /* Setup a stack for each mode - note that this only sets up a usable stack 73 for User mode. Also each mode is setup with interrupts initially disabled. */ 74 75 0050 78009FE5 ldr r0, =_stack_end 76 0054 DBF021E3 msr CPSR_c, #MODE_UND|I_BIT|F_BIT /* Undefined Instruction Mode */ 77 0058 00D0A0E1 mov sp, r0 78 005c 040040E2 sub r0, r0, #UND_STACK_SIZE 79 0060 D7F021E3 msr CPSR_c, #MODE_ABT|I_BIT|F_BIT /* Abort Mode */ 80 0064 00D0A0E1 mov sp, r0 81 0068 040040E2 sub r0, r0, #ABT_STACK_SIZE 82 006c D1F021E3 msr CPSR_c, #MODE_FIQ|I_BIT|F_BIT /* FIQ Mode */ 83 0070 00D0A0E1 mov sp, r0 84 0074 040040E2 sub r0, r0, #FIQ_STACK_SIZE 85 0078 D2F021E3 msr CPSR_c, #MODE_IRQ|I_BIT|F_BIT /* IRQ Mode */ 86 007c 00D0A0E1 mov sp, r0 87 0080 800040E2 sub r0, r0, #IRQ_STACK_SIZE 88 0084 D3F021E3 msr CPSR_c, #MODE_SVC|I_BIT|F_BIT /* Supervisor Mode */ 89 0088 00D0A0E1 mov sp, r0 90 008c 040040E2 sub r0, r0, #SVC_STACK_SIZE 91 0090 5FF021E3 msr CPSR_c, #MODE_SYS|F_BIT /* User Mode */ 92 0094 00D0A0E1 mov sp, r0 93 94 /* copy .data section (Copy from ROM to RAM) */ 95 0098 38109FE5 ldr R1, =_etext 96 009c 38209FE5 ldr R2, =_data 97 00a0 38309FE5 ldr R3, =_edata 98 00a4 030052E1 1: cmp R2, R3 99 00a8 04009134 ldrlo R0, [R1], #4 100 00ac 04008234 strlo R0, [R2], #4 101 00b0 FBFFFF3A blo 1b 102 103 /* Clear .bss section (Zero init) */ 104 00b4 0000A0E3 mov R0, #0 105 00b8 24109FE5 ldr R1, =_bss_start 106 00bc 24209FE5 ldr R2, =_bss_end 107 00c0 020051E1 2: cmp R1, R2 108 00c4 04008134 strlo R0, [R1], #4 109 00c8 FCFFFF3A blo 2b 110 111 /* Enter the C code */ 112 00cc FEFFFFEA b main 113 114 .endfunc _ARM GAS ../startup.S page 3 115 00d0 00000000 .end 115 00000000 115 00000000 115 00000000 115 00000000 _ARM GAS ../startup.S page 4 DEFINED SYMBOLS ../startup.S:12 *ABS*:00000004 UND_STACK_SIZE ../startup.S:13 *ABS*:00000004 ABT_STACK_SIZE ../startup.S:14 *ABS*:00000004 FIQ_STACK_SIZE ../startup.S:15 *ABS*:00000080 IRQ_STACK_SIZE ../startup.S:16 *ABS*:00000004 SVC_STACK_SIZE ../startup.S:21 *ABS*:00000010 MODE_USR ../startup.S:22 *ABS*:00000011 MODE_FIQ ../startup.S:23 *ABS*:00000012 MODE_IRQ ../startup.S:24 *ABS*:00000013 MODE_SVC ../startup.S:25 *ABS*:00000017 MODE_ABT ../startup.S:26 *ABS*:0000001b MODE_UND ../startup.S:27 *ABS*:0000001f MODE_SYS ../startup.S:29 *ABS*:00000080 I_BIT ../startup.S:30 *ABS*:00000040 F_BIT ../startup.S:34 .text:00000000 $a ../startup.S:64 .text:00000040 Reset_Handler ../startup.S:40 .text:00000000 _startup ../startup.S:44 .text:00000000 _vectors ../startup.S:53 .text:00000020 Reset_Addr ../startup.S:54 .text:00000024 Undef_Addr ../startup.S:55 .text:00000028 SWI_Addr ../startup.S:56 .text:0000002c PAbt_Addr ../startup.S:57 .text:00000030 DAbt_Addr ../startup.S:59 .text:00000038 FIQ_Addr ../startup.S:53 .text:00000020 $d ../startup.S:58 .text:00000034 IRQ_Addr ../startup.S:67 .text:00000040 $a ../startup.S:115 .text:000000d0 $d UNDEFINED SYMBOLS UNDEF_Routine SWI_Routine IRQ_Routine FIQ_Routine _stack_end TargetResetInit _etext _data _edata _bss_start _bss_end main Finished building: ../startup.S Building file: ../target.c Invoking: ARM Windows GCC C Compiler arm-elf-gcc -O0 -fsigned-char -c -msoft-float -MMD -MP -MF"target.d" -MT"target.d" -mcpu=arm7tdmi-s -mthumb-interwork -g -ggdb -o"target.o" "../target.c" Finished building: ../target.c Building target: CAN_test.elf Invoking: ARM Windows GCC C Linker arm-elf-ld -T"D:\work\workspace\CAN_test\demo2378.cmd" -Map main.map -o"CAN_test.elf" ./can.o ./fio.o ./irq.o ./main.o ./startup.o ./target.o arm-elf-ld: ERROR: ./startup.o uses hardware FP, whereas CAN_test.elf uses software FP arm-elf-ld: Warning: ./startup.o does not support interworking, whereas CAN_test.elf does arm-elf-ld: failed to merge target specific data of file ./startup.o ./startup.o: In function `Undef_Addr': (.text+0x24): undefined reference to `UNDEF_Routine' ./startup.o: In function `SWI_Addr': (.text+0x28): undefined reference to `SWI_Routine' ./startup.o: In function `PAbt_Addr': (.text+0x2c): undefined reference to `UNDEF_Routine' ./startup.o: In function `DAbt_Addr': (.text+0x30): undefined reference to `UNDEF_Routine' ./startup.o: In function `IRQ_Addr': (.text+0x34): undefined reference to `IRQ_Routine' ./startup.o: In function `FIQ_Addr': (.text+0x38): undefined reference to `FIQ_Routine' make: *** [CAN_test.elf] Error 1