├── README.md └── Smart Car two wheels ├── C_Layout.hwl ├── Default.mem ├── Project.mcp ├── Project_Data ├── CWSettingsWindows.stg └── Standard │ ├── ObjectCode │ ├── ATD.c.o │ ├── ECT.c.o │ ├── KEY.c.o │ ├── LCD5110.c.o │ ├── MC9S12XS128.c.o │ ├── PIT.C.o │ ├── PLL.c.o │ ├── PWM.c.o │ ├── SDdriver.c.o │ ├── Start12.c.o │ ├── datapage.c.o │ ├── main.c.o │ └── math.c.o │ └── TargetDataWindows.tdt ├── Sources ├── ATD.H ├── ATD.c ├── B.H ├── ECT.H ├── ECT.c ├── FAT.H ├── FAT16.c ├── FAT16.h ├── Fuzzy_control.h ├── KEY.H ├── KEY.c ├── LCD5110.H ├── LCD5110.c ├── LCDKEY.H ├── PIT.C ├── PIT.H ├── PLL.H ├── PLL.c ├── PWM.c ├── PWM.h ├── Project │ ├── C_Layout.hwl │ ├── Default.mem │ ├── Full_Chip_Simulation.ini │ ├── Project.mcp │ ├── Project_Data │ │ ├── CWSettingsWindows.stg │ │ └── Standard │ │ │ └── TargetDataWindows.tdt │ ├── Sources │ │ ├── Start12.c │ │ ├── datapage.c │ │ ├── derivative.h │ │ └── main.c │ ├── TBDML.ini │ ├── bin │ │ └── Project.map │ ├── cmd │ │ ├── Full_Chip_Simulation_Postload.cmd │ │ ├── Full_Chip_Simulation_Preload.cmd │ │ ├── Full_Chip_Simulation_Reset.cmd │ │ ├── Full_Chip_Simulation_SetCPU.cmd │ │ ├── Full_Chip_Simulation_Startup.cmd │ │ ├── TBDML_Erase_unsecure_hcs12xe.cmd │ │ ├── TBDML_Postload.cmd │ │ ├── TBDML_Preload.cmd │ │ ├── TBDML_Reset.cmd │ │ ├── TBDML_Startup.cmd │ │ ├── TBDML_Vppoff.cmd │ │ └── TBDML_Vppon.cmd │ └── prm │ │ ├── Project.prm │ │ └── burner.bbl ├── SDdriver.c ├── SDdriver.h ├── Start12.c ├── datapage.c ├── derivative.h ├── main.c ├── main │ ├── C_Layout.hwl │ ├── Default.mem │ ├── Full_Chip_Simulation.ini │ ├── Sources │ │ ├── Start12.c │ │ ├── datapage.c │ │ ├── derivative.h │ │ └── main.c │ ├── bin │ │ └── Project.map │ ├── cmd │ │ ├── Full_Chip_Simulation_Postload.cmd │ │ ├── Full_Chip_Simulation_Preload.cmd │ │ ├── Full_Chip_Simulation_Reset.cmd │ │ ├── Full_Chip_Simulation_SetCPU.cmd │ │ └── Full_Chip_Simulation_Startup.cmd │ ├── main.mcp │ ├── main_Data │ │ ├── CWSettingsWindows.stg │ │ └── Standard │ │ │ ├── ObjectCode │ │ │ ├── MC9S12XS128.c.o │ │ │ ├── Start12.c.o │ │ │ └── datapage.c.o │ │ │ └── TargetDataWindows.tdt │ └── prm │ │ ├── Project.prm │ │ └── burner.bbl └── math.c ├── TBDML.ini ├── bin ├── Project.abs ├── Project.abs.glo ├── Project.abs.s19 ├── Project.map └── Project.xpr ├── cmd ├── TBDML_Erase_unsecure_hcs12xe.cmd ├── TBDML_Postload.cmd ├── TBDML_Preload.cmd ├── TBDML_Reset.cmd ├── TBDML_Startup.cmd ├── TBDML_Vppoff.cmd └── TBDML_Vppon.cmd └── prm ├── Project.prm └── burner.bbl /README.md: -------------------------------------------------------------------------------- 1 | #100ms控速 转角5ms - 清华打脚 - 变时序 - 5ms 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/C_Layout.hwl: -------------------------------------------------------------------------------- 1 | OPEN source 0 0 60 39 2 | Source < attributes MARKS off 3 | OPEN assembly 60 0 40 31 4 | Assembly < attributes ADR on,CODE off,ABSADR on,SYMB off,TOPPC 0xF88C 5 | OPEN procedure 0 39 60 17 6 | Procedure < attributes VALUES on,TYPES off 7 | OPEN register 60 31 40 25 8 | Register < attributes FORMAT AUTO,COMPLEMENT None 9 | OPEN memory 60 56 40 22 10 | Memory < attributes FORMAT hex,COMPLEMENT None,WORD 1,ASC on,ADR on,ADDRESS 0x80 11 | OPEN data 0 56 60 22 12 | Data:1 < attributes SCOPE global,COMPLEMENT None,FORMAT Symb,MODE automatic,UPDATERATE 10,NAMEWIDTH 16 13 | OPEN data 0 78 60 22 14 | Data:2 < attributes SCOPE local,COMPLEMENT None,FORMAT Symb,MODE automatic,UPDATERATE 10,NAMEWIDTH 16 15 | OPEN command 60 78 40 22 16 | Command < attributes CACHESIZE 1000 17 | bckcolor 50331647 18 | font 'Courier New' 9 BLACK 19 | AUTOSIZE on 20 | ACTIVATE Data:2 Command Procedure Data:1 Source Register Assembly Memory 21 | -------------------------------------------------------------------------------- /Smart Car two wheels/Default.mem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Default.mem -------------------------------------------------------------------------------- /Smart Car two wheels/Project.mcp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Project.mcp -------------------------------------------------------------------------------- /Smart Car two wheels/Project_Data/CWSettingsWindows.stg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Project_Data/CWSettingsWindows.stg -------------------------------------------------------------------------------- /Smart Car two wheels/Project_Data/Standard/ObjectCode/ATD.c.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Project_Data/Standard/ObjectCode/ATD.c.o -------------------------------------------------------------------------------- /Smart Car two wheels/Project_Data/Standard/ObjectCode/ECT.c.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Project_Data/Standard/ObjectCode/ECT.c.o -------------------------------------------------------------------------------- /Smart Car two wheels/Project_Data/Standard/ObjectCode/KEY.c.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Project_Data/Standard/ObjectCode/KEY.c.o -------------------------------------------------------------------------------- /Smart Car two wheels/Project_Data/Standard/ObjectCode/LCD5110.c.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Project_Data/Standard/ObjectCode/LCD5110.c.o -------------------------------------------------------------------------------- /Smart Car two wheels/Project_Data/Standard/ObjectCode/MC9S12XS128.c.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Project_Data/Standard/ObjectCode/MC9S12XS128.c.o -------------------------------------------------------------------------------- /Smart Car two wheels/Project_Data/Standard/ObjectCode/PIT.C.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Project_Data/Standard/ObjectCode/PIT.C.o -------------------------------------------------------------------------------- /Smart Car two wheels/Project_Data/Standard/ObjectCode/PLL.c.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Project_Data/Standard/ObjectCode/PLL.c.o -------------------------------------------------------------------------------- /Smart Car two wheels/Project_Data/Standard/ObjectCode/PWM.c.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Project_Data/Standard/ObjectCode/PWM.c.o -------------------------------------------------------------------------------- /Smart Car two wheels/Project_Data/Standard/ObjectCode/SDdriver.c.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Project_Data/Standard/ObjectCode/SDdriver.c.o -------------------------------------------------------------------------------- /Smart Car two wheels/Project_Data/Standard/ObjectCode/Start12.c.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Project_Data/Standard/ObjectCode/Start12.c.o -------------------------------------------------------------------------------- /Smart Car two wheels/Project_Data/Standard/ObjectCode/datapage.c.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Project_Data/Standard/ObjectCode/datapage.c.o -------------------------------------------------------------------------------- /Smart Car two wheels/Project_Data/Standard/ObjectCode/main.c.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Project_Data/Standard/ObjectCode/main.c.o -------------------------------------------------------------------------------- /Smart Car two wheels/Project_Data/Standard/ObjectCode/math.c.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Project_Data/Standard/ObjectCode/math.c.o -------------------------------------------------------------------------------- /Smart Car two wheels/Project_Data/Standard/TargetDataWindows.tdt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Project_Data/Standard/TargetDataWindows.tdt -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/ATD.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/ATD.H -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/ATD.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "ATD.H" 3 | 4 | 5 | void ATD0_Init(void) 6 | { 7 | ATD0CTL1_SRES0=atd0_sres0; 8 | ATD0CTL2=atd0_ascie<<1; 9 | ATD0CTL3=(atd0_djm<<7)+(atd0_sc_length<<3)+(atd0_fifo<<2); 10 | ATD0CTL4_SMP=atd0_smp; 11 | ATD0CTL4_PRS=atd0_prs; 12 | ATD0CTL5=(atd0_scan<<5) + (atd0_mult<<4) + atd0_cd_cc_cb_ca; 13 | } 14 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/B.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/B.H -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/ECT.H: -------------------------------------------------------------------------------- 1 | #ifndef ECT_h 2 | #define ECT_h 3 | 4 | #include 5 | 6 | /********************************************************** 7 | Register: 8 | 9 | TIOS: 10 | IOS[7:0]: 11 | 0 The corresponding channel acts as an input capture. 12 | 1 The corresponding channel acts as an output compare. 13 | 14 | TCTL3 and TCTL4: 15 | *=================================================* 16 | EDGnB EDGnA Configuration 17 | 0 0 Capture disabled 18 | 0 1 Capture on rising edges only 19 | 1 0 Capture on falling edges only 20 | 1 1 Capture on any edge (rising or falling) 21 | *=================================================* 22 | 23 | TIE:(Input Capture/Output Compare x Interrupt Enable) 24 | C7I:C0I 25 | 26 | TSCR1: 27 | --------------------------------- 28 | |7 |6 |5 |4 |3 |2|1|0| 29 | --------------------------------- 30 | |TEN|TSWAI|TSFRZ|TFFCA|PRNT|0|0|0| 31 | --------------------------------- 32 | 33 | TEN: 34 | 0 Disables the main timer, including the counter. 35 | 1 Allows the timer to function normally. 36 | 37 | PRNT: 38 | 0 Enables legacy timer.(PR0,PR1,PR2) 39 | 1 Enables precision timer.(All bits of the PTPSR register) 40 | 41 | TSCR2: 42 | --------------------------- 43 | |7 |6|5|4|3 |2 |1 |0 | 44 | --------------------------- 45 | |TOI|0|0|0|TCRE|PR2|PR1|PR0| 46 | --------------------------- 47 | 48 | TOI: 49 | 0 Interrupt inhibited. 50 | 1 Hardware interrupt requested when TOF flag set. 51 | 52 | TSCR2: 53 | 0 Counter reset inhibited and counter free runs. 54 | 1 Counter reset by a successful output compare 7. 55 | 56 | PR[2:0]:(divide bus clock) 57 | 0x00 to 0x07 for bus clock divide by 1 to 128 multiply by 2 58 | 59 | TFLG1:(Input Capture/Output Compare Channel x Flag) 60 | C[7:0]F:Write 1 to clear it 61 | 62 | TCNT:16-bit count register 63 | 64 | TCxH and TCxL: 65 | 66 | *******************************************************************************/ 67 | #define tios_ios0 0 // 0 input capture 68 | // 1 output capture 69 | 70 | #define input0_interrupt 0 // 0 disable interrupt 71 | // 1 enable interrupt 72 | 73 | #define edge_select0 1 // 0 disable 74 | // 1 capture on rising edges only 75 | // 2 capture on falling edges only 76 | // 3 capture on any edge 77 | 78 | #define tscr2_pr0 0 // Prescale factor 79 | // 0---1 80 | // 1---2 81 | // 2---4 82 | // 3---8 83 | // 4---16 84 | // 5---32 85 | // 6---64 86 | // 7---128 87 | #define tc0h 0x00 88 | 89 | #define tc0l 0x00 90 | 91 | void Ect7_Init(void); 92 | void Pulse_Add_Init(void); 93 | /*====================================== 94 | void interrupt 8 Ect0_interrupt(void) 95 | { 96 | DisableInterrupts; 97 | TFLG1_C0F=1; 98 | } 99 | 100 | void Ect0_Init(void) 101 | { 102 | TIOS_IOS0=tios_ios0; 103 | TCTL4_EDG0x=edge_select0; 104 | TCTL3_EDG4x=edge_select1; 105 | 106 | #if input0_interrupt 107 | TIE_C0I=1; 108 | #else 109 | TIE_C0I=0; 110 | #endif 111 | 112 | #if tios_ios0 // Compare mode 113 | TC0H=tc0h; 114 | TC0L=tc0l; 115 | #endif 116 | 117 | TSCR2_PR=tscr2_pr0; 118 | TSCR1_TEN=1; // Enable 119 | } 120 | 121 | Interrupt vector number: 122 | 123 | * void interrupt 8 Ect0_interrupt(void) 124 | * void interrupt 9 Ect1_interrupt(void) 125 | * void interrupt 10 Ect2_interrupt(void) 126 | * void interrupt 11 Ect3_interrupt(void) 127 | * void interrupt 12 Ect4_interrupt(void) 128 | * void interrupt 13 Ect5_interrupt(void) 129 | * void interrupt 14 Ect6_interrupt(void) 130 | * void interrupt 15 Ect7_interrupt(void) 131 | =======================================*/ 132 | 133 | #endif 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/ECT.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/ECT.c -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/FAT.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/FAT.H -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/FAT16.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/FAT16.c -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/FAT16.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/FAT16.h -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Fuzzy_control.h: -------------------------------------------------------------------------------- 1 | #ifndef Fuzzy_control_h 2 | #define Fuzzy_control_h 3 | 4 | long Fuzzy(long value1,long Dvalue1,unsigned char flag,unsigned char flag1) 5 | { 6 | unsigned char x1,y1,x2,y2; 7 | long Error_tmp,DError_tmp,U_tmp[4],UF_tmp[4],UF[4]; 8 | Error_tmp=value1; 9 | DError_tmp=Dvalue1; 10 | 11 | if(Error_tmp<0)Error_tmp=-Error_tmp; 12 | if(DError_tmp<0)DError_tmp=-DError_tmp; 13 | 14 | //Membership function 15 | if(flag1==0) 16 | { 17 | if(Error_tmp<=PFF[1]) 18 | { 19 | x1=0; 20 | x2=1; 21 | UF_tmp[1]=100*(Error_tmp-PFF[0])/(PFF[1]-PFF[0]); 22 | UF_tmp[0]=100*(PFF[1]-Error_tmp)/(PFF[1]-PFF[0]); 23 | } 24 | else if(Error_tmp<=PFF[2]) 25 | { 26 | x1=1; 27 | x2=2; 28 | UF_tmp[1]=100*(Error_tmp-PFF[1])/(PFF[2]-PFF[1]); 29 | UF_tmp[0]=100*(PFF[2]-Error_tmp)/(PFF[2]-PFF[1]); 30 | } 31 | else if(Error_tmp<=PFF[3]) 32 | { 33 | x1=2; 34 | x2=3; 35 | UF_tmp[1]=100*(Error_tmp-PFF[2])/(PFF[3]-PFF[2]); 36 | UF_tmp[0]=100*(PFF[3]-Error_tmp)/(PFF[3]-PFF[2]); 37 | } 38 | else 39 | { 40 | x1=3; 41 | x2=3; 42 | UF_tmp[1]=100; 43 | UF_tmp[0]=100; 44 | } 45 | 46 | if(DError_tmp<=DFF[1]) 47 | { 48 | y1=0; 49 | y2=1; 50 | UF_tmp[3]=100*(DError_tmp-DFF[0])/(DFF[1]-DFF[0]); 51 | UF_tmp[2]=100*(DFF[1]-DError_tmp)/(DFF[1]-DFF[0]); 52 | } 53 | else if(DError_tmp<=DFF[2]) 54 | { 55 | y1=1; 56 | y2=2; 57 | UF_tmp[3]=100*(DError_tmp-DFF[1])/(DFF[2]-DFF[1]); 58 | UF_tmp[2]=100*(DFF[2]-DError_tmp)/(DFF[2]-DFF[1]); 59 | } 60 | else if(DError_tmp<=DFF[3]) 61 | { 62 | y1=2; 63 | y2=3; 64 | UF_tmp[3]=100*(DError_tmp-DFF[2])/(DFF[3]-DFF[2]); 65 | UF_tmp[2]=100*(DFF[3]-DError_tmp)/(DFF[3]-DFF[2]); 66 | } 67 | else 68 | { 69 | y1=3; 70 | y2=3; 71 | UF_tmp[3]=100; 72 | UF_tmp[2]=100; 73 | } 74 | 75 | x1+=3; 76 | y1+=3; 77 | x2+=3; 78 | y2+=3; 79 | 80 | if(UF_tmp[0]<=UF_tmp[2]) UF[0]=UF_tmp[0]; else UF[0]=UF_tmp[2]; 81 | if(UF_tmp[0]<=UF_tmp[3]) UF[1]=UF_tmp[0]; else UF[1]=UF_tmp[3]; 82 | if(UF_tmp[1]<=UF_tmp[2]) UF[2]=UF_tmp[1]; else UF[2]=UF_tmp[2]; 83 | if(UF_tmp[1]<=UF_tmp[3]) UF[3]=UF_tmp[1]; else UF[3]=UF_tmp[3]; 84 | 85 | //Look up the form and calculate the focus. 86 | if(flag==1) 87 | { 88 | U_tmp[0]=UP[P_rule[y1][x1]]; 89 | U_tmp[1]=UP[P_rule[y2][x1]]; 90 | U_tmp[2]=UP[P_rule[y1][x2]]; 91 | U_tmp[3]=UP[P_rule[y2][x2]]; 92 | 93 | return (U_tmp[0]*UF[0]+U_tmp[1]*UF[1]+U_tmp[2]*UF[2]+U_tmp[3]*UF[3])/(UF[0]+UF[1]+UF[2]+UF[3]); 94 | } 95 | else 96 | { 97 | U_tmp[0]=UD[D_rule[x1][y1]]; 98 | U_tmp[1]=UD[D_rule[x2][y1]]; 99 | U_tmp[2]=UD[D_rule[x1][y2]]; 100 | U_tmp[3]=UD[D_rule[x2][y2]]; 101 | 102 | return (U_tmp[0]*UF[0]+U_tmp[1]*UF[1]+U_tmp[2]*UF[2]+U_tmp[3]*UF[3])/(UF[0]+UF[1]+UF[2]+UF[3]); 103 | } 104 | } 105 | } 106 | //////////////////////////////////////////////////////////////////////////////////////////////////////////// 107 | /* if(flag1==1) 108 | { 109 | if(Error_tmp<=pff[1]) 110 | { 111 | x1=0; 112 | x2=1; 113 | UF_tmp[1]=100*(Error_tmp-pff[0])/(pff[1]-pff[0]); 114 | UF_tmp[0]=100*(pff[1]-Error_tmp)/(pff[1]-pff[0]); 115 | } 116 | else if(Error_tmp<=pff[2]) 117 | { 118 | x1=1; 119 | x2=2; 120 | UF_tmp[1]=100*(Error_tmp-pff[1])/(pff[2]-pff[1]); 121 | UF_tmp[0]=100*(pff[2]-Error_tmp)/(pff[2]-pff[1]); 122 | } 123 | else if(Error_tmp<=pff[3]) 124 | { 125 | x1=2; 126 | x2=3; 127 | UF_tmp[1]=100*(Error_tmp-pff[2])/(pff[3]-pff[2]); 128 | UF_tmp[0]=100*(pff[3]-Error_tmp)/(pff[3]-pff[2]); 129 | } 130 | else 131 | { 132 | x1=3; 133 | x2=3; 134 | UF_tmp[1]=100; 135 | UF_tmp[0]=100; 136 | //UF_tmp[0]=0; 137 | } 138 | 139 | if(DError_tmp<=dff[1]) 140 | { 141 | y1=0; 142 | y2=1; 143 | UF_tmp[3]=100*(DError_tmp-dff[0])/(dff[1]-dff[0]); 144 | UF_tmp[2]=100*(dff[1]-DError_tmp)/(dff[1]-dff[0]); 145 | } 146 | else if(DError_tmp<=dff[2]) 147 | { 148 | y1=1; 149 | y2=2; 150 | UF_tmp[3]=100*(DError_tmp-dff[1])/(dff[2]-dff[1]); 151 | UF_tmp[2]=100*(dff[2]-DError_tmp)/(dff[2]-dff[1]); 152 | } 153 | else if(DError_tmp<=dff[3]) 154 | { 155 | y1=2; 156 | y2=3; 157 | UF_tmp[3]=100*(DError_tmp-dff[2])/(dff[3]-dff[2]); 158 | UF_tmp[2]=100*(dff[3]-DError_tmp)/(dff[3]-dff[2]); 159 | } 160 | else 161 | { 162 | y1=3; 163 | y2=3; 164 | UF_tmp[3]=100; 165 | UF_tmp[2]=100; 166 | } 167 | 168 | x1+=3; 169 | y1+=3; 170 | x2+=3; 171 | y2+=3; 172 | 173 | if(UF_tmp[0]<=UF_tmp[2])UF[0]=UF_tmp[0]; else UF[0]=UF_tmp[2]; 174 | if(UF_tmp[0]<=UF_tmp[3])UF[1]=UF_tmp[0]; else UF[1]=UF_tmp[3]; 175 | if(UF_tmp[1]<=UF_tmp[2])UF[2]=UF_tmp[1]; else UF[2]=UF_tmp[2]; 176 | if(UF_tmp[1]<=UF_tmp[3])UF[3]=UF_tmp[1]; else UF[3]=UF_tmp[3]; 177 | 178 | //Look up the form and calculate the focus. 179 | if(flag==1) 180 | { 181 | U_tmp[0]=up[p_rule[y1][x1]]; 182 | U_tmp[1]=up[p_rule[y2][x1]]; 183 | U_tmp[2]=up[p_rule[y1][x2]]; 184 | U_tmp[3]=up[p_rule[y2][x2]]; 185 | 186 | return (U_tmp[0]*UF[0]+U_tmp[1]*UF[1]+U_tmp[2]*UF[2]+U_tmp[3]*UF[3])/(UF[0]+UF[1]+UF[2]+UF[3]); 187 | } 188 | else 189 | { 190 | U_tmp[0]=ud[d_rule[x1][y1]]; 191 | U_tmp[1]=ud[d_rule[x2][y1]]; 192 | U_tmp[2]=ud[d_rule[x1][y2]]; 193 | U_tmp[3]=ud[d_rule[x2][y2]]; 194 | 195 | return (U_tmp[0]*UF[0]+U_tmp[1]*UF[1]+U_tmp[2]*UF[2]+U_tmp[3]*UF[3])/(UF[0]+UF[1]+UF[2]+UF[3]); 196 | } 197 | } */ 198 | 199 | 200 | #endif 201 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/KEY.H: -------------------------------------------------------------------------------- 1 | #ifndef _KEY_H_ 2 | #define _KEY_H_ 3 | 4 | void key_port_init(void); 5 | void delay_ms(void); 6 | byte keyscan(void); 7 | 8 | #endif 9 | 10 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/KEY.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/KEY.c -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/LCD5110.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/LCD5110.H -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/LCD5110.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/LCD5110.c -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/LCDKEY.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/LCDKEY.H -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/PIT.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/PIT.C -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/PIT.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/PIT.H -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/PLL.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/PLL.H -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/PLL.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/PLL.c -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/PWM.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/PWM.c -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/PWM.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/PWM.h -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/C_Layout.hwl: -------------------------------------------------------------------------------- 1 | OPEN source 0 0 60 39 2 | Source < attributes MARKS off 3 | OPEN assembly 60 0 40 31 4 | Assembly < attributes ADR on,CODE off,ABSADR on,SYMB off,TOPPC 0xF88C 5 | OPEN procedure 0 39 60 17 6 | Procedure < attributes VALUES on,TYPES off 7 | OPEN register 60 31 40 25 8 | Register < attributes FORMAT AUTO,COMPLEMENT None 9 | OPEN memory 60 56 40 22 10 | Memory < attributes FORMAT hex,COMPLEMENT None,WORD 1,ASC on,ADR on,ADDRESS 0x80 11 | OPEN data 0 56 60 22 12 | Data:1 < attributes SCOPE global,COMPLEMENT None,FORMAT Symb,MODE automatic,UPDATERATE 10,NAMEWIDTH 16 13 | OPEN data 0 78 60 22 14 | Data:2 < attributes SCOPE local,COMPLEMENT None,FORMAT Symb,MODE automatic,UPDATERATE 10,NAMEWIDTH 16 15 | OPEN command 60 78 40 22 16 | Command < attributes CACHESIZE 1000 17 | bckcolor 50331647 18 | font 'Courier New' 9 BLACK 19 | AUTOSIZE on 20 | ACTIVATE Data:2 Command Procedure Data:1 Source Register Assembly Memory 21 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/Default.mem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/Project/Default.mem -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/Full_Chip_Simulation.ini: -------------------------------------------------------------------------------- 1 | [Environment Variables] 2 | GENPATH={Project}Sources;{Compiler}lib\hc12c\src;{Compiler}lib\hc12c\include;{Compiler}lib\hc12c\lib;{Compiler}lib\xgatec\src;{Compiler}lib\xgatec\include;{Compiler}lib\xgatec\lib 3 | LIBPATH={Compiler}lib\hc12c\include;{Compiler}lib\xgatec\include 4 | OBJPATH={Project}bin 5 | TEXTPATH={Project}bin 6 | ABSPATH={Project}bin 7 | 8 | [HI-WAVE] 9 | Target=sim 10 | Layout=C_layout.hwl 11 | LoadDialogOptions=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main" 12 | CPU=HC12 13 | 14 | [Simulator] 15 | CMDFILE0=CMDFILE STARTUP ON ".\cmd\Full_Chip_Simulation_startup.cmd" 16 | 17 | [Simulator HC12] 18 | CMDFILE0=CMDFILE RESET ON ".\cmd\Full_Chip_Simulation_reset.cmd" 19 | CMDFILE1=CMDFILE PRELOAD ON ".\cmd\Full_Chip_Simulation_preload.cmd" 20 | CMDFILE2=CMDFILE POSTLOAD ON ".\cmd\Full_Chip_Simulation_postload.cmd" 21 | CMDFILE3=CMDFILE SETCPU ON ".\cmd\Full_Chip_Simulation_setcpu.cmd" 22 | HCS12_SUPPORT=2 23 | FCS=MC9S12XS128 24 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/Project.mcp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/Project/Project.mcp -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/Project_Data/CWSettingsWindows.stg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/Project/Project_Data/CWSettingsWindows.stg -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/Project_Data/Standard/TargetDataWindows.tdt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/Project/Project_Data/Standard/TargetDataWindows.tdt -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/Sources/Start12.c: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | start12.c - standard startup code 3 | The startup code may be optimized to special user requests 4 | ---------------------------------------------------- 5 | Copyright (c) Metrowerks, Basel, Switzerland 6 | All rights reserved 7 | 8 | Note: ROM libraries are not implemented in this startup code 9 | Note: C++ destructors of global objects are NOT yet supported in the HIWARE Object File Format. 10 | To use this feature, please build your application with the ELF object file format. 11 | *****************************************************/ 12 | /*lint -esym(750, __NO_FLAGS_OFFSET, __NO_MAIN_OFFSET, __NO_STACKOFFSET_OFFSET) */ 13 | /* these macros remove some unused fields in the startup descriptor */ 14 | #define __NO_FLAGS_OFFSET /* we do not need the flags field in the startup data descriptor */ 15 | #define __NO_MAIN_OFFSET /* we do not need the main field in the startup data descriptor */ 16 | #define __NO_STACKOFFSET_OFFSET /* we do not need the stackOffset field in the startup data descriptor */ 17 | 18 | /*#define __BANKED_COPY_DOWN : allow to allocate .copy in flash area */ 19 | #if defined(__BANKED_COPY_DOWN) && (!defined(__HCS12X__) || !defined(__ELF_OBJECT_FILE_FORMAT__)) 20 | #error /* the __BANKED_COPY_DOWN switch is only supported for the HCS12X with ELF */ 21 | /* (and not for the HC12, HCS12 or for the HIWARE object file format) */ 22 | #endif 23 | 24 | #include "hidef.h" 25 | #include "start12.h" 26 | 27 | /***************************************************************************/ 28 | /* Macros to control how the startup code handles the COP: */ 29 | /* #define _DO_FEED_COP_ : do feed the COP */ 30 | /* #define _DO_ENABLE_COP_: do enable the COP */ 31 | /* #define _DO_DISABLE_COP_: disable the COP */ 32 | /* Without defining any of these, the startup code does NOT handle the COP */ 33 | /***************************************************************************/ 34 | /* __ONLY_INIT_SP define: */ 35 | /* This define selects an shorter version of the startup code */ 36 | /* which only loads the stack pointer and directly afterwards calls */ 37 | /* main. This version does however NOT initialized global variables */ 38 | /* (So this version is not ANSI compliant!) */ 39 | /***************************************************************************/ 40 | /* __FAR_DATA define: */ 41 | /* By default, the startup code only supports to initialize the default */ 42 | /* kind of memory. If some memory is allocated far in the small or banked */ 43 | /* memory model, then the startup code only supports to initialize this */ 44 | /* memory blocks if __FAR_DATA is defined. If __FAR_DATA is not defined, */ 45 | /* then the linker will issue a message like */ 46 | /* "L1128: Cutting value _Range beg data member from 0xF01000 to 0x1000" */ 47 | /* and this startup code writes to the cutted address */ 48 | /***************************************************************************/ 49 | /* __BANKED_COPY_DOWN define: */ 50 | /* by default, the startup code assumes that the startup data structure */ 51 | /* _startupData, the zero out areas and the .copy section are all */ 52 | /* allocated in NON_BANKED memory. Especially the .copy section can be */ 53 | /* if there are many or large RAM areas to initialize. */ 54 | /* for the HCS12X, which also copies the XGATE RAM located code via .copy */ 55 | /* section, the startup code supports to allocate .copy in a banked flash */ 56 | /* The placement of .copy in the prm file has to be adapted when adding or */ 57 | /* removing the this macro. */ 58 | /* Note: This macro is only supported for the HCS12X and when using ELF */ 59 | /***************************************************************************/ 60 | 61 | #ifdef __cplusplus 62 | #define __EXTERN_C extern "C" 63 | #else 64 | #define __EXTERN_C 65 | #endif 66 | 67 | __EXTERN_C void main(void); /* prototype of main function */ 68 | 69 | #ifndef __ONLY_INIT_SP 70 | #pragma DATA_SEG __NEAR_SEG STARTUP_DATA /* _startupData can be accessed using 16 bit accesses. */ 71 | /* This is needed because it contains the stack top, and without stack, far data cannot be accessed */ 72 | /*lint -e1065 */ 73 | struct _tagStartup _startupData; /* read-only: */ 74 | /* _startupData is allocated in ROM and */ 75 | /* initialized by the linker */ 76 | /*lint +e1065 */ 77 | #pragma DATA_SEG DEFAULT 78 | #endif /* __ONLY_INIT_SP */ 79 | 80 | #if defined(FAR_DATA) && (!defined(__HCS12X__) || defined(__BANKED_COPY_DOWN)) 81 | #include "non_bank.sgm" 82 | /* the init function must be in non banked memory if banked variables are used */ 83 | /* because _SET_PAGE is called, which may change any page register. */ 84 | 85 | __EXTERN_C void _SET_PAGE(void); /* the inline assembler needs a prototype */ 86 | /* this is a runtime routine with a special */ 87 | /* calling convention, do not use it in c code! */ 88 | #else 89 | #include "default.sgm" 90 | #endif /* defined(FAR_DATA) && (!defined(__HCS12X__) || defined(__BANKED_COPY_DOWN)) */ 91 | 92 | 93 | /* define value and bits for Windef Register */ 94 | #ifdef HC812A4 95 | #define WINDEF (*(volatile unsigned char*) 0x37) 96 | #if defined( __BANKED__) || defined(__LARGE__) || defined(__PPAGE__) 97 | #define __ENABLE_PPAGE__ 0x40 98 | #else 99 | #define __ENABLE_PPAGE__ 0x0 100 | #endif 101 | #if defined(__DPAGE__) 102 | #define __ENABLE_DPAGE__ 0x80 103 | #else 104 | #define __ENABLE_DPAGE__ 0x0 105 | #endif 106 | #if defined(__EPAGE__) 107 | #define __ENABLE_EPAGE__ 0x20 108 | #else 109 | #define __ENABLE_EPAGE__ 0x0 110 | #endif 111 | #endif /* HC812A4 */ 112 | 113 | #ifdef _HCS12_SERIALMON 114 | /* for Monitor based software remap the RAM & EEPROM to adhere 115 | to EB386. Edit RAM and EEPROM sections in PRM file to match these. */ 116 | #define ___INITRM (*(volatile unsigned char *) 0x0010) 117 | #define ___INITRG (*(volatile unsigned char *) 0x0011) 118 | #define ___INITEE (*(volatile unsigned char *) 0x0012) 119 | #endif 120 | 121 | #if defined(_DO_FEED_COP_) 122 | #define __FEED_COP_IN_HLI() } __asm movb #0x55, _COP_RST_ADR; __asm movb #0xAA, _COP_RST_ADR; __asm { 123 | #else 124 | #define __FEED_COP_IN_HLI() /* do nothing */ 125 | #endif 126 | 127 | #ifndef __ONLY_INIT_SP 128 | #if (!defined(FAR_DATA) || defined(__HCS12X__)) && (defined( __BANKED__) || defined(__LARGE__) || defined(__BANKED_COPY_DOWN)) 129 | static void __far Init(void) 130 | #else 131 | static void Init(void) 132 | #endif 133 | { 134 | /* purpose: 1) zero out RAM-areas where data is allocated */ 135 | /* 2) copy initialization data from ROM to RAM */ 136 | /* 3) call global constructors in C++ */ 137 | /* called from: _Startup, LibInits */ 138 | __asm { 139 | ZeroOut: 140 | #if defined(__HIWARE_OBJECT_FILE_FORMAT__) && defined(__LARGE__) 141 | LDX _startupData.pZeroOut:1 ; in the large memory model in the HIWARE format, pZeroOut is a 24 bit pointer 142 | #else 143 | LDX _startupData.pZeroOut ; *pZeroOut 144 | #endif 145 | LDY _startupData.nofZeroOuts ; nofZeroOuts 146 | BEQ CopyDown ; if nothing to zero out 147 | 148 | NextZeroOut: PSHY ; save nofZeroOuts 149 | #if defined(FAR_DATA) 150 | LDAB 1,X+ ; load page of destination address 151 | LDY 2,X+ ; load offset of destination address 152 | #if defined(__HCS12X__) 153 | STAB __GPAGE_ADR__ 154 | #else /* defined(__HCS12X__) */ 155 | __PIC_JSR(_SET_PAGE) ; sets the page in the correct page register 156 | #endif /* defined(__HCS12X__) */ 157 | #else /* FAR_DATA */ 158 | LDY 2,X+ ; start address and advance *pZeroOut (X = X+4) 159 | #endif /* FAR_DATA */ 160 | 161 | #if defined(__HCS12X__) && defined(FAR_DATA) 162 | PSHX 163 | LDX 0,X ; byte count 164 | #if defined(__OPTIMIZE_FOR_SIZE__) 165 | CLRA 166 | NextWord: GSTAA 1,Y+ ; clear memory byte 167 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 168 | DBNE X, NextWord ; dec byte count 169 | #else 170 | LDD #0 171 | LSRX 172 | BEQ LoopClrW1 ; do we copy more than 1 byte? 173 | NextWord: GSTD 2,Y+ ; clear memory word 174 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 175 | DBNE X, NextWord ; dec word count 176 | LoopClrW1: 177 | BCC LastClr ; handle last byte 178 | GSTAA 1,Y+ ; handle last byte 179 | LastClr: 180 | #endif 181 | PULX 182 | LEAX 2,X 183 | #elif defined(__OPTIMIZE_FOR_SIZE__) /* -os, default */ 184 | LDD 2,X+ ; byte count 185 | NextWord: CLR 1,Y+ ; clear memory byte 186 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 187 | DBNE D, NextWord ; dec byte count 188 | #else /* __OPTIMIZE_FOR_TIME__ */ 189 | LDD 2,X+ ; byte count 190 | LSRD ; /2 and save bit 0 in the carry 191 | BEQ LoopClrW1 ; do we copy more than 1 byte? 192 | PSHX 193 | LDX #0 194 | LoopClrW: STX 2,Y+ ; Word-Clear 195 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 196 | DBNE D, LoopClrW 197 | PULX 198 | LoopClrW1: 199 | BCC LastClr ; handle last byte 200 | CLR 1,Y+ 201 | LastClr: 202 | #endif /* __OPTIMIZE_FOR_SIZE__/__OPTIMIZE_FOR_TIME__ */ 203 | PULY ; restore nofZeroOuts 204 | DEY ; dec nofZeroOuts 205 | BNE NextZeroOut 206 | CopyDown: 207 | #if defined(__BANKED_COPY_DOWN) 208 | LDAA _startupData.toCopyDownBeg:0 ; get PAGE address of .copy section 209 | STAA __PPAGE_ADR__ ; set PPAGE address 210 | LDX _startupData.toCopyDownBeg:1 ; load address of copy down desc. 211 | #elif defined(__ELF_OBJECT_FILE_FORMAT__) 212 | LDX _startupData.toCopyDownBeg ; load address of copy down desc. 213 | #else 214 | LDX _startupData.toCopyDownBeg:2 ; load address of copy down desc. 215 | #endif 216 | NextBlock: 217 | LDD 2,X+ ; size of init-data -> D 218 | BEQ funcInits ; end of copy down desc. 219 | #ifdef FAR_DATA 220 | PSHD ; save counter 221 | LDAB 1,X+ ; load destination page 222 | LDY 2,X+ ; destination address 223 | #if defined(__HCS12X__) 224 | STAB __GPAGE_ADR__ 225 | #else /* __HCS12X__ */ 226 | __PIC_JSR(_SET_PAGE) ; sets the destinations page register 227 | #endif /* __HCS12X__ */ 228 | PULD ; restore counter 229 | #else /* FAR_DATA */ 230 | LDY 2,X+ ; load destination address 231 | #endif /* FAR_DATA */ 232 | 233 | #if defined(__HCS12X__) && defined(FAR_DATA) 234 | #if defined(__OPTIMIZE_FOR_SIZE__) /* -os, default */ 235 | Copy: PSHA 236 | LDAA 1,X+ 237 | GSTAA 1,Y+ ; move a byte from ROM to the data area 238 | PULA 239 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 240 | DBNE D,Copy ; copy-byte loop 241 | #else 242 | LSRD ; /2 and save bit 0 in the carry 243 | BEQ Copy1 ; do we copy more than 1 byte? 244 | 245 | Copy: PSHD 246 | LDD 2,X+ 247 | GSTD 2,Y+ ; move a word from ROM to the data area 248 | PULD 249 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 250 | DBNE D,Copy ; copy-word loop 251 | Copy1: 252 | BCC NextBlock ; handle last byte? 253 | LDAA 1,X+ 254 | GSTAA 1,Y+ ; move a byte from ROM to the data area 255 | #endif 256 | #elif defined(__OPTIMIZE_FOR_SIZE__) /* -os, default */ 257 | Copy: MOVB 1,X+,1,Y+ ; move a byte from ROM to the data area 258 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 259 | DBNE D,Copy ; copy-byte loop 260 | #else /* __OPTIMIZE_FOR_TIME__ */ 261 | LSRD ; /2 and save bit 0 in the carry 262 | BEQ Copy1 ; do we copy more than 1 byte? 263 | Copy: MOVW 2,X+,2,Y+ ; move a word from ROM to the data area 264 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 265 | DBNE D,Copy ; copy-word loop 266 | Copy1: 267 | BCC NextBlock ; handle last byte? 268 | MOVB 1,X+,1,Y+ ; copy the last byte 269 | #endif /* __OPTIMIZE_FOR_SIZE__/__OPTIMIZE_FOR_TIME__ */ 270 | BRA NextBlock 271 | funcInits: ; call of global construtors is only in c++ necessary 272 | #if defined(__cplusplus) 273 | #if defined(__ELF_OBJECT_FILE_FORMAT__) 274 | #if defined( __BANKED__) || defined(__LARGE__) 275 | LDY _startupData.nofInitBodies; load number of cpp. 276 | BEQ done ; if cppcount == 0, goto done 277 | LDX _startupData.initBodies ; load address of first module to initialize 278 | nextInit: 279 | LEAX 3,X ; increment to next init 280 | PSHX ; save address of next function to initialize 281 | PSHY ; save cpp counter 282 | CALL [-3,X] ; use double indirect call to load the page register also 283 | PULY ; restore cpp counter 284 | PULX ; restore actual address 285 | DEY ; decrement cpp counter 286 | BNE nextInit 287 | #else /* defined( __BANKED__) || defined(__LARGE__) */ 288 | 289 | LDD _startupData.nofInitBodies; load number of cpp. 290 | BEQ done ; if cppcount == 0, goto done 291 | LDX _startupData.initBodies ; load address of first module to initialize 292 | nextInit: 293 | LDY 2,X+ ; load address of first module to initialize 294 | PSHD 295 | PSHX ; save actual address 296 | JSR 0,Y ; call initialization function 297 | PULX ; restore actual address 298 | PULD ; restore cpp counter 299 | DBNE D, nextInit 300 | #endif /* defined( __BANKED__) || defined(__LARGE__) */ 301 | #else /* __ELF_OBJECT_FILE_FORMAT__ */ 302 | LDX _startupData.mInits ; load address of first module to initialize 303 | #if defined( __BANKED__) || defined(__LARGE__) 304 | nextInit: LDY 3,X+ ; load address of initialization function 305 | BEQ done ; stop when address == 0 306 | ; in common environments the offset of a function is never 0, so this test could be avoided 307 | #ifdef __InitFunctionsMayHaveOffset0__ 308 | BRCLR -1,X, done, 0xff ; stop when address == 0 309 | #endif /* __InitFunctionsMayHaveOffset0__ */ 310 | PSHX ; save address of next function to initialize 311 | CALL [-3,X] ; use double indirect call to load the page register also 312 | #else /* defined( __BANKED__) || defined(__LARGE__) */ 313 | nextInit: 314 | LDY 2,X+ ; load address of first module to initialize 315 | BEQ done ; stop when address of function == 0 316 | PSHX ; save actual address 317 | JSR 0,Y ; call initialization function 318 | #endif /* defined( __BANKED__) || defined(__LARGE__) */ 319 | PULX ; restore actual address 320 | BRA nextInit 321 | #endif /* __ELF_OBJECT_FILE_FORMAT__ */ 322 | done: 323 | #endif /* __cplusplus */ 324 | } 325 | } 326 | #endif /* __ONLY_INIT_SP */ 327 | 328 | #if defined( __ELF_OBJECT_FILE_FORMAT__) && defined(__cplusplus ) && 0 /* the call to main does not support to return anymore */ 329 | 330 | #if !defined(FAR_DATA) && (defined( __BANKED__) || defined(__LARGE__)) 331 | static void __far Fini(void) 332 | #else 333 | static void Fini(void) 334 | #endif 335 | { 336 | /* purpose: 1) call global destructors in C++ */ 337 | __asm { 338 | #if defined( __BANKED__) || defined(__LARGE__) 339 | 340 | LDY _startupData.nofFiniBodies; load number of cpp. 341 | BEQ done ; if cppcount == 0, goto done 342 | LDX _startupData.finiBodies ; load address of first module to finalize 343 | nextInit2: 344 | LEAX 3,X ; increment to next init 345 | PSHX ; save address of next function to finalize 346 | PSHY ; save cpp counter 347 | CALL [-3,X] ; use double indirect call to load the page register also 348 | PULY ; restore cpp counter 349 | PULX ; restore actual address 350 | DEY ; decrement cpp counter 351 | BNE nextInit2 352 | #else /* defined( __BANKED__) || defined(__LARGE__) */ 353 | 354 | LDD _startupData.nofFiniBodies; load number of cpp. 355 | BEQ done ; if cppcount == 0, goto done 356 | LDX _startupData.finiBodies ; load address of first module to finalize 357 | nextInit2: 358 | LDY 2,X+ ; load address of first module to finalize 359 | PSHD 360 | PSHX ; save actual address 361 | JSR 0,Y ; call finalize function 362 | PULX ; restore actual address 363 | PULD ; restore cpp counter 364 | DBNE D, nextInit2 365 | #endif /* defined(__BANKED__) || defined(__LARGE__) */ 366 | done:; 367 | } 368 | } 369 | #endif 370 | 371 | 372 | #include "non_bank.sgm" 373 | 374 | #pragma MESSAGE DISABLE C12053 /* Stack-pointer change not in debugging-information */ 375 | #pragma NO_FRAME 376 | #pragma NO_ENTRY 377 | #if !defined(__SMALL__) 378 | #pragma NO_EXIT 379 | #endif 380 | 381 | /* The function _Startup must be called in order to initialize global variables and to call main */ 382 | /* You can adapt this function or call it from your startup code to implement a different startup */ 383 | /* functionality. */ 384 | 385 | /* You should also setup the needed IO registers as WINDEF (HC12A4 only) or the COP registers to run */ 386 | /* on hardware */ 387 | 388 | /* to set the reset vector several ways are possible : */ 389 | /* 1. define the function with "interrupt 0" as done below in the first case */ 390 | /* 2. add the following line to your prm file : VECTOR ADDRESS 0xfffe _Startup */ 391 | /* of course, even more posibilities exists */ 392 | /* the reset vector must be set so that the application has a defined entry point */ 393 | 394 | #if defined(__SET_RESET_VECTOR__) 395 | __EXTERN_C void __interrupt 0 _Startup(void) { 396 | #else 397 | __EXTERN_C void _Startup(void) { 398 | #endif 399 | /* purpose: 1) initialize the stack 400 | 2) initialize the RAM, copy down init data etc (Init) 401 | 3) call main; 402 | parameters: NONE 403 | called from: _PRESTART-code generated by the Linker 404 | or directly referenced by the reset vector */ 405 | 406 | /* initialize the stack pointer */ 407 | INIT_SP_FROM_STARTUP_DESC(); /*lint !e522 asm code */ /* HLI macro definition in hidef.h */ 408 | 409 | #if defined(_HCS12_SERIALMON) 410 | /* for Monitor based software remap the RAM & EEPROM to adhere 411 | to EB386. Edit RAM and EEPROM sections in PRM file to match these. */ 412 | ___INITRG = 0x00; /* lock registers block to 0x0000 */ 413 | ___INITRM = 0x39; /* lock Ram to end at 0x3FFF */ 414 | ___INITEE = 0x09; /* lock EEPROM block to end at 0x0fff */ 415 | #endif 416 | 417 | /* Here user defined code could be inserted, the stack could be used */ 418 | #if defined(_DO_DISABLE_COP_) 419 | _DISABLE_COP(); 420 | #endif 421 | 422 | /* Example : Set up WinDef Register to allow Paging */ 423 | #ifdef HC812A4 /* HC12 A4 derivative needs WINDEF to configure which pages are available */ 424 | #if (__ENABLE_EPAGE__ != 0 || __ENABLE_DPAGE__ != 0 || __ENABLE_PPAGE__ != 0) 425 | WINDEF= __ENABLE_EPAGE__ | __ENABLE_DPAGE__ | __ENABLE_PPAGE__; 426 | #endif 427 | #endif 428 | 429 | #if (defined(__MAP_RAM__) || defined(__MAP_FLASH__) || defined(__MAP_EXTERNAL__)) && !defined(__DO_SET_MMCTL1__) 430 | #define __DO_SET_MMCTL1__ 431 | #endif 432 | 433 | 434 | #if defined(__DO_SET_MMCTL1__) 435 | /* Set the MMCTL1 byte. Please use for HCS12XE and change the bits according */ 436 | /* to your configuration. */ 437 | /* Note: MMCTL1 is write once therefore please adapt this initialization here. */ 438 | /* This has to be done prior to the call to Init. */ 439 | #define _MMCTL1_ADR (0x00000013) 440 | #define _MMCTL1_BIT_TGMRAMON (1<<7) /* EEE Tag RAM and FTM SCRATCH RAM visible in the memory map */ 441 | #define _MMCTL1_BIT_EEEIFRON (1<<5) /* EEE IFR visible in the memory map */ 442 | #define _MMCTL1_BIT_PGMIFRON (1<<4) /* Program IFR visible in the memory map */ 443 | #define _MMCTL1_BIT_RAMHM (1<<3) /* RAM only in the higher half of the memory map */ 444 | #define _MMCTL1_BIT_EROMON (1<<2) /* Enables emulated Flash or ROM memory in the memory map */ 445 | #define _MMCTL1_BIT_ROMHM (1<<1) /* FLASH or ROM only in higher Half of Memory Map */ 446 | #define _MMCTL1_BIT_ROMON (1<<0) /* Enable FLASH or ROM in the memory map */ 447 | 448 | #define _MMCTL1_SET(value) ((*(volatile unsigned char*)_MMCTL1_ADR)= (value)) 449 | 450 | #if defined(__MAP_FLASH__) 451 | _MMCTL1_SET(_MMCTL1_BIT_ROMON | _MMCTL1_BIT_EROMON); 452 | #elif defined(__MAP_EXTERNAL__) 453 | _MMCTL1_SET(_MMCTL1_BIT_ROMON | _MMCTL1_BIT_EROMON | _MMCTL1_BIT_ROMHM); 454 | #else /* RAM */ 455 | _MMCTL1_SET(_MMCTL1_BIT_ROMON | _MMCTL1_BIT_EROMON | _MMCTL1_BIT_RAMHM | _MMCTL1_BIT_ROMHM); 456 | #endif 457 | #endif 458 | 459 | #ifndef __ONLY_INIT_SP 460 | Init(); /* zero out, copy down, call constructors */ 461 | #endif 462 | 463 | /* Here user defined code could be inserted, all global variables are initilized */ 464 | #if defined(_DO_ENABLE_COP_) 465 | _ENABLE_COP(1); 466 | #endif 467 | 468 | /* call main() */ 469 | main(); 470 | } 471 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/Sources/derivative.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Note: This file is recreated by the project wizard whenever the MCU is 3 | * changed and should not be edited by hand 4 | */ 5 | 6 | /* Include the derivative-specific header file */ 7 | #include 8 | 9 | #pragma LINK_INFO DERIVATIVE "MC9S12XS128" 10 | 11 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/Sources/main.c: -------------------------------------------------------------------------------- 1 | #include /* common defines and macros */ 2 | #include "derivative.h" /* derivative-specific definitions */ 3 | 4 | 5 | 6 | 7 | 8 | 9 | void main(void) { 10 | /* put your own code here */ 11 | 12 | 13 | 14 | EnableInterrupts; 15 | 16 | 17 | for(;;) { 18 | _FEED_COP(); /* feeds the dog */ 19 | } /* loop forever */ 20 | /* please make sure that you never leave main */ 21 | } 22 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/TBDML.ini: -------------------------------------------------------------------------------- 1 | [Environment Variables] 2 | GENPATH={Project}Sources;{Compiler}lib\hc12c\src;{Compiler}lib\hc12c\include;{Compiler}lib\hc12c\lib;{Compiler}lib\xgatec\src;{Compiler}lib\xgatec\include;{Compiler}lib\xgatec\lib 3 | LIBPATH={Compiler}lib\hc12c\include;{Compiler}lib\xgatec\include 4 | OBJPATH={Project}bin 5 | TEXTPATH={Project}bin 6 | ABSPATH={Project}bin 7 | 8 | [HI-WAVE] 9 | Target=TBDML 10 | Layout=C_layout.hwl 11 | LoadDialogOptions=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main" 12 | CPU=HC12 13 | 14 | [TBDML HCS12_GDI_SETTINGS] 15 | CMDFILE0=CMDFILE STARTUP ON ".\cmd\TBDML_startup.cmd" 16 | CMDFILE1=CMDFILE RESET ON ".\cmd\TBDML_reset.cmd" 17 | CMDFILE2=CMDFILE PRELOAD ON ".\cmd\TBDML_preload.cmd" 18 | CMDFILE3=CMDFILE POSTLOAD ON ".\cmd\TBDML_postload.cmd" 19 | CMDFILE4=CMDFILE VPPON ON ".\cmd\TBDML_vppon.cmd" 20 | CMDFILE5=CMDFILE VPPOFF ON ".\cmd\TBDML_vppoff.cmd" 21 | CMDFILE6=CMDFILE UNSECURE ON ".\cmd\TBDML_erase_unsecure_hcs12xe.cmd" 22 | MCUID=0x2E1 23 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/bin/Project.map: -------------------------------------------------------------------------------- 1 | This is a dummy entry for the map file. 2 | The correct input will be placed after the first link process. 3 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/cmd/Full_Chip_Simulation_Postload.cmd: -------------------------------------------------------------------------------- 1 | // After load the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/cmd/Full_Chip_Simulation_Preload.cmd: -------------------------------------------------------------------------------- 1 | // Before load the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/cmd/Full_Chip_Simulation_Reset.cmd: -------------------------------------------------------------------------------- 1 | // After reset the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/cmd/Full_Chip_Simulation_SetCPU.cmd: -------------------------------------------------------------------------------- 1 | // At startup the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/cmd/Full_Chip_Simulation_Startup.cmd: -------------------------------------------------------------------------------- 1 | // At startup the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/cmd/TBDML_Erase_unsecure_hcs12xe.cmd: -------------------------------------------------------------------------------- 1 | // ver 0.2 (28-Mar-06) 2 | // HCS12XE Core erasing + unsecuring command file: 3 | // These commands mass erase the chip then program the security byte to 0xFE (unsecured state). 4 | 5 | DEFINEVALUEDLG "Information required to unsecure the device" "FCLKDIV" 17 "To unsecure the device, the command script needs \nthe correct value for the FCLKDIV onchip register.\n\nDatasheet proposed values:\n\noscillator frequency\tFCLKDIV value (decimal)\n\n 16 \tMHz\t\t17\n 12 \tMHz\t\t13\n 8 \tMHz\t\t9\n 4 \tMHz\t\t5\n" 6 | 7 | FLASH RELEASE 8 | 9 | reset 10 | wb 0x03c 0x00 //disable cop 11 | wait 20 12 | 13 | 14 | WB 0x100 FCLKDIV // clock divider 15 | 16 | WB 0x106 0x30 // clear any error flags 17 | WB 0x102 0x00 // CCOBIX = 0 18 | WB 0x10A 0x08 // load erase all blocks command 19 | WB 0x106 0x80 // launch command 20 | WAIT 10 21 | 22 | reset 23 | 24 | WB 0x100 FCLKDIV // clock divider 25 | WB 0x106 0x30 // clear any error flags 26 | WB 0x102 0x00 // CCOBIX = 0 27 | WB 0x10A 0x06 // load program command 28 | WB 0x10B 0x7F // load GPAGE 29 | WB 0x102 0x01 // CCOBIX = 1 30 | WB 0x10A 0xFF // load addr hi 31 | WB 0x10B 0x08 // load addr lo 32 | WB 0x102 0x02 // CCOBIX = 2 33 | WB 0x10A 0xFF // load data 34 | WB 0x10B 0xFF // load data 35 | WB 0x102 0x03 // CCOBIX = 3 36 | WB 0x10A 0xFF // load data 37 | WB 0x10B 0xFF // load data 38 | WB 0x102 0x04 // CCOBIX = 4 39 | WB 0x10A 0xFF // load data 40 | WB 0x10B 0xFF // load data 41 | WB 0x102 0x05 // CCOBIX = 5 42 | WB 0x10A 0xFF // load data 43 | WB 0x10B 0xFE // load data 44 | WB 0x106 0x80 // launch command 45 | WAIT 1 46 | 47 | undef FCLKDIV // undefine variable 48 | 49 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/cmd/TBDML_Postload.cmd: -------------------------------------------------------------------------------- 1 | // After load the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/cmd/TBDML_Preload.cmd: -------------------------------------------------------------------------------- 1 | // Before load the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/cmd/TBDML_Reset.cmd: -------------------------------------------------------------------------------- 1 | // After reset the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/cmd/TBDML_Startup.cmd: -------------------------------------------------------------------------------- 1 | // At startup the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/cmd/TBDML_Vppoff.cmd: -------------------------------------------------------------------------------- 1 | // After programming the flash, the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/cmd/TBDML_Vppon.cmd: -------------------------------------------------------------------------------- 1 | // Before programming the flash, the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/prm/Project.prm: -------------------------------------------------------------------------------- 1 | /* This is a linker parameter file for the MC9S12XS128 */ 2 | 3 | /* 4 | This file is setup to use the HCS12X core only. 5 | If you plan to also use the XGATE in your project, best create a new project with the 6 | 'New Project Wizard' (File|New... menu in the CodeWarrior IDE) and choose the appropriate 7 | project parameters. 8 | */ 9 | 10 | NAMES 11 | /* CodeWarrior will pass all the needed files to the linker by command line. But here you may add your additional files */ 12 | END 13 | 14 | SEGMENTS /* here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. All addresses are 'logical' */ 15 | /* Register space */ 16 | /* IO_SEG = PAGED 0x0000 TO 0x07FF; intentionally not defined */ 17 | 18 | /* non-paged RAM */ 19 | RAM = READ_WRITE DATA_NEAR 0x2000 TO 0x3FFF; 20 | 21 | /* non-banked FLASH */ 22 | ROM_4000 = READ_ONLY DATA_NEAR IBCC_NEAR 0x4000 TO 0x7FFF; 23 | ROM_C000 = READ_ONLY DATA_NEAR IBCC_NEAR 0xC000 TO 0xFEFF; 24 | /* VECTORS = READ_ONLY 0xFF00 TO 0xFFFF; intentionally not defined: used for VECTOR commands below */ 25 | //OSVECTORS = READ_ONLY 0xFF10 TO 0xFFFF; /* OSEK interrupt vectors (use your vector.o) */ 26 | 27 | /* paged EEPROM 0x0800 TO 0x0BFF; addressed through EPAGE */ 28 | EEPROM_00 = READ_ONLY DATA_FAR IBCC_FAR 0x000800 TO 0x000BFF; 29 | EEPROM_01 = READ_ONLY DATA_FAR IBCC_FAR 0x010800 TO 0x010BFF; 30 | EEPROM_02 = READ_ONLY DATA_FAR IBCC_FAR 0x020800 TO 0x020BFF; 31 | EEPROM_03 = READ_ONLY DATA_FAR IBCC_FAR 0x030800 TO 0x030BFF; 32 | EEPROM_04 = READ_ONLY DATA_FAR IBCC_FAR 0x040800 TO 0x040BFF; 33 | EEPROM_05 = READ_ONLY DATA_FAR IBCC_FAR 0x050800 TO 0x050BFF; 34 | EEPROM_06 = READ_ONLY DATA_FAR IBCC_FAR 0x060800 TO 0x060BFF; 35 | EEPROM_07 = READ_ONLY DATA_FAR IBCC_FAR 0x070800 TO 0x070BFF; 36 | 37 | /* paged RAM: 0x1000 TO 0x1FFF; addressed through RPAGE */ 38 | /* RAM_FE = READ_WRITE 0xFE1000 TO 0xFE1FFF; intentionally not defined: equivalent to RAM: 0x2000..0x2FFF */ 39 | /* RAM_FF = READ_WRITE 0xFF1000 TO 0xFF1FFF; intentionally not defined: equivalent to RAM: 0x3000..0x3FFF */ 40 | 41 | /* paged FLASH: 0x8000 TO 0xBFFF; addressed through PPAGE */ 42 | PAGE_F8 = READ_ONLY DATA_FAR IBCC_FAR 0xF88000 TO 0xF8BFFF; 43 | PAGE_F9 = READ_ONLY DATA_FAR IBCC_FAR 0xF98000 TO 0xF9BFFF; 44 | PAGE_FA = READ_ONLY DATA_FAR IBCC_FAR 0xFA8000 TO 0xFABFFF; 45 | PAGE_FB = READ_ONLY DATA_FAR IBCC_FAR 0xFB8000 TO 0xFBBFFF; 46 | PAGE_FC = READ_ONLY DATA_FAR IBCC_FAR 0xFC8000 TO 0xFCBFFF; 47 | /* PAGE_FD = READ_ONLY 0xFD8000 TO 0xFDBFFF; intentionally not defined: equivalent to ROM_4000 */ 48 | PAGE_FE = READ_ONLY DATA_FAR IBCC_FAR 0xFE8000 TO 0xFEBFFF; 49 | /* PAGE_FF = READ_ONLY 0xFF8000 TO 0xFFBFFF; intentionally not defined: equivalent to ROM_C000 */ 50 | END 51 | 52 | PLACEMENT /* here all predefined and user segments are placed into the SEGMENTS defined above. */ 53 | _PRESTART, /* Used in HIWARE format: jump to _Startup at the code start */ 54 | STARTUP, /* startup data structures */ 55 | ROM_VAR, /* constant variables */ 56 | STRINGS, /* string literals */ 57 | VIRTUAL_TABLE_SEGMENT, /* C++ virtual table segment */ 58 | //.ostext, /* eventually OSEK code */ 59 | NON_BANKED, /* runtime routines which must not be banked */ 60 | COPY /* copy down information: how to initialize variables */ 61 | /* in case you want to use ROM_4000 here as well, make sure 62 | that all files (incl. library files) are compiled with the 63 | option: -OnB=b */ 64 | INTO ROM_C000/*, ROM_4000*/; 65 | 66 | DEFAULT_ROM INTO PAGE_FE, PAGE_FC, PAGE_FB, PAGE_FA, PAGE_F9, PAGE_F8; 67 | 68 | //.stackstart, /* eventually used for OSEK kernel awareness: Main-Stack Start */ 69 | SSTACK, /* allocate stack first to avoid overwriting variables on overflow */ 70 | //.stackend, /* eventually used for OSEK kernel awareness: Main-Stack End */ 71 | PAGED_RAM, /* there is no need for paged data accesses on this derivative */ 72 | 73 | DEFAULT_RAM /* all variables, the default RAM location */ 74 | INTO RAM; 75 | 76 | DISTRIBUTE DISTRIBUTE_INTO 77 | ROM_4000, PAGE_FE, PAGE_FC, PAGE_FB, PAGE_FA, PAGE_F9, PAGE_F8; 78 | CONST_DISTRIBUTE DISTRIBUTE_INTO 79 | ROM_4000, PAGE_FE, PAGE_FC, PAGE_FB, PAGE_FA, PAGE_F9, PAGE_F8; 80 | DATA_DISTRIBUTE DISTRIBUTE_INTO 81 | RAM; 82 | //.vectors INTO OSVECTORS; /* OSEK vector table */ 83 | END 84 | 85 | 86 | ENTRIES /* keep the following unreferenced variables */ 87 | /* OSEK: always allocate the vector table and all dependent objects */ 88 | //_vectab OsBuildNumber _OsOrtiStackStart _OsOrtiStart 89 | END 90 | 91 | STACKSIZE 0x100 /* size of the stack (will be allocated in DEFAULT_RAM) */ 92 | 93 | /* use these definitions in plane of the vector table ('vectors') above */ 94 | VECTOR 0 _Startup /* reset vector: this is the default entry point for a C/C++ application. */ 95 | //VECTOR 0 Entry /* reset vector: this is the default entry point for an Assembly application. */ 96 | //INIT Entry /* for assembly applications: that this is as well the initialization entry point */ 97 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Project/prm/burner.bbl: -------------------------------------------------------------------------------- 1 | /* global s-record file */ 2 | OPENFILE "%ABS_FILE%.glo" 3 | format = motorola 4 | busWidth = 1 5 | SRECORD=Sx 6 | 7 | /* "EABI compliant encoded global" address to global */ 8 | len = 0x1800000 9 | origin = 0x1000000 10 | destination = 0 11 | SENDBYTE 1 "%ABS_FILE%" 12 | 13 | /* physical flash window to global */ 14 | len = 0x4000 15 | destination = 0x7F8000 16 | origin = 0x008000 17 | SENDBYTE 1 "%ABS_FILE%" 18 | 19 | /* logical non banked flash at $4000 and $C000 to global */ 20 | len = 0x4000 21 | destination = 0x7F4000 22 | origin = 0x004000 23 | SENDBYTE 1 "%ABS_FILE%" 24 | destination = 0x7FC000 25 | origin = 0x00C000 26 | SENDBYTE 1 "%ABS_FILE%" 27 | 28 | /* logical 1 MB banked flash to global */ 29 | destination = 0x700000 30 | origin = 0xc08000 31 | SENDBYTE 1 "%ABS_FILE%" 32 | destination = 0x704000 33 | origin = 0xc18000 34 | SENDBYTE 1 "%ABS_FILE%" 35 | destination = 0x708000 36 | origin = 0xc28000 37 | SENDBYTE 1 "%ABS_FILE%" 38 | destination = 0x70c000 39 | origin = 0xc38000 40 | SENDBYTE 1 "%ABS_FILE%" 41 | destination = 0x710000 42 | origin = 0xc48000 43 | SENDBYTE 1 "%ABS_FILE%" 44 | destination = 0x714000 45 | origin = 0xc58000 46 | SENDBYTE 1 "%ABS_FILE%" 47 | destination = 0x718000 48 | origin = 0xc68000 49 | SENDBYTE 1 "%ABS_FILE%" 50 | destination = 0x71c000 51 | origin = 0xc78000 52 | SENDBYTE 1 "%ABS_FILE%" 53 | destination = 0x720000 54 | origin = 0xc88000 55 | SENDBYTE 1 "%ABS_FILE%" 56 | destination = 0x724000 57 | origin = 0xc98000 58 | SENDBYTE 1 "%ABS_FILE%" 59 | destination = 0x728000 60 | origin = 0xca8000 61 | SENDBYTE 1 "%ABS_FILE%" 62 | destination = 0x72c000 63 | origin = 0xcb8000 64 | SENDBYTE 1 "%ABS_FILE%" 65 | destination = 0x730000 66 | origin = 0xcc8000 67 | SENDBYTE 1 "%ABS_FILE%" 68 | destination = 0x734000 69 | origin = 0xcd8000 70 | SENDBYTE 1 "%ABS_FILE%" 71 | destination = 0x738000 72 | origin = 0xce8000 73 | SENDBYTE 1 "%ABS_FILE%" 74 | destination = 0x73c000 75 | origin = 0xcf8000 76 | SENDBYTE 1 "%ABS_FILE%" 77 | destination = 0x740000 78 | origin = 0xd08000 79 | SENDBYTE 1 "%ABS_FILE%" 80 | destination = 0x744000 81 | origin = 0xd18000 82 | SENDBYTE 1 "%ABS_FILE%" 83 | destination = 0x748000 84 | origin = 0xd28000 85 | SENDBYTE 1 "%ABS_FILE%" 86 | destination = 0x74c000 87 | origin = 0xd38000 88 | SENDBYTE 1 "%ABS_FILE%" 89 | destination = 0x750000 90 | origin = 0xd48000 91 | SENDBYTE 1 "%ABS_FILE%" 92 | destination = 0x754000 93 | origin = 0xd58000 94 | SENDBYTE 1 "%ABS_FILE%" 95 | destination = 0x758000 96 | origin = 0xd68000 97 | SENDBYTE 1 "%ABS_FILE%" 98 | destination = 0x75c000 99 | origin = 0xd78000 100 | SENDBYTE 1 "%ABS_FILE%" 101 | destination = 0x760000 102 | origin = 0xd88000 103 | SENDBYTE 1 "%ABS_FILE%" 104 | destination = 0x764000 105 | origin = 0xd98000 106 | SENDBYTE 1 "%ABS_FILE%" 107 | destination = 0x768000 108 | origin = 0xda8000 109 | SENDBYTE 1 "%ABS_FILE%" 110 | destination = 0x76c000 111 | origin = 0xdb8000 112 | SENDBYTE 1 "%ABS_FILE%" 113 | destination = 0x770000 114 | origin = 0xdc8000 115 | SENDBYTE 1 "%ABS_FILE%" 116 | destination = 0x774000 117 | origin = 0xdd8000 118 | SENDBYTE 1 "%ABS_FILE%" 119 | destination = 0x778000 120 | origin = 0xde8000 121 | SENDBYTE 1 "%ABS_FILE%" 122 | destination = 0x77c000 123 | origin = 0xdf8000 124 | SENDBYTE 1 "%ABS_FILE%" 125 | destination = 0x780000 126 | origin = 0xe08000 127 | SENDBYTE 1 "%ABS_FILE%" 128 | destination = 0x784000 129 | origin = 0xe18000 130 | SENDBYTE 1 "%ABS_FILE%" 131 | destination = 0x788000 132 | origin = 0xe28000 133 | SENDBYTE 1 "%ABS_FILE%" 134 | destination = 0x78c000 135 | origin = 0xe38000 136 | SENDBYTE 1 "%ABS_FILE%" 137 | destination = 0x790000 138 | origin = 0xe48000 139 | SENDBYTE 1 "%ABS_FILE%" 140 | destination = 0x794000 141 | origin = 0xe58000 142 | SENDBYTE 1 "%ABS_FILE%" 143 | destination = 0x798000 144 | origin = 0xe68000 145 | SENDBYTE 1 "%ABS_FILE%" 146 | destination = 0x79c000 147 | origin = 0xe78000 148 | SENDBYTE 1 "%ABS_FILE%" 149 | destination = 0x7a0000 150 | origin = 0xe88000 151 | SENDBYTE 1 "%ABS_FILE%" 152 | destination = 0x7a4000 153 | origin = 0xe98000 154 | SENDBYTE 1 "%ABS_FILE%" 155 | destination = 0x7a8000 156 | origin = 0xea8000 157 | SENDBYTE 1 "%ABS_FILE%" 158 | destination = 0x7ac000 159 | origin = 0xeb8000 160 | SENDBYTE 1 "%ABS_FILE%" 161 | destination = 0x7b0000 162 | origin = 0xec8000 163 | SENDBYTE 1 "%ABS_FILE%" 164 | destination = 0x7b4000 165 | origin = 0xed8000 166 | SENDBYTE 1 "%ABS_FILE%" 167 | destination = 0x7b8000 168 | origin = 0xee8000 169 | SENDBYTE 1 "%ABS_FILE%" 170 | destination = 0x7bc000 171 | origin = 0xef8000 172 | SENDBYTE 1 "%ABS_FILE%" 173 | destination = 0x7c0000 174 | origin = 0xf08000 175 | SENDBYTE 1 "%ABS_FILE%" 176 | destination = 0x7c4000 177 | origin = 0xf18000 178 | SENDBYTE 1 "%ABS_FILE%" 179 | destination = 0x7c8000 180 | origin = 0xf28000 181 | SENDBYTE 1 "%ABS_FILE%" 182 | destination = 0x7cc000 183 | origin = 0xf38000 184 | SENDBYTE 1 "%ABS_FILE%" 185 | destination = 0x7d0000 186 | origin = 0xf48000 187 | SENDBYTE 1 "%ABS_FILE%" 188 | destination = 0x7d4000 189 | origin = 0xf58000 190 | SENDBYTE 1 "%ABS_FILE%" 191 | destination = 0x7d8000 192 | origin = 0xf68000 193 | SENDBYTE 1 "%ABS_FILE%" 194 | destination = 0x7dc000 195 | origin = 0xf78000 196 | SENDBYTE 1 "%ABS_FILE%" 197 | destination = 0x7e0000 198 | origin = 0xf88000 199 | SENDBYTE 1 "%ABS_FILE%" 200 | destination = 0x7e4000 201 | origin = 0xf98000 202 | SENDBYTE 1 "%ABS_FILE%" 203 | destination = 0x7e8000 204 | origin = 0xfa8000 205 | SENDBYTE 1 "%ABS_FILE%" 206 | destination = 0x7ec000 207 | origin = 0xfb8000 208 | SENDBYTE 1 "%ABS_FILE%" 209 | destination = 0x7f0000 210 | origin = 0xfc8000 211 | SENDBYTE 1 "%ABS_FILE%" 212 | destination = 0x7f4000 213 | origin = 0xfd8000 214 | SENDBYTE 1 "%ABS_FILE%" 215 | destination = 0x7f8000 216 | origin = 0xfe8000 217 | SENDBYTE 1 "%ABS_FILE%" 218 | destination = 0x7fc000 219 | origin = 0xff8000 220 | SENDBYTE 1 "%ABS_FILE%" 221 | 222 | CLOSE 223 | 224 | /*****************************************************************************/ 225 | 226 | /* logical s-record file */ 227 | 228 | OPENFILE "%ABS_FILE%.s19" 229 | format = motorola 230 | busWidth = 1 231 | SRECORD=Sx 232 | 233 | /* logical non banked flash at $4000 and $C000 to logical */ 234 | len = 0x4000 235 | origin = 0x004000 236 | destination = 0x004000 237 | SENDBYTE 1 "%ABS_FILE%" 238 | 239 | len = 0x4000 240 | origin = 0x00C000 241 | destination = 0xC000 242 | SENDBYTE 1 "%ABS_FILE%" 243 | 244 | /* physical flash window to logical */ 245 | len = 0x4000 246 | origin = 0x008000 247 | destination = 0xFE8000 248 | SENDBYTE 1 "%ABS_FILE%" 249 | 250 | 251 | /* logical 1 MB banked flash to logical */ 252 | len = 0x400000 253 | origin = 0xC00000 254 | destination = 0xC00000 255 | SENDBYTE 1 "%ABS_FILE%" 256 | 257 | 258 | /* global 1 MB banked flash to logical */ 259 | len = 0x4000 260 | origin = 0x1700000 261 | destination = 0xc08000 262 | SENDBYTE 1 "%ABS_FILE%" 263 | origin = 0x1704000 264 | destination = 0xc18000 265 | SENDBYTE 1 "%ABS_FILE%" 266 | origin = 0x1708000 267 | destination = 0xc28000 268 | SENDBYTE 1 "%ABS_FILE%" 269 | origin = 0x170c000 270 | destination = 0xc38000 271 | SENDBYTE 1 "%ABS_FILE%" 272 | origin = 0x1710000 273 | destination = 0xc48000 274 | SENDBYTE 1 "%ABS_FILE%" 275 | origin = 0x1714000 276 | destination = 0xc58000 277 | SENDBYTE 1 "%ABS_FILE%" 278 | origin = 0x1718000 279 | destination = 0xc68000 280 | SENDBYTE 1 "%ABS_FILE%" 281 | origin = 0x171c000 282 | destination = 0xc78000 283 | SENDBYTE 1 "%ABS_FILE%" 284 | origin = 0x1720000 285 | destination = 0xc88000 286 | SENDBYTE 1 "%ABS_FILE%" 287 | origin = 0x1724000 288 | destination = 0xc98000 289 | SENDBYTE 1 "%ABS_FILE%" 290 | origin = 0x1728000 291 | destination = 0xca8000 292 | SENDBYTE 1 "%ABS_FILE%" 293 | origin = 0x172c000 294 | destination = 0xcb8000 295 | SENDBYTE 1 "%ABS_FILE%" 296 | origin = 0x1730000 297 | destination = 0xcc8000 298 | SENDBYTE 1 "%ABS_FILE%" 299 | origin = 0x1734000 300 | destination = 0xcd8000 301 | SENDBYTE 1 "%ABS_FILE%" 302 | origin = 0x1738000 303 | destination = 0xce8000 304 | SENDBYTE 1 "%ABS_FILE%" 305 | origin = 0x173c000 306 | destination = 0xcf8000 307 | SENDBYTE 1 "%ABS_FILE%" 308 | origin = 0x1740000 309 | destination = 0xd08000 310 | SENDBYTE 1 "%ABS_FILE%" 311 | origin = 0x1744000 312 | destination = 0xd18000 313 | SENDBYTE 1 "%ABS_FILE%" 314 | origin = 0x1748000 315 | destination = 0xd28000 316 | SENDBYTE 1 "%ABS_FILE%" 317 | origin = 0x174c000 318 | destination = 0xd38000 319 | SENDBYTE 1 "%ABS_FILE%" 320 | origin = 0x1750000 321 | destination = 0xd48000 322 | SENDBYTE 1 "%ABS_FILE%" 323 | origin = 0x1754000 324 | destination = 0xd58000 325 | SENDBYTE 1 "%ABS_FILE%" 326 | origin = 0x1758000 327 | destination = 0xd68000 328 | SENDBYTE 1 "%ABS_FILE%" 329 | origin = 0x175c000 330 | destination = 0xd78000 331 | SENDBYTE 1 "%ABS_FILE%" 332 | origin = 0x1760000 333 | destination = 0xd88000 334 | SENDBYTE 1 "%ABS_FILE%" 335 | origin = 0x1764000 336 | destination = 0xd98000 337 | SENDBYTE 1 "%ABS_FILE%" 338 | origin = 0x1768000 339 | destination = 0xda8000 340 | SENDBYTE 1 "%ABS_FILE%" 341 | origin = 0x176c000 342 | destination = 0xdb8000 343 | SENDBYTE 1 "%ABS_FILE%" 344 | origin = 0x1770000 345 | destination = 0xdc8000 346 | SENDBYTE 1 "%ABS_FILE%" 347 | origin = 0x1774000 348 | destination = 0xdd8000 349 | SENDBYTE 1 "%ABS_FILE%" 350 | origin = 0x1778000 351 | destination = 0xde8000 352 | SENDBYTE 1 "%ABS_FILE%" 353 | origin = 0x177c000 354 | destination = 0xdf8000 355 | SENDBYTE 1 "%ABS_FILE%" 356 | origin = 0x1780000 357 | destination = 0xe08000 358 | SENDBYTE 1 "%ABS_FILE%" 359 | origin = 0x1784000 360 | destination = 0xe18000 361 | SENDBYTE 1 "%ABS_FILE%" 362 | origin = 0x1788000 363 | destination = 0xe28000 364 | SENDBYTE 1 "%ABS_FILE%" 365 | origin = 0x178c000 366 | destination = 0xe38000 367 | SENDBYTE 1 "%ABS_FILE%" 368 | origin = 0x1790000 369 | destination = 0xe48000 370 | SENDBYTE 1 "%ABS_FILE%" 371 | origin = 0x1794000 372 | destination = 0xe58000 373 | SENDBYTE 1 "%ABS_FILE%" 374 | origin = 0x1798000 375 | destination = 0xe68000 376 | SENDBYTE 1 "%ABS_FILE%" 377 | origin = 0x179c000 378 | destination = 0xe78000 379 | SENDBYTE 1 "%ABS_FILE%" 380 | origin = 0x17a0000 381 | destination = 0xe88000 382 | SENDBYTE 1 "%ABS_FILE%" 383 | origin = 0x17a4000 384 | destination = 0xe98000 385 | SENDBYTE 1 "%ABS_FILE%" 386 | origin = 0x17a8000 387 | destination = 0xea8000 388 | SENDBYTE 1 "%ABS_FILE%" 389 | origin = 0x17ac000 390 | destination = 0xeb8000 391 | SENDBYTE 1 "%ABS_FILE%" 392 | origin = 0x17b0000 393 | destination = 0xec8000 394 | SENDBYTE 1 "%ABS_FILE%" 395 | origin = 0x17b4000 396 | destination = 0xed8000 397 | SENDBYTE 1 "%ABS_FILE%" 398 | origin = 0x17b8000 399 | destination = 0xee8000 400 | SENDBYTE 1 "%ABS_FILE%" 401 | origin = 0x17bc000 402 | destination = 0xef8000 403 | SENDBYTE 1 "%ABS_FILE%" 404 | origin = 0x17c0000 405 | destination = 0xf08000 406 | SENDBYTE 1 "%ABS_FILE%" 407 | origin = 0x17c4000 408 | destination = 0xf18000 409 | SENDBYTE 1 "%ABS_FILE%" 410 | origin = 0x17c8000 411 | destination = 0xf28000 412 | SENDBYTE 1 "%ABS_FILE%" 413 | origin = 0x17cc000 414 | destination = 0xf38000 415 | SENDBYTE 1 "%ABS_FILE%" 416 | origin = 0x17d0000 417 | destination = 0xf48000 418 | SENDBYTE 1 "%ABS_FILE%" 419 | origin = 0x17d4000 420 | destination = 0xf58000 421 | SENDBYTE 1 "%ABS_FILE%" 422 | origin = 0x17d8000 423 | destination = 0xf68000 424 | SENDBYTE 1 "%ABS_FILE%" 425 | origin = 0x17dc000 426 | destination = 0xf78000 427 | SENDBYTE 1 "%ABS_FILE%" 428 | origin = 0x17e0000 429 | destination = 0xf88000 430 | SENDBYTE 1 "%ABS_FILE%" 431 | origin = 0x17e4000 432 | destination = 0xf98000 433 | SENDBYTE 1 "%ABS_FILE%" 434 | origin = 0x17e8000 435 | destination = 0xfa8000 436 | SENDBYTE 1 "%ABS_FILE%" 437 | origin = 0x17ec000 438 | destination = 0xfb8000 439 | SENDBYTE 1 "%ABS_FILE%" 440 | origin = 0x17f0000 441 | destination = 0xfc8000 442 | SENDBYTE 1 "%ABS_FILE%" 443 | origin = 0x17f4000 444 | destination = 0xfd8000 445 | SENDBYTE 1 "%ABS_FILE%" 446 | origin = 0x17f8000 447 | destination = 0xfe8000 448 | SENDBYTE 1 "%ABS_FILE%" 449 | origin = 0x17fc000 450 | destination = 0xff8000 451 | SENDBYTE 1 "%ABS_FILE%" 452 | 453 | CLOSE 454 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/SDdriver.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/SDdriver.c -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/SDdriver.h: -------------------------------------------------------------------------------- 1 | #ifndef _LQSD_H 2 | #define _LQSD_H 3 | #include "derivative.h" 4 | 5 | void Dly_ms(int ms); 6 | void SPI_High_Rate(void) ; 7 | void Init_Dev(void); 8 | void SD_Init(void); 9 | byte Wt_Block(dword sector, byte* buffer); 10 | byte Rd_Block(dword sector, byte* buffer); 11 | byte SD_Reset(void); 12 | void New_Buf8(byte buffer[],byte ch); 13 | void CLS_Buf8(byte buffer[]); 14 | //void View_Buf8(byte buffer[]); 15 | #endif -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/Start12.c: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | start12.c - standard startup code 3 | The startup code may be optimized to special user requests 4 | ---------------------------------------------------- 5 | Copyright (c) Metrowerks, Basel, Switzerland 6 | All rights reserved 7 | 8 | Note: ROM libraries are not implemented in this startup code 9 | Note: C++ destructors of global objects are NOT yet supported in the HIWARE Object File Format. 10 | To use this feature, please build your application with the ELF object file format. 11 | *****************************************************/ 12 | /*lint -esym(750, __NO_FLAGS_OFFSET, __NO_MAIN_OFFSET, __NO_STACKOFFSET_OFFSET) */ 13 | /* these macros remove some unused fields in the startup descriptor */ 14 | #define __NO_FLAGS_OFFSET /* we do not need the flags field in the startup data descriptor */ 15 | #define __NO_MAIN_OFFSET /* we do not need the main field in the startup data descriptor */ 16 | #define __NO_STACKOFFSET_OFFSET /* we do not need the stackOffset field in the startup data descriptor */ 17 | 18 | /*#define __BANKED_COPY_DOWN : allow to allocate .copy in flash area */ 19 | #if defined(__BANKED_COPY_DOWN) && (!defined(__HCS12X__) || !defined(__ELF_OBJECT_FILE_FORMAT__)) 20 | #error /* the __BANKED_COPY_DOWN switch is only supported for the HCS12X with ELF */ 21 | /* (and not for the HC12, HCS12 or for the HIWARE object file format) */ 22 | #endif 23 | 24 | #include "hidef.h" 25 | #include "start12.h" 26 | 27 | /***************************************************************************/ 28 | /* Macros to control how the startup code handles the COP: */ 29 | /* #define _DO_FEED_COP_ : do feed the COP */ 30 | /* #define _DO_ENABLE_COP_: do enable the COP */ 31 | /* #define _DO_DISABLE_COP_: disable the COP */ 32 | /* Without defining any of these, the startup code does NOT handle the COP */ 33 | /***************************************************************************/ 34 | /* __ONLY_INIT_SP define: */ 35 | /* This define selects an shorter version of the startup code */ 36 | /* which only loads the stack pointer and directly afterwards calls */ 37 | /* main. This version does however NOT initialized global variables */ 38 | /* (So this version is not ANSI compliant!) */ 39 | /***************************************************************************/ 40 | /* __FAR_DATA define: */ 41 | /* By default, the startup code only supports to initialize the default */ 42 | /* kind of memory. If some memory is allocated far in the small or banked */ 43 | /* memory model, then the startup code only supports to initialize this */ 44 | /* memory blocks if __FAR_DATA is defined. If __FAR_DATA is not defined, */ 45 | /* then the linker will issue a message like */ 46 | /* "L1128: Cutting value _Range beg data member from 0xF01000 to 0x1000" */ 47 | /* and this startup code writes to the cutted address */ 48 | /***************************************************************************/ 49 | /* __BANKED_COPY_DOWN define: */ 50 | /* by default, the startup code assumes that the startup data structure */ 51 | /* _startupData, the zero out areas and the .copy section are all */ 52 | /* allocated in NON_BANKED memory. Especially the .copy section can be */ 53 | /* if there are many or large RAM areas to initialize. */ 54 | /* for the HCS12X, which also copies the XGATE RAM located code via .copy */ 55 | /* section, the startup code supports to allocate .copy in a banked flash */ 56 | /* The placement of .copy in the prm file has to be adapted when adding or */ 57 | /* removing the this macro. */ 58 | /* Note: This macro is only supported for the HCS12X and when using ELF */ 59 | /***************************************************************************/ 60 | 61 | #ifdef __cplusplus 62 | #define __EXTERN_C extern "C" 63 | #else 64 | #define __EXTERN_C 65 | #endif 66 | 67 | __EXTERN_C void main(void); /* prototype of main function */ 68 | 69 | #ifndef __ONLY_INIT_SP 70 | #pragma DATA_SEG __NEAR_SEG STARTUP_DATA /* _startupData can be accessed using 16 bit accesses. */ 71 | /* This is needed because it contains the stack top, and without stack, far data cannot be accessed */ 72 | /*lint -e1065 */ 73 | struct _tagStartup _startupData; /* read-only: */ 74 | /* _startupData is allocated in ROM and */ 75 | /* initialized by the linker */ 76 | /*lint +e1065 */ 77 | #pragma DATA_SEG DEFAULT 78 | #endif /* __ONLY_INIT_SP */ 79 | 80 | #if defined(FAR_DATA) && (!defined(__HCS12X__) || defined(__BANKED_COPY_DOWN)) 81 | #include "non_bank.sgm" 82 | /* the init function must be in non banked memory if banked variables are used */ 83 | /* because _SET_PAGE is called, which may change any page register. */ 84 | 85 | __EXTERN_C void _SET_PAGE(void); /* the inline assembler needs a prototype */ 86 | /* this is a runtime routine with a special */ 87 | /* calling convention, do not use it in c code! */ 88 | #else 89 | #include "default.sgm" 90 | #endif /* defined(FAR_DATA) && (!defined(__HCS12X__) || defined(__BANKED_COPY_DOWN)) */ 91 | 92 | 93 | /* define value and bits for Windef Register */ 94 | #ifdef HC812A4 95 | #define WINDEF (*(volatile unsigned char*) 0x37) 96 | #if defined( __BANKED__) || defined(__LARGE__) || defined(__PPAGE__) 97 | #define __ENABLE_PPAGE__ 0x40 98 | #else 99 | #define __ENABLE_PPAGE__ 0x0 100 | #endif 101 | #if defined(__DPAGE__) 102 | #define __ENABLE_DPAGE__ 0x80 103 | #else 104 | #define __ENABLE_DPAGE__ 0x0 105 | #endif 106 | #if defined(__EPAGE__) 107 | #define __ENABLE_EPAGE__ 0x20 108 | #else 109 | #define __ENABLE_EPAGE__ 0x0 110 | #endif 111 | #endif /* HC812A4 */ 112 | 113 | #ifdef _HCS12_SERIALMON 114 | /* for Monitor based software remap the RAM & EEPROM to adhere 115 | to EB386. Edit RAM and EEPROM sections in PRM file to match these. */ 116 | #define ___INITRM (*(volatile unsigned char *) 0x0010) 117 | #define ___INITRG (*(volatile unsigned char *) 0x0011) 118 | #define ___INITEE (*(volatile unsigned char *) 0x0012) 119 | #endif 120 | 121 | #if defined(_DO_FEED_COP_) 122 | #define __FEED_COP_IN_HLI() } __asm movb #0x55, _COP_RST_ADR; __asm movb #0xAA, _COP_RST_ADR; __asm { 123 | #else 124 | #define __FEED_COP_IN_HLI() /* do nothing */ 125 | #endif 126 | 127 | #ifndef __ONLY_INIT_SP 128 | #if (!defined(FAR_DATA) || defined(__HCS12X__)) && (defined( __BANKED__) || defined(__LARGE__) || defined(__BANKED_COPY_DOWN)) 129 | static void __far Init(void) 130 | #else 131 | static void Init(void) 132 | #endif 133 | { 134 | /* purpose: 1) zero out RAM-areas where data is allocated */ 135 | /* 2) copy initialization data from ROM to RAM */ 136 | /* 3) call global constructors in C++ */ 137 | /* called from: _Startup, LibInits */ 138 | __asm { 139 | ZeroOut: 140 | #if defined(__HIWARE_OBJECT_FILE_FORMAT__) && defined(__LARGE__) 141 | LDX _startupData.pZeroOut:1 ; in the large memory model in the HIWARE format, pZeroOut is a 24 bit pointer 142 | #else 143 | LDX _startupData.pZeroOut ; *pZeroOut 144 | #endif 145 | LDY _startupData.nofZeroOuts ; nofZeroOuts 146 | BEQ CopyDown ; if nothing to zero out 147 | 148 | NextZeroOut: PSHY ; save nofZeroOuts 149 | #if defined(FAR_DATA) 150 | LDAB 1,X+ ; load page of destination address 151 | LDY 2,X+ ; load offset of destination address 152 | #if defined(__HCS12X__) 153 | STAB __GPAGE_ADR__ 154 | #else /* defined(__HCS12X__) */ 155 | __PIC_JSR(_SET_PAGE) ; sets the page in the correct page register 156 | #endif /* defined(__HCS12X__) */ 157 | #else /* FAR_DATA */ 158 | LDY 2,X+ ; start address and advance *pZeroOut (X = X+4) 159 | #endif /* FAR_DATA */ 160 | 161 | #if defined(__HCS12X__) && defined(FAR_DATA) 162 | PSHX 163 | LDX 0,X ; byte count 164 | #if defined(__OPTIMIZE_FOR_SIZE__) 165 | CLRA 166 | NextWord: GSTAA 1,Y+ ; clear memory byte 167 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 168 | DBNE X, NextWord ; dec byte count 169 | #else 170 | LDD #0 171 | LSRX 172 | BEQ LoopClrW1 ; do we copy more than 1 byte? 173 | NextWord: GSTD 2,Y+ ; clear memory word 174 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 175 | DBNE X, NextWord ; dec word count 176 | LoopClrW1: 177 | BCC LastClr ; handle last byte 178 | GSTAA 1,Y+ ; handle last byte 179 | LastClr: 180 | #endif 181 | PULX 182 | LEAX 2,X 183 | #elif defined(__OPTIMIZE_FOR_SIZE__) /* -os, default */ 184 | LDD 2,X+ ; byte count 185 | NextWord: CLR 1,Y+ ; clear memory byte 186 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 187 | DBNE D, NextWord ; dec byte count 188 | #else /* __OPTIMIZE_FOR_TIME__ */ 189 | LDD 2,X+ ; byte count 190 | LSRD ; /2 and save bit 0 in the carry 191 | BEQ LoopClrW1 ; do we copy more than 1 byte? 192 | PSHX 193 | LDX #0 194 | LoopClrW: STX 2,Y+ ; Word-Clear 195 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 196 | DBNE D, LoopClrW 197 | PULX 198 | LoopClrW1: 199 | BCC LastClr ; handle last byte 200 | CLR 1,Y+ 201 | LastClr: 202 | #endif /* __OPTIMIZE_FOR_SIZE__/__OPTIMIZE_FOR_TIME__ */ 203 | PULY ; restore nofZeroOuts 204 | DEY ; dec nofZeroOuts 205 | BNE NextZeroOut 206 | CopyDown: 207 | #if defined(__BANKED_COPY_DOWN) 208 | LDAA _startupData.toCopyDownBeg:0 ; get PAGE address of .copy section 209 | STAA __PPAGE_ADR__ ; set PPAGE address 210 | LDX _startupData.toCopyDownBeg:1 ; load address of copy down desc. 211 | #elif defined(__ELF_OBJECT_FILE_FORMAT__) 212 | LDX _startupData.toCopyDownBeg ; load address of copy down desc. 213 | #else 214 | LDX _startupData.toCopyDownBeg:2 ; load address of copy down desc. 215 | #endif 216 | NextBlock: 217 | LDD 2,X+ ; size of init-data -> D 218 | BEQ funcInits ; end of copy down desc. 219 | #ifdef FAR_DATA 220 | PSHD ; save counter 221 | LDAB 1,X+ ; load destination page 222 | LDY 2,X+ ; destination address 223 | #if defined(__HCS12X__) 224 | STAB __GPAGE_ADR__ 225 | #else /* __HCS12X__ */ 226 | __PIC_JSR(_SET_PAGE) ; sets the destinations page register 227 | #endif /* __HCS12X__ */ 228 | PULD ; restore counter 229 | #else /* FAR_DATA */ 230 | LDY 2,X+ ; load destination address 231 | #endif /* FAR_DATA */ 232 | 233 | #if defined(__HCS12X__) && defined(FAR_DATA) 234 | #if defined(__OPTIMIZE_FOR_SIZE__) /* -os, default */ 235 | Copy: PSHA 236 | LDAA 1,X+ 237 | GSTAA 1,Y+ ; move a byte from ROM to the data area 238 | PULA 239 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 240 | DBNE D,Copy ; copy-byte loop 241 | #else 242 | LSRD ; /2 and save bit 0 in the carry 243 | BEQ Copy1 ; do we copy more than 1 byte? 244 | 245 | Copy: PSHD 246 | LDD 2,X+ 247 | GSTD 2,Y+ ; move a word from ROM to the data area 248 | PULD 249 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 250 | DBNE D,Copy ; copy-word loop 251 | Copy1: 252 | BCC NextBlock ; handle last byte? 253 | LDAA 1,X+ 254 | GSTAA 1,Y+ ; move a byte from ROM to the data area 255 | #endif 256 | #elif defined(__OPTIMIZE_FOR_SIZE__) /* -os, default */ 257 | Copy: MOVB 1,X+,1,Y+ ; move a byte from ROM to the data area 258 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 259 | DBNE D,Copy ; copy-byte loop 260 | #else /* __OPTIMIZE_FOR_TIME__ */ 261 | LSRD ; /2 and save bit 0 in the carry 262 | BEQ Copy1 ; do we copy more than 1 byte? 263 | Copy: MOVW 2,X+,2,Y+ ; move a word from ROM to the data area 264 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 265 | DBNE D,Copy ; copy-word loop 266 | Copy1: 267 | BCC NextBlock ; handle last byte? 268 | MOVB 1,X+,1,Y+ ; copy the last byte 269 | #endif /* __OPTIMIZE_FOR_SIZE__/__OPTIMIZE_FOR_TIME__ */ 270 | BRA NextBlock 271 | funcInits: ; call of global construtors is only in c++ necessary 272 | #if defined(__cplusplus) 273 | #if defined(__ELF_OBJECT_FILE_FORMAT__) 274 | #if defined( __BANKED__) || defined(__LARGE__) 275 | LDY _startupData.nofInitBodies; load number of cpp. 276 | BEQ done ; if cppcount == 0, goto done 277 | LDX _startupData.initBodies ; load address of first module to initialize 278 | nextInit: 279 | LEAX 3,X ; increment to next init 280 | PSHX ; save address of next function to initialize 281 | PSHY ; save cpp counter 282 | CALL [-3,X] ; use double indirect call to load the page register also 283 | PULY ; restore cpp counter 284 | PULX ; restore actual address 285 | DEY ; decrement cpp counter 286 | BNE nextInit 287 | #else /* defined( __BANKED__) || defined(__LARGE__) */ 288 | 289 | LDD _startupData.nofInitBodies; load number of cpp. 290 | BEQ done ; if cppcount == 0, goto done 291 | LDX _startupData.initBodies ; load address of first module to initialize 292 | nextInit: 293 | LDY 2,X+ ; load address of first module to initialize 294 | PSHD 295 | PSHX ; save actual address 296 | JSR 0,Y ; call initialization function 297 | PULX ; restore actual address 298 | PULD ; restore cpp counter 299 | DBNE D, nextInit 300 | #endif /* defined( __BANKED__) || defined(__LARGE__) */ 301 | #else /* __ELF_OBJECT_FILE_FORMAT__ */ 302 | LDX _startupData.mInits ; load address of first module to initialize 303 | #if defined( __BANKED__) || defined(__LARGE__) 304 | nextInit: LDY 3,X+ ; load address of initialization function 305 | BEQ done ; stop when address == 0 306 | ; in common environments the offset of a function is never 0, so this test could be avoided 307 | #ifdef __InitFunctionsMayHaveOffset0__ 308 | BRCLR -1,X, done, 0xff ; stop when address == 0 309 | #endif /* __InitFunctionsMayHaveOffset0__ */ 310 | PSHX ; save address of next function to initialize 311 | CALL [-3,X] ; use double indirect call to load the page register also 312 | #else /* defined( __BANKED__) || defined(__LARGE__) */ 313 | nextInit: 314 | LDY 2,X+ ; load address of first module to initialize 315 | BEQ done ; stop when address of function == 0 316 | PSHX ; save actual address 317 | JSR 0,Y ; call initialization function 318 | #endif /* defined( __BANKED__) || defined(__LARGE__) */ 319 | PULX ; restore actual address 320 | BRA nextInit 321 | #endif /* __ELF_OBJECT_FILE_FORMAT__ */ 322 | done: 323 | #endif /* __cplusplus */ 324 | } 325 | } 326 | #endif /* __ONLY_INIT_SP */ 327 | 328 | #if defined( __ELF_OBJECT_FILE_FORMAT__) && defined(__cplusplus ) && 0 /* the call to main does not support to return anymore */ 329 | 330 | #if !defined(FAR_DATA) && (defined( __BANKED__) || defined(__LARGE__)) 331 | static void __far Fini(void) 332 | #else 333 | static void Fini(void) 334 | #endif 335 | { 336 | /* purpose: 1) call global destructors in C++ */ 337 | __asm { 338 | #if defined( __BANKED__) || defined(__LARGE__) 339 | 340 | LDY _startupData.nofFiniBodies; load number of cpp. 341 | BEQ done ; if cppcount == 0, goto done 342 | LDX _startupData.finiBodies ; load address of first module to finalize 343 | nextInit2: 344 | LEAX 3,X ; increment to next init 345 | PSHX ; save address of next function to finalize 346 | PSHY ; save cpp counter 347 | CALL [-3,X] ; use double indirect call to load the page register also 348 | PULY ; restore cpp counter 349 | PULX ; restore actual address 350 | DEY ; decrement cpp counter 351 | BNE nextInit2 352 | #else /* defined( __BANKED__) || defined(__LARGE__) */ 353 | 354 | LDD _startupData.nofFiniBodies; load number of cpp. 355 | BEQ done ; if cppcount == 0, goto done 356 | LDX _startupData.finiBodies ; load address of first module to finalize 357 | nextInit2: 358 | LDY 2,X+ ; load address of first module to finalize 359 | PSHD 360 | PSHX ; save actual address 361 | JSR 0,Y ; call finalize function 362 | PULX ; restore actual address 363 | PULD ; restore cpp counter 364 | DBNE D, nextInit2 365 | #endif /* defined(__BANKED__) || defined(__LARGE__) */ 366 | done:; 367 | } 368 | } 369 | #endif 370 | 371 | 372 | #include "non_bank.sgm" 373 | 374 | #pragma MESSAGE DISABLE C12053 /* Stack-pointer change not in debugging-information */ 375 | #pragma NO_FRAME 376 | #pragma NO_ENTRY 377 | #if !defined(__SMALL__) 378 | #pragma NO_EXIT 379 | #endif 380 | 381 | /* The function _Startup must be called in order to initialize global variables and to call main */ 382 | /* You can adapt this function or call it from your startup code to implement a different startup */ 383 | /* functionality. */ 384 | 385 | /* You should also setup the needed IO registers as WINDEF (HC12A4 only) or the COP registers to run */ 386 | /* on hardware */ 387 | 388 | /* to set the reset vector several ways are possible : */ 389 | /* 1. define the function with "interrupt 0" as done below in the first case */ 390 | /* 2. add the following line to your prm file : VECTOR ADDRESS 0xfffe _Startup */ 391 | /* of course, even more posibilities exists */ 392 | /* the reset vector must be set so that the application has a defined entry point */ 393 | 394 | #if defined(__SET_RESET_VECTOR__) 395 | __EXTERN_C void __interrupt 0 _Startup(void) { 396 | #else 397 | __EXTERN_C void _Startup(void) { 398 | #endif 399 | /* purpose: 1) initialize the stack 400 | 2) initialize the RAM, copy down init data etc (Init) 401 | 3) call main; 402 | parameters: NONE 403 | called from: _PRESTART-code generated by the Linker 404 | or directly referenced by the reset vector */ 405 | 406 | /* initialize the stack pointer */ 407 | INIT_SP_FROM_STARTUP_DESC(); /*lint !e522 asm code */ /* HLI macro definition in hidef.h */ 408 | 409 | #if defined(_HCS12_SERIALMON) 410 | /* for Monitor based software remap the RAM & EEPROM to adhere 411 | to EB386. Edit RAM and EEPROM sections in PRM file to match these. */ 412 | ___INITRG = 0x00; /* lock registers block to 0x0000 */ 413 | ___INITRM = 0x39; /* lock Ram to end at 0x3FFF */ 414 | ___INITEE = 0x09; /* lock EEPROM block to end at 0x0fff */ 415 | #endif 416 | 417 | /* Here user defined code could be inserted, the stack could be used */ 418 | #if defined(_DO_DISABLE_COP_) 419 | _DISABLE_COP(); 420 | #endif 421 | 422 | /* Example : Set up WinDef Register to allow Paging */ 423 | #ifdef HC812A4 /* HC12 A4 derivative needs WINDEF to configure which pages are available */ 424 | #if (__ENABLE_EPAGE__ != 0 || __ENABLE_DPAGE__ != 0 || __ENABLE_PPAGE__ != 0) 425 | WINDEF= __ENABLE_EPAGE__ | __ENABLE_DPAGE__ | __ENABLE_PPAGE__; 426 | #endif 427 | #endif 428 | 429 | #if (defined(__MAP_RAM__) || defined(__MAP_FLASH__) || defined(__MAP_EXTERNAL__)) && !defined(__DO_SET_MMCTL1__) 430 | #define __DO_SET_MMCTL1__ 431 | #endif 432 | 433 | 434 | #if defined(__DO_SET_MMCTL1__) 435 | /* Set the MMCTL1 byte. Please use for HCS12XE and change the bits according */ 436 | /* to your configuration. */ 437 | /* Note: MMCTL1 is write once therefore please adapt this initialization here. */ 438 | /* This has to be done prior to the call to Init. */ 439 | #define _MMCTL1_ADR (0x00000013) 440 | #define _MMCTL1_BIT_TGMRAMON (1<<7) /* EEE Tag RAM and FTM SCRATCH RAM visible in the memory map */ 441 | #define _MMCTL1_BIT_EEEIFRON (1<<5) /* EEE IFR visible in the memory map */ 442 | #define _MMCTL1_BIT_PGMIFRON (1<<4) /* Program IFR visible in the memory map */ 443 | #define _MMCTL1_BIT_RAMHM (1<<3) /* RAM only in the higher half of the memory map */ 444 | #define _MMCTL1_BIT_EROMON (1<<2) /* Enables emulated Flash or ROM memory in the memory map */ 445 | #define _MMCTL1_BIT_ROMHM (1<<1) /* FLASH or ROM only in higher Half of Memory Map */ 446 | #define _MMCTL1_BIT_ROMON (1<<0) /* Enable FLASH or ROM in the memory map */ 447 | 448 | #define _MMCTL1_SET(value) ((*(volatile unsigned char*)_MMCTL1_ADR)= (value)) 449 | 450 | #if defined(__MAP_FLASH__) 451 | _MMCTL1_SET(_MMCTL1_BIT_ROMON | _MMCTL1_BIT_EROMON); 452 | #elif defined(__MAP_EXTERNAL__) 453 | _MMCTL1_SET(_MMCTL1_BIT_ROMON | _MMCTL1_BIT_EROMON | _MMCTL1_BIT_ROMHM); 454 | #else /* RAM */ 455 | _MMCTL1_SET(_MMCTL1_BIT_ROMON | _MMCTL1_BIT_EROMON | _MMCTL1_BIT_RAMHM | _MMCTL1_BIT_ROMHM); 456 | #endif 457 | #endif 458 | 459 | #ifndef __ONLY_INIT_SP 460 | Init(); /* zero out, copy down, call constructors */ 461 | #endif 462 | 463 | /* Here user defined code could be inserted, all global variables are initilized */ 464 | #if defined(_DO_ENABLE_COP_) 465 | _ENABLE_COP(1); 466 | #endif 467 | 468 | /* call main() */ 469 | main(); 470 | } 471 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/derivative.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Note: This file is recreated by the project wizard whenever the MCU is 3 | * changed and should not be edited by hand 4 | */ 5 | 6 | /* Include the derivative-specific header file */ 7 | #include 8 | 9 | #pragma LINK_INFO DERIVATIVE "MC9S12XS128" 10 | 11 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/main.c -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/main/C_Layout.hwl: -------------------------------------------------------------------------------- 1 | OPEN source 0 0 60 39 2 | Source < attributes MARKS off 3 | OPEN assembly 60 0 40 31 4 | Assembly < attributes ADR on,CODE off,ABSADR on,SYMB off,TOPPC 0xF88C 5 | OPEN procedure 0 39 60 17 6 | Procedure < attributes VALUES on,TYPES off 7 | OPEN register 60 31 40 25 8 | Register < attributes FORMAT AUTO,COMPLEMENT None 9 | OPEN memory 60 56 40 22 10 | Memory < attributes FORMAT hex,COMPLEMENT None,WORD 1,ASC on,ADR on,ADDRESS 0x80 11 | OPEN data 0 56 60 22 12 | Data:1 < attributes SCOPE global,COMPLEMENT None,FORMAT Symb,MODE automatic,UPDATERATE 10,NAMEWIDTH 16 13 | OPEN data 0 78 60 22 14 | Data:2 < attributes SCOPE local,COMPLEMENT None,FORMAT Symb,MODE automatic,UPDATERATE 10,NAMEWIDTH 16 15 | OPEN command 60 78 40 22 16 | Command < attributes CACHESIZE 1000 17 | bckcolor 50331647 18 | font 'Courier New' 9 BLACK 19 | AUTOSIZE on 20 | ACTIVATE Data:2 Command Procedure Data:1 Source Register Assembly Memory 21 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/main/Default.mem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/main/Default.mem -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/main/Full_Chip_Simulation.ini: -------------------------------------------------------------------------------- 1 | [Environment Variables] 2 | GENPATH={Project}Sources;{Compiler}lib\hc12c\src;{Compiler}lib\hc12c\include;{Compiler}lib\hc12c\lib;{Compiler}lib\xgatec\src;{Compiler}lib\xgatec\include;{Compiler}lib\xgatec\lib 3 | LIBPATH={Compiler}lib\hc12c\include;{Compiler}lib\xgatec\include 4 | OBJPATH={Project}bin 5 | TEXTPATH={Project}bin 6 | ABSPATH={Project}bin 7 | 8 | [HI-WAVE] 9 | Target=sim 10 | Layout=C_layout.hwl 11 | LoadDialogOptions=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main" 12 | CPU=HC12 13 | 14 | [Simulator] 15 | CMDFILE0=CMDFILE STARTUP ON ".\cmd\Full_Chip_Simulation_startup.cmd" 16 | 17 | [Simulator HC12] 18 | CMDFILE0=CMDFILE RESET ON ".\cmd\Full_Chip_Simulation_reset.cmd" 19 | CMDFILE1=CMDFILE PRELOAD ON ".\cmd\Full_Chip_Simulation_preload.cmd" 20 | CMDFILE2=CMDFILE POSTLOAD ON ".\cmd\Full_Chip_Simulation_postload.cmd" 21 | CMDFILE3=CMDFILE SETCPU ON ".\cmd\Full_Chip_Simulation_setcpu.cmd" 22 | HCS12_SUPPORT=2 23 | FCS=MC9S12XS128 24 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/main/Sources/Start12.c: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | start12.c - standard startup code 3 | The startup code may be optimized to special user requests 4 | ---------------------------------------------------- 5 | Copyright (c) Metrowerks, Basel, Switzerland 6 | All rights reserved 7 | 8 | Note: ROM libraries are not implemented in this startup code 9 | Note: C++ destructors of global objects are NOT yet supported in the HIWARE Object File Format. 10 | To use this feature, please build your application with the ELF object file format. 11 | *****************************************************/ 12 | /*lint -esym(750, __NO_FLAGS_OFFSET, __NO_MAIN_OFFSET, __NO_STACKOFFSET_OFFSET) */ 13 | /* these macros remove some unused fields in the startup descriptor */ 14 | #define __NO_FLAGS_OFFSET /* we do not need the flags field in the startup data descriptor */ 15 | #define __NO_MAIN_OFFSET /* we do not need the main field in the startup data descriptor */ 16 | #define __NO_STACKOFFSET_OFFSET /* we do not need the stackOffset field in the startup data descriptor */ 17 | 18 | /*#define __BANKED_COPY_DOWN : allow to allocate .copy in flash area */ 19 | #if defined(__BANKED_COPY_DOWN) && (!defined(__HCS12X__) || !defined(__ELF_OBJECT_FILE_FORMAT__)) 20 | #error /* the __BANKED_COPY_DOWN switch is only supported for the HCS12X with ELF */ 21 | /* (and not for the HC12, HCS12 or for the HIWARE object file format) */ 22 | #endif 23 | 24 | #include "hidef.h" 25 | #include "start12.h" 26 | 27 | /***************************************************************************/ 28 | /* Macros to control how the startup code handles the COP: */ 29 | /* #define _DO_FEED_COP_ : do feed the COP */ 30 | /* #define _DO_ENABLE_COP_: do enable the COP */ 31 | /* #define _DO_DISABLE_COP_: disable the COP */ 32 | /* Without defining any of these, the startup code does NOT handle the COP */ 33 | /***************************************************************************/ 34 | /* __ONLY_INIT_SP define: */ 35 | /* This define selects an shorter version of the startup code */ 36 | /* which only loads the stack pointer and directly afterwards calls */ 37 | /* main. This version does however NOT initialized global variables */ 38 | /* (So this version is not ANSI compliant!) */ 39 | /***************************************************************************/ 40 | /* __FAR_DATA define: */ 41 | /* By default, the startup code only supports to initialize the default */ 42 | /* kind of memory. If some memory is allocated far in the small or banked */ 43 | /* memory model, then the startup code only supports to initialize this */ 44 | /* memory blocks if __FAR_DATA is defined. If __FAR_DATA is not defined, */ 45 | /* then the linker will issue a message like */ 46 | /* "L1128: Cutting value _Range beg data member from 0xF01000 to 0x1000" */ 47 | /* and this startup code writes to the cutted address */ 48 | /***************************************************************************/ 49 | /* __BANKED_COPY_DOWN define: */ 50 | /* by default, the startup code assumes that the startup data structure */ 51 | /* _startupData, the zero out areas and the .copy section are all */ 52 | /* allocated in NON_BANKED memory. Especially the .copy section can be */ 53 | /* if there are many or large RAM areas to initialize. */ 54 | /* for the HCS12X, which also copies the XGATE RAM located code via .copy */ 55 | /* section, the startup code supports to allocate .copy in a banked flash */ 56 | /* The placement of .copy in the prm file has to be adapted when adding or */ 57 | /* removing the this macro. */ 58 | /* Note: This macro is only supported for the HCS12X and when using ELF */ 59 | /***************************************************************************/ 60 | 61 | #ifdef __cplusplus 62 | #define __EXTERN_C extern "C" 63 | #else 64 | #define __EXTERN_C 65 | #endif 66 | 67 | __EXTERN_C void main(void); /* prototype of main function */ 68 | 69 | #ifndef __ONLY_INIT_SP 70 | #pragma DATA_SEG __NEAR_SEG STARTUP_DATA /* _startupData can be accessed using 16 bit accesses. */ 71 | /* This is needed because it contains the stack top, and without stack, far data cannot be accessed */ 72 | /*lint -e1065 */ 73 | struct _tagStartup _startupData; /* read-only: */ 74 | /* _startupData is allocated in ROM and */ 75 | /* initialized by the linker */ 76 | /*lint +e1065 */ 77 | #pragma DATA_SEG DEFAULT 78 | #endif /* __ONLY_INIT_SP */ 79 | 80 | #if defined(FAR_DATA) && (!defined(__HCS12X__) || defined(__BANKED_COPY_DOWN)) 81 | #include "non_bank.sgm" 82 | /* the init function must be in non banked memory if banked variables are used */ 83 | /* because _SET_PAGE is called, which may change any page register. */ 84 | 85 | __EXTERN_C void _SET_PAGE(void); /* the inline assembler needs a prototype */ 86 | /* this is a runtime routine with a special */ 87 | /* calling convention, do not use it in c code! */ 88 | #else 89 | #include "default.sgm" 90 | #endif /* defined(FAR_DATA) && (!defined(__HCS12X__) || defined(__BANKED_COPY_DOWN)) */ 91 | 92 | 93 | /* define value and bits for Windef Register */ 94 | #ifdef HC812A4 95 | #define WINDEF (*(volatile unsigned char*) 0x37) 96 | #if defined( __BANKED__) || defined(__LARGE__) || defined(__PPAGE__) 97 | #define __ENABLE_PPAGE__ 0x40 98 | #else 99 | #define __ENABLE_PPAGE__ 0x0 100 | #endif 101 | #if defined(__DPAGE__) 102 | #define __ENABLE_DPAGE__ 0x80 103 | #else 104 | #define __ENABLE_DPAGE__ 0x0 105 | #endif 106 | #if defined(__EPAGE__) 107 | #define __ENABLE_EPAGE__ 0x20 108 | #else 109 | #define __ENABLE_EPAGE__ 0x0 110 | #endif 111 | #endif /* HC812A4 */ 112 | 113 | #ifdef _HCS12_SERIALMON 114 | /* for Monitor based software remap the RAM & EEPROM to adhere 115 | to EB386. Edit RAM and EEPROM sections in PRM file to match these. */ 116 | #define ___INITRM (*(volatile unsigned char *) 0x0010) 117 | #define ___INITRG (*(volatile unsigned char *) 0x0011) 118 | #define ___INITEE (*(volatile unsigned char *) 0x0012) 119 | #endif 120 | 121 | #if defined(_DO_FEED_COP_) 122 | #define __FEED_COP_IN_HLI() } __asm movb #0x55, _COP_RST_ADR; __asm movb #0xAA, _COP_RST_ADR; __asm { 123 | #else 124 | #define __FEED_COP_IN_HLI() /* do nothing */ 125 | #endif 126 | 127 | #ifndef __ONLY_INIT_SP 128 | #if (!defined(FAR_DATA) || defined(__HCS12X__)) && (defined( __BANKED__) || defined(__LARGE__) || defined(__BANKED_COPY_DOWN)) 129 | static void __far Init(void) 130 | #else 131 | static void Init(void) 132 | #endif 133 | { 134 | /* purpose: 1) zero out RAM-areas where data is allocated */ 135 | /* 2) copy initialization data from ROM to RAM */ 136 | /* 3) call global constructors in C++ */ 137 | /* called from: _Startup, LibInits */ 138 | __asm { 139 | ZeroOut: 140 | #if defined(__HIWARE_OBJECT_FILE_FORMAT__) && defined(__LARGE__) 141 | LDX _startupData.pZeroOut:1 ; in the large memory model in the HIWARE format, pZeroOut is a 24 bit pointer 142 | #else 143 | LDX _startupData.pZeroOut ; *pZeroOut 144 | #endif 145 | LDY _startupData.nofZeroOuts ; nofZeroOuts 146 | BEQ CopyDown ; if nothing to zero out 147 | 148 | NextZeroOut: PSHY ; save nofZeroOuts 149 | #if defined(FAR_DATA) 150 | LDAB 1,X+ ; load page of destination address 151 | LDY 2,X+ ; load offset of destination address 152 | #if defined(__HCS12X__) 153 | STAB __GPAGE_ADR__ 154 | #else /* defined(__HCS12X__) */ 155 | __PIC_JSR(_SET_PAGE) ; sets the page in the correct page register 156 | #endif /* defined(__HCS12X__) */ 157 | #else /* FAR_DATA */ 158 | LDY 2,X+ ; start address and advance *pZeroOut (X = X+4) 159 | #endif /* FAR_DATA */ 160 | 161 | #if defined(__HCS12X__) && defined(FAR_DATA) 162 | PSHX 163 | LDX 0,X ; byte count 164 | #if defined(__OPTIMIZE_FOR_SIZE__) 165 | CLRA 166 | NextWord: GSTAA 1,Y+ ; clear memory byte 167 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 168 | DBNE X, NextWord ; dec byte count 169 | #else 170 | LDD #0 171 | LSRX 172 | BEQ LoopClrW1 ; do we copy more than 1 byte? 173 | NextWord: GSTD 2,Y+ ; clear memory word 174 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 175 | DBNE X, NextWord ; dec word count 176 | LoopClrW1: 177 | BCC LastClr ; handle last byte 178 | GSTAA 1,Y+ ; handle last byte 179 | LastClr: 180 | #endif 181 | PULX 182 | LEAX 2,X 183 | #elif defined(__OPTIMIZE_FOR_SIZE__) /* -os, default */ 184 | LDD 2,X+ ; byte count 185 | NextWord: CLR 1,Y+ ; clear memory byte 186 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 187 | DBNE D, NextWord ; dec byte count 188 | #else /* __OPTIMIZE_FOR_TIME__ */ 189 | LDD 2,X+ ; byte count 190 | LSRD ; /2 and save bit 0 in the carry 191 | BEQ LoopClrW1 ; do we copy more than 1 byte? 192 | PSHX 193 | LDX #0 194 | LoopClrW: STX 2,Y+ ; Word-Clear 195 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 196 | DBNE D, LoopClrW 197 | PULX 198 | LoopClrW1: 199 | BCC LastClr ; handle last byte 200 | CLR 1,Y+ 201 | LastClr: 202 | #endif /* __OPTIMIZE_FOR_SIZE__/__OPTIMIZE_FOR_TIME__ */ 203 | PULY ; restore nofZeroOuts 204 | DEY ; dec nofZeroOuts 205 | BNE NextZeroOut 206 | CopyDown: 207 | #if defined(__BANKED_COPY_DOWN) 208 | LDAA _startupData.toCopyDownBeg:0 ; get PAGE address of .copy section 209 | STAA __PPAGE_ADR__ ; set PPAGE address 210 | LDX _startupData.toCopyDownBeg:1 ; load address of copy down desc. 211 | #elif defined(__ELF_OBJECT_FILE_FORMAT__) 212 | LDX _startupData.toCopyDownBeg ; load address of copy down desc. 213 | #else 214 | LDX _startupData.toCopyDownBeg:2 ; load address of copy down desc. 215 | #endif 216 | NextBlock: 217 | LDD 2,X+ ; size of init-data -> D 218 | BEQ funcInits ; end of copy down desc. 219 | #ifdef FAR_DATA 220 | PSHD ; save counter 221 | LDAB 1,X+ ; load destination page 222 | LDY 2,X+ ; destination address 223 | #if defined(__HCS12X__) 224 | STAB __GPAGE_ADR__ 225 | #else /* __HCS12X__ */ 226 | __PIC_JSR(_SET_PAGE) ; sets the destinations page register 227 | #endif /* __HCS12X__ */ 228 | PULD ; restore counter 229 | #else /* FAR_DATA */ 230 | LDY 2,X+ ; load destination address 231 | #endif /* FAR_DATA */ 232 | 233 | #if defined(__HCS12X__) && defined(FAR_DATA) 234 | #if defined(__OPTIMIZE_FOR_SIZE__) /* -os, default */ 235 | Copy: PSHA 236 | LDAA 1,X+ 237 | GSTAA 1,Y+ ; move a byte from ROM to the data area 238 | PULA 239 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 240 | DBNE D,Copy ; copy-byte loop 241 | #else 242 | LSRD ; /2 and save bit 0 in the carry 243 | BEQ Copy1 ; do we copy more than 1 byte? 244 | 245 | Copy: PSHD 246 | LDD 2,X+ 247 | GSTD 2,Y+ ; move a word from ROM to the data area 248 | PULD 249 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 250 | DBNE D,Copy ; copy-word loop 251 | Copy1: 252 | BCC NextBlock ; handle last byte? 253 | LDAA 1,X+ 254 | GSTAA 1,Y+ ; move a byte from ROM to the data area 255 | #endif 256 | #elif defined(__OPTIMIZE_FOR_SIZE__) /* -os, default */ 257 | Copy: MOVB 1,X+,1,Y+ ; move a byte from ROM to the data area 258 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 259 | DBNE D,Copy ; copy-byte loop 260 | #else /* __OPTIMIZE_FOR_TIME__ */ 261 | LSRD ; /2 and save bit 0 in the carry 262 | BEQ Copy1 ; do we copy more than 1 byte? 263 | Copy: MOVW 2,X+,2,Y+ ; move a word from ROM to the data area 264 | __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */ 265 | DBNE D,Copy ; copy-word loop 266 | Copy1: 267 | BCC NextBlock ; handle last byte? 268 | MOVB 1,X+,1,Y+ ; copy the last byte 269 | #endif /* __OPTIMIZE_FOR_SIZE__/__OPTIMIZE_FOR_TIME__ */ 270 | BRA NextBlock 271 | funcInits: ; call of global construtors is only in c++ necessary 272 | #if defined(__cplusplus) 273 | #if defined(__ELF_OBJECT_FILE_FORMAT__) 274 | #if defined( __BANKED__) || defined(__LARGE__) 275 | LDY _startupData.nofInitBodies; load number of cpp. 276 | BEQ done ; if cppcount == 0, goto done 277 | LDX _startupData.initBodies ; load address of first module to initialize 278 | nextInit: 279 | LEAX 3,X ; increment to next init 280 | PSHX ; save address of next function to initialize 281 | PSHY ; save cpp counter 282 | CALL [-3,X] ; use double indirect call to load the page register also 283 | PULY ; restore cpp counter 284 | PULX ; restore actual address 285 | DEY ; decrement cpp counter 286 | BNE nextInit 287 | #else /* defined( __BANKED__) || defined(__LARGE__) */ 288 | 289 | LDD _startupData.nofInitBodies; load number of cpp. 290 | BEQ done ; if cppcount == 0, goto done 291 | LDX _startupData.initBodies ; load address of first module to initialize 292 | nextInit: 293 | LDY 2,X+ ; load address of first module to initialize 294 | PSHD 295 | PSHX ; save actual address 296 | JSR 0,Y ; call initialization function 297 | PULX ; restore actual address 298 | PULD ; restore cpp counter 299 | DBNE D, nextInit 300 | #endif /* defined( __BANKED__) || defined(__LARGE__) */ 301 | #else /* __ELF_OBJECT_FILE_FORMAT__ */ 302 | LDX _startupData.mInits ; load address of first module to initialize 303 | #if defined( __BANKED__) || defined(__LARGE__) 304 | nextInit: LDY 3,X+ ; load address of initialization function 305 | BEQ done ; stop when address == 0 306 | ; in common environments the offset of a function is never 0, so this test could be avoided 307 | #ifdef __InitFunctionsMayHaveOffset0__ 308 | BRCLR -1,X, done, 0xff ; stop when address == 0 309 | #endif /* __InitFunctionsMayHaveOffset0__ */ 310 | PSHX ; save address of next function to initialize 311 | CALL [-3,X] ; use double indirect call to load the page register also 312 | #else /* defined( __BANKED__) || defined(__LARGE__) */ 313 | nextInit: 314 | LDY 2,X+ ; load address of first module to initialize 315 | BEQ done ; stop when address of function == 0 316 | PSHX ; save actual address 317 | JSR 0,Y ; call initialization function 318 | #endif /* defined( __BANKED__) || defined(__LARGE__) */ 319 | PULX ; restore actual address 320 | BRA nextInit 321 | #endif /* __ELF_OBJECT_FILE_FORMAT__ */ 322 | done: 323 | #endif /* __cplusplus */ 324 | } 325 | } 326 | #endif /* __ONLY_INIT_SP */ 327 | 328 | #if defined( __ELF_OBJECT_FILE_FORMAT__) && defined(__cplusplus ) && 0 /* the call to main does not support to return anymore */ 329 | 330 | #if !defined(FAR_DATA) && (defined( __BANKED__) || defined(__LARGE__)) 331 | static void __far Fini(void) 332 | #else 333 | static void Fini(void) 334 | #endif 335 | { 336 | /* purpose: 1) call global destructors in C++ */ 337 | __asm { 338 | #if defined( __BANKED__) || defined(__LARGE__) 339 | 340 | LDY _startupData.nofFiniBodies; load number of cpp. 341 | BEQ done ; if cppcount == 0, goto done 342 | LDX _startupData.finiBodies ; load address of first module to finalize 343 | nextInit2: 344 | LEAX 3,X ; increment to next init 345 | PSHX ; save address of next function to finalize 346 | PSHY ; save cpp counter 347 | CALL [-3,X] ; use double indirect call to load the page register also 348 | PULY ; restore cpp counter 349 | PULX ; restore actual address 350 | DEY ; decrement cpp counter 351 | BNE nextInit2 352 | #else /* defined( __BANKED__) || defined(__LARGE__) */ 353 | 354 | LDD _startupData.nofFiniBodies; load number of cpp. 355 | BEQ done ; if cppcount == 0, goto done 356 | LDX _startupData.finiBodies ; load address of first module to finalize 357 | nextInit2: 358 | LDY 2,X+ ; load address of first module to finalize 359 | PSHD 360 | PSHX ; save actual address 361 | JSR 0,Y ; call finalize function 362 | PULX ; restore actual address 363 | PULD ; restore cpp counter 364 | DBNE D, nextInit2 365 | #endif /* defined(__BANKED__) || defined(__LARGE__) */ 366 | done:; 367 | } 368 | } 369 | #endif 370 | 371 | 372 | #include "non_bank.sgm" 373 | 374 | #pragma MESSAGE DISABLE C12053 /* Stack-pointer change not in debugging-information */ 375 | #pragma NO_FRAME 376 | #pragma NO_ENTRY 377 | #if !defined(__SMALL__) 378 | #pragma NO_EXIT 379 | #endif 380 | 381 | /* The function _Startup must be called in order to initialize global variables and to call main */ 382 | /* You can adapt this function or call it from your startup code to implement a different startup */ 383 | /* functionality. */ 384 | 385 | /* You should also setup the needed IO registers as WINDEF (HC12A4 only) or the COP registers to run */ 386 | /* on hardware */ 387 | 388 | /* to set the reset vector several ways are possible : */ 389 | /* 1. define the function with "interrupt 0" as done below in the first case */ 390 | /* 2. add the following line to your prm file : VECTOR ADDRESS 0xfffe _Startup */ 391 | /* of course, even more posibilities exists */ 392 | /* the reset vector must be set so that the application has a defined entry point */ 393 | 394 | #if defined(__SET_RESET_VECTOR__) 395 | __EXTERN_C void __interrupt 0 _Startup(void) { 396 | #else 397 | __EXTERN_C void _Startup(void) { 398 | #endif 399 | /* purpose: 1) initialize the stack 400 | 2) initialize the RAM, copy down init data etc (Init) 401 | 3) call main; 402 | parameters: NONE 403 | called from: _PRESTART-code generated by the Linker 404 | or directly referenced by the reset vector */ 405 | 406 | /* initialize the stack pointer */ 407 | INIT_SP_FROM_STARTUP_DESC(); /*lint !e522 asm code */ /* HLI macro definition in hidef.h */ 408 | 409 | #if defined(_HCS12_SERIALMON) 410 | /* for Monitor based software remap the RAM & EEPROM to adhere 411 | to EB386. Edit RAM and EEPROM sections in PRM file to match these. */ 412 | ___INITRG = 0x00; /* lock registers block to 0x0000 */ 413 | ___INITRM = 0x39; /* lock Ram to end at 0x3FFF */ 414 | ___INITEE = 0x09; /* lock EEPROM block to end at 0x0fff */ 415 | #endif 416 | 417 | /* Here user defined code could be inserted, the stack could be used */ 418 | #if defined(_DO_DISABLE_COP_) 419 | _DISABLE_COP(); 420 | #endif 421 | 422 | /* Example : Set up WinDef Register to allow Paging */ 423 | #ifdef HC812A4 /* HC12 A4 derivative needs WINDEF to configure which pages are available */ 424 | #if (__ENABLE_EPAGE__ != 0 || __ENABLE_DPAGE__ != 0 || __ENABLE_PPAGE__ != 0) 425 | WINDEF= __ENABLE_EPAGE__ | __ENABLE_DPAGE__ | __ENABLE_PPAGE__; 426 | #endif 427 | #endif 428 | 429 | #if (defined(__MAP_RAM__) || defined(__MAP_FLASH__) || defined(__MAP_EXTERNAL__)) && !defined(__DO_SET_MMCTL1__) 430 | #define __DO_SET_MMCTL1__ 431 | #endif 432 | 433 | 434 | #if defined(__DO_SET_MMCTL1__) 435 | /* Set the MMCTL1 byte. Please use for HCS12XE and change the bits according */ 436 | /* to your configuration. */ 437 | /* Note: MMCTL1 is write once therefore please adapt this initialization here. */ 438 | /* This has to be done prior to the call to Init. */ 439 | #define _MMCTL1_ADR (0x00000013) 440 | #define _MMCTL1_BIT_TGMRAMON (1<<7) /* EEE Tag RAM and FTM SCRATCH RAM visible in the memory map */ 441 | #define _MMCTL1_BIT_EEEIFRON (1<<5) /* EEE IFR visible in the memory map */ 442 | #define _MMCTL1_BIT_PGMIFRON (1<<4) /* Program IFR visible in the memory map */ 443 | #define _MMCTL1_BIT_RAMHM (1<<3) /* RAM only in the higher half of the memory map */ 444 | #define _MMCTL1_BIT_EROMON (1<<2) /* Enables emulated Flash or ROM memory in the memory map */ 445 | #define _MMCTL1_BIT_ROMHM (1<<1) /* FLASH or ROM only in higher Half of Memory Map */ 446 | #define _MMCTL1_BIT_ROMON (1<<0) /* Enable FLASH or ROM in the memory map */ 447 | 448 | #define _MMCTL1_SET(value) ((*(volatile unsigned char*)_MMCTL1_ADR)= (value)) 449 | 450 | #if defined(__MAP_FLASH__) 451 | _MMCTL1_SET(_MMCTL1_BIT_ROMON | _MMCTL1_BIT_EROMON); 452 | #elif defined(__MAP_EXTERNAL__) 453 | _MMCTL1_SET(_MMCTL1_BIT_ROMON | _MMCTL1_BIT_EROMON | _MMCTL1_BIT_ROMHM); 454 | #else /* RAM */ 455 | _MMCTL1_SET(_MMCTL1_BIT_ROMON | _MMCTL1_BIT_EROMON | _MMCTL1_BIT_RAMHM | _MMCTL1_BIT_ROMHM); 456 | #endif 457 | #endif 458 | 459 | #ifndef __ONLY_INIT_SP 460 | Init(); /* zero out, copy down, call constructors */ 461 | #endif 462 | 463 | /* Here user defined code could be inserted, all global variables are initilized */ 464 | #if defined(_DO_ENABLE_COP_) 465 | _ENABLE_COP(1); 466 | #endif 467 | 468 | /* call main() */ 469 | main(); 470 | } 471 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/main/Sources/derivative.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Note: This file is recreated by the project wizard whenever the MCU is 3 | * changed and should not be edited by hand 4 | */ 5 | 6 | /* Include the derivative-specific header file */ 7 | #include 8 | 9 | #pragma LINK_INFO DERIVATIVE "MC9S12XS128" 10 | 11 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/main/Sources/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/main/Sources/main.c -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/main/bin/Project.map: -------------------------------------------------------------------------------- 1 | This is a dummy entry for the map file. 2 | The correct input will be placed after the first link process. 3 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/main/cmd/Full_Chip_Simulation_Postload.cmd: -------------------------------------------------------------------------------- 1 | // After load the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/main/cmd/Full_Chip_Simulation_Preload.cmd: -------------------------------------------------------------------------------- 1 | // Before load the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/main/cmd/Full_Chip_Simulation_Reset.cmd: -------------------------------------------------------------------------------- 1 | // After reset the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/main/cmd/Full_Chip_Simulation_SetCPU.cmd: -------------------------------------------------------------------------------- 1 | // At startup the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/main/cmd/Full_Chip_Simulation_Startup.cmd: -------------------------------------------------------------------------------- 1 | // At startup the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/main/main.mcp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/main/main.mcp -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/main/main_Data/CWSettingsWindows.stg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/main/main_Data/CWSettingsWindows.stg -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/main/main_Data/Standard/ObjectCode/MC9S12XS128.c.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/main/main_Data/Standard/ObjectCode/MC9S12XS128.c.o -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/main/main_Data/Standard/ObjectCode/Start12.c.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/main/main_Data/Standard/ObjectCode/Start12.c.o -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/main/main_Data/Standard/ObjectCode/datapage.c.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/main/main_Data/Standard/ObjectCode/datapage.c.o -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/main/main_Data/Standard/TargetDataWindows.tdt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/Sources/main/main_Data/Standard/TargetDataWindows.tdt -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/main/prm/Project.prm: -------------------------------------------------------------------------------- 1 | /* This is a linker parameter file for the MC9S12XS128 */ 2 | 3 | /* 4 | This file is setup to use the HCS12X core only. 5 | If you plan to also use the XGATE in your project, best create a new project with the 6 | 'New Project Wizard' (File|New... menu in the CodeWarrior IDE) and choose the appropriate 7 | project parameters. 8 | */ 9 | 10 | NAMES 11 | /* CodeWarrior will pass all the needed files to the linker by command line. But here you may add your additional files */ 12 | END 13 | 14 | SEGMENTS /* here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. All addresses are 'logical' */ 15 | /* Register space */ 16 | /* IO_SEG = PAGED 0x0000 TO 0x07FF; intentionally not defined */ 17 | 18 | /* non-paged RAM */ 19 | RAM = READ_WRITE DATA_NEAR 0x2000 TO 0x3FFF; 20 | 21 | /* non-banked FLASH */ 22 | ROM_4000 = READ_ONLY DATA_NEAR IBCC_NEAR 0x4000 TO 0x7FFF; 23 | ROM_C000 = READ_ONLY DATA_NEAR IBCC_NEAR 0xC000 TO 0xFEFF; 24 | /* VECTORS = READ_ONLY 0xFF00 TO 0xFFFF; intentionally not defined: used for VECTOR commands below */ 25 | //OSVECTORS = READ_ONLY 0xFF10 TO 0xFFFF; /* OSEK interrupt vectors (use your vector.o) */ 26 | 27 | /* paged EEPROM 0x0800 TO 0x0BFF; addressed through EPAGE */ 28 | EEPROM_00 = READ_ONLY DATA_FAR IBCC_FAR 0x000800 TO 0x000BFF; 29 | EEPROM_01 = READ_ONLY DATA_FAR IBCC_FAR 0x010800 TO 0x010BFF; 30 | EEPROM_02 = READ_ONLY DATA_FAR IBCC_FAR 0x020800 TO 0x020BFF; 31 | EEPROM_03 = READ_ONLY DATA_FAR IBCC_FAR 0x030800 TO 0x030BFF; 32 | EEPROM_04 = READ_ONLY DATA_FAR IBCC_FAR 0x040800 TO 0x040BFF; 33 | EEPROM_05 = READ_ONLY DATA_FAR IBCC_FAR 0x050800 TO 0x050BFF; 34 | EEPROM_06 = READ_ONLY DATA_FAR IBCC_FAR 0x060800 TO 0x060BFF; 35 | EEPROM_07 = READ_ONLY DATA_FAR IBCC_FAR 0x070800 TO 0x070BFF; 36 | 37 | /* paged RAM: 0x1000 TO 0x1FFF; addressed through RPAGE */ 38 | /* RAM_FE = READ_WRITE 0xFE1000 TO 0xFE1FFF; intentionally not defined: equivalent to RAM: 0x2000..0x2FFF */ 39 | /* RAM_FF = READ_WRITE 0xFF1000 TO 0xFF1FFF; intentionally not defined: equivalent to RAM: 0x3000..0x3FFF */ 40 | 41 | /* paged FLASH: 0x8000 TO 0xBFFF; addressed through PPAGE */ 42 | PAGE_F8 = READ_ONLY DATA_FAR IBCC_FAR 0xF88000 TO 0xF8BFFF; 43 | PAGE_F9 = READ_ONLY DATA_FAR IBCC_FAR 0xF98000 TO 0xF9BFFF; 44 | PAGE_FA = READ_ONLY DATA_FAR IBCC_FAR 0xFA8000 TO 0xFABFFF; 45 | PAGE_FB = READ_ONLY DATA_FAR IBCC_FAR 0xFB8000 TO 0xFBBFFF; 46 | PAGE_FC = READ_ONLY DATA_FAR IBCC_FAR 0xFC8000 TO 0xFCBFFF; 47 | /* PAGE_FD = READ_ONLY 0xFD8000 TO 0xFDBFFF; intentionally not defined: equivalent to ROM_4000 */ 48 | PAGE_FE = READ_ONLY DATA_FAR IBCC_FAR 0xFE8000 TO 0xFEBFFF; 49 | /* PAGE_FF = READ_ONLY 0xFF8000 TO 0xFFBFFF; intentionally not defined: equivalent to ROM_C000 */ 50 | END 51 | 52 | PLACEMENT /* here all predefined and user segments are placed into the SEGMENTS defined above. */ 53 | _PRESTART, /* Used in HIWARE format: jump to _Startup at the code start */ 54 | STARTUP, /* startup data structures */ 55 | ROM_VAR, /* constant variables */ 56 | STRINGS, /* string literals */ 57 | VIRTUAL_TABLE_SEGMENT, /* C++ virtual table segment */ 58 | //.ostext, /* eventually OSEK code */ 59 | NON_BANKED, /* runtime routines which must not be banked */ 60 | COPY /* copy down information: how to initialize variables */ 61 | /* in case you want to use ROM_4000 here as well, make sure 62 | that all files (incl. library files) are compiled with the 63 | option: -OnB=b */ 64 | INTO ROM_C000/*, ROM_4000*/; 65 | 66 | DEFAULT_ROM INTO PAGE_FE, PAGE_FC, PAGE_FB, PAGE_FA, PAGE_F9, PAGE_F8; 67 | 68 | //.stackstart, /* eventually used for OSEK kernel awareness: Main-Stack Start */ 69 | SSTACK, /* allocate stack first to avoid overwriting variables on overflow */ 70 | //.stackend, /* eventually used for OSEK kernel awareness: Main-Stack End */ 71 | PAGED_RAM, /* there is no need for paged data accesses on this derivative */ 72 | 73 | DEFAULT_RAM /* all variables, the default RAM location */ 74 | INTO RAM; 75 | 76 | DISTRIBUTE DISTRIBUTE_INTO 77 | ROM_4000, PAGE_FE, PAGE_FC, PAGE_FB, PAGE_FA, PAGE_F9, PAGE_F8; 78 | CONST_DISTRIBUTE DISTRIBUTE_INTO 79 | ROM_4000, PAGE_FE, PAGE_FC, PAGE_FB, PAGE_FA, PAGE_F9, PAGE_F8; 80 | DATA_DISTRIBUTE DISTRIBUTE_INTO 81 | RAM; 82 | //.vectors INTO OSVECTORS; /* OSEK vector table */ 83 | END 84 | 85 | 86 | ENTRIES /* keep the following unreferenced variables */ 87 | /* OSEK: always allocate the vector table and all dependent objects */ 88 | //_vectab OsBuildNumber _OsOrtiStackStart _OsOrtiStart 89 | END 90 | 91 | STACKSIZE 0x100 /* size of the stack (will be allocated in DEFAULT_RAM) */ 92 | 93 | /* use these definitions in plane of the vector table ('vectors') above */ 94 | VECTOR 0 _Startup /* reset vector: this is the default entry point for a C/C++ application. */ 95 | //VECTOR 0 Entry /* reset vector: this is the default entry point for an Assembly application. */ 96 | //INIT Entry /* for assembly applications: that this is as well the initialization entry point */ 97 | -------------------------------------------------------------------------------- /Smart Car two wheels/Sources/main/prm/burner.bbl: -------------------------------------------------------------------------------- 1 | /* global s-record file */ 2 | OPENFILE "%ABS_FILE%.glo" 3 | format = motorola 4 | busWidth = 1 5 | SRECORD=Sx 6 | 7 | /* "EABI compliant encoded global" address to global */ 8 | len = 0x1800000 9 | origin = 0x1000000 10 | destination = 0 11 | SENDBYTE 1 "%ABS_FILE%" 12 | 13 | /* physical flash window to global */ 14 | len = 0x4000 15 | destination = 0x7F8000 16 | origin = 0x008000 17 | SENDBYTE 1 "%ABS_FILE%" 18 | 19 | /* logical non banked flash at $4000 and $C000 to global */ 20 | len = 0x4000 21 | destination = 0x7F4000 22 | origin = 0x004000 23 | SENDBYTE 1 "%ABS_FILE%" 24 | destination = 0x7FC000 25 | origin = 0x00C000 26 | SENDBYTE 1 "%ABS_FILE%" 27 | 28 | /* logical 1 MB banked flash to global */ 29 | destination = 0x700000 30 | origin = 0xc08000 31 | SENDBYTE 1 "%ABS_FILE%" 32 | destination = 0x704000 33 | origin = 0xc18000 34 | SENDBYTE 1 "%ABS_FILE%" 35 | destination = 0x708000 36 | origin = 0xc28000 37 | SENDBYTE 1 "%ABS_FILE%" 38 | destination = 0x70c000 39 | origin = 0xc38000 40 | SENDBYTE 1 "%ABS_FILE%" 41 | destination = 0x710000 42 | origin = 0xc48000 43 | SENDBYTE 1 "%ABS_FILE%" 44 | destination = 0x714000 45 | origin = 0xc58000 46 | SENDBYTE 1 "%ABS_FILE%" 47 | destination = 0x718000 48 | origin = 0xc68000 49 | SENDBYTE 1 "%ABS_FILE%" 50 | destination = 0x71c000 51 | origin = 0xc78000 52 | SENDBYTE 1 "%ABS_FILE%" 53 | destination = 0x720000 54 | origin = 0xc88000 55 | SENDBYTE 1 "%ABS_FILE%" 56 | destination = 0x724000 57 | origin = 0xc98000 58 | SENDBYTE 1 "%ABS_FILE%" 59 | destination = 0x728000 60 | origin = 0xca8000 61 | SENDBYTE 1 "%ABS_FILE%" 62 | destination = 0x72c000 63 | origin = 0xcb8000 64 | SENDBYTE 1 "%ABS_FILE%" 65 | destination = 0x730000 66 | origin = 0xcc8000 67 | SENDBYTE 1 "%ABS_FILE%" 68 | destination = 0x734000 69 | origin = 0xcd8000 70 | SENDBYTE 1 "%ABS_FILE%" 71 | destination = 0x738000 72 | origin = 0xce8000 73 | SENDBYTE 1 "%ABS_FILE%" 74 | destination = 0x73c000 75 | origin = 0xcf8000 76 | SENDBYTE 1 "%ABS_FILE%" 77 | destination = 0x740000 78 | origin = 0xd08000 79 | SENDBYTE 1 "%ABS_FILE%" 80 | destination = 0x744000 81 | origin = 0xd18000 82 | SENDBYTE 1 "%ABS_FILE%" 83 | destination = 0x748000 84 | origin = 0xd28000 85 | SENDBYTE 1 "%ABS_FILE%" 86 | destination = 0x74c000 87 | origin = 0xd38000 88 | SENDBYTE 1 "%ABS_FILE%" 89 | destination = 0x750000 90 | origin = 0xd48000 91 | SENDBYTE 1 "%ABS_FILE%" 92 | destination = 0x754000 93 | origin = 0xd58000 94 | SENDBYTE 1 "%ABS_FILE%" 95 | destination = 0x758000 96 | origin = 0xd68000 97 | SENDBYTE 1 "%ABS_FILE%" 98 | destination = 0x75c000 99 | origin = 0xd78000 100 | SENDBYTE 1 "%ABS_FILE%" 101 | destination = 0x760000 102 | origin = 0xd88000 103 | SENDBYTE 1 "%ABS_FILE%" 104 | destination = 0x764000 105 | origin = 0xd98000 106 | SENDBYTE 1 "%ABS_FILE%" 107 | destination = 0x768000 108 | origin = 0xda8000 109 | SENDBYTE 1 "%ABS_FILE%" 110 | destination = 0x76c000 111 | origin = 0xdb8000 112 | SENDBYTE 1 "%ABS_FILE%" 113 | destination = 0x770000 114 | origin = 0xdc8000 115 | SENDBYTE 1 "%ABS_FILE%" 116 | destination = 0x774000 117 | origin = 0xdd8000 118 | SENDBYTE 1 "%ABS_FILE%" 119 | destination = 0x778000 120 | origin = 0xde8000 121 | SENDBYTE 1 "%ABS_FILE%" 122 | destination = 0x77c000 123 | origin = 0xdf8000 124 | SENDBYTE 1 "%ABS_FILE%" 125 | destination = 0x780000 126 | origin = 0xe08000 127 | SENDBYTE 1 "%ABS_FILE%" 128 | destination = 0x784000 129 | origin = 0xe18000 130 | SENDBYTE 1 "%ABS_FILE%" 131 | destination = 0x788000 132 | origin = 0xe28000 133 | SENDBYTE 1 "%ABS_FILE%" 134 | destination = 0x78c000 135 | origin = 0xe38000 136 | SENDBYTE 1 "%ABS_FILE%" 137 | destination = 0x790000 138 | origin = 0xe48000 139 | SENDBYTE 1 "%ABS_FILE%" 140 | destination = 0x794000 141 | origin = 0xe58000 142 | SENDBYTE 1 "%ABS_FILE%" 143 | destination = 0x798000 144 | origin = 0xe68000 145 | SENDBYTE 1 "%ABS_FILE%" 146 | destination = 0x79c000 147 | origin = 0xe78000 148 | SENDBYTE 1 "%ABS_FILE%" 149 | destination = 0x7a0000 150 | origin = 0xe88000 151 | SENDBYTE 1 "%ABS_FILE%" 152 | destination = 0x7a4000 153 | origin = 0xe98000 154 | SENDBYTE 1 "%ABS_FILE%" 155 | destination = 0x7a8000 156 | origin = 0xea8000 157 | SENDBYTE 1 "%ABS_FILE%" 158 | destination = 0x7ac000 159 | origin = 0xeb8000 160 | SENDBYTE 1 "%ABS_FILE%" 161 | destination = 0x7b0000 162 | origin = 0xec8000 163 | SENDBYTE 1 "%ABS_FILE%" 164 | destination = 0x7b4000 165 | origin = 0xed8000 166 | SENDBYTE 1 "%ABS_FILE%" 167 | destination = 0x7b8000 168 | origin = 0xee8000 169 | SENDBYTE 1 "%ABS_FILE%" 170 | destination = 0x7bc000 171 | origin = 0xef8000 172 | SENDBYTE 1 "%ABS_FILE%" 173 | destination = 0x7c0000 174 | origin = 0xf08000 175 | SENDBYTE 1 "%ABS_FILE%" 176 | destination = 0x7c4000 177 | origin = 0xf18000 178 | SENDBYTE 1 "%ABS_FILE%" 179 | destination = 0x7c8000 180 | origin = 0xf28000 181 | SENDBYTE 1 "%ABS_FILE%" 182 | destination = 0x7cc000 183 | origin = 0xf38000 184 | SENDBYTE 1 "%ABS_FILE%" 185 | destination = 0x7d0000 186 | origin = 0xf48000 187 | SENDBYTE 1 "%ABS_FILE%" 188 | destination = 0x7d4000 189 | origin = 0xf58000 190 | SENDBYTE 1 "%ABS_FILE%" 191 | destination = 0x7d8000 192 | origin = 0xf68000 193 | SENDBYTE 1 "%ABS_FILE%" 194 | destination = 0x7dc000 195 | origin = 0xf78000 196 | SENDBYTE 1 "%ABS_FILE%" 197 | destination = 0x7e0000 198 | origin = 0xf88000 199 | SENDBYTE 1 "%ABS_FILE%" 200 | destination = 0x7e4000 201 | origin = 0xf98000 202 | SENDBYTE 1 "%ABS_FILE%" 203 | destination = 0x7e8000 204 | origin = 0xfa8000 205 | SENDBYTE 1 "%ABS_FILE%" 206 | destination = 0x7ec000 207 | origin = 0xfb8000 208 | SENDBYTE 1 "%ABS_FILE%" 209 | destination = 0x7f0000 210 | origin = 0xfc8000 211 | SENDBYTE 1 "%ABS_FILE%" 212 | destination = 0x7f4000 213 | origin = 0xfd8000 214 | SENDBYTE 1 "%ABS_FILE%" 215 | destination = 0x7f8000 216 | origin = 0xfe8000 217 | SENDBYTE 1 "%ABS_FILE%" 218 | destination = 0x7fc000 219 | origin = 0xff8000 220 | SENDBYTE 1 "%ABS_FILE%" 221 | 222 | CLOSE 223 | 224 | /*****************************************************************************/ 225 | 226 | /* logical s-record file */ 227 | 228 | OPENFILE "%ABS_FILE%.s19" 229 | format = motorola 230 | busWidth = 1 231 | SRECORD=Sx 232 | 233 | /* logical non banked flash at $4000 and $C000 to logical */ 234 | len = 0x4000 235 | origin = 0x004000 236 | destination = 0x004000 237 | SENDBYTE 1 "%ABS_FILE%" 238 | 239 | len = 0x4000 240 | origin = 0x00C000 241 | destination = 0xC000 242 | SENDBYTE 1 "%ABS_FILE%" 243 | 244 | /* physical flash window to logical */ 245 | len = 0x4000 246 | origin = 0x008000 247 | destination = 0xFE8000 248 | SENDBYTE 1 "%ABS_FILE%" 249 | 250 | 251 | /* logical 1 MB banked flash to logical */ 252 | len = 0x400000 253 | origin = 0xC00000 254 | destination = 0xC00000 255 | SENDBYTE 1 "%ABS_FILE%" 256 | 257 | 258 | /* global 1 MB banked flash to logical */ 259 | len = 0x4000 260 | origin = 0x1700000 261 | destination = 0xc08000 262 | SENDBYTE 1 "%ABS_FILE%" 263 | origin = 0x1704000 264 | destination = 0xc18000 265 | SENDBYTE 1 "%ABS_FILE%" 266 | origin = 0x1708000 267 | destination = 0xc28000 268 | SENDBYTE 1 "%ABS_FILE%" 269 | origin = 0x170c000 270 | destination = 0xc38000 271 | SENDBYTE 1 "%ABS_FILE%" 272 | origin = 0x1710000 273 | destination = 0xc48000 274 | SENDBYTE 1 "%ABS_FILE%" 275 | origin = 0x1714000 276 | destination = 0xc58000 277 | SENDBYTE 1 "%ABS_FILE%" 278 | origin = 0x1718000 279 | destination = 0xc68000 280 | SENDBYTE 1 "%ABS_FILE%" 281 | origin = 0x171c000 282 | destination = 0xc78000 283 | SENDBYTE 1 "%ABS_FILE%" 284 | origin = 0x1720000 285 | destination = 0xc88000 286 | SENDBYTE 1 "%ABS_FILE%" 287 | origin = 0x1724000 288 | destination = 0xc98000 289 | SENDBYTE 1 "%ABS_FILE%" 290 | origin = 0x1728000 291 | destination = 0xca8000 292 | SENDBYTE 1 "%ABS_FILE%" 293 | origin = 0x172c000 294 | destination = 0xcb8000 295 | SENDBYTE 1 "%ABS_FILE%" 296 | origin = 0x1730000 297 | destination = 0xcc8000 298 | SENDBYTE 1 "%ABS_FILE%" 299 | origin = 0x1734000 300 | destination = 0xcd8000 301 | SENDBYTE 1 "%ABS_FILE%" 302 | origin = 0x1738000 303 | destination = 0xce8000 304 | SENDBYTE 1 "%ABS_FILE%" 305 | origin = 0x173c000 306 | destination = 0xcf8000 307 | SENDBYTE 1 "%ABS_FILE%" 308 | origin = 0x1740000 309 | destination = 0xd08000 310 | SENDBYTE 1 "%ABS_FILE%" 311 | origin = 0x1744000 312 | destination = 0xd18000 313 | SENDBYTE 1 "%ABS_FILE%" 314 | origin = 0x1748000 315 | destination = 0xd28000 316 | SENDBYTE 1 "%ABS_FILE%" 317 | origin = 0x174c000 318 | destination = 0xd38000 319 | SENDBYTE 1 "%ABS_FILE%" 320 | origin = 0x1750000 321 | destination = 0xd48000 322 | SENDBYTE 1 "%ABS_FILE%" 323 | origin = 0x1754000 324 | destination = 0xd58000 325 | SENDBYTE 1 "%ABS_FILE%" 326 | origin = 0x1758000 327 | destination = 0xd68000 328 | SENDBYTE 1 "%ABS_FILE%" 329 | origin = 0x175c000 330 | destination = 0xd78000 331 | SENDBYTE 1 "%ABS_FILE%" 332 | origin = 0x1760000 333 | destination = 0xd88000 334 | SENDBYTE 1 "%ABS_FILE%" 335 | origin = 0x1764000 336 | destination = 0xd98000 337 | SENDBYTE 1 "%ABS_FILE%" 338 | origin = 0x1768000 339 | destination = 0xda8000 340 | SENDBYTE 1 "%ABS_FILE%" 341 | origin = 0x176c000 342 | destination = 0xdb8000 343 | SENDBYTE 1 "%ABS_FILE%" 344 | origin = 0x1770000 345 | destination = 0xdc8000 346 | SENDBYTE 1 "%ABS_FILE%" 347 | origin = 0x1774000 348 | destination = 0xdd8000 349 | SENDBYTE 1 "%ABS_FILE%" 350 | origin = 0x1778000 351 | destination = 0xde8000 352 | SENDBYTE 1 "%ABS_FILE%" 353 | origin = 0x177c000 354 | destination = 0xdf8000 355 | SENDBYTE 1 "%ABS_FILE%" 356 | origin = 0x1780000 357 | destination = 0xe08000 358 | SENDBYTE 1 "%ABS_FILE%" 359 | origin = 0x1784000 360 | destination = 0xe18000 361 | SENDBYTE 1 "%ABS_FILE%" 362 | origin = 0x1788000 363 | destination = 0xe28000 364 | SENDBYTE 1 "%ABS_FILE%" 365 | origin = 0x178c000 366 | destination = 0xe38000 367 | SENDBYTE 1 "%ABS_FILE%" 368 | origin = 0x1790000 369 | destination = 0xe48000 370 | SENDBYTE 1 "%ABS_FILE%" 371 | origin = 0x1794000 372 | destination = 0xe58000 373 | SENDBYTE 1 "%ABS_FILE%" 374 | origin = 0x1798000 375 | destination = 0xe68000 376 | SENDBYTE 1 "%ABS_FILE%" 377 | origin = 0x179c000 378 | destination = 0xe78000 379 | SENDBYTE 1 "%ABS_FILE%" 380 | origin = 0x17a0000 381 | destination = 0xe88000 382 | SENDBYTE 1 "%ABS_FILE%" 383 | origin = 0x17a4000 384 | destination = 0xe98000 385 | SENDBYTE 1 "%ABS_FILE%" 386 | origin = 0x17a8000 387 | destination = 0xea8000 388 | SENDBYTE 1 "%ABS_FILE%" 389 | origin = 0x17ac000 390 | destination = 0xeb8000 391 | SENDBYTE 1 "%ABS_FILE%" 392 | origin = 0x17b0000 393 | destination = 0xec8000 394 | SENDBYTE 1 "%ABS_FILE%" 395 | origin = 0x17b4000 396 | destination = 0xed8000 397 | SENDBYTE 1 "%ABS_FILE%" 398 | origin = 0x17b8000 399 | destination = 0xee8000 400 | SENDBYTE 1 "%ABS_FILE%" 401 | origin = 0x17bc000 402 | destination = 0xef8000 403 | SENDBYTE 1 "%ABS_FILE%" 404 | origin = 0x17c0000 405 | destination = 0xf08000 406 | SENDBYTE 1 "%ABS_FILE%" 407 | origin = 0x17c4000 408 | destination = 0xf18000 409 | SENDBYTE 1 "%ABS_FILE%" 410 | origin = 0x17c8000 411 | destination = 0xf28000 412 | SENDBYTE 1 "%ABS_FILE%" 413 | origin = 0x17cc000 414 | destination = 0xf38000 415 | SENDBYTE 1 "%ABS_FILE%" 416 | origin = 0x17d0000 417 | destination = 0xf48000 418 | SENDBYTE 1 "%ABS_FILE%" 419 | origin = 0x17d4000 420 | destination = 0xf58000 421 | SENDBYTE 1 "%ABS_FILE%" 422 | origin = 0x17d8000 423 | destination = 0xf68000 424 | SENDBYTE 1 "%ABS_FILE%" 425 | origin = 0x17dc000 426 | destination = 0xf78000 427 | SENDBYTE 1 "%ABS_FILE%" 428 | origin = 0x17e0000 429 | destination = 0xf88000 430 | SENDBYTE 1 "%ABS_FILE%" 431 | origin = 0x17e4000 432 | destination = 0xf98000 433 | SENDBYTE 1 "%ABS_FILE%" 434 | origin = 0x17e8000 435 | destination = 0xfa8000 436 | SENDBYTE 1 "%ABS_FILE%" 437 | origin = 0x17ec000 438 | destination = 0xfb8000 439 | SENDBYTE 1 "%ABS_FILE%" 440 | origin = 0x17f0000 441 | destination = 0xfc8000 442 | SENDBYTE 1 "%ABS_FILE%" 443 | origin = 0x17f4000 444 | destination = 0xfd8000 445 | SENDBYTE 1 "%ABS_FILE%" 446 | origin = 0x17f8000 447 | destination = 0xfe8000 448 | SENDBYTE 1 "%ABS_FILE%" 449 | origin = 0x17fc000 450 | destination = 0xff8000 451 | SENDBYTE 1 "%ABS_FILE%" 452 | 453 | CLOSE 454 | -------------------------------------------------------------------------------- /Smart Car two wheels/TBDML.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/TBDML.ini -------------------------------------------------------------------------------- /Smart Car two wheels/bin/Project.abs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/bin/Project.abs -------------------------------------------------------------------------------- /Smart Car two wheels/bin/Project.abs.glo: -------------------------------------------------------------------------------- 1 | S0550000463A5CB5A5C6ACBBFAD1A7CFB05C736D6172746361725C3130306D73BFD8CBD920D7AABDC7356D73202D20C7E5BBAAB4F2BDC5202D20B1E4CAB1D0F2202D20356D735C62696E5C50726F6A6563742E616273C8 2 | S2247FC000CF2100C6055B134A8E65FE4A8E57FE0001C015C616210002C21410FC2308FE2308 3 | S2247FC02006BC22FC18BE22FA2F1AB322FC18B222FA16C1192F08C601877C23BF20331879F3 4 | S2247FC04023BF202DBC22FC18BE22FA2C20FC22FCB32308FE22FA18B2230616C1192F08C623 5 | S2247FC06001877C23BF2010187923BF2010187923BFFC23BF0424061872212E2006CC030C2A 6 | S2247FC0807C212C72212A72212BF6212BC164250379212B4A8B97FE4A8D6BFEF6212AC105D3 7 | S2247FC0A0251679212A79232A4A8BF3FE72232AF6232AC11425F2205AC101260E4A8C47FEF8 8 | S2247FC0C04A89A4FE4A8A60FE2048C102262572232DF6232DC101260B4A8A9EFEC6FA7B0316 9 | S2247FC0E020202FC102260A79232D4A8ACFFE790320201FC103261372232CF6232CC1142518 10 | S2247FC1001179232C4A8B00FE2008C10426044A8C8AFE1C03450110EF0BCD010435B746C740 11 | S2247FC120873BB76416C4B23D141072212A72212BF6212BC164250379212B4A8B97FE4A8DA1 12 | S2247FC1406BFEF6212AC105251679212A79232A4A8BF3FE72232AF6232AC11425F2205AC137 13 | S2247FC16001260E4A8C47FE4A89A4FE4A8A60FE2048C102262572232DF6232DC101260B4A89 14 | S2247FC1808A9EFEC6FA7B0320202FC102260A79232D4A8ACFFE790320201FC103261372237E 15 | S2247FC1A02CF6232CC114251179232C4A8B00FE2008C10426044A8C8AFE1C03450210EF0BFF 16 | S2247FC1C0EC82A38827202A108CFFE92C0306C4463016C446345020068C001725013D186492 17 | S2247FC1E08D668F5326F8A684A18C271CEC86A38E6C86A685A28D6A85240B618461851860DE 18 | S2247FC200862602628506C47BEC86E38E6C86A685A98D2407461866861862826A853D343B7E 19 | S2247FC220343416C40916C41E079616C43330303A1B823D3BEC862604EC842706A684888073 20 | S2247FC2406A843A06C21E0464030445041AE280003D3B34A680180EA8862B1786FFEE802B92 21 | S2247FC2600140AE862606EE82AE882708220140972002E1861B843DEC8283009DB7C52B0F21 22 | S2247FC280270AEC865965860926FA6C8669883D8EFFE02D0E6988EC85491866870826F96CFF 23 | S2247FC2A0853D87C76C856C873DEC872607EE8526036C823DCE009DE7852B070959186585F5 24 | S2247FC2C02AF96A876E823D3B34363416C60C07D916C43330303A1B813D3B34363416C609BA 25 | S2247FC2E007C716C43330303A1B813D363B343416C409078316C6013032303A3D1B9CA6885B 26 | S2247FC300A8F0106A88EC86A38CC3007EE7F0112B13B7C5C7522B1B1868F01265F0112AF416 27 | S2247FC3201AE5B7C56C861869806982CE0018E789202C1B8406C472186881658018688A654E 28 | S2247FC34089241B2B2BEC8AE3F0126C8AA689A9F0116A89E7822603186380638220122A1040 29 | S2247FC360EC8AA3F0126C8AE689E2F0116B8962820926C4EC816C8AE6806B891B8406C47B6A 30 | S2247FC3803534A688A8F0106A88EC86E38C83007D2A05303106C4676C86EC8AEDF012136D6F 31 | S2247FC3A080E68987EDF01213E3806C80CC00003B2402628135ED8EE6F0158713E3846A8F8D 32 | S2247FC3C03A18E3B119EE6D80E689A6F01112E3806C89303106C47B6CAC343416C40916C49C 33 | S2247FC3E01E079D16C4333030ECB33D343B343416C41E16C40916C2FC16C4333030ECB326F6 34 | S2247FC400078E80002602B7453DEC8469845924026184180E2704530C8580876C823DEC8C82 35 | S2247FC420698C592402618C180E2704530C8D80876C883DA683E6852A014258E784270214A1 36 | S2247FC4400146566C843D343BECF010EE886C886EF010ECF012EE8A6C8A6EF012EC8CEE86A3 37 | S2247FC4606C866E8C3A303D3B87C76C866C886C843A3D3007F234180884FE3DEE822B2727AA 38 | S2247FC4801D18E785260AE787260618876984200CE7852B0818688665850926F46E828E00C5 39 | S2247FC4A0FF250E06C47218648566870826F81869823DAC8418AE82311B84054041511841BE 40 | S2247FC4C004A401083D04A401083D830001188200003D35B7C513B7D43113B7E41AE6B7E4D8 41 | S2247FC4E03D186982EC8C261DEE8EED86EC8811280CEC8618C7116D82B746EC88116D846CE5 42 | S2247FC500881869863D972709EE86B7C5CD00002008EE8DE686ED87B7C61135ECF010133BC7 43 | S2247FC52035ECF012ED8413E3B130B7C5CD0000356581A38CB7C518A38A310446113669AFDE 44 | S2247FC5403137323433EEF01011B76532201F252A046403044539E78E2706EE8E87C7200BF7 45 | S2247FC560B7C5363469AFEEF013313A1810083A34A3B1B74620A4310220A04151B7C5415197 46 | S2247FC58004A40108AE8E22EE2505ACF01024E7316D841869826C886E863D186100186002FC 47 | S2247FC5A026031862003D3B341B9CE78A2C1B1A8A07E8E7842C0A1A8407E020111A8407DAD0 48 | S2247FC5C016C4E11A8007D32007E7842DEF16C4E1EC82EE801B88EDB505403D30E6E605E5B6 49 | S2247FC5E0EE8097260CE1002208E12122FC2702EE8037E6011AE5E6B2050061841A8506C5B5 50 | S2247FC6009AE784270306C5FA3D69843D6984E7852A0306C5FA3D001C21004003126F0005AD 51 | S2247FC6203F8000003A83126F3B449BA63F0000003BC49BA63F8001CB21263F800000046342 52 | S2247FC64002F302BC0244000800500000003700000037000000460000005000140190003E1E 53 | S2247FC6605149453E0000427F4000004261514946002141454B31001814127F1000274545F4 54 | S2247FC6804539003C4A49493000017109050300364949493600064949291E007C1211127C7A 55 | S2247FC6A0007F49494936003E41414122007F4141221C007F49494941007F09090901003E90 56 | S2247FC6C04149497A007F0808087F0000417F4100002040413F01007F08142241007F404094 57 | S2247FC6E04040007F020C027F007F0408107F003E4141413E007F09090906003E4151215EE0 58 | S2247FC700007F091929460046494949310001017F0101003F4040403F001F2040201F003F75 59 | S2247FC7204038403F006314081463000708700807006151494543000000000000000036360B 60 | S2247FC7400000000808080808002010080402000060600000000000A0600000040201020422 61 | S2247FC7600808082A1C0800E010080810E000000F102020100F00001010F800000000002029 62 | S2247FC780203F2020000000700808088870000030282422213000003008888848300000182F 63 | S2247FC7A0202020110E000000C02010F8000000070424243F240000F808888808080000199F 64 | S2247FC7C0212020110E0000E0108888180000000F112020110E0000380808C838080000006E 65 | S2247FC7E0003F000000000070880808887000001C222121221C0000E010080810E0000000C8 66 | S20B7FC800312222110F000018 67 | S2087FFF78C128C0193F 68 | S2067FFFFEC000BD 69 | S2247F80004A920DFE7B23C1C737B6239836C62B4A8FBCFE1B82F623C104210CFC22F47C2116 70 | S2247F80202CFC22F87C212EF623C1C10226117223984A8F1BFEF62398C1072603792398F6F0 71 | S2247F804023C1C10326147223974A8F1BFE792398F62397C1052603792397F623C1C10826CD 72 | S2247F806005C6017B232EF6239718260110C60137C737C6414A8FBCFEC6026BA0C737C64474 73 | S2247F80804A8FBCFE1B8216868A3737C6414A8FBCFEC6026BA05737C6444A8FBCFE1B82164D 74 | S2247F80A08674375837C6414A8FBCFEC6026BA037C6444A8FBCFEC6036BA05337C6324A8F0C 75 | S2247F80C0BCFECC05016BA036C6414A8FBCFE1B82C60216869ACC05033736C6354A8FBCFE4B 76 | S2247F80E0C60A6BA0C737FC22F44A9042FECC010A6BA036FC22F84A9042FECC020A6BA03696 77 | S2247F8100FC22FC4A9042FEC60A6BA05737FC23084A9042FE1B82F62398262D168684260511 78 | S2247F81201872212C0AC10526051873212C0AC1062609FE212C1A0A7E212C0AC1072631FEB0 79 | S2247F8140212C1A167E212C0A04010306867316868426051872212E0AC10526051873212E49 80 | S2247F81600AC1062609FE212E1A0A7E212E0AC107182604FFFE212E1A167E212E0AC10118FC 81 | S2247F8180260226C60137C737C65A4A8FBCFE1B82C6031686A6C6013737C65A4A8FBCFEC608 82 | S2247F81A0036BA05737C6444A8FBCFEC6016BA05837C6534A8FBCFEC6036BA05337C6504A37 83 | S2247F81C08FBCFECC03016BA036C6534A8FBCFE1B82C6021686B2C6033737C6574A8FBCFE7B 84 | S2247F81E0CC04016BA036C6444A8FBCFE1B82C6031686B2CC05013736C6444A8FBCFE1B821F 85 | S2247F8200C60316869AC60837C737FC21304A9042FECC01086BA036FC21324A9042FECC0224 86 | S2247F8220086BA036FC21344A9042FECC03086BA036FC21384A9042FEC6086BA05737FC21FB 87 | S2247F8240464A9042FECC05086BA036FC21484A9042FE1B82F62398262D168684260518722B 88 | S2247F826021300AC1052605187321300AC1062609FE21301A0A7E21300AC107262FFE21309A 89 | S2247F82801A167E21300AC101262D1686842605187221320AC1052605187321320AC1062644 90 | S2247F82A009FE21321A0A7E21320AC107262FFE21321A167E21320AC102262D168684260507 91 | S2247F82C0187221340AC1052605187321340AC1062609FE21341A0A7E21340AC1072650FED0 92 | S2247F82E021341A167E21340AC10326591686842610FC2138FE213616C4C57C21387E21360C 93 | S2247F83000AC1052610FC2138FE213616C4CA7C21387E21360AC1062614FC2138C3000A7C32 94 | S2247F83202138FC2136C90089007C21360AC107263AFC213883000A7C2138FC2136C2008268 95 | S2247F8340007C21360AC104262D1686842605187221460AC1052605187321460AC10626097B 96 | S2247F8360FE21461A0A7E21460AC107260BFE21461A167E21460AC105262216868426051813 97 | S2247F83807221480AC1052605187321480AC1062609FE21481A0A7E21480AC107182602D338 98 | S2247F83A0FE21481A167E21480AC1021826011AC60137C737C6504A8FBCFEC6026BA0C7371F 99 | S2247F83C0C6574A8FBCFEC6036BA0C737C6374A8FBCFE1B82C6011686BEC602375737C6579F 100 | S2247F83E04A8FBCFE1B82168674375837C6504A8FBCFEC6026BA037C6574A8FBCFEC6036B5C 101 | S2247F8400A05337C6354A8FBCFECC03016BA036C6504A8FBCFEC6026BA05237C6574A8FBC58 102 | S2247F8420FEC6036BA037C6334A8FBCFECC04016BA036C64C4A8FBCFEC6026BA05837C64202 103 | S2247F84404A8FBCFEC6036BA05237C64D4A8FBCFECC05016BA036C6524A8FBCFECC05026B06 104 | S2247F8460A036C6424A8FBCFECC05036BA036C6574A8FBCFEC6086BA0C737F60323874A90EE 105 | S2247F848042FECC01086BA036F6031D874A9042FECC02086BA036F60321874A9042FECC03AA 106 | S2247F84A0086BA036F6031F874A9042FEC6086BA05737FC23434A9042FECC05086BA036FC3D 107 | S2247F84C023474A9042FE068671C1031826015BC60137C737C6534A8FBCFE1B82C602168690 108 | S2247F84E0A616868A3737C6534A8FBCFEC6026BA05737C6504A8FBCFE1B8216867437583795 109 | S2247F8500C6534A8FBCFE1B82C6021686BEC603375337C6574A8FBCFECC03016BA036C65803 110 | S2247F85204A8FBCFEC6026BA05237C6534A8FBCFEC6036BA037C64A4A8FBCFEC6086BA0C7CE 111 | S2247F854037FC213C4A9042FECC01086BA036FC21404A9042FECC02086BA036FC21384A901A 112 | S2247F856042FECC03086BA036C7874A9042FE1B82F6239826591686842610FC213CFE213AE2 113 | S2247F858016C4C57C213C7E213A0AC1052610FC213CFE213A16C4CA7C213C7E213A0AC10627 114 | S2247F85A02614FC213CC3000A7C213CFC213AC90089007C213A0AC107265AFC213C83000A46 115 | S2247F85C07C213CFC213AC20082007C213A0A0421A21686842610FC2140FE213E16C4C57CD0 116 | S2247F85E021407E213E0AC1052610FC2140FE213E16C4CA7C21407E213E0AC1062614FC2173 117 | S2247F860040C3000A7C2140FC213EC90089007C213E0AC107265DFC214083000A7C2140FC4C 118 | S2247F8620213EC20082007C213E0AC1042645C60137C737F60323874A90AEFEC6016BA058AF 119 | S2247F864037F60321874A90AEFEC6046BA037FC234B4A90AEFEC6066BA0C737F6031D874A80 120 | S2247F866090AEFECC02066BA036F6031F874A90AEFE1B820AC603375737C6314A8FBCFE1B26 121 | S2247F868082C6013DF623C1C1043DC60337C737C6304A8FBCFE1B82C6013D37CC0544364A00 122 | S2247F86A08FBCFE1B823D37C737C6504A8FBCFE1B823D375237C6504A8FBCFE1B823D3737AA 123 | S2247F86C0C6504A8FBCFE1B823DC6107B02C51F02C680FBFC02D07C22F4C7877C22F2FE02DB 124 | S2247F86E0D27E22F87C22F60A3B34FC239B6CAAFC23993BEC8A16C233FD21186DA16C82FC0D 125 | S2247F870021163BEC8416C3D76CA3FC23143BFC23123BEC8416C21E7C23147E23126CA1344D 126 | S2247F8720ECF011EE8F16C2337C239F7E239DFC21206CA1FC211E3BFC210CFE210A16C233A7 127 | S2247F87406CA3FC21243BFC21223BEC8416C2331B847C231C7E231AFC2128FE212616C24658 128 | S2247F87607C23207E231E7E23227C2324FC21107C2328FC210E7C232635FC21163BFC231CAF 129 | S2247F8780FE231A16C3D76CA3FC211C3BFC211A3BEC8416C21E7C211C7E211A6DA1FC21165C 130 | S2247F87A03BFC2320FE231E16C3D76EA3CE211E6C82EC023BEC003BEC86EE8416C21E1B84F7 131 | S2247F87C016899335FC21163BFC2324FE232216C3D71B84CD212216897FFC21183BFC21169A 132 | S2247F87E03BFC2328FE232616C3D71B84CD212616897FFC21083BFE210634FC211CFE211A80 133 | S2247F880016C3D77C23A37E23A1FD21086DA1FD210635FC2124FE212216C3D77C23A77E23FA 134 | S2247F8820A5FD23A36DA1FD23A135FC2108FE210616C3D7FD21146DA1FD21123516C21E7C37 135 | S2247F884023AB7E23A96CA134FC23A3FE23A116C3EB7C23AF7E23ADFD23AB6DA1FD23A93580 136 | S2247F8860FC23A7FE23A516C3EB7C23B37E23B1FD23A37D23B7FD23A17D23B5FD21086DA11C 137 | S2247F8880FD210635FC2120FE211E16C3D77C23BB7E23B9FD23B76DA1FC23B53B16899D16D7 138 | S2247F88A0C3D76CA134FC211CFE211A16C2337C211C7E211AFC23BB6CA1FE23B93416899D39 139 | S2247F88C016C3D76CA134CE211EEE006E86CE211EEC02EE8616C2331B8416899335FC23B5E0 140 | S2247F88E03BFC23B3FE23B116C3D76CA134CE2122EE00CD2122EC4216C2331B846C426E40E1 141 | S2247F8900FC23BB3BFC23B93BFC23B3FE23B116C3D76CA134CE2126EE00CD2126EC4216C2F9 142 | S2247F8920331B846C426E40FC239F3BFE239D34076C16C3D7FD23146DA1FD23123516C21ED8 143 | S2247F89407C23147E2312FC239F6CA1FC239D3BFC23B3FE23B116C3D7FD239B6DA1FD239995 144 | S2247F89603516C21E7C239B7E23996CA134EC8AEE8816C2331B847C23187E23161B880A6C76 145 | S2247F898084EC423BEC403BEC8816C21E1B846C426E403D34CE211E6C023A6C003DFC23AFFD 146 | S2247F89A0FE23AD3D3BFC22F4FE22F216C2C77C2310FC22F834FE22F616C2C77C230CFC21B4 147 | S2247F89C02C34188716C2D9FD231035ED843516C233FD21026DA16C86FC21003BEC8816C388 148 | S2247F89E0D71B846C84CCCCCD3BCC444C3BEC8816C3EB1B846C84C7873BCC42B43BEC88167F 149 | S2247F8A00C3D71B847C23107E230EFC212E188716C2D96C84FC230C3BEC823BEC8816C23322 150 | S2247F8A206DA1FD21003516C3D76CA3FC21046E82188716C2D9CDA2F035CD3F2F3516C3D77D 151 | S2247F8A406CA134EC84EE8616C3EB7C230C7E230AFD23106DA1FD230E354A86E8FE1B8A0A4D 152 | S2247F8A60FC2130188716C2D9FD231435FD23123516C3D76CA1FC213234188716C2D9FD2355 153 | S2247F8A801835FD23163516C3D76CA134EC86EE8416C21E1B8416C2EB7C23BD1B840ADC622A 154 | S2247F8AA07C234318877E23415E62FC237B2C0CFC234316C4BC7C23437E2341FC2359F323F3 155 | S2247F8AC0437C2359FC235718F323417C23570ADC627C234718877E23455E62FC237D2C0CB5 156 | S2247F8AE0FC234716C4BC7C23477E2345FC235DF323477C235DFC235B18F323457C235B0A64 157 | S2247F8B00FC235DF32359FE235B18B92357CD000A35B746C7873BB76416C5A67C234B7E2366 158 | S2247F8B2049C7877C235D7C235B7C23597C2357FC2138B3234B7C233BFE213618B223497EDD 159 | S2247F8B402339FD213416C4D27C23337E2331FD233B18F0233FFC233918B3233D35FD232FC7 160 | S2247F8B603BEC823016C4D27C23377E2335FD233B7D233FFD23397D233DFD234F7D2353FD71 161 | S2247F8B80234D7D2351F323337C234FFC233118F323357C234D3A0A3BFC234FB32353FE23E3 162 | S2247F8BA04D18B2235116C2C77C23617E235FF6212B87C30001B74D16C2C7FD236135FD2301 163 | S2247F8BC05F3516C3D76CA3C7873BCD42C835EC8416C3EB6CA1FC235334FE235116C2C73BF6 164 | S2247F8BE034EC86EE8416C21E1B8416C2EB7C23551B860A4A86C9FEFC2365F322F47C2365BA 165 | S2247F8C00FC236318F322F27C2363FC2369F322F87C2369FC236718F322F67C2367FC236D55 166 | S2247F8C20F322FC7C236DFC236B18F322FA7C236BFC2379F323087C2379FC237718F3230640 167 | S2247F8C407C237772232B0A1B9C186982EC825959B745F6232B873BC73BECE223656E84EE9C 168 | S2247F8C60E2236316C5A6ED806CEA22F46EEA22F2C7876CEA23656CEA2363186282EE828E40 169 | S2247F8C8000062DC87B232B1B840AFC2308B322FCFE230618B222FA16C2C77C23917E238FDF 170 | S2247F8CA0FD230818FB22FCFC230618F322FAB7C6B7D616C2C77C238D7E238B3B34FC23916B 171 | S2247F8CC0B76516C3EB7C23857E2383FD23816DA1FD237F3516C2331B847C23897E2387FC6F 172 | S2247F8CE02146188716C2D9FD238535FD23833516C3D76CA1FC214834188716C2D9FD238938 173 | S2247F8D0035FD23873516C3D76CA134EC86EE8416C21E1B8416C2EB7C2395FC23857C238199 174 | S2247F8D20FC23837C237FFC23957C23931B840AFC237B2F0DF6237CCB037B032379032120C9 175 | S2247F8D400CF6237C50CB037B0321790323FC237D2F0CF6237ECB037B031D79031F0A79039A 176 | S2247F8D601DF6237E50CB037B031F0AFC23BDCE000A1815FC235534CE000A181534EC82A323 177 | S2247F8D80B16C80FC2393CD000A133BB745EC82A3B17C237B3A1AE67E237DFC237B8C00F590 178 | S2247F8DA02F05C6F58720088CFF0B2C06CCFF0B7C237B8E00F52F05C6F58720088EFF0B2CF4 179 | S2247F8DC006CCFF0B7C237DC7873BCE41F034FC2314FE231216C2511B842E2DC7873BCEC1BA 180 | S2247F8DE0F034FC2314FE231216C2511B842D19F6232E2714C7873BCE42C834FC238DFE2373 181 | S2247F8E008B16C2511B842C08C7877C237B7C237D4A8D2FFE0A4A9133FE4A927CFE4A929FD8 182 | S2247F8E20FE4A92C3FE4A92E7FE4A930BFE4A911AFE4A9146FE4A9196FE4A91D0FE4A91F176 183 | S2247F8E40FE4A9209FEC67F7B02424A8EDBFE4A8F1BFE1C0240200A14104A8E15FE10EF4A26 184 | S2247F8E608000FE20FAFEC011FDC00F270E35ED31EC3169700434FB310326F2FEC013EC3150 185 | S2247F8E80270BED31180A30700434F920F10A1887088E000525FA0A6BAE1D0240100E800176 186 | S2247F8EA0061D02400820041C02400869810F8580061C02400420041D02400468851D0240FE 187 | S2247F8EC0021C0240026281E681C10825E01C0240081C0240101C0240043A0A1D0240204A51 188 | S2247F8EE08E8EFE1C024020C62137C74A8E97FE33C6D00709C6200705C60C07010A37C74A0D 189 | S2247F8F008E97FE1B813DCA4037C74A8E97FE32E683CA8037C74A8E97FE320AC76BAD4A8F18 190 | S2247F8F2006FE1B81698187C737526A814A8E97FEE6A052C154B71025EE6281E681C10625F7 191 | S2247F8F40E53A0A6BAE360757870763C108B71025F8073C86080757C110B71025F807406985 192 | S2247F8F60820713C10825FA0726C6086B820707C11025FA1B830AC610A68312EB84CE225299 193 | S2247F8F80A6E536C6014A8E97FE336284E6843DE68958585837E689524A8F06FE1B813DE68D 194 | S2247F8FA08958585837E6894A8F06FE1B813DC737526A834A8E97FE33E682523D3736C0300F 195 | S2247F8FC0C1092206E681C0302046E681C041C1192206E681CBC92038E681C1202604C62445 196 | S2247F8FE0202EC13A2604C6252026C12D2604C626201EC12F2604C6272016C12E2604C628C3 197 | S2247F9000200EC12C2604C6292006C15E2604C62A6B81C606A6861237E6864A8F06FE33C7C9 198 | S2247F90206B80C606A68112B745E680871AE6A6E2214A36C6014A8E97FEE6A052C10625E0D2 199 | S2247F90403A0A3BCE03E81810B7516BAEEC82CE03E81810CE00641810B75137EC83CE006482 200 | S2247F90601810CE000A1810B75137EC84CE000A1810A68A36A68A366B85E6844A8FBCFE3AA2 201 | S2247F9080E68A5237E68A37E6834A8FBCFE3AE68ACB0237E68A37E6824A8FBCFE3AE68ACBEB 202 | S2247F90A00337E68A37E6854A8FBCFE1B880A3BCE03E81810B7516BAEEC82CE03E81810CE46 203 | S2247F90C000641810B75137EC83CE00641810CE000A1810B75137EC84CE000A1810A68A3663 204 | S2247F90E0A68A366B85E6844A8F43FE3AE68A5237E68A37E6834A8F43FE3AE68ACB0237E621 205 | S2247F91008A37E6824A8F43FE3AE68ACB0337E68A37E6854A8F43FE1B880A1C02C120790286 206 | S2247F9120C2CC10C07B02C31C02C4E01D02C41F7A02C50ACCC4815B355A34A7A7A7A74F37AD 207 | S2247F914008FC4C39800AF60340C4FCCA017B0340F60341C4F0CA017B03411D03430FF60313 208 | S2247F916044C4F0CA017B03441C034080F60342C4F0CA017B0342C6C77B0346CCEA5F7C03A8 209 | S2247F9180481D0243801D0242801C0240801C0244801C0245800AF60340C4FCCA017B034011 210 | S2247F91A0F60341C4F0CA027B03411D03430FF60344C4F0CA037B03441C034080F60342C4E2 211 | S2247F91C0F0CA037B0342C6C7877C034C7B03470A4D4080D64AC43FCA405B4A4D4C804D4D4E 212 | S2247F91E0074D46804C60104D60204C60044C60400AC6425B604C600C0AC6FF37C6320431F4 213 | S2247F9200FD6380E68026F5320A4C0C020A1B9D6981790003C6FF5B01960104805A4A91F941 214 | S2247F9220FED601048104D6016B82D60104B1FBE682C1FE223EC1FB6B80250EC1FE220AC0F5 215 | S2247F9240FB8716C5DB1C2E191687E68216C5E0F7247F1FBF1ADF15EF10F70BC6018FC6028A 216 | S2247F92608FC6038FC6048FC6058FC6068FC6078FC6088FC6096B81E6811B830A1D030202CE 217 | S2247F9280F60303C4F8CA047B03031C0301021D030402C6FA7B031579031D1C0300020A1DC7 218 | S2247F92A0030208F60303C48FCA407B03031C0301081D030408CC19FA7B03177A031F1C03C0 219 | S2247F92C000080A1D030210F60303C4F8CA047B03031C0301101D030410CC19FA7B03187A6C 220 | S2247F92E003201C0300100A1D030220F60303C4F8CA047B03031C0301201D030420CC19FAE2 221 | S2247F93007B03197A03211C0300200A1D030280F60303C48FCA407B03031C0301801D03040B 222 | S2137F932080CC19FA7B031B7A03231C0300800A79 223 | S9030000FC 224 | -------------------------------------------------------------------------------- /Smart Car two wheels/bin/Project.abs.s19: -------------------------------------------------------------------------------- 1 | S0550000463A5CB5A5C6ACBBFAD1A7CFB05C736D6172746361725C3130306D73BFD8CBD920D7AABDC7356D73202D20C7E5BBAAB4F2BDC5202D20B1E4CAB1D0F2202D20356D735C62696E5C50726F6A6563742E616273C8 2 | S123C000CF2100C6055B134A8E65FE4A8E57FE0001C015C616210002C21410FC2308FE2388 3 | S123C02006BC22FC18BE22FA2F1AB322FC18B222FA16C1192F08C601877C23BF2033187973 4 | S123C04023BF202DBC22FC18BE22FA2C20FC22FCB32308FE22FA18B2230616C1192F08C6A3 5 | S123C06001877C23BF2010187923BF2010187923BFFC23BF0424061872212E2006CC030CAA 6 | S123C0807C212C72212A72212BF6212BC164250379212B4A8B97FE4A8D6BFEF6212AC10553 7 | S123C0A0251679212A79232A4A8BF3FE72232AF6232AC11425F2205AC101260E4A8C47FE78 8 | S123C0C04A89A4FE4A8A60FE2048C102262572232DF6232DC101260B4A8A9EFEC6FA7B0396 9 | S123C0E020202FC102260A79232D4A8ACFFE790320201FC103261372232CF6232CC1142598 10 | S123C1001179232C4A8B00FE2008C10426044A8C8AFE1C03450110EF0BCD010435B746C7C0 11 | S123C120873BB76416C4B23D141072212A72212BF6212BC164250379212B4A8B97FE4A8D21 12 | S123C1406BFEF6212AC105251679212A79232A4A8BF3FE72232AF6232AC11425F2205AC1B7 13 | S123C16001260E4A8C47FE4A89A4FE4A8A60FE2048C102262572232DF6232DC101260B4A09 14 | S123C1808A9EFEC6FA7B0320202FC102260A79232D4A8ACFFE790320201FC10326137223FE 15 | S123C1A02CF6232CC114251179232C4A8B00FE2008C10426044A8C8AFE1C03450210EF0B7F 16 | S123C1C0EC82A38827202A108CFFE92C0306C4463016C446345020068C001725013D186412 17 | S123C1E08D668F5326F8A684A18C271CEC86A38E6C86A685A28D6A85240B6184618518605E 18 | S123C200862602628506C47BEC86E38E6C86A685A98D2407461866861862826A853D343BFE 19 | S123C220343416C40916C41E079616C43330303A1B823D3BEC862604EC842706A6848880F3 20 | S123C2406A843A06C21E0464030445041AE280003D3B34A680180EA8862B1786FFEE802B12 21 | S123C2600140AE862606EE82AE882708220140972002E1861B843DEC8283009DB7C52B0FA1 22 | S123C280270AEC865965860926FA6C8669883D8EFFE02D0E6988EC85491866870826F96C7F 23 | S123C2A0853D87C76C856C873DEC872607EE8526036C823DCE009DE7852B07095918658575 24 | S123C2C02AF96A876E823D3B34363416C60C07D916C43330303A1B813D3B34363416C6093A 25 | S123C2E007C716C43330303A1B813D363B343416C409078316C6013032303A3D1B9CA688DB 26 | S123C300A8F0106A88EC86A38CC3007EE7F0112B13B7C5C7522B1B1868F01265F0112AF496 27 | S123C3201AE5B7C56C861869806982CE0018E789202C1B8406C472186881658018688A65CE 28 | S123C34089241B2B2BEC8AE3F0126C8AA689A9F0116A89E7822603186380638220122A10C0 29 | S123C360EC8AA3F0126C8AE689E2F0116B8962820926C4EC816C8AE6806B891B8406C47BEA 30 | S123C3803534A688A8F0106A88EC86E38C83007D2A05303106C4676C86EC8AEDF012136DEF 31 | S123C3A080E68987EDF01213E3806C80CC00003B2402628135ED8EE6F0158713E3846A8F0D 32 | S123C3C03A18E3B119EE6D80E689A6F01112E3806C89303106C47B6CAC343416C40916C41C 33 | S123C3E01E079D16C4333030ECB33D343B343416C41E16C40916C2FC16C4333030ECB32676 34 | S123C400078E80002602B7453DEC8469845924026184180E2704530C8580876C823DEC8C02 35 | S123C420698C592402618C180E2704530C8D80876C883DA683E6852A014258E78427021421 36 | S123C4400146566C843D343BECF010EE886C886EF010ECF012EE8A6C8A6EF012EC8CEE8623 37 | S123C4606C866E8C3A303D3B87C76C866C886C843A3D3007F234180884FE3DEE822B27272A 38 | S123C4801D18E785260AE787260618876984200CE7852B0818688665850926F46E828E0045 39 | S123C4A0FF250E06C47218648566870826F81869823DAC8418AE82311B840540415118413E 40 | S123C4C004A401083D04A401083D830001188200003D35B7C513B7D43113B7E41AE6B7E458 41 | S123C4E03D186982EC8C261DEE8EED86EC8811280CEC8618C7116D82B746EC88116D846C65 42 | S123C500881869863D972709EE86B7C5CD00002008EE8DE686ED87B7C61135ECF010133B47 43 | S123C52035ECF012ED8413E3B130B7C5CD0000356581A38CB7C518A38A310446113669AF5E 44 | S123C5403137323433EEF01011B76532201F252A046403044539E78E2706EE8E87C7200B77 45 | S123C560B7C5363469AFEEF013313A1810083A34A3B1B74620A4310220A04151B7C5415117 46 | S123C58004A40108AE8E22EE2505ACF01024E7316D841869826C886E863D1861001860027C 47 | S123C5A026031862003D3B341B9CE78A2C1B1A8A07E8E7842C0A1A8407E020111A8407DA50 48 | S123C5C016C4E11A8007D32007E7842DEF16C4E1EC82EE801B88EDB505403D30E6E605E536 49 | S123C5E0EE8097260CE1002208E12122FC2702EE8037E6011AE5E6B2050061841A8506C535 50 | S123C6009AE784270306C5FA3D69843D6984E7852A0306C5FA3D001C21004003126F00052D 51 | S123C6203F8000003A83126F3B449BA63F0000003BC49BA63F8001CB21263F8000000463C2 52 | S123C64002F302BC0244000800500000003700000037000000460000005000140190003E9E 53 | S123C6605149453E0000427F4000004261514946002141454B31001814127F100027454574 54 | S123C6804539003C4A49493000017109050300364949493600064949291E007C1211127CFA 55 | S123C6A0007F49494936003E41414122007F4141221C007F49494941007F09090901003E10 56 | S123C6C04149497A007F0808087F0000417F4100002040413F01007F08142241007F404014 57 | S123C6E04040007F020C027F007F0408107F003E4141413E007F09090906003E4151215E60 58 | S123C700007F091929460046494949310001017F0101003F4040403F001F2040201F003FF5 59 | S123C7204038403F006314081463000708700807006151494543000000000000000036368B 60 | S123C7400000000808080808002010080402000060600000000000A06000000402010204A2 61 | S123C7600808082A1C0800E010080810E000000F102020100F00001010F8000000000020A9 62 | S123C780203F202000000070080808887000003028242221300000300888884830000018AF 63 | S123C7A0202020110E000000C02010F8000000070424243F240000F808888808080000191F 64 | S123C7C0212020110E0000E0108888180000000F112020110E0000380808C83808000000EE 65 | S123C7E0003F000000000070880808887000001C222121221C0000E010080810E000000048 66 | S10AC800312222110F000098 67 | S107FF78C128C019BF 68 | S105FFFEC0003D 69 | S224FE80004A920DFE7B23C1C737B6239836C62B4A8FBCFE1B82F623C104210CFC22F47C2197 70 | S224FE80202CFC22F87C212EF623C1C10226117223984A8F1BFEF62398C1072603792398F671 71 | S224FE804023C1C10326147223974A8F1BFE792398F62397C1052603792397F623C1C108264E 72 | S224FE806005C6017B232EF6239718260110C60137C737C6414A8FBCFEC6026BA0C737C644F5 73 | S224FE80804A8FBCFE1B8216868A3737C6414A8FBCFEC6026BA05737C6444A8FBCFE1B8216CE 74 | S224FE80A08674375837C6414A8FBCFEC6026BA037C6444A8FBCFEC6036BA05337C6324A8F8D 75 | S224FE80C0BCFECC05016BA036C6414A8FBCFE1B82C60216869ACC05033736C6354A8FBCFECC 76 | S224FE80E0C60A6BA0C737FC22F44A9042FECC010A6BA036FC22F84A9042FECC020A6BA03617 77 | S224FE8100FC22FC4A9042FEC60A6BA05737FC23084A9042FE1B82F62398262D168684260592 78 | S224FE81201872212C0AC10526051873212C0AC1062609FE212C1A0A7E212C0AC1072631FE31 79 | S224FE8140212C1A167E212C0A04010306867316868426051872212E0AC10526051873212ECA 80 | S224FE81600AC1062609FE212E1A0A7E212E0AC107182604FFFE212E1A167E212E0AC101187D 81 | S224FE8180260226C60137C737C65A4A8FBCFE1B82C6031686A6C6013737C65A4A8FBCFEC689 82 | S224FE81A0036BA05737C6444A8FBCFEC6016BA05837C6534A8FBCFEC6036BA05337C6504AB8 83 | S224FE81C08FBCFECC03016BA036C6534A8FBCFE1B82C6021686B2C6033737C6574A8FBCFEFC 84 | S224FE81E0CC04016BA036C6444A8FBCFE1B82C6031686B2CC05013736C6444A8FBCFE1B82A0 85 | S224FE8200C60316869AC60837C737FC21304A9042FECC01086BA036FC21324A9042FECC02A5 86 | S224FE8220086BA036FC21344A9042FECC03086BA036FC21384A9042FEC6086BA05737FC217C 87 | S224FE8240464A9042FECC05086BA036FC21484A9042FE1B82F62398262D16868426051872AC 88 | S224FE826021300AC1052605187321300AC1062609FE21301A0A7E21300AC107262FFE21301B 89 | S224FE82801A167E21300AC101262D1686842605187221320AC1052605187321320AC10626C5 90 | S224FE82A009FE21321A0A7E21320AC107262FFE21321A167E21320AC102262D168684260588 91 | S224FE82C0187221340AC1052605187321340AC1062609FE21341A0A7E21340AC1072650FE51 92 | S224FE82E021341A167E21340AC10326591686842610FC2138FE213616C4C57C21387E21368D 93 | S224FE83000AC1052610FC2138FE213616C4CA7C21387E21360AC1062614FC2138C3000A7CB3 94 | S224FE83202138FC2136C90089007C21360AC107263AFC213883000A7C2138FC2136C20082E9 95 | S224FE8340007C21360AC104262D1686842605187221460AC1052605187321460AC1062609FC 96 | S224FE8360FE21461A0A7E21460AC107260BFE21461A167E21460AC105262216868426051894 97 | S224FE83807221480AC1052605187321480AC1062609FE21481A0A7E21480AC107182602D3B9 98 | S224FE83A0FE21481A167E21480AC1021826011AC60137C737C6504A8FBCFEC6026BA0C737A0 99 | S224FE83C0C6574A8FBCFEC6036BA0C737C6374A8FBCFE1B82C6011686BEC602375737C65720 100 | S224FE83E04A8FBCFE1B82168674375837C6504A8FBCFEC6026BA037C6574A8FBCFEC6036BDD 101 | S224FE8400A05337C6354A8FBCFECC03016BA036C6504A8FBCFEC6026BA05237C6574A8FBCD9 102 | S224FE8420FEC6036BA037C6334A8FBCFECC04016BA036C64C4A8FBCFEC6026BA05837C64283 103 | S224FE84404A8FBCFEC6036BA05237C64D4A8FBCFECC05016BA036C6524A8FBCFECC05026B87 104 | S224FE8460A036C6424A8FBCFECC05036BA036C6574A8FBCFEC6086BA0C737F60323874A906F 105 | S224FE848042FECC01086BA036F6031D874A9042FECC02086BA036F60321874A9042FECC032B 106 | S224FE84A0086BA036F6031F874A9042FEC6086BA05737FC23434A9042FECC05086BA036FCBE 107 | S224FE84C023474A9042FE068671C1031826015BC60137C737C6534A8FBCFE1B82C602168611 108 | S224FE84E0A616868A3737C6534A8FBCFEC6026BA05737C6504A8FBCFE1B8216867437583716 109 | S224FE8500C6534A8FBCFE1B82C6021686BEC603375337C6574A8FBCFECC03016BA036C65884 110 | S224FE85204A8FBCFEC6026BA05237C6534A8FBCFEC6036BA037C64A4A8FBCFEC6086BA0C74F 111 | S224FE854037FC213C4A9042FECC01086BA036FC21404A9042FECC02086BA036FC21384A909B 112 | S224FE856042FECC03086BA036C7874A9042FE1B82F6239826591686842610FC213CFE213A63 113 | S224FE858016C4C57C213C7E213A0AC1052610FC213CFE213A16C4CA7C213C7E213A0AC106A8 114 | S224FE85A02614FC213CC3000A7C213CFC213AC90089007C213A0AC107265AFC213C83000AC7 115 | S224FE85C07C213CFC213AC20082007C213A0A0421A21686842610FC2140FE213E16C4C57C51 116 | S224FE85E021407E213E0AC1052610FC2140FE213E16C4CA7C21407E213E0AC1062614FC21F4 117 | S224FE860040C3000A7C2140FC213EC90089007C213E0AC107265DFC214083000A7C2140FCCD 118 | S224FE8620213EC20082007C213E0AC1042645C60137C737F60323874A90AEFEC6016BA05830 119 | S224FE864037F60321874A90AEFEC6046BA037FC234B4A90AEFEC6066BA0C737F6031D874A01 120 | S224FE866090AEFECC02066BA036F6031F874A90AEFE1B820AC603375737C6314A8FBCFE1BA7 121 | S224FE868082C6013DF623C1C1043DC60337C737C6304A8FBCFE1B82C6013D37CC0544364A81 122 | S224FE86A08FBCFE1B823D37C737C6504A8FBCFE1B823D375237C6504A8FBCFE1B823D37372B 123 | S224FE86C0C6504A8FBCFE1B823DC6107B02C51F02C680FBFC02D07C22F4C7877C22F2FE025C 124 | S224FE86E0D27E22F87C22F60A3B34FC239B6CAAFC23993BEC8A16C233FD21186DA16C82FC8E 125 | S224FE870021163BEC8416C3D76CA3FC23143BFC23123BEC8416C21E7C23147E23126CA134CE 126 | S224FE8720ECF011EE8F16C2337C239F7E239DFC21206CA1FC211E3BFC210CFE210A16C23328 127 | S224FE87406CA3FC21243BFC21223BEC8416C2331B847C231C7E231AFC2128FE212616C246D9 128 | S224FE87607C23207E231E7E23227C2324FC21107C2328FC210E7C232635FC21163BFC231C30 129 | S224FE8780FE231A16C3D76CA3FC211C3BFC211A3BEC8416C21E7C211C7E211A6DA1FC2116DD 130 | S224FE87A03BFC2320FE231E16C3D76EA3CE211E6C82EC023BEC003BEC86EE8416C21E1B8478 131 | S224FE87C016899335FC21163BFC2324FE232216C3D71B84CD212216897FFC21183BFC21161B 132 | S224FE87E03BFC2328FE232616C3D71B84CD212616897FFC21083BFE210634FC211CFE211A01 133 | S224FE880016C3D77C23A37E23A1FD21086DA1FD210635FC2124FE212216C3D77C23A77E237B 134 | S224FE8820A5FD23A36DA1FD23A135FC2108FE210616C3D7FD21146DA1FD21123516C21E7CB8 135 | S224FE884023AB7E23A96CA134FC23A3FE23A116C3EB7C23AF7E23ADFD23AB6DA1FD23A93501 136 | S224FE8860FC23A7FE23A516C3EB7C23B37E23B1FD23A37D23B7FD23A17D23B5FD21086DA19D 137 | S224FE8880FD210635FC2120FE211E16C3D77C23BB7E23B9FD23B76DA1FC23B53B16899D1658 138 | S224FE88A0C3D76CA134FC211CFE211A16C2337C211C7E211AFC23BB6CA1FE23B93416899DBA 139 | S224FE88C016C3D76CA134CE211EEE006E86CE211EEC02EE8616C2331B8416899335FC23B561 140 | S224FE88E03BFC23B3FE23B116C3D76CA134CE2122EE00CD2122EC4216C2331B846C426E4062 141 | S224FE8900FC23BB3BFC23B93BFC23B3FE23B116C3D76CA134CE2126EE00CD2126EC4216C27A 142 | S224FE8920331B846C426E40FC239F3BFE239D34076C16C3D7FD23146DA1FD23123516C21E59 143 | S224FE89407C23147E2312FC239F6CA1FC239D3BFC23B3FE23B116C3D7FD239B6DA1FD239916 144 | S224FE89603516C21E7C239B7E23996CA134EC8AEE8816C2331B847C23187E23161B880A6CF7 145 | S224FE898084EC423BEC403BEC8816C21E1B846C426E403D34CE211E6C023A6C003DFC23AF7E 146 | S224FE89A0FE23AD3D3BFC22F4FE22F216C2C77C2310FC22F834FE22F616C2C77C230CFC2135 147 | S224FE89C02C34188716C2D9FD231035ED843516C233FD21026DA16C86FC21003BEC8816C309 148 | S224FE89E0D71B846C84CCCCCD3BCC444C3BEC8816C3EB1B846C84C7873BCC42B43BEC881600 149 | S224FE8A00C3D71B847C23107E230EFC212E188716C2D96C84FC230C3BEC823BEC8816C233A3 150 | S224FE8A206DA1FD21003516C3D76CA3FC21046E82188716C2D9CDA2F035CD3F2F3516C3D7FE 151 | S224FE8A406CA134EC84EE8616C3EB7C230C7E230AFD23106DA1FD230E354A86E8FE1B8A0ACE 152 | S224FE8A60FC2130188716C2D9FD231435FD23123516C3D76CA1FC213234188716C2D9FD23D6 153 | S224FE8A801835FD23163516C3D76CA134EC86EE8416C21E1B8416C2EB7C23BD1B840ADC62AB 154 | S224FE8AA07C234318877E23415E62FC237B2C0CFC234316C4BC7C23437E2341FC2359F32374 155 | S224FE8AC0437C2359FC235718F323417C23570ADC627C234718877E23455E62FC237D2C0C36 156 | S224FE8AE0FC234716C4BC7C23477E2345FC235DF323477C235DFC235B18F323457C235B0AE5 157 | S224FE8B00FC235DF32359FE235B18B92357CD000A35B746C7873BB76416C5A67C234B7E23E7 158 | S224FE8B2049C7877C235D7C235B7C23597C2357FC2138B3234B7C233BFE213618B223497E5E 159 | S224FE8B402339FD213416C4D27C23337E2331FD233B18F0233FFC233918B3233D35FD232F48 160 | S224FE8B603BEC823016C4D27C23377E2335FD233B7D233FFD23397D233DFD234F7D2353FDF2 161 | S224FE8B80234D7D2351F323337C234FFC233118F323357C234D3A0A3BFC234FB32353FE2364 162 | S224FE8BA04D18B2235116C2C77C23617E235FF6212B87C30001B74D16C2C7FD236135FD2382 163 | S224FE8BC05F3516C3D76CA3C7873BCD42C835EC8416C3EB6CA1FC235334FE235116C2C73B77 164 | S224FE8BE034EC86EE8416C21E1B8416C2EB7C23551B860A4A86C9FEFC2365F322F47C23653B 165 | S224FE8C00FC236318F322F27C2363FC2369F322F87C2369FC236718F322F67C2367FC236DD6 166 | S224FE8C20F322FC7C236DFC236B18F322FA7C236BFC2379F323087C2379FC237718F32306C1 167 | S224FE8C407C237772232B0A1B9C186982EC825959B745F6232B873BC73BECE223656E84EE1D 168 | S224FE8C60E2236316C5A6ED806CEA22F46EEA22F2C7876CEA23656CEA2363186282EE828EC1 169 | S224FE8C8000062DC87B232B1B840AFC2308B322FCFE230618B222FA16C2C77C23917E238F60 170 | S224FE8CA0FD230818FB22FCFC230618F322FAB7C6B7D616C2C77C238D7E238B3B34FC2391EC 171 | S224FE8CC0B76516C3EB7C23857E2383FD23816DA1FD237F3516C2331B847C23897E2387FCF0 172 | S224FE8CE02146188716C2D9FD238535FD23833516C3D76CA1FC214834188716C2D9FD2389B9 173 | S224FE8D0035FD23873516C3D76CA134EC86EE8416C21E1B8416C2EB7C2395FC23857C23811A 174 | S224FE8D20FC23837C237FFC23957C23931B840AFC237B2F0DF6237CCB037B0323790321204A 175 | S224FE8D400CF6237C50CB037B0321790323FC237D2F0CF6237ECB037B031D79031F0A79031B 176 | S224FE8D601DF6237E50CB037B031F0AFC23BDCE000A1815FC235534CE000A181534EC82A3A4 177 | S224FE8D80B16C80FC2393CD000A133BB745EC82A3B17C237B3A1AE67E237DFC237B8C00F511 178 | S224FE8DA02F05C6F58720088CFF0B2C06CCFF0B7C237B8E00F52F05C6F58720088EFF0B2C75 179 | S224FE8DC006CCFF0B7C237DC7873BCE41F034FC2314FE231216C2511B842E2DC7873BCEC13B 180 | S224FE8DE0F034FC2314FE231216C2511B842D19F6232E2714C7873BCE42C834FC238DFE23F4 181 | S224FE8E008B16C2511B842C08C7877C237B7C237D4A8D2FFE0A4A9133FE4A927CFE4A929F59 182 | S224FE8E20FE4A92C3FE4A92E7FE4A930BFE4A911AFE4A9146FE4A9196FE4A91D0FE4A91F1F7 183 | S224FE8E40FE4A9209FEC67F7B02424A8EDBFE4A8F1BFE1C0240200A14104A8E15FE10EF4AA7 184 | S224FE8E608000FE20FAFEC011FDC00F270E35ED31EC3169700434FB310326F2FEC013EC31D1 185 | S224FE8E80270BED31180A30700434F920F10A1887088E000525FA0A6BAE1D0240100E8001F7 186 | S224FE8EA0061D02400820041C02400869810F8580061C02400420041D02400468851D02407F 187 | S224FE8EC0021C0240026281E681C10825E01C0240081C0240101C0240043A0A1D0240204AD2 188 | S224FE8EE08E8EFE1C024020C62137C74A8E97FE33C6D00709C6200705C60C07010A37C74A8E 189 | S224FE8F008E97FE1B813DCA4037C74A8E97FE32E683CA8037C74A8E97FE320AC76BAD4A8F99 190 | S224FE8F2006FE1B81698187C737526A814A8E97FEE6A052C154B71025EE6281E681C1062578 191 | S224FE8F40E53A0A6BAE360757870763C108B71025F8073C86080757C110B71025F807406906 192 | S224FE8F60820713C10825FA0726C6086B820707C11025FA1B830AC610A68312EB84CE22521A 193 | S224FE8F80A6E536C6014A8E97FE336284E6843DE68958585837E689524A8F06FE1B813DE60E 194 | S224FE8FA08958585837E6894A8F06FE1B813DC737526A834A8E97FE33E682523D3736C03090 195 | S224FE8FC0C1092206E681C0302046E681C041C1192206E681CBC92038E681C1202604C624C6 196 | S224FE8FE0202EC13A2604C6252026C12D2604C626201EC12F2604C6272016C12E2604C62844 197 | S224FE9000200EC12C2604C6292006C15E2604C62A6B81C606A6861237E6864A8F06FE33C74A 198 | S224FE90206B80C606A68112B745E680871AE6A6E2214A36C6014A8E97FEE6A052C10625E053 199 | S224FE90403A0A3BCE03E81810B7516BAEEC82CE03E81810CE00641810B75137EC83CE006403 200 | S224FE90601810CE000A1810B75137EC84CE000A1810A68A36A68A366B85E6844A8FBCFE3A23 201 | S224FE9080E68A5237E68A37E6834A8FBCFE3AE68ACB0237E68A37E6824A8FBCFE3AE68ACB6C 202 | S224FE90A00337E68A37E6854A8FBCFE1B880A3BCE03E81810B7516BAEEC82CE03E81810CEC7 203 | S224FE90C000641810B75137EC83CE00641810CE000A1810B75137EC84CE000A1810A68A36E4 204 | S224FE90E0A68A366B85E6844A8F43FE3AE68A5237E68A37E6834A8F43FE3AE68ACB0237E6A2 205 | S224FE91008A37E6824A8F43FE3AE68ACB0337E68A37E6854A8F43FE1B880A1C02C120790207 206 | S224FE9120C2CC10C07B02C31C02C4E01D02C41F7A02C50ACCC4815B355A34A7A7A7A74F372E 207 | S224FE914008FC4C39800AF60340C4FCCA017B0340F60341C4F0CA017B03411D03430FF60394 208 | S224FE916044C4F0CA017B03441C034080F60342C4F0CA017B0342C6C77B0346CCEA5F7C0329 209 | S224FE9180481D0243801D0242801C0240801C0244801C0245800AF60340C4FCCA017B034092 210 | S224FE91A0F60341C4F0CA027B03411D03430FF60344C4F0CA037B03441C034080F60342C463 211 | S224FE91C0F0CA037B0342C6C7877C034C7B03470A4D4080D64AC43FCA405B4A4D4C804D4DCF 212 | S224FE91E0074D46804C60104D60204C60044C60400AC6425B604C600C0AC6FF37C632043175 213 | S224FE9200FD6380E68026F5320A4C0C020A1B9D6981790003C6FF5B01960104805A4A91F9C2 214 | S224FE9220FED601048104D6016B82D60104B1FBE682C1FE223EC1FB6B80250EC1FE220AC076 215 | S224FE9240FB8716C5DB1C2E191687E68216C5E0F7247F1FBF1ADF15EF10F70BC6018FC6020B 216 | S224FE92608FC6038FC6048FC6058FC6068FC6078FC6088FC6096B81E6811B830A1D0302024F 217 | S224FE9280F60303C4F8CA047B03031C0301021D030402C6FA7B031579031D1C0300020A1D48 218 | S224FE92A0030208F60303C48FCA407B03031C0301081D030408CC19FA7B03177A031F1C0341 219 | S224FE92C000080A1D030210F60303C4F8CA047B03031C0301101D030410CC19FA7B03187AED 220 | S224FE92E003201C0300100A1D030220F60303C4F8CA047B03031C0301201D030420CC19FA63 221 | S224FE93007B03197A03211C0300200A1D030280F60303C48FCA407B03031C0301801D03048C 222 | S213FE932080CC19FA7B031B7A03231C0300800AFA 223 | S9030000FC 224 | -------------------------------------------------------------------------------- /Smart Car two wheels/bin/Project.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stupidbee/Smart-Car/1ce06edd610c765f655a79c25f36d23942e73e01/Smart Car two wheels/bin/Project.map -------------------------------------------------------------------------------- /Smart Car two wheels/bin/Project.xpr: -------------------------------------------------------------------------------- 1 | Data:1 < ADDXPR ONLY_ADD_IF_NEW "error" 2 | Data:1 < ADDXPR ONLY_ADD_IF_NEW "PACNT" 3 | Data:1 < ADDXPR ONLY_ADD_IF_NEW "text" 4 | -------------------------------------------------------------------------------- /Smart Car two wheels/cmd/TBDML_Erase_unsecure_hcs12xe.cmd: -------------------------------------------------------------------------------- 1 | // ver 0.2 (28-Mar-06) 2 | // HCS12XE Core erasing + unsecuring command file: 3 | // These commands mass erase the chip then program the security byte to 0xFE (unsecured state). 4 | 5 | DEFINEVALUEDLG "Information required to unsecure the device" "FCLKDIV" 17 "To unsecure the device, the command script needs \nthe correct value for the FCLKDIV onchip register.\n\nDatasheet proposed values:\n\noscillator frequency\tFCLKDIV value (decimal)\n\n 16 \tMHz\t\t17\n 12 \tMHz\t\t13\n 8 \tMHz\t\t9\n 4 \tMHz\t\t5\n" 6 | 7 | FLASH RELEASE 8 | 9 | reset 10 | wb 0x03c 0x00 //disable cop 11 | wait 20 12 | 13 | 14 | WB 0x100 FCLKDIV // clock divider 15 | 16 | WB 0x106 0x30 // clear any error flags 17 | WB 0x102 0x00 // CCOBIX = 0 18 | WB 0x10A 0x08 // load erase all blocks command 19 | WB 0x106 0x80 // launch command 20 | WAIT 10 21 | 22 | reset 23 | 24 | WB 0x100 FCLKDIV // clock divider 25 | WB 0x106 0x30 // clear any error flags 26 | WB 0x102 0x00 // CCOBIX = 0 27 | WB 0x10A 0x06 // load program command 28 | WB 0x10B 0x7F // load GPAGE 29 | WB 0x102 0x01 // CCOBIX = 1 30 | WB 0x10A 0xFF // load addr hi 31 | WB 0x10B 0x08 // load addr lo 32 | WB 0x102 0x02 // CCOBIX = 2 33 | WB 0x10A 0xFF // load data 34 | WB 0x10B 0xFF // load data 35 | WB 0x102 0x03 // CCOBIX = 3 36 | WB 0x10A 0xFF // load data 37 | WB 0x10B 0xFF // load data 38 | WB 0x102 0x04 // CCOBIX = 4 39 | WB 0x10A 0xFF // load data 40 | WB 0x10B 0xFF // load data 41 | WB 0x102 0x05 // CCOBIX = 5 42 | WB 0x10A 0xFF // load data 43 | WB 0x10B 0xFE // load data 44 | WB 0x106 0x80 // launch command 45 | WAIT 1 46 | 47 | undef FCLKDIV // undefine variable 48 | 49 | -------------------------------------------------------------------------------- /Smart Car two wheels/cmd/TBDML_Postload.cmd: -------------------------------------------------------------------------------- 1 | // After load the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/cmd/TBDML_Preload.cmd: -------------------------------------------------------------------------------- 1 | // Before load the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/cmd/TBDML_Reset.cmd: -------------------------------------------------------------------------------- 1 | // After reset the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/cmd/TBDML_Startup.cmd: -------------------------------------------------------------------------------- 1 | // At startup the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/cmd/TBDML_Vppoff.cmd: -------------------------------------------------------------------------------- 1 | // After programming the flash, the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/cmd/TBDML_Vppon.cmd: -------------------------------------------------------------------------------- 1 | // Before programming the flash, the commands written below will be executed 2 | -------------------------------------------------------------------------------- /Smart Car two wheels/prm/Project.prm: -------------------------------------------------------------------------------- 1 | /* This is a linker parameter file for the MC9S12XS128 */ 2 | 3 | /* 4 | This file is setup to use the HCS12X core only. 5 | If you plan to also use the XGATE in your project, best create a new project with the 6 | 'New Project Wizard' (File|New... menu in the CodeWarrior IDE) and choose the appropriate 7 | project parameters. 8 | */ 9 | 10 | NAMES 11 | /* CodeWarrior will pass all the needed files to the linker by command line. But here you may add your additional files */ 12 | END 13 | 14 | SEGMENTS /* here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. All addresses are 'logical' */ 15 | /* Register space */ 16 | /* IO_SEG = PAGED 0x0000 TO 0x07FF; intentionally not defined */ 17 | 18 | /* non-paged RAM */ 19 | RAM = READ_WRITE DATA_NEAR 0x2000 TO 0x3FFF; 20 | 21 | /* non-banked FLASH */ 22 | ROM_4000 = READ_ONLY DATA_NEAR IBCC_NEAR 0x4000 TO 0x7FFF; 23 | ROM_C000 = READ_ONLY DATA_NEAR IBCC_NEAR 0xC000 TO 0xFEFF; 24 | /* VECTORS = READ_ONLY 0xFF00 TO 0xFFFF; intentionally not defined: used for VECTOR commands below */ 25 | //OSVECTORS = READ_ONLY 0xFF10 TO 0xFFFF; /* OSEK interrupt vectors (use your vector.o) */ 26 | 27 | /* paged EEPROM 0x0800 TO 0x0BFF; addressed through EPAGE */ 28 | EEPROM_00 = READ_ONLY DATA_FAR IBCC_FAR 0x000800 TO 0x000BFF; 29 | EEPROM_01 = READ_ONLY DATA_FAR IBCC_FAR 0x010800 TO 0x010BFF; 30 | EEPROM_02 = READ_ONLY DATA_FAR IBCC_FAR 0x020800 TO 0x020BFF; 31 | EEPROM_03 = READ_ONLY DATA_FAR IBCC_FAR 0x030800 TO 0x030BFF; 32 | EEPROM_04 = READ_ONLY DATA_FAR IBCC_FAR 0x040800 TO 0x040BFF; 33 | EEPROM_05 = READ_ONLY DATA_FAR IBCC_FAR 0x050800 TO 0x050BFF; 34 | EEPROM_06 = READ_ONLY DATA_FAR IBCC_FAR 0x060800 TO 0x060BFF; 35 | EEPROM_07 = READ_ONLY DATA_FAR IBCC_FAR 0x070800 TO 0x070BFF; 36 | 37 | /* paged RAM: 0x1000 TO 0x1FFF; addressed through RPAGE */ 38 | /* RAM_FE = READ_WRITE 0xFE1000 TO 0xFE1FFF; intentionally not defined: equivalent to RAM: 0x2000..0x2FFF */ 39 | /* RAM_FF = READ_WRITE 0xFF1000 TO 0xFF1FFF; intentionally not defined: equivalent to RAM: 0x3000..0x3FFF */ 40 | 41 | /* paged FLASH: 0x8000 TO 0xBFFF; addressed through PPAGE */ 42 | PAGE_F8 = READ_ONLY DATA_FAR IBCC_FAR 0xF88000 TO 0xF8BFFF; 43 | PAGE_F9 = READ_ONLY DATA_FAR IBCC_FAR 0xF98000 TO 0xF9BFFF; 44 | PAGE_FA = READ_ONLY DATA_FAR IBCC_FAR 0xFA8000 TO 0xFABFFF; 45 | PAGE_FB = READ_ONLY DATA_FAR IBCC_FAR 0xFB8000 TO 0xFBBFFF; 46 | PAGE_FC = READ_ONLY DATA_FAR IBCC_FAR 0xFC8000 TO 0xFCBFFF; 47 | /* PAGE_FD = READ_ONLY 0xFD8000 TO 0xFDBFFF; intentionally not defined: equivalent to ROM_4000 */ 48 | PAGE_FE = READ_ONLY DATA_FAR IBCC_FAR 0xFE8000 TO 0xFEBFFF; 49 | /* PAGE_FF = READ_ONLY 0xFF8000 TO 0xFFBFFF; intentionally not defined: equivalent to ROM_C000 */ 50 | END 51 | 52 | PLACEMENT /* here all predefined and user segments are placed into the SEGMENTS defined above. */ 53 | _PRESTART, /* Used in HIWARE format: jump to _Startup at the code start */ 54 | STARTUP, /* startup data structures */ 55 | ROM_VAR, /* constant variables */ 56 | STRINGS, /* string literals */ 57 | VIRTUAL_TABLE_SEGMENT, /* C++ virtual table segment */ 58 | //.ostext, /* eventually OSEK code */ 59 | NON_BANKED, /* runtime routines which must not be banked */ 60 | COPY /* copy down information: how to initialize variables */ 61 | /* in case you want to use ROM_4000 here as well, make sure 62 | that all files (incl. library files) are compiled with the 63 | option: -OnB=b */ 64 | INTO ROM_C000/*, ROM_4000*/; 65 | 66 | DEFAULT_ROM INTO PAGE_FE, PAGE_FC, PAGE_FB, PAGE_FA, PAGE_F9, PAGE_F8; 67 | 68 | //.stackstart, /* eventually used for OSEK kernel awareness: Main-Stack Start */ 69 | SSTACK, /* allocate stack first to avoid overwriting variables on overflow */ 70 | //.stackend, /* eventually used for OSEK kernel awareness: Main-Stack End */ 71 | PAGED_RAM, /* there is no need for paged data accesses on this derivative */ 72 | 73 | DEFAULT_RAM /* all variables, the default RAM location */ 74 | INTO RAM; 75 | 76 | DISTRIBUTE DISTRIBUTE_INTO 77 | ROM_4000, PAGE_FE, PAGE_FC, PAGE_FB, PAGE_FA, PAGE_F9, PAGE_F8; 78 | CONST_DISTRIBUTE DISTRIBUTE_INTO 79 | ROM_4000, PAGE_FE, PAGE_FC, PAGE_FB, PAGE_FA, PAGE_F9, PAGE_F8; 80 | DATA_DISTRIBUTE DISTRIBUTE_INTO 81 | RAM; 82 | //.vectors INTO OSVECTORS; /* OSEK vector table */ 83 | END 84 | 85 | 86 | ENTRIES /* keep the following unreferenced variables */ 87 | /* OSEK: always allocate the vector table and all dependent objects */ 88 | //_vectab OsBuildNumber _OsOrtiStackStart _OsOrtiStart 89 | END 90 | 91 | STACKSIZE 0x100 /* size of the stack (will be allocated in DEFAULT_RAM) */ 92 | 93 | /* use these definitions in plane of the vector table ('vectors') above */ 94 | VECTOR 0 _Startup /* reset vector: this is the default entry point for a C/C++ application. */ 95 | //VECTOR 0 Entry /* reset vector: this is the default entry point for an Assembly application. */ 96 | //INIT Entry /* for assembly applications: that this is as well the initialization entry point */ 97 | -------------------------------------------------------------------------------- /Smart Car two wheels/prm/burner.bbl: -------------------------------------------------------------------------------- 1 | /* global s-record file */ 2 | OPENFILE "%ABS_FILE%.glo" 3 | format = motorola 4 | busWidth = 1 5 | SRECORD=Sx 6 | 7 | /* "EABI compliant encoded global" address to global */ 8 | len = 0x1800000 9 | origin = 0x1000000 10 | destination = 0 11 | SENDBYTE 1 "%ABS_FILE%" 12 | 13 | /* physical flash window to global */ 14 | len = 0x4000 15 | destination = 0x7F8000 16 | origin = 0x008000 17 | SENDBYTE 1 "%ABS_FILE%" 18 | 19 | /* logical non banked flash at $4000 and $C000 to global */ 20 | len = 0x4000 21 | destination = 0x7F4000 22 | origin = 0x004000 23 | SENDBYTE 1 "%ABS_FILE%" 24 | destination = 0x7FC000 25 | origin = 0x00C000 26 | SENDBYTE 1 "%ABS_FILE%" 27 | 28 | /* logical 1 MB banked flash to global */ 29 | destination = 0x700000 30 | origin = 0xc08000 31 | SENDBYTE 1 "%ABS_FILE%" 32 | destination = 0x704000 33 | origin = 0xc18000 34 | SENDBYTE 1 "%ABS_FILE%" 35 | destination = 0x708000 36 | origin = 0xc28000 37 | SENDBYTE 1 "%ABS_FILE%" 38 | destination = 0x70c000 39 | origin = 0xc38000 40 | SENDBYTE 1 "%ABS_FILE%" 41 | destination = 0x710000 42 | origin = 0xc48000 43 | SENDBYTE 1 "%ABS_FILE%" 44 | destination = 0x714000 45 | origin = 0xc58000 46 | SENDBYTE 1 "%ABS_FILE%" 47 | destination = 0x718000 48 | origin = 0xc68000 49 | SENDBYTE 1 "%ABS_FILE%" 50 | destination = 0x71c000 51 | origin = 0xc78000 52 | SENDBYTE 1 "%ABS_FILE%" 53 | destination = 0x720000 54 | origin = 0xc88000 55 | SENDBYTE 1 "%ABS_FILE%" 56 | destination = 0x724000 57 | origin = 0xc98000 58 | SENDBYTE 1 "%ABS_FILE%" 59 | destination = 0x728000 60 | origin = 0xca8000 61 | SENDBYTE 1 "%ABS_FILE%" 62 | destination = 0x72c000 63 | origin = 0xcb8000 64 | SENDBYTE 1 "%ABS_FILE%" 65 | destination = 0x730000 66 | origin = 0xcc8000 67 | SENDBYTE 1 "%ABS_FILE%" 68 | destination = 0x734000 69 | origin = 0xcd8000 70 | SENDBYTE 1 "%ABS_FILE%" 71 | destination = 0x738000 72 | origin = 0xce8000 73 | SENDBYTE 1 "%ABS_FILE%" 74 | destination = 0x73c000 75 | origin = 0xcf8000 76 | SENDBYTE 1 "%ABS_FILE%" 77 | destination = 0x740000 78 | origin = 0xd08000 79 | SENDBYTE 1 "%ABS_FILE%" 80 | destination = 0x744000 81 | origin = 0xd18000 82 | SENDBYTE 1 "%ABS_FILE%" 83 | destination = 0x748000 84 | origin = 0xd28000 85 | SENDBYTE 1 "%ABS_FILE%" 86 | destination = 0x74c000 87 | origin = 0xd38000 88 | SENDBYTE 1 "%ABS_FILE%" 89 | destination = 0x750000 90 | origin = 0xd48000 91 | SENDBYTE 1 "%ABS_FILE%" 92 | destination = 0x754000 93 | origin = 0xd58000 94 | SENDBYTE 1 "%ABS_FILE%" 95 | destination = 0x758000 96 | origin = 0xd68000 97 | SENDBYTE 1 "%ABS_FILE%" 98 | destination = 0x75c000 99 | origin = 0xd78000 100 | SENDBYTE 1 "%ABS_FILE%" 101 | destination = 0x760000 102 | origin = 0xd88000 103 | SENDBYTE 1 "%ABS_FILE%" 104 | destination = 0x764000 105 | origin = 0xd98000 106 | SENDBYTE 1 "%ABS_FILE%" 107 | destination = 0x768000 108 | origin = 0xda8000 109 | SENDBYTE 1 "%ABS_FILE%" 110 | destination = 0x76c000 111 | origin = 0xdb8000 112 | SENDBYTE 1 "%ABS_FILE%" 113 | destination = 0x770000 114 | origin = 0xdc8000 115 | SENDBYTE 1 "%ABS_FILE%" 116 | destination = 0x774000 117 | origin = 0xdd8000 118 | SENDBYTE 1 "%ABS_FILE%" 119 | destination = 0x778000 120 | origin = 0xde8000 121 | SENDBYTE 1 "%ABS_FILE%" 122 | destination = 0x77c000 123 | origin = 0xdf8000 124 | SENDBYTE 1 "%ABS_FILE%" 125 | destination = 0x780000 126 | origin = 0xe08000 127 | SENDBYTE 1 "%ABS_FILE%" 128 | destination = 0x784000 129 | origin = 0xe18000 130 | SENDBYTE 1 "%ABS_FILE%" 131 | destination = 0x788000 132 | origin = 0xe28000 133 | SENDBYTE 1 "%ABS_FILE%" 134 | destination = 0x78c000 135 | origin = 0xe38000 136 | SENDBYTE 1 "%ABS_FILE%" 137 | destination = 0x790000 138 | origin = 0xe48000 139 | SENDBYTE 1 "%ABS_FILE%" 140 | destination = 0x794000 141 | origin = 0xe58000 142 | SENDBYTE 1 "%ABS_FILE%" 143 | destination = 0x798000 144 | origin = 0xe68000 145 | SENDBYTE 1 "%ABS_FILE%" 146 | destination = 0x79c000 147 | origin = 0xe78000 148 | SENDBYTE 1 "%ABS_FILE%" 149 | destination = 0x7a0000 150 | origin = 0xe88000 151 | SENDBYTE 1 "%ABS_FILE%" 152 | destination = 0x7a4000 153 | origin = 0xe98000 154 | SENDBYTE 1 "%ABS_FILE%" 155 | destination = 0x7a8000 156 | origin = 0xea8000 157 | SENDBYTE 1 "%ABS_FILE%" 158 | destination = 0x7ac000 159 | origin = 0xeb8000 160 | SENDBYTE 1 "%ABS_FILE%" 161 | destination = 0x7b0000 162 | origin = 0xec8000 163 | SENDBYTE 1 "%ABS_FILE%" 164 | destination = 0x7b4000 165 | origin = 0xed8000 166 | SENDBYTE 1 "%ABS_FILE%" 167 | destination = 0x7b8000 168 | origin = 0xee8000 169 | SENDBYTE 1 "%ABS_FILE%" 170 | destination = 0x7bc000 171 | origin = 0xef8000 172 | SENDBYTE 1 "%ABS_FILE%" 173 | destination = 0x7c0000 174 | origin = 0xf08000 175 | SENDBYTE 1 "%ABS_FILE%" 176 | destination = 0x7c4000 177 | origin = 0xf18000 178 | SENDBYTE 1 "%ABS_FILE%" 179 | destination = 0x7c8000 180 | origin = 0xf28000 181 | SENDBYTE 1 "%ABS_FILE%" 182 | destination = 0x7cc000 183 | origin = 0xf38000 184 | SENDBYTE 1 "%ABS_FILE%" 185 | destination = 0x7d0000 186 | origin = 0xf48000 187 | SENDBYTE 1 "%ABS_FILE%" 188 | destination = 0x7d4000 189 | origin = 0xf58000 190 | SENDBYTE 1 "%ABS_FILE%" 191 | destination = 0x7d8000 192 | origin = 0xf68000 193 | SENDBYTE 1 "%ABS_FILE%" 194 | destination = 0x7dc000 195 | origin = 0xf78000 196 | SENDBYTE 1 "%ABS_FILE%" 197 | destination = 0x7e0000 198 | origin = 0xf88000 199 | SENDBYTE 1 "%ABS_FILE%" 200 | destination = 0x7e4000 201 | origin = 0xf98000 202 | SENDBYTE 1 "%ABS_FILE%" 203 | destination = 0x7e8000 204 | origin = 0xfa8000 205 | SENDBYTE 1 "%ABS_FILE%" 206 | destination = 0x7ec000 207 | origin = 0xfb8000 208 | SENDBYTE 1 "%ABS_FILE%" 209 | destination = 0x7f0000 210 | origin = 0xfc8000 211 | SENDBYTE 1 "%ABS_FILE%" 212 | destination = 0x7f4000 213 | origin = 0xfd8000 214 | SENDBYTE 1 "%ABS_FILE%" 215 | destination = 0x7f8000 216 | origin = 0xfe8000 217 | SENDBYTE 1 "%ABS_FILE%" 218 | destination = 0x7fc000 219 | origin = 0xff8000 220 | SENDBYTE 1 "%ABS_FILE%" 221 | 222 | CLOSE 223 | 224 | /*****************************************************************************/ 225 | 226 | /* logical s-record file */ 227 | 228 | OPENFILE "%ABS_FILE%.s19" 229 | format = motorola 230 | busWidth = 1 231 | SRECORD=Sx 232 | 233 | /* logical non banked flash at $4000 and $C000 to logical */ 234 | len = 0x4000 235 | origin = 0x004000 236 | destination = 0x004000 237 | SENDBYTE 1 "%ABS_FILE%" 238 | 239 | len = 0x4000 240 | origin = 0x00C000 241 | destination = 0xC000 242 | SENDBYTE 1 "%ABS_FILE%" 243 | 244 | /* physical flash window to logical */ 245 | len = 0x4000 246 | origin = 0x008000 247 | destination = 0xFE8000 248 | SENDBYTE 1 "%ABS_FILE%" 249 | 250 | 251 | /* logical 1 MB banked flash to logical */ 252 | len = 0x400000 253 | origin = 0xC00000 254 | destination = 0xC00000 255 | SENDBYTE 1 "%ABS_FILE%" 256 | 257 | 258 | /* global 1 MB banked flash to logical */ 259 | len = 0x4000 260 | origin = 0x1700000 261 | destination = 0xc08000 262 | SENDBYTE 1 "%ABS_FILE%" 263 | origin = 0x1704000 264 | destination = 0xc18000 265 | SENDBYTE 1 "%ABS_FILE%" 266 | origin = 0x1708000 267 | destination = 0xc28000 268 | SENDBYTE 1 "%ABS_FILE%" 269 | origin = 0x170c000 270 | destination = 0xc38000 271 | SENDBYTE 1 "%ABS_FILE%" 272 | origin = 0x1710000 273 | destination = 0xc48000 274 | SENDBYTE 1 "%ABS_FILE%" 275 | origin = 0x1714000 276 | destination = 0xc58000 277 | SENDBYTE 1 "%ABS_FILE%" 278 | origin = 0x1718000 279 | destination = 0xc68000 280 | SENDBYTE 1 "%ABS_FILE%" 281 | origin = 0x171c000 282 | destination = 0xc78000 283 | SENDBYTE 1 "%ABS_FILE%" 284 | origin = 0x1720000 285 | destination = 0xc88000 286 | SENDBYTE 1 "%ABS_FILE%" 287 | origin = 0x1724000 288 | destination = 0xc98000 289 | SENDBYTE 1 "%ABS_FILE%" 290 | origin = 0x1728000 291 | destination = 0xca8000 292 | SENDBYTE 1 "%ABS_FILE%" 293 | origin = 0x172c000 294 | destination = 0xcb8000 295 | SENDBYTE 1 "%ABS_FILE%" 296 | origin = 0x1730000 297 | destination = 0xcc8000 298 | SENDBYTE 1 "%ABS_FILE%" 299 | origin = 0x1734000 300 | destination = 0xcd8000 301 | SENDBYTE 1 "%ABS_FILE%" 302 | origin = 0x1738000 303 | destination = 0xce8000 304 | SENDBYTE 1 "%ABS_FILE%" 305 | origin = 0x173c000 306 | destination = 0xcf8000 307 | SENDBYTE 1 "%ABS_FILE%" 308 | origin = 0x1740000 309 | destination = 0xd08000 310 | SENDBYTE 1 "%ABS_FILE%" 311 | origin = 0x1744000 312 | destination = 0xd18000 313 | SENDBYTE 1 "%ABS_FILE%" 314 | origin = 0x1748000 315 | destination = 0xd28000 316 | SENDBYTE 1 "%ABS_FILE%" 317 | origin = 0x174c000 318 | destination = 0xd38000 319 | SENDBYTE 1 "%ABS_FILE%" 320 | origin = 0x1750000 321 | destination = 0xd48000 322 | SENDBYTE 1 "%ABS_FILE%" 323 | origin = 0x1754000 324 | destination = 0xd58000 325 | SENDBYTE 1 "%ABS_FILE%" 326 | origin = 0x1758000 327 | destination = 0xd68000 328 | SENDBYTE 1 "%ABS_FILE%" 329 | origin = 0x175c000 330 | destination = 0xd78000 331 | SENDBYTE 1 "%ABS_FILE%" 332 | origin = 0x1760000 333 | destination = 0xd88000 334 | SENDBYTE 1 "%ABS_FILE%" 335 | origin = 0x1764000 336 | destination = 0xd98000 337 | SENDBYTE 1 "%ABS_FILE%" 338 | origin = 0x1768000 339 | destination = 0xda8000 340 | SENDBYTE 1 "%ABS_FILE%" 341 | origin = 0x176c000 342 | destination = 0xdb8000 343 | SENDBYTE 1 "%ABS_FILE%" 344 | origin = 0x1770000 345 | destination = 0xdc8000 346 | SENDBYTE 1 "%ABS_FILE%" 347 | origin = 0x1774000 348 | destination = 0xdd8000 349 | SENDBYTE 1 "%ABS_FILE%" 350 | origin = 0x1778000 351 | destination = 0xde8000 352 | SENDBYTE 1 "%ABS_FILE%" 353 | origin = 0x177c000 354 | destination = 0xdf8000 355 | SENDBYTE 1 "%ABS_FILE%" 356 | origin = 0x1780000 357 | destination = 0xe08000 358 | SENDBYTE 1 "%ABS_FILE%" 359 | origin = 0x1784000 360 | destination = 0xe18000 361 | SENDBYTE 1 "%ABS_FILE%" 362 | origin = 0x1788000 363 | destination = 0xe28000 364 | SENDBYTE 1 "%ABS_FILE%" 365 | origin = 0x178c000 366 | destination = 0xe38000 367 | SENDBYTE 1 "%ABS_FILE%" 368 | origin = 0x1790000 369 | destination = 0xe48000 370 | SENDBYTE 1 "%ABS_FILE%" 371 | origin = 0x1794000 372 | destination = 0xe58000 373 | SENDBYTE 1 "%ABS_FILE%" 374 | origin = 0x1798000 375 | destination = 0xe68000 376 | SENDBYTE 1 "%ABS_FILE%" 377 | origin = 0x179c000 378 | destination = 0xe78000 379 | SENDBYTE 1 "%ABS_FILE%" 380 | origin = 0x17a0000 381 | destination = 0xe88000 382 | SENDBYTE 1 "%ABS_FILE%" 383 | origin = 0x17a4000 384 | destination = 0xe98000 385 | SENDBYTE 1 "%ABS_FILE%" 386 | origin = 0x17a8000 387 | destination = 0xea8000 388 | SENDBYTE 1 "%ABS_FILE%" 389 | origin = 0x17ac000 390 | destination = 0xeb8000 391 | SENDBYTE 1 "%ABS_FILE%" 392 | origin = 0x17b0000 393 | destination = 0xec8000 394 | SENDBYTE 1 "%ABS_FILE%" 395 | origin = 0x17b4000 396 | destination = 0xed8000 397 | SENDBYTE 1 "%ABS_FILE%" 398 | origin = 0x17b8000 399 | destination = 0xee8000 400 | SENDBYTE 1 "%ABS_FILE%" 401 | origin = 0x17bc000 402 | destination = 0xef8000 403 | SENDBYTE 1 "%ABS_FILE%" 404 | origin = 0x17c0000 405 | destination = 0xf08000 406 | SENDBYTE 1 "%ABS_FILE%" 407 | origin = 0x17c4000 408 | destination = 0xf18000 409 | SENDBYTE 1 "%ABS_FILE%" 410 | origin = 0x17c8000 411 | destination = 0xf28000 412 | SENDBYTE 1 "%ABS_FILE%" 413 | origin = 0x17cc000 414 | destination = 0xf38000 415 | SENDBYTE 1 "%ABS_FILE%" 416 | origin = 0x17d0000 417 | destination = 0xf48000 418 | SENDBYTE 1 "%ABS_FILE%" 419 | origin = 0x17d4000 420 | destination = 0xf58000 421 | SENDBYTE 1 "%ABS_FILE%" 422 | origin = 0x17d8000 423 | destination = 0xf68000 424 | SENDBYTE 1 "%ABS_FILE%" 425 | origin = 0x17dc000 426 | destination = 0xf78000 427 | SENDBYTE 1 "%ABS_FILE%" 428 | origin = 0x17e0000 429 | destination = 0xf88000 430 | SENDBYTE 1 "%ABS_FILE%" 431 | origin = 0x17e4000 432 | destination = 0xf98000 433 | SENDBYTE 1 "%ABS_FILE%" 434 | origin = 0x17e8000 435 | destination = 0xfa8000 436 | SENDBYTE 1 "%ABS_FILE%" 437 | origin = 0x17ec000 438 | destination = 0xfb8000 439 | SENDBYTE 1 "%ABS_FILE%" 440 | origin = 0x17f0000 441 | destination = 0xfc8000 442 | SENDBYTE 1 "%ABS_FILE%" 443 | origin = 0x17f4000 444 | destination = 0xfd8000 445 | SENDBYTE 1 "%ABS_FILE%" 446 | origin = 0x17f8000 447 | destination = 0xfe8000 448 | SENDBYTE 1 "%ABS_FILE%" 449 | origin = 0x17fc000 450 | destination = 0xff8000 451 | SENDBYTE 1 "%ABS_FILE%" 452 | 453 | CLOSE 454 | --------------------------------------------------------------------------------