├── CCP_CANape.md
├── CCP_TEST_16
├── CANape_TEST_16
│ └── a2l_test
│ │ ├── Project.abs
│ │ ├── Project.map
│ │ ├── new_database.a2l
│ │ └── test
│ │ └── Project
│ │ ├── 123.cna
│ │ ├── CANape.INI
│ │ ├── CanapeCmd.ini
│ │ └── canape.0-0-0.ini
└── Project
│ ├── C_Layout.hwl
│ ├── Default.mem
│ ├── Project.mcp
│ ├── Project_Data
│ ├── CWSettingsWindows.stg
│ └── Standard
│ │ ├── ObjectCode
│ │ ├── CCP.C.o
│ │ ├── MC9S12XEP100.c.o
│ │ ├── Start12.c.o
│ │ ├── boot_can.c.o
│ │ ├── ccp_can_interface.C.o
│ │ ├── datapage.c.o
│ │ └── main.c.o
│ │ └── TargetDataWindows.tdt
│ ├── Sources
│ ├── CCP.C
│ ├── CCPPAR.H
│ ├── Configure.h
│ ├── Start12.c
│ ├── boot_can.c
│ ├── boot_can.h
│ ├── ccp.h
│ ├── ccp_can_interface.C
│ ├── ccp_can_interface.H
│ ├── datapage.c
│ ├── derivative.h
│ ├── main.c
│ └── vectors_s12xep.c
│ ├── TBDML.ini
│ ├── bin
│ ├── Project.abs
│ ├── Project.abs.glo
│ ├── Project.abs.s19
│ └── Project.map
│ ├── 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
├── CCP_TEST_32
├── ape_test
│ ├── ccp-test
│ │ ├── internal_FLASH.elf
│ │ └── new_database.a2l
│ └── pro
│ │ └── Project
│ │ ├── 123.cna
│ │ ├── CANape.INI
│ │ ├── CanapeCmd.ini
│ │ └── canape.0-0-0.ini
└── ccp_test_32
│ ├── bin
│ ├── RAM.MAP
│ ├── RAM.elf
│ ├── RAM.mot
│ ├── internal_FLASH.MAP
│ ├── internal_FLASH.elf
│ └── internal_FLASH.mot
│ ├── ccp_test_32.old.mcp
│ ├── ccp_test_32.old.old.mcp
│ ├── ccp_test_32.old.old_Data
│ ├── CWSettingsWindows.stg
│ ├── RAM
│ │ └── TargetDataWindows.tdt
│ └── internal_FLASH
│ │ └── TargetDataWindows.tdt
│ ├── ccp_test_32.old_Data
│ ├── CWSettingsWindows.stg
│ ├── RAM
│ │ └── TargetDataWindows.tdt
│ └── internal_FLASH
│ │ └── TargetDataWindows.tdt
│ ├── ccp_test_32_Data
│ ├── CWSettingsWindows.stg
│ ├── RAM
│ │ └── TargetDataWindows.tdt
│ └── internal_FLASH
│ │ └── TargetDataWindows.tdt
│ ├── config.t32
│ ├── jpc564xa.cmm
│ ├── lcf
│ ├── MPC5644A.lcf
│ └── MPC5644A_DEBUG.lcf
│ ├── readme.txt
│ ├── source
│ ├── CAN
│ │ ├── CAN.c
│ │ ├── CAN.h
│ │ ├── IntcInterrupts.c
│ │ ├── IntcInterrupts.h
│ │ ├── SPI.c
│ │ ├── SPI.h
│ │ ├── ZTypes.h
│ │ └── can_message.h
│ ├── ccp
│ │ ├── CCP.C
│ │ ├── CCPPAR.H
│ │ ├── Configure.h
│ │ ├── boot_can.c
│ │ ├── boot_can.h
│ │ ├── ccp.h
│ │ ├── ccp_can_interface.C
│ │ └── ccp_can_interface.H
│ └── includes
│ │ ├── ccp_global_def.h
│ │ ├── ccp_includes.h
│ │ └── ccp_types.h
│ ├── src
│ ├── Exceptions.c
│ ├── Exceptions.h
│ ├── IntcInterrupts.c
│ ├── IntcInterrupts.h
│ ├── MPC55xx_init.c
│ ├── MPC55xx_init_debug.c
│ ├── MPC5644A.h
│ ├── MPC5644A_HWInit.c
│ ├── MPC5644A_HWInit.h
│ ├── PIT
│ │ ├── PIT.c
│ │ └── PIT.h
│ ├── __ppc_eabi_init.c
│ ├── main.c
│ └── typedefs.h
│ └── windows.cmm
├── README.md
└── ccp移植.md
/CCP_CANape.md:
--------------------------------------------------------------------------------
1 | # CANape与ECU
2 |
3 | ## 1、CANape的数据库.a2l文件
4 |
5 | ### (1)描述:
6 |
7 | .a2l文件中包含了程序的参数和地址,由程序编译后bin文件夹中的.map或者.pdb或者.elf等文件生成
8 |
9 | ### (2)生成步骤:
10 |
11 | **1、打开ASAP2 Editor**
12 | 
13 |
14 | **2、在菜单栏中选择File,点击New**
15 | 
16 |
17 | **3、在菜单栏中选择Tool,点击Settings..**
18 | 
19 |
20 | **4、在新弹出的窗口中点击MAP File(s),选择导入外部的数据库,将bin文件夹中编译后的文件加载进来并选择对应的格式(.map对应Hware HC12),之后点击OK,再弹出窗口也点击OK。**
21 | 
22 |
23 | **5、右键,点击New,选择Parameter**
24 | 
25 |
26 | **6、对Parameter设置**
27 | **name:**
28 | 
29 |
30 | **Address(点击Link,选择具体的参数):**
31 | 
32 |
33 | **数据类型&字节序(一定注意字节序):**
34 | 
35 |
36 | **7、完成,保存,退出:**
37 | **6步骤完成后一个参数就新建成功了,可以根据需求添加其他的参数或者其他。此时保存后退出,.a2l文件就完成了。**
38 | 
39 |
40 | ## 2、CANape模型
41 |
42 | ### (1)描述:
43 |
44 | 在Vector CANape中搭建模型,使ECU与上位机通过CANape建立连接。
45 |
46 | ### (2)生成步骤:
47 |
48 | **1、打开CANape上位机软件,依次加入Symbol Explorer、Device Window、Trace Window(导入.a2l后才可加入),完成后界面如下图:**
49 | 
50 |
51 | **2、上位机CCP的配置,主要对下图中方框中的部分进行配置:**
52 | 
53 |
54 | **波特率配置:**
55 | 
56 |
57 | **字节序、CCP协议版本配置:**
58 | 
59 |
60 | **CRO、DTO、ECU Address、波特率配置:**
61 | 
62 |
63 | **CAN通道选择:**
64 | 
65 |
66 | **3、加入参数(将.a2l中的参数加入):**
67 | 
68 |
69 | **最后的界面:**
70 | 
--------------------------------------------------------------------------------
/CCP_TEST_16/CANape_TEST_16/a2l_test/Project.abs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_16/CANape_TEST_16/a2l_test/Project.abs
--------------------------------------------------------------------------------
/CCP_TEST_16/CANape_TEST_16/a2l_test/test/Project/123.cna:
--------------------------------------------------------------------------------
1 | [FILE_INFO]
2 | Identification=CANape-Configuration-File
3 | FileName=123.cna
4 | FileNameAbsolute=C:\Users\xin.zhang\Desktop\201_CCP_TEST_16\CANape_TEST_16\a2l_test\test\Project\123.cna
5 | WorkingDirectory=C:\Users\xin.zhang\Desktop\201_CCP_TEST_16\CANape_TEST_16\a2l_test\test\Project
6 | ProjectId=07df-0006-0018-0009-001b-003b-0000
7 | FileVersion=702
8 | PrgVersion=Version 9.0.40.27237
9 | PrgDate=28.2.2011
10 | Description=
11 | CreationTime=09:33
12 | CreationDate=06/24/2015 ; Month/Day/Year
13 | ModificationTime=18:21
14 | ModificationDate=06/24/2015 ; Month/Day/Year
15 | Protected=0
16 |
17 | [CALIBRATION_LIST]
18 | Count=3
19 |
20 | [CALIBRATION_OBJECT_1]
21 | EditOffset=1
22 | EditFactor=2
23 | EditFormat=2
24 | ShowWorkingPoint=0
25 | FollowWorkingPoint=0
26 | Module=new_database
27 | Name=cal1
28 | StimMode=0
29 |
30 | [CALIBRATION_OBJECT_2]
31 | EditOffset=1
32 | EditFactor=2
33 | EditFormat=2
34 | ShowWorkingPoint=0
35 | FollowWorkingPoint=0
36 | Module=new_database
37 | Name=cal2
38 | StimMode=0
39 |
40 | [CALIBRATION_OBJECT_3]
41 | EditOffset=1
42 | EditFactor=2
43 | EditFormat=2
44 | ShowWorkingPoint=0
45 | FollowWorkingPoint=0
46 | Module=new_database
47 | Name=cal3
48 | StimMode=0
49 |
50 | [CANAPE_ENVIRONMENT]
51 | OBJECT_COUNT=0
52 |
53 | [DATAMINING]
54 | AnalysisFilename=Analysis-{YEAR}-{MONTH}-{DAY}_{HOUR}-{MINUTE}-{SECOND}
55 | AnalysisDirectory=
56 | Comment=
57 | OptionMaxFindingsPerFile=100
58 | OptionMaxFindings=1000
59 | FromTime=-1
60 | FromActive=0
61 | FromTimePartActive=0
62 | ToTime=-1
63 | ToActive=0
64 | ToTimePartActive=0
65 | MDFExtensions=*.mdf
66 | Methods=
67 | Signals=
68 | ConditionEpsilon=1e-009
69 | ConditionEpsilonRelative=0
70 |
71 | [DATAMINING_FILE_LIST]
72 | Count=0
73 |
74 | [DISPLAY_PAGE_1]
75 | Name=
76 | Comment=
77 | Maximized=0
78 | ActiveWindow=4294967295
79 |
80 | [DISPLAY_PAGES]
81 | Count=1
82 | Active=-1
83 |
84 | [EVENT_LIST]
85 | Count=0
86 |
87 | [FILE_COMMENT_TEMPLATE]
88 | 1="Name",""
89 | 2="Division",""
90 | 3="Project",""
91 | 4="Subject",""
92 | 5="Comment",""
93 | Count=5
94 |
95 | [FUNCTION_OBJECT_LIST]
96 | count=0
97 |
98 | [FUNCTIONS]
99 | COUNT=0
100 | COUNT_LIBRARY=0
101 |
102 | [JOB_LIST]
103 | Count=0
104 |
105 | [MDF_LIST]
106 | Count=0
107 |
108 | [MEASUREMENT_LIST]
109 | Count=0
110 | MeaCfgLabellistName=
111 |
112 | [MEASUREMENT_OPTIONS]
113 | MaxTime=60000
114 | BufferSize=30000
115 | TimeAxis=20000
116 | TimeLimited=0
117 | BufferSizeMem=5120
118 | ShowDialogForErrors=1
119 | SaveAllToDisplayBuffer=0
120 | TimeMode=0
121 | YMode=1
122 | PollingAlways=1
123 | PollingOnlyVisiblePage=0
124 | DrawLastValue=1
125 | UpdateCycleBar=100
126 | UpdateCycleVal=500
127 | UpdateCycleGraph=1000
128 | UpdateCycleArr=1000
129 | UpdateCycleCal=1000
130 | UpdateCycle2D3DMeasure=500
131 | UpdateCycleAx=100
132 | UpdateCycleWrt=100
133 | UpdateCycleTrace=100
134 | UpdateCycleTxt=1000
135 | TimeScrollSoft=0
136 | TimeScrollAt=100
137 | TimeScrollSoftAt=80
138 | TimeScrollBy=100
139 | FitTimeAxis=1
140 | FitYAxis=0
141 | AutoInsertComment=1
142 | OfflineFileSignals=1
143 | UpdateMeaInCalWindows=1
144 | MeaSaveParameterOnStart=0
145 | ShowFileSignalsDuringMeasurement=0
146 | AddOnSignalModes=1
147 | LiveMeasurementRate=1000
148 | EditCommentAfterSaveSignals=1
149 | ShowRejectFileMsg=1
150 | ParDeviceCount=0
151 | MeaSaveParameterFileName=Parameter
152 | StopMeasurementOnEvent=1
153 | StopMeasurementEventsCount=0
154 | StopMeasurementOnESC=1
155 |
156 | [MEASUREMENT_USERFILTER]
157 | Count=0
158 |
159 | [OPTIONS]
160 | WindowTextExtended=1
161 | WindowSymbols=1
162 | GlobalCursor=0
163 | GlobalCursorTime=0
164 | MainWindowPos=0, -8, 0, 1600, 860 ;cmd, x, y, w, h
165 |
166 | [PAR_COMMENT]
167 | Count=0
168 |
169 | [POST_ANALYSIS_SCRIPT]
170 | ScriptName=
171 |
172 | [POST_PROCESSEDFILE_SCRIPT]
173 | ScriptName=
174 |
175 | [PRE_ANALYSIS_SCRIPT]
176 | ScriptName=
177 |
178 | [PRE_PROCESSEDFILE_SCRIPT]
179 | ScriptName=
180 |
181 | [PRINTFORMAT]
182 | FormatPortrait=0
183 | PageSame=1
184 | ColorMono=0
185 | PreviewSignals=0
186 | ShowWindowTitle=0
187 | CompanyAlignement=0
188 | NbrPages=1
189 | CompanyLogo=
190 | PrintAlignment=0
191 | HeaderPos=1
192 | HeaderHeight=20
193 | CompanyComment_1="Print page: {PAGE} {DATE} {TIME}"
194 | CompanyComment_2="License name: {LICENSENAME}"
195 | CompanyComment_3="Serial number: {LICENSENO}"
196 | CompanyComment_Count=3
197 | Comment_1="File 1: {FILENAME 1}"
198 | Comment_2="Name: {NAME 1} Division: {DIVISION 1}"
199 | Comment_3="Project: {PROJECT 1} Measurement object: {SUBJECT 1}"
200 | Comment_4="Comment: {COMMENT 1}"
201 | Comment_Count=4
202 | TreeCount=0
203 |
204 | [RECORDER_1]
205 | Name=Recorder
206 | Comment=
207 | FilenameTemplate={RECORDER}_{YEAR}-{MONTH}-{DAY}_{HOUR}-{MINUTE}-{SECOND}.MDF
208 | ConverterId=
209 | MaxSize=4294967295
210 | Enabled=1
211 | DefaultRecorder=1
212 | EditComment=1
213 | StartWithoutRecording=0
214 | SaveMeasurementComment=1
215 | SaveWriteWindowText=0
216 | SaveCalibrationCommands=0
217 | SplitFileEnabled=0
218 | SplitFileTimeEnabled=0
219 | SplitFileSizeEnabled=1
220 | SplitFileEventEnabled=0
221 | SplitFileTimeS=3600
222 | SplitFileSizeBytes=104857600
223 | AutoSaveTime=60000
224 | DataReduction=-1
225 | SaveParameterOnStart=0
226 | FlushMode=0
227 | TrgEnabled=0
228 | TrgStopRecording=0
229 | TrgStartStop=0
230 | TrgEnableMaxStopTime=0
231 | TrgSaveInOneFile=0
232 | TrgPreTimeMS=5000
233 | TrgPostTimeMS=5000
234 | TrgMaxStopTimeMS=5000
235 | TrgMaxBlockCount=1
236 | StartEvCount=0
237 | StopEvCount=0
238 | SplitEvCount=0
239 |
240 | [RECORDER_1_FILE_COMMENT]
241 | 1="Name",""
242 | 2="Division",""
243 | 3="Project",""
244 | 4="Subject",""
245 | 5="Comment",""
246 | Count=5
247 |
248 | [RECORDER_LIST]
249 | RecorderCount=1
250 |
251 | [SIGNSELWND]
252 | Enabled=1
253 | Docked=1
254 | DockedVisible=1
255 | DockedLocation=3
256 | DockedWidth=200
257 | DockedHeight=150
258 | FloatedLeft=0
259 | FloatedTop=0
260 | FloatedWidth=200
261 | FloatedHeight=300
262 | DockEnable=1
263 | DockSignalSelWnd=1
264 | DockSignalSelShowWnd=1
265 | DockLoc=3
266 | DockWidth=198
267 | PosLeft=0
268 | PosTop=0
269 | PosRight=216
270 | PosBottom=336
271 | FocusID=2004
272 | ActiveTab=0
273 | FilterNodeID=All
274 | TreeExpand_0=@All
275 | TreeExpand_1=All\Devices
276 | TreeExpand_2=All\Devices\new_database\new_database.a2l
277 | TreeExpand_3=All\Devices\new_database
278 | TreeExpand_4=$All\Devices
279 | TreeExpand_5=#All\Devices\new_database\new_database.a2l\cal3
280 | TreeExpand_6=@All\Devices
281 | TreeExpand_7=$
282 | TreeExpand_8=#
283 | TreeExpand_9=@All\Devices\Environment
284 | TreeExpand_10=$
285 | TreeExpand_11=#
286 | TreeExpand_12=@All\Devices\new_database
287 | TreeExpand_13=$
288 | TreeExpand_14=#
289 | TreeExpand_15=@All\Opened parameter set files
290 | TreeExpand_16=$
291 | TreeExpand_17=#
292 | TreeExpand_18=@All\Loaded measurement files
293 | TreeExpand_19=$
294 | TreeExpand_20=#
295 | TreeExpand_21=@All\Function Definitions
296 | TreeExpand_22=$
297 | TreeExpand_23=#
298 | TreeExpand_24=@All\Virtual file channels
299 | TreeExpand_25=$
300 | TreeExpand_26=#
301 | TreeExpand_27=@All\Measurement list
302 | TreeExpand_28=$
303 | TreeExpand_29=#
304 | TreeExpand_30=@All\Calibration objects
305 | TreeExpand_31=$
306 | TreeExpand_32=#
307 | TreeExpand_33=@All\Data Mining results
308 | TreeExpand_34=$
309 | TreeExpand_35=#
310 | TextSearchCaseSensitive=0
311 | TextSearchUseMode=1
312 | TextSearchSearchFullText=1
313 |
314 | [VIRTUAL_MDF_LIST]
315 | Count=0
316 |
317 | [WINDOW_1]
318 | DisplayMode=0
319 | Title=Device window
320 | Type=256
321 | Comment=Device window
322 | Number=1
323 | Position=0, 0, 0, 810, 452 ;cmd, x, y, w, h
324 | Position_Page01=0, 0, 0, 810, 452 ;cmd, x, y, w, h
325 | FloatingWindow=0
326 | ShowSignalComments=1
327 | DisplayMask=1 ; pages 1
328 |
329 | [WINDOW_2]
330 | ShowTime=1
331 | TimeWidth=120
332 | CopyColumnTitles=1
333 | ClearStart=1
334 | AbsoluteTimeEnabled=0
335 | ColumnCount=3
336 | Column_0=2, 38
337 | Column_1=0, 120
338 | Column_2=1, 600
339 | Title=Write
340 | Type=128
341 | Comment=Write window
342 | Number=2
343 | Position=0, 0, 452, 623, 235 ;cmd, x, y, w, h
344 | Position_Page01=0, 0, 452, 623, 235 ;cmd, x, y, w, h
345 | FloatingWindow=0
346 | ShowSignalComments=1
347 | DisplayMask=1 ; pages 1
348 |
349 | [WINDOW_3]
350 | BufferSize=131071
351 | OnlyMeasurement=0
352 | DropTraceEvents=0
353 | DeltaTimeEnabled=0
354 | LoggingEnabled=0
355 | LoggingFilePath=
356 | LoggingOverwriteOnConfigLoad=0
357 | TraceChannelCount=2
358 | CopyColumnTitles=1
359 | ClearStart=1
360 | AbsoluteTimeEnabled=0
361 | ColumnCount=7
362 | Column_0=0, 120
363 | Column_1=257, 40
364 | Column_2=4, 80
365 | Column_3=1, 50
366 | Column_4=2, 35
367 | Column_5=3, 180
368 | Column_6=513, 180
369 | Title=Trace
370 | Type=16384
371 | Comment=Trace window
372 | Number=3
373 | Position=0, 623, 452, 647, 235 ;cmd, x, y, w, h
374 | Position_Page01=0, 623, 452, 647, 235 ;cmd, x, y, w, h
375 | FloatingWindow=0
376 | ShowSignalComments=1
377 | DisplayMask=1 ; pages 1
378 |
379 | [WINDOW_3_CHANNEL_1]
380 | Module=new_database
381 | Channel=0
382 | CustomColorFlag=0
383 | Color=0
384 |
385 | [WINDOW_3_CHANNEL_2]
386 | Module=new_database
387 | Channel=1
388 | CustomColorFlag=0
389 | Color=0
390 |
391 | [WINDOW_4]
392 | ColumnWidth=194 97 -45 -75
393 | Group=0
394 | Sorted=0
395 | ObjectCount=1
396 | Title=Parameter
397 | Type=8
398 | Comment=Calibration window
399 | Number=4
400 | Position=0, 810, 0, 300, 150 ;cmd, x, y, w, h
401 | Position_Page01=0, 810, 0, 300, 150 ;cmd, x, y, w, h
402 | FloatingWindow=0
403 | ShowSignalComments=1
404 | DisplayMask=1 ; pages 1
405 |
406 | [WINDOW_4_OBJECT_1]
407 | Module=new_database
408 | Name=cal1
409 |
410 | [WINDOW_5]
411 | ColumnWidth=194 97 -45 -75
412 | Group=0
413 | Sorted=3
414 | ObjectCount=1
415 | Title=Parameter
416 | Type=8
417 | Comment=Calibration window
418 | Number=5
419 | Position=0, 810, 300, 300, 150 ;cmd, x, y, w, h
420 | Position_Page01=0, 810, 300, 300, 150 ;cmd, x, y, w, h
421 | FloatingWindow=0
422 | ShowSignalComments=1
423 | DisplayMask=1 ; pages 1
424 |
425 | [WINDOW_5_OBJECT_1]
426 | Module=new_database
427 | Name=cal3
428 |
429 | [WINDOW_6]
430 | ColumnWidth=194 97 -45 -75
431 | Group=0
432 | Sorted=0
433 | ObjectCount=1
434 | Title=Parameter
435 | Type=8
436 | Comment=Calibration window
437 | Number=6
438 | Position=0, 810, 150, 300, 150 ;cmd, x, y, w, h
439 | Position_Page01=0, 810, 150, 300, 150 ;cmd, x, y, w, h
440 | FloatingWindow=0
441 | ShowSignalComments=1
442 | DisplayMask=1 ; pages 1
443 |
444 | [WINDOW_6_OBJECT_1]
445 | Module=new_database
446 | Name=cal2
447 |
448 | [WINDOWS]
449 | Count=6
450 |
451 | [Y_COMMON_AXIS_LIST]
452 | Count=0
453 |
454 |
--------------------------------------------------------------------------------
/CCP_TEST_16/CANape_TEST_16/a2l_test/test/Project/canape.0-0-0.ini:
--------------------------------------------------------------------------------
1 | ;-------------------------------------------------------------------------------
2 | ;
3 | ; CANAPE.INI
4 | ; CANape Project Configuration
5 | ;
6 | ;-------------------------------------------------------------------------------
7 | ; This file must be located in the working directory.
8 | ; Most settings are created by CANape and don't need to be changed manually.
9 | ; All timings values in ms
10 | ;
11 | ; To create a new CANape project, use the 'Create new Project' Icon.
12 | ;-------------------------------------------------------------------------------
13 |
14 | [CONFIG]
15 | ; Configurations
16 | ;----------------
17 |
18 | [FILE_INFO]
19 | Identification=CANape-Project-File
20 | FileName=canape.ini
21 | FileNameAbsolute=
22 | WorkingDirectory=
23 | FileVersion=702
24 | PrgVersion=
25 | PrgDate=
26 | Description=
27 | CreationTime=11:11
28 | CreationDate=10/28/2008 ; Month/Day/Year
29 | ModificationTime=16:43
30 | ModificationDate=07/06/2010 ; Month/Day/Year
31 | Protected=0
32 |
33 |
34 | [ADDON]
35 | ; ADDONs
36 | ;--------
37 |
38 | ;ADDON1_TEXT=Script DEMO.SCR
39 | ;ADDON1_EXE=DEMO.SCR
40 | ;ADDON2_TEXT=Call STARTUP.SCR
41 | ;ADDON2_EXE=STARTUP.SCR
42 |
43 |
44 | [MACRO_LABELS]
45 | ; MACRO_LABELS
46 | ;--------------
47 | ;Here you can define your personal macro labels. You can use them
48 | ;inside the print dialog and inside the measurement comment dialog
49 | ;(MDF comment dialog). The MDF comment file interpreter will replace
50 | ;the labels with the defined text.
51 | ;The first 10 labels are displaied in the popup menu.
52 | ;The maximum count of labels is not limited.
53 |
54 | ;Example
55 | ;COMPANY=Vector Informatik GmbH
56 |
57 |
58 | [CAN1]
59 | ; CAN bittiming for all channel 1
60 | ; Format is C200/527 style, same as in CANalyzer
61 | ;--------------------------------
62 | BTR0=0x01
63 | BTR1=0x23
64 |
65 | [CAN2]
66 | ; CAN bittiming for all channel 2
67 | ;--------------------------------
68 | BTR0=0x01
69 | BTR1=0x23
70 |
71 | [CAN3]
72 | ; CAN bittiming for all channel 3
73 | ;--------------------------------
74 | BTR0=0x01
75 | BTR1=0x23
76 |
77 | [CAN4]
78 | ; CAN bittiming for all channel 4
79 | ;--------------------------------
80 | BTR0=0x01
81 | BTR1=0x23
82 |
83 |
84 | [CANAPE]
85 | ; General Settings
86 | ;------------------
87 |
88 | ; Last Directory management
89 | ; The following keys regulate the initial directory, if the file open/save
90 | ; dialogs are opened:
91 | ; SAVE_LAST_xxx_DIRECTORY = 0
92 | ; The initial directory is always the current working directory or the
93 | ; directory specified under the key xxx_DIR, if this key exist and isn't empty
94 | ; SAVE_LAST_xxx_DIRECTORY = 1
95 | ; The first time after each programm start the initial directory is the
96 | ; current working directory or the directory specified under the key
97 | ; xxx_DIR. After that the last selected directory is the initial
98 | ; directory. The last directory isn't saved at the end of the programm.
99 | ; SAVE_LAST_xxx_DIRECTORY = 2
100 | ; Same as 1, but the the last directory is saved to the key xxx_DIR at
101 | ; the end of the programm.
102 | ; xxx_DIR =
103 | ; This is the initial directory after each programm start.
104 | SAVE_LAST_MDF_DIRECTORY=1
105 | MEASUREMENT_DIR=
106 | SAVE_LAST_CFG_DIRECTORY=1
107 | CONFIGURATION_DIR=
108 | SAVE_LAST_SCR_DIRECTORY=1
109 | SCRIPT_DIR=
110 | SAVE_LAST_PAR_DIRECTORY=1
111 | PARAMETER_DIR=
112 |
113 | ; To store the measurement filename here in CANape.INI and not in the CNA file
114 | ; set GLOBAL_MEASUREMENT_FILE=1
115 | GLOBAL_MEASUREMENT_FILE=0
116 | ; If option 'global measurement file name' is enabled, this is the file name
117 | MEASUREMENT_FILE=CANapeData001.MDF
118 | ; File format version of created MDF measurement files
119 | ; 200 = CN_BLOCK with signal names limited to 32 characters.
120 | ; Longer names are coded into the comment block
121 | ; 210 = CN_BLOCK with extra TX_BLOCK for signal names > 32 characters.
122 | ; INCA V3.0 compatible, but CANape V2.x/3.0 and CANgraph V1.x/2.0
123 | ; (and other older programms) can NOT read this files!
124 | ; 300 = CN_BLOCK with extra TX_BLOCK for display name and optional byte offset
125 | ; to address signals behind 8kB inside a record.
126 | ; Optional usage of verbal conversion tables with a linear conversion
127 | ; 310 = New datatypes with Motorola byte order, Signals which goes over a
128 | ; byte boundary need not to begin on a byte boundary.
129 | ; 320 = Extended HDBLOCK with ns time stamp and information about time source
130 | ; and quality. Changed LINK from signed to unsigned long.
131 | ; Fill Bytes for DG block.
132 | ; 400 = ASAM standard (details and hints see CANape online help)
133 | MDF_FORMAT=320
134 |
135 | ; If CANape creates measurement files using a 32 bit integer
136 | ; datatype as time channel (like CANape 3.x) the internal
137 | ; time resolution of 1 ns can not be saved. So the time resolution
138 | ; must be set to a higher value:
139 | ; CANAPE time base used for MDF time stamps in millionth parts of a second
140 | ; allowed values are 1, 10, 100 (default) or 1000 (1 ms)
141 | ; The maximum measure time for MDF files depends on this setting:
142 | ;
143 | ; TIME_BASE | maximum measure time
144 | ; ----------------------------------------------------------
145 | ; 1000 | 49,7 Days (Windows timer overflow)
146 | ; 100 | 4,9 Days (119 hours, default and fix in CANape 2.0)
147 | ; 10 | 11,9 Hours (Timebase of CANalyzer/CANoe)
148 | ; 1 | 71,5 Minutes
149 | ;
150 | MDF_UINT32_TIME_BASE=10
151 |
152 | ; Enable logging of calibration commands to CANAPE.LOG
153 | LOG=0
154 |
155 | ; Force INCA compatible ASAP2 Export
156 | ; INCA/VS100 can't handle all of the ASAP2 features
157 | INCA=0
158 |
159 | ; Force CANape to enable measurement for all CHARACTERISTIC objects
160 | ; imported from ASAP2-files.
161 | ; 0=Only the calibrateflags are set for CHARACTERISTIC objects
162 | ; 1=The calibrateflag and the measureflag are enabled for CHARACTERISTIC-objects
163 | ASAP2_CHARACTERISTIC=0
164 |
165 | ; Enable DOS like keyboard selection in signal listboxes
166 | DOS_LISTBOX_MODE=0
167 |
168 | ; The Measure Marker in Graphic Display jumps to next Measure Point (not next Pixel)
169 | ; if you move them by cursors keys.
170 | KEY_SNAP_IN=0
171 |
172 | ; Disable measurement thread event notification
173 | ; Set notification level to
174 | WIN32_EVENT=32
175 |
176 | ; Don't stop measurement on CAN driver buffer overruns
177 | ; A message will be displayed when the first overrun occurs
178 | IGNORE_OVERFLOW=1
179 |
180 | ; Redraw mode of signals in graphic windows
181 | ; 0 = Syncron redraw. No redraw thread is started. Redraw of measurement signals
182 | ; with a lot of values will block the user interface
183 | ; 1 = Asyncrone redraw. Each graphic window use a thread for signal redraw,
184 | ; user commands are accept during redraw.
185 | ; 2 = Optimized asyncrone redraw.
186 | ; Note: Asyncrone redraw is deactivated during measurement.
187 | ; If CANape runs with Windows95/98, Asyncrone redraw is deactivated always.
188 | ASYNCRON_REDRAW=2
189 |
190 | ; Database Cache
191 | ; Only for CANape HEX-Editor: Count of cached databases (default is 2)
192 | ; To deaktivate the cache set the count to zero (0)
193 | DATABASE_CACHE_COUNT=2
194 |
195 | ; Synchronize Timestamps from CCP or CAN drivers
196 | ; Use only if the hardware CAN driver time synchronisation is turned of or
197 | ; to synchronise TCP/IP timestamps
198 | TIME_SYNC=0
199 |
200 | ; Internal
201 | LAST_MEASUREMENT_FILE=CANape.MDF
202 | FLUSH_MODE=0
203 | USE_MMTIMER=0
204 |
205 |
206 | [MEASUREMENT_DEFAULT_OPTIONS]
207 | ; Default measurement options
208 | ; If menu command "File|New Config" is selected, the following values are used
209 | ; as default for the measurement options.
210 | MaxTime=60000
211 | BufferSize=30000
212 | TimeAxis=20000
213 | TimeLimited=0
214 | BufferSizeMem=5120
215 | SaveMeasureData=1
216 | TimeMode=0
217 | YMode=1
218 | PollingAlways=1
219 | DrawLastValue=1
220 | AutoIncName=0
221 | ConverterId=
222 | UpdateCycleBar=100
223 | UpdateCycleVal=500
224 | UpdateCycleGraph=1000
225 | UpdateCycleArr=1000
226 | UpdateCycleWrt=100
227 | UpdateCycleTxt=1000
228 | TimeScrollSoft=0
229 | TimeScrollAt=100
230 | TimeScrollBy=100
231 | FitTimeAxis=1
232 | FitYAxis=0
233 | AutoSaveTime=60000
234 |
235 |
236 | [DEFAULT_DISPLAY]
237 | ; General settings for new displays
238 | ; First this section is readed, then the display type spezific
239 | ; section is readed. If a entry doesn't exist, in the display
240 | ; spezific section, the following settings are used:
241 | ;
242 | ; Use color of existing displays of the same object as default
243 | SAME_DEFAULT_COLOR=1
244 | ; Value format: 0=Hex, 1=Dec, 2=unused, 3=Phys, 4=Bin, 5=Ascii
245 | FORMAT=3
246 | ; Line between two points: 1=horizontal, 2=lined, 3=stairs
247 | LINE_TYPE=2
248 | ; Show Y-Axis of this signal in graphic windows
249 | SHOW_Y_AXIS=1
250 | ; X-Offset (time offset) in ms
251 | X_OFFSET=0
252 | ; Column width in characters for tabular text windows
253 | WIDTH=10
254 |
255 | [DEFAULT_GRAPH_DISPLAY]
256 | ; special settings for new graphic and digital displays
257 |
258 | [DEFAULT_TEXT_DISPLAY]
259 | ; special settings for new text displays
260 |
261 | [DEFAULT_BAR_DISPLAY]
262 | ; special settings for new bar displays
263 |
264 | [DEFAULT_VAL_DISPLAY]
265 | ; special settings for new val displays
266 |
267 |
268 | [WRITEWINDOW]
269 | ; Default BufferSize is 10kByte. This is enough for about 150 lines.
270 | ; Possible values are 1k - 65k Byte.
271 | BUFFERSIZE=10240
272 |
273 | ; Flag to configure the type of displaied messages. The flag is
274 | ; a bit mask, multiple flags can be combined. E.g. a value of 0xFF
275 | ; shows all messages. A value of 0x00 (zero) disables the write
276 | ; window, it can't be opend then.
277 | ; 0x01 Enables Clear message (should be set always)
278 | ; 0x02 Show messages from functions
279 | ; 0x04 Show warning messages
280 | ; 0x08 Show error messages
281 | ; 0x10 Show trigger messages (if a trigger is fired)
282 | ; 0x20 Show command messages (with a hand symbol)
283 | ; As default all messages are shown
284 | SHOW_MESSAGES=0xFF
285 |
286 | ; Flag to disable the jump to the write window in case of an error
287 | ; If this flag is not zero (default), the write window becomes
288 | ; visible if an error occurs
289 | SHOW_FOR_ERRORS=1
290 |
291 |
292 | [WINDOW]
293 | ; CANape internal settings
294 | ;--------------------------
295 | X=0
296 | Y=0
297 | H=600
298 | W=800
299 | STATE=1
300 | CHILD_TOOL_LOC=1
301 | MAIN_TOOL_LOC=1
302 |
303 |
304 | [COLORS]
305 | ; If you want to save your own window background color set this option to 0
306 | USE_DEFAULT_BACKGROUND=1
307 | ; Color settings:
308 |
309 |
310 | [DB_EXPLORER]
311 | ; If CANape terminates with a blue screen after opening a dialog
312 | ; with a tree view set DO_NOT_LOAD_IMAGELIST=1
313 | DO_NOT_LOAD_IMAGELIST=0
314 | ; Database explorer
315 | EDITOR_X=44
316 | EDITOR_Y=44
317 | EDITOR_W=960
318 | EDITOR_H=750
319 | EDITOR_TV_W=200
320 | SELECT_X=100
321 | SELECT_Y=50
322 | SELECT_W=824
323 | SELECT_H=510
324 | SELECT_TV_W=150
325 | SELECT_COLW_NAME=150
326 | SELECT_COLW_ADDRESS=0
327 | SELECT_COLW_DATATYP=0
328 | SELECT_COLW_COMMENT=250
329 | EDITOR_COLW_NAME=230
330 | EDITOR_COLW_ADDRESS=90
331 | EDITOR_COLW_DATATYP=70
332 | EDITOR_COLW_COMMENT=250
333 |
334 |
335 | [ASAP2_EXPORT]
336 | CREATE_IF_DATA_CCP=1
337 | CREATE_IF_DATA_KWP2000=0
338 | CREATE_IF_DATA_ETK=0
339 | FORMAT=2
340 |
341 |
342 | [PARTIAL_LOAD_EXPLORER]
343 |
344 |
345 | [CONVERTER]
346 | ; Last used measurement file extension
347 | LAST=.mdf
348 |
349 | ; Save/load the import/export converter options from this
350 | ; ini file -> set LOCAL_CONVERTER_OPTIONS=1 (default)
351 | ; To save/load the options from VECTOR.INI set
352 | ; LOCAL_CONVERTER_OPTIONS=0
353 | LOCAL_CONVERTER_OPTIONS=1
354 |
355 |
356 | [FUNCTIONS]
357 |
358 | ; Functions
359 | ;-----------------------------------------------
360 |
361 | COUNT=0
362 |
363 | [FUNCTION_1]
364 | [FUNCTION_2]
365 | [FUNCTION_3]
366 | [FUNCTION_4]
367 | [FUNCTION_5]
368 | [FUNCTION_6]
369 | [FUNCTION_7]
370 | [FUNCTION_8]
371 | [FUNCTION_9]
372 | [FUNCTION_10]
373 | [FUNCTION_11]
374 | [FUNCTION_12]
375 | [FUNCTION_13]
376 | [FUNCTION_14]
377 | [FUNCTION_15]
378 | [FUNCTION_16]
379 | [FUNCTION_17]
380 | [FUNCTION_18]
381 | [FUNCTION_19]
382 |
383 |
384 | [MODULES]
385 |
386 | ; Modules
387 | ;-----------------------------------------------
388 |
389 | COUNT=0
390 |
391 |
392 |
393 |
--------------------------------------------------------------------------------
/CCP_TEST_16/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 |
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/Default.mem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_16/Project/Default.mem
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/Project.mcp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_16/Project/Project.mcp
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/Project_Data/CWSettingsWindows.stg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_16/Project/Project_Data/CWSettingsWindows.stg
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/Project_Data/Standard/ObjectCode/CCP.C.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_16/Project/Project_Data/Standard/ObjectCode/CCP.C.o
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/Project_Data/Standard/ObjectCode/MC9S12XEP100.c.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_16/Project/Project_Data/Standard/ObjectCode/MC9S12XEP100.c.o
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/Project_Data/Standard/ObjectCode/Start12.c.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_16/Project/Project_Data/Standard/ObjectCode/Start12.c.o
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/Project_Data/Standard/ObjectCode/boot_can.c.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_16/Project/Project_Data/Standard/ObjectCode/boot_can.c.o
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/Project_Data/Standard/ObjectCode/ccp_can_interface.C.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_16/Project/Project_Data/Standard/ObjectCode/ccp_can_interface.C.o
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/Project_Data/Standard/ObjectCode/datapage.c.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_16/Project/Project_Data/Standard/ObjectCode/datapage.c.o
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/Project_Data/Standard/ObjectCode/main.c.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_16/Project/Project_Data/Standard/ObjectCode/main.c.o
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/Project_Data/Standard/TargetDataWindows.tdt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_16/Project/Project_Data/Standard/TargetDataWindows.tdt
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/Sources/CCP.C:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_16/Project/Sources/CCP.C
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/Sources/CCPPAR.H:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 |
3 | File Name : ccppar.c
4 | Date : 09.07.2001
5 | Version : 1.1
6 | Desciption : customization header for ccp.c
7 | CCP driver example
8 | see CCP.DOC for a complete description of all options
9 |
10 | *******************************************************************************/
11 |
12 |
13 | // -----------------------------------------------------------------------------
14 | // DEFINITION
15 | // -----------------------------------------------------------------------------
16 | #ifndef __CCPPAR_H__
17 | #define __CCPPAR_H__
18 | #define CCP_MOTOROLA
19 | #define C_MINI_CAN_DRIVER
20 |
21 | /*----------------------------------------------------------------------------*/
22 | /* Platform independant types */
23 |
24 | #define BYTE unsigned char
25 | #define WORD unsigned int
26 | #define DWORD unsigned long
27 | #define BYTEPTR unsigned char*
28 | #define MTABYTEPTR BYTEPTR
29 | #define ROM
30 | #define RAM
31 |
32 | /* #define DAQBYTEPTR */
33 | /* #define MTABYTEPTR */
34 |
35 | /*----------------------------------------------------------------------------*/
36 | /* Disable/Enable Interrupts */
37 |
38 |
39 | /* Has to be defined if ccpSendCallBack may interrupt ccpDaq */
40 |
41 |
42 | extern void disable_interrupt(void);
43 | extern void enable_interrupt(void);
44 |
45 | #define CCP_DISABLE_INTERRUPT disable_interrupt();
46 | #define CCP_ENABLE_INTERRUPT enable_interrupt();
47 |
48 |
49 | /*----------------------------------------------------------------------------*/
50 |
51 |
52 | /* CCP parameters */
53 |
54 | /* CCP Identifiers and Address */
55 | #define CCP_STATION_ADDR 0x3900 /* Define CCP_STATION_ADDR in Intel Format */
56 | /* High/Low byte swapped on motorola machines !!! (0x3900) */
57 |
58 | #define CCP_STATION_ID "Ccptest080709" /* Plug&Play station identification */
59 |
60 | #define CCP_DTO_ID 0x101 /* CAN identifier ECU -> Master */
61 | #define CCP_CRO_ID 0x100 /* CAN identifier Master -> ECU */
62 |
63 |
64 | /*----------------------------------------------------------------------------*/
65 | /* CCP Data Acuisition Parameters */
66 |
67 | #define CCP_DAQ /* Enable synchronous data aquisition in ccpDaq() */
68 | #define CCP_MAX_ODT 3 /* Number of ODTs in each DAQ lists */
69 | #define CCP_MAX_DAQ 2 /* Number of DAQ lists */
70 |
71 |
72 | /*----------------------------------------------------------------------------*/
73 | /* CCP Options */
74 |
75 | /* Use the transmit queue in CCP.C */
76 | /* Complete sampling is done in ccpDaq(x) and the messages are written into the queue */
77 | #define CCP_SEND_QUEUE
78 |
79 | /* Indicate queue overruns in the msb of pid */
80 | /* Will be displayed in CANape's status bar if CANAPE.INI: [asap1a] check_overflow=1 */
81 | #define CCP_SEND_QUEUE_OVERRUN_INDICATION
82 |
83 | /* Transmit only one message in one call to ccpDaq() */
84 | /* #define CCP_SEND_SINGLE */
85 |
86 | /* Use GET_SEED and UNLOCK */
87 | /* This is usually user dependant, just a skeleton here */
88 | /*#define CCP_SEED_KEY*/
89 |
90 | /* Implement the flash programming feature in the ECU*/
91 | /* This is usually user dependant, just a skeleton here */
92 | // #define CCP_PROGRAM
93 |
94 | /* Activate the flash programming kernel download */
95 | #define CCP_BOOTLOADER_DOWNLOAD
96 |
97 | /* Implement the memory checksum feature */
98 | /* The checksum will be calculated in ccpBackground() */
99 | /* This may be implementation specific */
100 | #define CCP_CHECKSUM
101 | #define CCP_CHECKSUM_TYPE WORD
102 |
103 | /* Use a 16 bit CRC algorithm */
104 | /* Note:
105 | This will need additional 512 byte of ROM
106 | CCP_CHECKSUM_TYPE has to be WORD !
107 | */
108 | /* #define CCP_CHECKSUM_CCITT*/
109 |
110 | /* Check for pending CCP commands in ccpBackground() */
111 | /* #ifdef CCP_CMD_NOT_IN_INTERRUPT */
112 |
113 | /* Enable Memory Write Protection */
114 | /*#define CCP_WRITE_PROTECTION*/
115 |
116 | /* Enable EEPROM Read/Write Access */
117 | /* #define CCP_WRITE_EEPROM */
118 | /* #define CCP_READ_EEPROM */
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 | /*----------------------------------------------------------------------------*/
130 | /* Special values for the CCPsim WIN32 Application */
131 | #if defined(__WIN32__) || defined(WIN32)
132 |
133 | #define CCP_TESTMODE /* Turn on screen output via printf */
134 | #define CCPPRINT printf
135 |
136 | extern DWORD gDtoId;
137 | extern DWORD gCroId;
138 | extern WORD gStationAddr;
139 | #undef CCP_CRO_ID
140 | #define CCP_CRO_ID gCroId
141 | #undef CCP_DTO_ID
142 | #define CCP_DTO_ID gDtoId
143 | #undef CCP_STATION_ADDR
144 | #define CCP_STATION_ADDR gStationAddr
145 | #undef CCP_STATION_ID
146 | #define CCP_STATION_ID "CCPSIM"
147 |
148 | #undef CCP_MAX_ODT
149 | #undef CCP_MAX_DAQ
150 | #define CCP_MAX_ODT 10
151 | #define CCP_MAX_DAQ 5
152 | #undef CCP_SEND_SINGLE
153 | #undef CCP_SEND_QUEUE
154 | #define CCP_SEND_QUEUE_OVERRUN_INDICATION
155 | #define CCP_SEND_QUEUE_SIZE (CCP_MAX_ODT*CCP_MAX_DAQ)
156 | #define CCP_SEED_KEY
157 | #undef CCP_BOOTLOADER_DOWNLOAD
158 | #define CCP_PROGRAM
159 | #define CCP_WRITE_PROTECTION
160 | /*#define CCP_CHECKSUM_CCITT*/
161 |
162 | #endif
163 |
164 | #endif
165 |
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/Sources/Configure.h:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | #pragma LINK_INFO DERIVATIVE "MC9S12XEP100"
5 |
6 |
7 | #define ABS_EC1 0x67fe4016
8 | #define ABS_TEST 0x67fe4216
9 |
10 | #define HCU_EC3 0x67fe0442
11 | #define NO_ERR 0x00
12 | #define ERR_BUFFER_FULL 0x80
13 |
14 | typedef unsigned char byte;
15 | typedef unsigned int word;
16 | typedef unsigned long dword;
17 | word ABS_EC1data[4];
18 | byte *p,*t;
19 | byte length, index;
20 | byte rxdata[8];
21 | dword RXID;
22 | byte test[4],a=0;
23 | byte errorflag = NO_ERR;
24 | struct
25 | {
26 | byte ABSActive ;
27 | byte BrakeState;
28 | byte BrakePedalPos;
29 | word RearAxisBrakeMaxForce;
30 | }ABS_EC1_msg;
31 | struct
32 | {
33 | word MtrRegenerateTorque;
34 | } HCU_EC3_msg;
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/Sources/boot_can.c:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 |
3 | File Name : boot_can.c
4 | Date : 14.08.2001
5 | Version : 1.0
6 | Desciption : free CAN driver for CCP without using interrupts
7 |
8 | *******************************************************************************/
9 |
10 |
11 | // -----------------------------------------------------------------------------
12 | // INCLUDE FILES
13 | // -----------------------------------------------------------------------------
14 | //#include // standard HC12 IO
15 | #include "ccppar.h" // CPP config file
16 |
17 | #include "boot_can.h" // CAN driver
18 | #include
19 | // -----------------------------------------------------------------------------
20 |
21 |
22 | // -----------------------------------------------------------------------------
23 | // DEFINES
24 | // -----------------------------------------------------------------------------
25 |
26 | #define CAN_BTR0 0x00C3 // CAN-Bus-Timing
27 | #define CAN_BTR1 0x003A // 250 KBaud
28 |
29 | #define SYNCH 0x0010 // SYNCH-Bit
30 | #define RXF_new 0x0001 // receive buffer
31 | #define TXE0_new 0x0001 // transmit buffer 0
32 |
33 | #define REG_BLOCK_ADR 0x0000 // address of register block
34 | #define REG_BLOCK_OFFSET 0x0100 // offset to CAN register
35 |
36 | //#define msCAN12 (*((t_msCAN12*)(REG_BLOCK_ADR + REG_BLOCK_OFFSET)))
37 | // -----------------------------------------------------------------------------
38 |
39 |
40 |
41 |
42 | // -----------------------------------------------------------------------------
43 | // VARIABLES and Structs
44 | // -----------------------------------------------------------------------------
45 | unsigned int g_ccp_dto_id; // global DTO-ID
46 | unsigned int g_ccp_cro_id; // global CRO-ID
47 |
48 | typedef volatile struct
49 | {
50 | WORD Id; // ID
51 | BYTE IdEx1; // Extended ID bytes; not used
52 | BYTE IdEx2;
53 | BYTE DataFld[8]; // Data 0 .. 7
54 | BYTE DLC; // Data length reg.: X X X X DLC3 DLC2 DLC1 DLC0
55 | BYTE PRIO; // TxBuf priority reg.
56 | BYTE unused[2];
57 | } t_MsgObject;
58 |
59 |
60 | /*
61 | typedef volatile struct
62 | {
63 | BYTE CMCR0; // 0 0 CSWAI SYNCH TLNKEN SLPAK SLPRQ SFTRES
64 | BYTE CMCR1; // 0 0 0 0 0 LOOPB WUPM CLKSRC
65 | BYTE CBTR0; // SJW1 SJW0 BRP5 ... BRP0
66 | BYTE CBTR1; // SAMP TSEG22 TSEG21 TSEG20 TSEG13 ... TSEG10
67 | BYTE CRFLG; // WUPIF RWRNIF TWRNIF RERRIF TERRIF BOFFIF OVRIF RXF
68 | BYTE CRIER; // WUPIE RWRNIE TWRNIE RERRIE TERRIE BOFFIE OVRIE RXE
69 | BYTE CTFLG; // 0 ABTAK2 ABTAK1 ABTAK0 0 TXE2 TXE1 TXE0
70 | BYTE CTCR; // 0 ABTRQ2 ABTRQ1 ABTRQ0 0 TXEIE2 TXEIE1 TXEIE0
71 | BYTE CIDAC; // 0 0 IDAM1 IDAM0 0 0 IDHIT1 IDHIT0
72 | BYTE reserved1[5];
73 | BYTE CRXERR; // RXERR7 ... RXERR0
74 | BYTE CTXERR; // TXERR7 ... TXERR0
75 | BYTE CIDAR0; // Filter Masks 0..3
76 | BYTE CIDAR1;
77 | BYTE CIDAR2;
78 | BYTE CIDAR3;
79 | BYTE CIDMR0;
80 | BYTE CIDMR1;
81 | BYTE CIDMR2;
82 | BYTE CIDMR3;
83 | BYTE CIDAR4; // Filter Masks 4..7
84 | BYTE CIDAR5;
85 | BYTE CIDAR6;
86 | BYTE CIDAR7;
87 | BYTE CIDMR4;
88 | BYTE CIDMR5;
89 | BYTE CIDMR6;
90 | BYTE CIDMR7;
91 | BYTE reserved2[29];
92 | BYTE PCTLCAN; // 0 0 0 0 0 0 PUECAN
93 | BYTE PORTCAN; // PCAN7 ... PCAN0
94 | BYTE DDRCAN; // DDRCAN7 ... DDRCAN0
95 | t_MsgObject RxBuf; // Rx-Msg Object
96 | t_MsgObject TxBuf[3]; // Tx-Msg Objects
97 | } t_msCAN12; */
98 | /* STOPSINGLE_OF_MULTIPLE */
99 |
100 | // -----------------------------------------------------------------------------
101 |
102 |
103 |
104 | // -----------------------------------------------------------------------------
105 | // CAN INITIALISATION
106 | // -----------------------------------------------------------------------------
107 | void ccpBootInit (int cro_id, int dto_id)
108 | {
109 | g_ccp_dto_id = dto_id; // handover IDs (CRO, DTO)
110 | g_ccp_cro_id = cro_id;
111 |
112 | CAN0CTL0 = 0x01;
113 |
114 | while (!(CAN0CTL1&0x01)){};
115 |
116 | CAN0CTL1 = 0x80;
117 |
118 | CAN0BTR0 = 0xC3;
119 |
120 | CAN0BTR1 = 0x3A;
121 |
122 |
123 | CAN0IDAC_IDAM = 0; // use 2*32bit Acceptance Filters
124 |
125 | CAN0IDAR0 = 0x20; // TS_PM_1 & TS_PM2 ID 1st Reg Byte = 0x20 both
126 | CAN0IDAR1 = 0x00; // TS_PM_1 2nd Byte = 0x00;TS_PM_2 2nd Byte = 0x20; Need Mask
127 | CAN0IDAR2 = 0; // Not useful in Standard Frame
128 | CAN0IDAR3 = 0; // Not useful in Standard Frame
129 |
130 | CAN0IDMR0 = 0xFF; // No Mask, care first 3 bits
131 | CAN0IDMR1 = 0xFF; // Mask All
132 | CAN0IDMR2 = 0; // Not useful in Standard Frame
133 | CAN0IDMR3 = 0; // Not useful in Standard Frame
134 |
135 | CAN0CTL0 = 0x00;
136 | while ((CAN0CTL1&0x01) != 0){};
137 |
138 | CAN0RFLG_RXF = 1; // clear receive full flag
139 | CAN0CTL0_RXFRM = 1; // clear Received Frame Flag
140 |
141 | // -----------------------------------------------------------------------------
142 | } /* ccpBootInit */
143 |
144 |
145 |
146 |
147 | // -----------------------------------------------------------------------------
148 | // CAN TRANSMIT (Data Frame)
149 | // -----------------------------------------------------------------------------
150 | int ccpBootTransmitCrmPossible( void ) {
151 |
152 | return ((CAN0TFLG_TXE0) == 1); // return 1 if so
153 | }
154 | // -----------------------------------------------------------------------------
155 | void ccpBootTransmitCrm (unsigned char *msg)
156 | {
157 |
158 | CAN0TBSEL = 0; // clear "Tx buffer select Reg" first
159 | CAN0TBSEL = 0x1; // select Tx0 buffer
160 |
161 | CAN0TXIDR0=((g_ccp_dto_id<<5)>>8);
162 | CAN0TXIDR1=(g_ccp_dto_id<<5);
163 |
164 | CAN0TXDLR=8;
165 | CAN0TXDSR0=*msg++;
166 | CAN0TXDSR1=*msg++;
167 | CAN0TXDSR2=*msg++;
168 | CAN0TXDSR3=*msg++;
169 | CAN0TXDSR4=*msg++;
170 | CAN0TXDSR5=*msg++;
171 | CAN0TXDSR6=*msg++;
172 | CAN0TXDSR7=*msg++;
173 |
174 | CAN0TFLG = 0x01;
175 |
176 | } /* ccpBootTransmitCrm */
177 | // -----------------------------------------------------------------------------
178 |
179 |
180 | // -----------------------------------------------------------------------------
181 | // CAN RECEIVE (Data Frame)
182 | // -----------------------------------------------------------------------------
183 | int ccpBootReceiveCro (unsigned char *msg)
184 | {
185 | WORD id;
186 |
187 | if (CAN0RFLG_RXF == 0) return 0; // check if receive buffer is full
188 |
189 | id = CAN0RXIDR0;
190 | id = (id<<8) + CAN0RXIDR1;
191 | id = id >> 5;
192 |
193 | *msg++ = CAN0RXDSR0; // store received message in buffer
194 | *msg++ = CAN0RXDSR1;
195 | *msg++ = CAN0RXDSR2;
196 | *msg++ = CAN0RXDSR3;
197 | *msg++ = CAN0RXDSR4;
198 | *msg++ = CAN0RXDSR5;
199 | *msg++ = CAN0RXDSR6;
200 | *msg++ = CAN0RXDSR7;
201 |
202 |
203 | CAN0RFLG_RXF = 1;// clear receive full flag
204 |
205 | CAN0CTL0_RXFRM = 1; // clear Received Frame Flag
206 |
207 | if (id == g_ccp_cro_id) return 1; // if correctly received, return 1
208 |
209 | return 0;
210 |
211 | } /* ccpBootReceiveCro */
212 | // -----------------------------------------------------------------------------
213 |
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/Sources/boot_can.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 |
3 | File Name : boot_can.h
4 | Date : 14.08.2001
5 | Version : 1.0
6 | Desciption : header for boot_can.c
7 | CCP Driver Example
8 |
9 | *******************************************************************************/
10 |
11 |
12 | // -----------------------------------------------------------------------------
13 | // DEFINITION
14 | // -----------------------------------------------------------------------------
15 | #ifndef __BOOT_CAN_H_
16 | #define __BOOT_CAN_H_
17 | // -----------------------------------------------------------------------------
18 |
19 |
20 | // -----------------------------------------------------------------------------
21 | // CAN Transmit / Receive functions
22 | // -----------------------------------------------------------------------------
23 |
24 | void ccpBootInit (int, int);
25 | int ccpBootTransmitCrmPossible( void );
26 | void ccpBootTransmitCrm (unsigned char *msg);
27 | int ccpBootReceiveCro (unsigned char *msg);
28 |
29 | // -----------------------------------------------------------------------------
30 | #endif
31 |
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/Sources/ccp.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_16/Project/Sources/ccp.h
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/Sources/ccp_can_interface.C:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 |
3 | File Name : ccp_can_interface.c
4 | Date : 28.09.2001
5 | Version : 1.0.1
6 | Desciption : additional functions for CCP
7 |
8 |
9 | *******************************************************************************/
10 |
11 |
12 | // -----------------------------------------------------------------------------
13 | // INCLUDE FILES
14 | // -----------------------------------------------------------------------------
15 | #include "ccp_can_interface.h" // additional functions for CCP usage
16 | // -----------------------------------------------------------------------------
17 |
18 |
19 | // -----------------------------------------------------------------------------
20 | // Empty Interrupt Service Routine
21 | // -----------------------------------------------------------------------------
22 | /*
23 | @interrupt void irq_dummy(void) { // dummy function,
24 | } // interrupt vect.
25 | */
26 | // -----------------------------------------------------------------------------
27 |
28 |
29 | // -----------------------------------------------------------------------------
30 | // SENDING an CRM-DTO when receiving an CRO
31 | // -----------------------------------------------------------------------------
32 | BYTE ccpSend( BYTEPTR msg )
33 | {
34 | ccpBootTransmitCrm(msg); // callup CAN-send
35 | return 1;
36 | }
37 | // -----------------------------------------------------------------------------
38 |
39 | // -----------------------------------------------------------------------------
40 | // CONVERT pointer
41 | // -----------------------------------------------------------------------------
42 | MTABYTEPTR ccpGetPointer( BYTE addr_ext, DWORD addr ) // get Pointer into
43 | { // normal C
44 | return (MTABYTEPTR) addr;
45 | }
46 | // -----------------------------------------------------------------------------
47 |
48 |
49 | // -----------------------------------------------------------------------------
50 | // CALCULATE new measuerments
51 | // -----------------------------------------------------------------------------
52 | void ccpUserBackground( void )
53 | {
54 | }
55 | // -----------------------------------------------------------------------------
56 |
57 |
58 | // -----------------------------------------------------------------------------
59 | // Define
60 | // -----------------------------------------------------------------------------
61 | BYTE ccpDisableNormalOperation( MTABYTEPTR a, WORD s )
62 | {
63 | disable_interrupt(); // disables all interrupts, e.g. TIMER_0
64 | return 1;
65 | }
66 | // -----------------------------------------------------------------------------
67 |
68 |
69 | // -----------------------------------------------------------------------------
70 | // Disable/Enable Interrupt Functions
71 | // -----------------------------------------------------------------------------
72 | BYTE disable_interrupt_count = 0; // init counter
73 |
74 | void disable_interrupt() {
75 |
76 | _asm("SEI"); // set I-Bit
77 | disable_interrupt_count++; // incr. counter
78 | }
79 |
80 | void enable_interrupt() {
81 |
82 | if (--disable_interrupt_count==0) { // if interrupts only one time disabled
83 | _asm("CLI"); // enable them
84 | }
85 | }
86 | // -----------------------------------------------------------------------------
87 |
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/Sources/ccp_can_interface.H:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 |
3 | File Name : ccp_can_interface.h
4 | Date : 27.07.2001
5 | Version : 1.0
6 | Desciption : additional functions for CCP
7 |
8 |
9 | *******************************************************************************/
10 |
11 | #include "ccppar.h" // CPP config file
12 |
13 | // -----------------------------------------------------------------------------
14 | // PROTOTYPES
15 | // -----------------------------------------------------------------------------
16 | void irq_dummy(void); // empty ISR
17 |
18 | BYTE ccpSend( BYTEPTR msg );
19 | MTABYTEPTR ccpGetPointer( BYTE addr_ext, DWORD addr );
20 |
21 | void ccpUserBackground( void );
22 |
23 | void disable_interrupt(); // I-bit SET
24 | void enable_interrupt(); // I-bit CLEAR
25 | // -----------------------------------------------------------------------------
26 |
--------------------------------------------------------------------------------
/CCP_TEST_16/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 "MC9S12XEP100"
10 |
11 |
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/Sources/main.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_16/Project/Sources/main.c
--------------------------------------------------------------------------------
/CCP_TEST_16/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 | MainFrame=0,1,-1,-1,-1,-1,100,100,1300,725
14 | TOOLBAR=57600 57601 32795 0 57635 57634 57637 0 57671 57669 0 32777 32776 32782 32780 32781 32778 0 32806
15 |
16 |
17 |
18 | [TBDML HCS12_GDI_SETTINGS]
19 | CMDFILE0=CMDFILE STARTUP ON ".\cmd\TBDML_startup.cmd"
20 | CMDFILE1=CMDFILE RESET ON ".\cmd\TBDML_reset.cmd"
21 | CMDFILE2=CMDFILE PRELOAD ON ".\cmd\TBDML_preload.cmd"
22 | CMDFILE3=CMDFILE POSTLOAD ON ".\cmd\TBDML_postload.cmd"
23 | CMDFILE4=CMDFILE VPPON ON ".\cmd\TBDML_vppon.cmd"
24 | CMDFILE5=CMDFILE VPPOFF ON ".\cmd\TBDML_vppoff.cmd"
25 | CMDFILE6=CMDFILE UNSECURE ON ".\cmd\TBDML_erase_unsecure_hcs12xe.cmd"
26 | MCUID=0x02D3
27 | CHIPSECURE=CHIPSECURE SETUP 0xFF0F 0x3 0x2
28 | DBG_S12X_0=DBG GENERAL DISARM_ON PROTECT_OFF ANALYZE_ON STEPATRUN_ON
29 | DBG_S12X_1=DBG PREDEFINED SELECT 0
30 | S12XDBG_TRIGGER_A=RangeAllowed:1 AccessSizeCompareAllowed:0 Disabled:0 BreakAllways:0 Range:0 OutsideRange:0 CompareMismatch:0 DataToCompare:0 DataToCompareMask:0 AccessSizeCompare: 0 WordAccessSizeCompare:0 Core:0
31 | S12XDBG_TRIGGER_B=RangeAllowed:0 AccessSizeCompareAllowed:1 Disabled:0 BreakAllways:0 Range:0 OutsideRange:0 CompareMismatch:0 DataToCompare:0 DataToCompareMask:0 AccessSizeCompare: 0 WordAccessSizeCompare:0 Core:0
32 | S12XDBG_TRIGGER_C=RangeAllowed:1 AccessSizeCompareAllowed:0 Disabled:0 BreakAllways:0 Range:0 OutsideRange:0 CompareMismatch:0 DataToCompare:0 DataToCompareMask:0 AccessSizeCompare: 0 WordAccessSizeCompare:0 Core:0
33 | S12XDBG_TRIGGER_D=RangeAllowed:0 AccessSizeCompareAllowed:1 Disabled:0 BreakAllways:0 Range:0 OutsideRange:0 CompareMismatch:0 DataToCompare:0 DataToCompareMask:0 AccessSizeCompare: 0 WordAccessSizeCompare:0 Core:0
34 | DBG_S12X_2=DBG PREDEFINED DBGENGINE TRACE HCS12X RECORDBEFORE PUREPC
35 | DBG_S12X_3=DBG PREDEFINED DBGENGINE SEQUENCER 0x02 0x02 0x02
36 | NV_PARAMETER_FILE=C:\Program Files (x86)\Freescale\CWS12v5.1\prog\FPP\mcu02D3.fpp
37 | NV_SAVE_WSP=0
38 | NV_AUTO_ID=1
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 | [TBDML]
53 | COMSETTINGS=SETCOMM DRIVER NOPROTOCOL NOPERIODICAL
54 | NV_PARAMETER_FILE=
55 | NV_SAVE_WSP=0
56 | NV_AUTO_ID=1
57 |
58 |
59 | [Recent Applications File List]
60 | File0=C:\Users\xin.zhang\Desktop\201_CCP_TEST_16\Project\bin\Project.abs
61 | File1=
62 | File2=
63 | File3=
64 | LoadFlags0=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main"
65 | LoadFlags1=
66 | LoadFlags2=
67 | LoadFlags3=
68 |
69 |
70 | [Recent Layout File List]
71 | File0=C_layout.hwl
72 | File1=
73 | File2=
74 | File3=
75 |
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/bin/Project.abs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_16/Project/bin/Project.abs
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/bin/Project.abs.glo:
--------------------------------------------------------------------------------
1 | S0450000433A5C55736572735C78696E2E7A68616E675C4465736B746F705C3230315F4343505F544553545F31365C50726F6A6563745C62696E5C50726F6A6563742E616273C0
2 | S2247FC000CF2100C6055B134A8000FE4AC0C6000001C015C15E210000CA00000000000000FB
3 | S2247FC02000000000000000000000000000000000000000000000000000000000000000007C
4 | S2247FC04000000000000000000000000000000000001872211DFC211D8C000A260AD601C8F5
5 | S2247FC060015B011879211D4C37800BCC80775B3B5A383DCC02FF5B027900005B035B015B22
6 | S2247FC080097900087902627902617B02647902657A0266507B026A79026D79026E507B0261
7 | S2247FC0A06C7B025A7B025C1D0258013D7900394C3A40CC81015B345A35790036A7A74F37C4
8 | S2247FC0C008FC4C39803D07AB07E214108601C73B524A8029FE3A4A85BEFE078F10EFC60AE1
9 | S2247FC0E07B210058877C2103C77C2101C61E7B2105CC21154A80D7FE044407CC21154A82F9
10 | S2247FC1009AFE4A85E0FE4A807AFE0444044A856EFE4A85E6FE20DA87D7B7C6270449043657
11 | S2247FC120FC3D3037E1310460022504E61F2002E6E51AE5330500EE8097260CE1002208E1EE
12 | S2247FC1402222FC2702EE801B8205E30001ED8118028381180A8083180A85806D840A001318
13 | S21B7FC16021000A000000141E436370746573743038303730390000D9
14 | S2067FFFF0C0517A
15 | S2067FFFFEC000BD
16 | S2247F8000FEC011FDC00F270E35ED31EC3169700434FB310326F2FEC013EC31270BED3118EE
17 | S2247F80200A30700434F920F10A7C211FEC837C2121C6017B01401F014101FBCCC3807B0172
18 | S2247F8040417A0142C63A7B01431D014B30C6207B0150790151790152790153C6FF7B01549B
19 | S2247F80607B01557901567901577901401E014101FB1C0144011C0140800A1E01460102C77C
20 | S2247F80808FC601870A3B79014AC6017B014AFD211FCC0020137A0170F621208620127B0157
21 | S2247F80A071C6087B017CEE80A6307A0174A6307A0175A6307A0176A6307A0177A6307A012C
22 | S2247F80C078A6307A0179A6307A017AA6007A017B86017A01463A0A3B1F01440153F601609D
23 | S2247F80E0873BF60161B7453AB710C71AE6B756C60516C117EE80B746F601646B30F601659B
24 | S2247F81006B30F601666B30F601676B30F601686B30F601696B30F6016A6B30F6016B6B0091
25 | S2247F81201C0144011C014080BD21212603C60121C787300A4A85E0FE1F212C70061C212CEC
26 | S2247F814001200B1C212C10CC21234A85D1FE4A85E6FE0A187921310A3B201AE6868759B726
27 | S2247F816045EDE2212DEE803BE6006B40301862E2212D186280E68537536B86E6B026DCC6C7
28 | S2247F818001300AB7452015E6848759B74634EEEA212DE600306B301862EA212DE6833753F8
29 | S2247F81A06B84E6B026E10A3BC1022503C7201F86311287C32165B745C300316C808F6930DC
30 | S2247F81C0AE8025FA1C212B024A8153FEC603300A3BE687C1022503C72038C631A68712B7A6
31 | S2247F81E045E6856BE22193EC802605C601876C80C631A68712EE80B7466EEA218FCE000101
32 | S2247F82006EEA2191E6866BEA2194C6046BEA2195C601300A37C1022503C72011C631A6804D
33 | S2247F822012B745C6016BE221951C212B80320A69AFC631A68012B745E6E22195C10426060C
34 | S2247F8240C6016BE221956280E680C10225E31C212B80320A6BAEC1022426C631A68012B78D
35 | S2247F82604569E221956981C631A68112B7450EE22195010C6281E681C10225EB1D212B8065
36 | S2247F82803A0AC737C631A68012B74569E221953352C10225EE1D212B800A6CAC3BB745E669
37 | S2247F82A000C1012704C1052651EC028C39002703046437E6000421141E212B10074A8282A6
38 | S2247F82C0FE79212C1C212B201D212B1086FFC77C2123EE82E6017B2125487A21268639C7A2
39 | S2247F82E07C2127877C21290685301F212B20081D212B201C212B100685341F212B20F8CD8B
40 | S2247F8300FF007D2123A6017A2125C1231822021BC1026B81252EC1082214C002875905FFD0
41 | S2247F832083A083BF8404852B8486835F84B7C1142512C117220EC014875905FF84198435D3
42 | S2247F83408472837187E68116C13623852B0E84D90F840A1B85231E84FA1F850F2383E21D22
43 | S2247F8360212B20EE82E602182601621C212B102047C76B8120046281E681E68187B745E644
44 | S2247F8380E2210626F1E6817B2126C6017C21271C212842C68E7C212918032106212D20779D
45 | S2247F83A0168569C1012413168537EE82B746E6028759B7456DE2212D2079C63206852DC78C
46 | S2247F83C037EE83A602361A03B7544A8158FE1B826B85C102272004610306850BC103261FAC
47 | S2247F83E0201FC737860636EC84C300024A8158FE1B826B84C1021827013A0451E3C10326B9
48 | S2247F84006F06850BC7168559207AEE821685377C212FC601168559206B1685694A8254FE08
49 | S2247F84201685694A81A7FE7B21261685698603127B2127207B168569C102240EA60381035F
50 | S2247F844024086B80E604C107230B86317A212418792163207C3736C631A68212B745C60E0C
51 | S2247F846032121AE633871AE22165591AE67E2163205F168569042151FC2163274C168537DF
52 | S2247F84806CFB9CDF204B1F212B0231168569C10222378716C1220331030D1AEE82E6034ACC
53 | S2247F84A08254FE202C168545EE82E6034A8214FE207E16854520791E212B0204C622206D05
54 | S2247F84C0EE82E602270704010AC63120604A8282FE205D4A822FFE2057C6027B2126C787FB
55 | S2247F84E07C21297C2127FE212D7E212FEE82EC047C21C8F621242638203AFC212D3BEE84A5
56 | S2247F8500EC024A85D9FE1B82046125C633201ECC21233BFD212D873536EC874AC14D001B77
57 | S2247F852082200DCC02017C21262005C6307B21244A8134FE1B860AE60337EC06EE044A8520
58 | S2247F8540D8FE1B813DEE84E60337E60437E60537EC064A81D0FE1B833D37EE85A60236CC59
59 | S2247F856021264A8183FE1B823DEE84E6023D1D212C701F212C010A1D212C014A8134FE209A
60 | S2247F8580341F212B80364A85E0FEF6213127291C212C20F6213258585887C321334A85D1A5
61 | S2247F85A0FE722132F62132C10625037921327321314A85E6FEC6010A4A85E6FEC70ACC21B6
62 | S2247F85C023C300A73BCE21238F6930AE8025FA3A0A4A8085FEC6010A0A4A85E0FEC6010ADE
63 | S2157F85E014107221140A732114F62114260210EF0A2D
64 | S9030000FC
65 |
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/bin/Project.abs.s19:
--------------------------------------------------------------------------------
1 | S0450000433A5C55736572735C78696E2E7A68616E675C4465736B746F705C3230315F4343505F544553545F31365C50726F6A6563745C62696E5C50726F6A6563742E616273C0
2 | S123C000CF2100C6055B134A8000FE4AC0C6000001C015C15E210000CA000000000000007B
3 | S123C0200000000000000000000000000000000000000000000000000000000000000000FC
4 | S123C04000000000000000000000000000000000001872211DFC211D8C000A260AD601C875
5 | S123C060015B011879211D4C37800BCC80775B3B5A383DCC02FF5B027900005B035B015BA2
6 | S123C080097900087902627902617B02647902657A0266507B026A79026D79026E507B02E1
7 | S123C0A06C7B025A7B025C1D0258013D7900394C3A40CC81015B345A35790036A7A74F3744
8 | S123C0C008FC4C39803D07AB07E214108601C73B524A8029FE3A4A85BEFE078F10EFC60A61
9 | S123C0E07B210058877C2103C77C2101C61E7B2105CC21154A80D7FE044407CC21154A8279
10 | S123C1009AFE4A85E0FE4A807AFE0444044A856EFE4A85E6FE20DA87D7B7C62704490436D7
11 | S123C120FC3D3037E1310460022504E61F2002E6E51AE5330500EE8097260CE1002208E16E
12 | S123C1402222FC2702EE801B8205E30001ED8118028381180A8083180A85806D840A001398
13 | S11AC16021000A000000141E43637074657374303830373039000059
14 | S105FFF0C051FA
15 | S105FFFEC0003D
16 | S224FE8000FEC011FDC00F270E35ED31EC3169700434FB310326F2FEC013EC31270BED31186F
17 | S224FE80200A30700434F920F10A7C211FEC837C2121C6017B01401F014101FBCCC3807B01F3
18 | S224FE8040417A0142C63A7B01431D014B30C6207B0150790151790152790153C6FF7B01541C
19 | S224FE80607B01557901567901577901401E014101FB1C0144011C0140800A1E01460102C7FD
20 | S224FE80808FC601870A3B79014AC6017B014AFD211FCC0020137A0170F621208620127B01D8
21 | S224FE80A071C6087B017CEE80A6307A0174A6307A0175A6307A0176A6307A0177A6307A01AD
22 | S224FE80C078A6307A0179A6307A017AA6007A017B86017A01463A0A3B1F01440153F601601E
23 | S224FE80E0873BF60161B7453AB710C71AE6B756C60516C117EE80B746F601646B30F601651C
24 | S224FE81006B30F601666B30F601676B30F601686B30F601696B30F6016A6B30F6016B6B0012
25 | S224FE81201C0144011C014080BD21212603C60121C787300A4A85E0FE1F212C70061C212C6D
26 | S224FE814001200B1C212C10CC21234A85D1FE4A85E6FE0A187921310A3B201AE6868759B7A7
27 | S224FE816045EDE2212DEE803BE6006B40301862E2212D186280E68537536B86E6B026DCC648
28 | S224FE818001300AB7452015E6848759B74634EEEA212DE600306B301862EA212DE683375379
29 | S224FE81A06B84E6B026E10A3BC1022503C7201F86311287C32165B745C300316C808F69305D
30 | S224FE81C0AE8025FA1C212B024A8153FEC603300A3BE687C1022503C72038C631A68712B727
31 | S224FE81E045E6856BE22193EC802605C601876C80C631A68712EE80B7466EEA218FCE000182
32 | S224FE82006EEA2191E6866BEA2194C6046BEA2195C601300A37C1022503C72011C631A680CE
33 | S224FE822012B745C6016BE221951C212B80320A69AFC631A68012B745E6E22195C10426068D
34 | S224FE8240C6016BE221956280E680C10225E31C212B80320A6BAEC1022426C631A68012B70E
35 | S224FE82604569E221956981C631A68112B7450EE22195010C6281E681C10225EB1D212B80E6
36 | S224FE82803A0AC737C631A68012B74569E221953352C10225EE1D212B800A6CAC3BB745E6EA
37 | S224FE82A000C1012704C1052651EC028C39002703046437E6000421141E212B10074A828227
38 | S224FE82C0FE79212C1C212B201D212B1086FFC77C2123EE82E6017B2125487A21268639C723
39 | S224FE82E07C2127877C21290685301F212B20081D212B201C212B100685341F212B20F8CD0C
40 | S224FE8300FF007D2123A6017A2125C1231822021BC1026B81252EC1082214C002875905FF51
41 | S224FE832083A083BF8404852B8486835F84B7C1142512C117220EC014875905FF8419843554
42 | S224FE83408472837187E68116C13623852B0E84D90F840A1B85231E84FA1F850F2383E21DA3
43 | S224FE8360212B20EE82E602182601621C212B102047C76B8120046281E681E68187B745E6C5
44 | S224FE8380E2210626F1E6817B2126C6017C21271C212842C68E7C212918032106212D20771E
45 | S224FE83A0168569C1012413168537EE82B746E6028759B7456DE2212D2079C63206852DC70D
46 | S224FE83C037EE83A602361A03B7544A8158FE1B826B85C102272004610306850BC103261F2D
47 | S224FE83E0201FC737860636EC84C300024A8158FE1B826B84C1021827013A0451E3C103263A
48 | S224FE84006F06850BC7168559207AEE821685377C212FC601168559206B1685694A8254FE89
49 | S224FE84201685694A81A7FE7B21261685698603127B2127207B168569C102240EA6038103E0
50 | S224FE844024086B80E604C107230B86317A212418792163207C3736C631A68212B745C60E8D
51 | S224FE846032121AE633871AE22165591AE67E2163205F168569042151FC2163274C16853760
52 | S224FE84806CFB9CDF204B1F212B0231168569C10222378716C1220331030D1AEE82E6034A4D
53 | S224FE84A08254FE202C168545EE82E6034A8214FE207E16854520791E212B0204C622206D86
54 | S224FE84C0EE82E602270704010AC63120604A8282FE205D4A822FFE2057C6027B2126C7877C
55 | S224FE84E07C21297C2127FE212D7E212FEE82EC047C21C8F621242638203AFC212D3BEE8426
56 | S224FE8500EC024A85D9FE1B82046125C633201ECC21233BFD212D873536EC874AC14D001BF8
57 | S224FE852082200DCC02017C21262005C6307B21244A8134FE1B860AE60337EC06EE044A85A1
58 | S224FE8540D8FE1B813DEE84E60337E60437E60537EC064A81D0FE1B833D37EE85A60236CCDA
59 | S224FE856021264A8183FE1B823DEE84E6023D1D212C701F212C010A1D212C014A8134FE201B
60 | S224FE8580341F212B80364A85E0FEF6213127291C212C20F6213258585887C321334A85D126
61 | S224FE85A0FE722132F62132C10625037921327321314A85E6FEC6010A4A85E6FEC70ACC2137
62 | S224FE85C023C300A73BCE21238F6930AE8025FA3A0A4A8085FEC6010A0A4A85E0FEC6010A5F
63 | S215FE85E014107221140A732114F62114260210EF0AAE
64 | S9030000FC
65 |
--------------------------------------------------------------------------------
/CCP_TEST_16/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 |
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/cmd/TBDML_Postload.cmd:
--------------------------------------------------------------------------------
1 | // After load the commands written below will be executed
2 |
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/cmd/TBDML_Preload.cmd:
--------------------------------------------------------------------------------
1 | // Before load the commands written below will be executed
2 |
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/cmd/TBDML_Reset.cmd:
--------------------------------------------------------------------------------
1 | // After reset the commands written below will be executed
2 |
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/cmd/TBDML_Startup.cmd:
--------------------------------------------------------------------------------
1 | // At startup the commands written below will be executed
2 |
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/cmd/TBDML_Vppoff.cmd:
--------------------------------------------------------------------------------
1 | // After programming the flash, the commands written below will be executed
2 |
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/cmd/TBDML_Vppon.cmd:
--------------------------------------------------------------------------------
1 | // Before programming the flash, the commands written below will be executed
2 |
--------------------------------------------------------------------------------
/CCP_TEST_16/Project/prm/Project.prm:
--------------------------------------------------------------------------------
1 | /* This is a linker parameter file for the MC9S12XEP100 */
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 EEPROM */
19 | EEPROM = READ_ONLY DATA_NEAR IBCC_NEAR 0x0C00 TO 0x0FFF;
20 |
21 | /* non-paged RAM */
22 | RAM = READ_WRITE DATA_NEAR 0x2000 TO 0x3FFF;
23 |
24 | /* non-banked FLASH */
25 | ROM_4000 = READ_ONLY DATA_NEAR IBCC_NEAR 0x4000 TO 0x7FFF;
26 | ROM_C000 = READ_ONLY DATA_NEAR IBCC_NEAR 0xC000 TO 0xFEFF;
27 | /* VECTORS = READ_ONLY 0xFF00 TO 0xFFFF; intentionally not defined: used for VECTOR commands below */
28 | //OSVECTORS = READ_ONLY 0xFF10 TO 0xFFFF; /* OSEK interrupt vectors (use your vector.o) */
29 |
30 | /* paged EEPROM 0x0800 TO 0x0BFF; addressed through EPAGE */
31 | EEPROM_00 = READ_ONLY DATA_FAR IBCC_FAR 0x000800 TO 0x000BFF;
32 | EEPROM_01 = READ_ONLY DATA_FAR IBCC_FAR 0x010800 TO 0x010BFF;
33 | EEPROM_02 = READ_ONLY DATA_FAR IBCC_FAR 0x020800 TO 0x020BFF;
34 | EEPROM_03 = READ_ONLY DATA_FAR IBCC_FAR 0x030800 TO 0x030BFF;
35 | EEPROM_04 = READ_ONLY DATA_FAR IBCC_FAR 0x040800 TO 0x040BFF;
36 | EEPROM_05 = READ_ONLY DATA_FAR IBCC_FAR 0x050800 TO 0x050BFF;
37 | EEPROM_06 = READ_ONLY DATA_FAR IBCC_FAR 0x060800 TO 0x060BFF;
38 | EEPROM_07 = READ_ONLY DATA_FAR IBCC_FAR 0x070800 TO 0x070BFF;
39 | EEPROM_08 = READ_ONLY DATA_FAR IBCC_FAR 0x080800 TO 0x080BFF;
40 | EEPROM_09 = READ_ONLY DATA_FAR IBCC_FAR 0x090800 TO 0x090BFF;
41 | EEPROM_0A = READ_ONLY DATA_FAR IBCC_FAR 0x0A0800 TO 0x0A0BFF;
42 | EEPROM_0B = READ_ONLY DATA_FAR IBCC_FAR 0x0B0800 TO 0x0B0BFF;
43 | EEPROM_0C = READ_ONLY DATA_FAR IBCC_FAR 0x0C0800 TO 0x0C0BFF;
44 | EEPROM_0D = READ_ONLY DATA_FAR IBCC_FAR 0x0D0800 TO 0x0D0BFF;
45 | EEPROM_0E = READ_ONLY DATA_FAR IBCC_FAR 0x0E0800 TO 0x0E0BFF;
46 | EEPROM_0F = READ_ONLY DATA_FAR IBCC_FAR 0x0F0800 TO 0x0F0BFF;
47 | EEPROM_10 = READ_ONLY DATA_FAR IBCC_FAR 0x100800 TO 0x100BFF;
48 | EEPROM_11 = READ_ONLY DATA_FAR IBCC_FAR 0x110800 TO 0x110BFF;
49 | EEPROM_12 = READ_ONLY DATA_FAR IBCC_FAR 0x120800 TO 0x120BFF;
50 | EEPROM_13 = READ_ONLY DATA_FAR IBCC_FAR 0x130800 TO 0x130BFF;
51 | EEPROM_14 = READ_ONLY DATA_FAR IBCC_FAR 0x140800 TO 0x140BFF;
52 | EEPROM_15 = READ_ONLY DATA_FAR IBCC_FAR 0x150800 TO 0x150BFF;
53 | EEPROM_16 = READ_ONLY DATA_FAR IBCC_FAR 0x160800 TO 0x160BFF;
54 | EEPROM_17 = READ_ONLY DATA_FAR IBCC_FAR 0x170800 TO 0x170BFF;
55 | EEPROM_18 = READ_ONLY DATA_FAR IBCC_FAR 0x180800 TO 0x180BFF;
56 | EEPROM_19 = READ_ONLY DATA_FAR IBCC_FAR 0x190800 TO 0x190BFF;
57 | EEPROM_1A = READ_ONLY DATA_FAR IBCC_FAR 0x1A0800 TO 0x1A0BFF;
58 | EEPROM_1B = READ_ONLY DATA_FAR IBCC_FAR 0x1B0800 TO 0x1B0BFF;
59 | EEPROM_1C = READ_ONLY DATA_FAR IBCC_FAR 0x1C0800 TO 0x1C0BFF;
60 | EEPROM_1D = READ_ONLY DATA_FAR IBCC_FAR 0x1D0800 TO 0x1D0BFF;
61 | EEPROM_1E = READ_ONLY DATA_FAR IBCC_FAR 0x1E0800 TO 0x1E0BFF;
62 | EEPROM_1F = READ_ONLY DATA_FAR IBCC_FAR 0x1F0800 TO 0x1F0BFF;
63 | EEPROM_FC = READ_ONLY DATA_FAR IBCC_FAR 0xFC0800 TO 0xFC0BFF;
64 | EEPROM_FD = READ_ONLY DATA_FAR IBCC_FAR 0xFD0800 TO 0xFD0BFF;
65 | EEPROM_FE = READ_ONLY DATA_FAR IBCC_FAR 0xFE0800 TO 0xFE0BFF;
66 | /* EEPROM_FF = READ_ONLY 0xFF0800 TO 0xFF0BFF; intentionally not defined: equivalent to EEPROM */
67 |
68 | /* paged RAM: 0x1000 TO 0x1FFF; addressed through RPAGE */
69 | RAM_F0 = READ_WRITE DATA_FAR 0xF01000 TO 0xF01FFF;
70 | RAM_F1 = READ_WRITE DATA_FAR 0xF11000 TO 0xF11FFF;
71 | RAM_F2 = READ_WRITE DATA_FAR 0xF21000 TO 0xF21FFF;
72 | RAM_F3 = READ_WRITE DATA_FAR 0xF31000 TO 0xF31FFF;
73 | RAM_F4 = READ_WRITE DATA_FAR 0xF41000 TO 0xF41FFF;
74 | RAM_F5 = READ_WRITE DATA_FAR 0xF51000 TO 0xF51FFF;
75 | RAM_F6 = READ_WRITE DATA_FAR 0xF61000 TO 0xF61FFF;
76 | RAM_F7 = READ_WRITE DATA_FAR 0xF71000 TO 0xF71FFF;
77 | RAM_F8 = READ_WRITE DATA_FAR 0xF81000 TO 0xF81FFF;
78 | RAM_F9 = READ_WRITE DATA_FAR 0xF91000 TO 0xF91FFF;
79 | RAM_FA = READ_WRITE DATA_FAR 0xFA1000 TO 0xFA1FFF;
80 | RAM_FB = READ_WRITE DATA_FAR 0xFB1000 TO 0xFB1FFF;
81 | RAM_FC = READ_WRITE DATA_FAR 0xFC1000 TO 0xFC1FFF;
82 | RAM_FD = READ_WRITE DATA_FAR 0xFD1000 TO 0xFD1FFF;
83 | /* RAM_FE = READ_WRITE 0xFE1000 TO 0xFE1FFF; intentionally not defined: equivalent to RAM: 0x2000..0x2FFF */
84 | /* RAM_FF = READ_WRITE 0xFF1000 TO 0xFF1FFF; intentionally not defined: equivalent to RAM: 0x3000..0x3FFF */
85 |
86 | /* paged FLASH: 0x8000 TO 0xBFFF; addressed through PPAGE */
87 | PAGE_C0 = READ_ONLY DATA_FAR IBCC_FAR 0xC08000 TO 0xC0BFFF;
88 | PAGE_C1 = READ_ONLY DATA_FAR IBCC_FAR 0xC18000 TO 0xC1BFFF;
89 | PAGE_C2 = READ_ONLY DATA_FAR IBCC_FAR 0xC28000 TO 0xC2BFFF;
90 | PAGE_C3 = READ_ONLY DATA_FAR IBCC_FAR 0xC38000 TO 0xC3BFFF;
91 | PAGE_C4 = READ_ONLY DATA_FAR IBCC_FAR 0xC48000 TO 0xC4BFFF;
92 | PAGE_C5 = READ_ONLY DATA_FAR IBCC_FAR 0xC58000 TO 0xC5BFFF;
93 | PAGE_C6 = READ_ONLY DATA_FAR IBCC_FAR 0xC68000 TO 0xC6BFFF;
94 | PAGE_C7 = READ_ONLY DATA_FAR IBCC_FAR 0xC78000 TO 0xC7BFFF;
95 |
96 | PAGE_C8 = READ_ONLY DATA_FAR IBCC_FAR 0xC88000 TO 0xC8BFFF;
97 | PAGE_C9 = READ_ONLY DATA_FAR IBCC_FAR 0xC98000 TO 0xC9BFFF;
98 | PAGE_CA = READ_ONLY DATA_FAR IBCC_FAR 0xCA8000 TO 0xCABFFF;
99 | PAGE_CB = READ_ONLY DATA_FAR IBCC_FAR 0xCB8000 TO 0xCBBFFF;
100 | PAGE_CC = READ_ONLY DATA_FAR IBCC_FAR 0xCC8000 TO 0xCCBFFF;
101 | PAGE_CD = READ_ONLY DATA_FAR IBCC_FAR 0xCD8000 TO 0xCDBFFF;
102 | PAGE_CE = READ_ONLY DATA_FAR IBCC_FAR 0xCE8000 TO 0xCEBFFF;
103 | PAGE_CF = READ_ONLY DATA_FAR IBCC_FAR 0xCF8000 TO 0xCFBFFF;
104 |
105 | PAGE_D0 = READ_ONLY DATA_FAR IBCC_FAR 0xD08000 TO 0xD0BFFF;
106 | PAGE_D1 = READ_ONLY DATA_FAR IBCC_FAR 0xD18000 TO 0xD1BFFF;
107 | PAGE_D2 = READ_ONLY DATA_FAR IBCC_FAR 0xD28000 TO 0xD2BFFF;
108 | PAGE_D3 = READ_ONLY DATA_FAR IBCC_FAR 0xD38000 TO 0xD3BFFF;
109 | PAGE_D4 = READ_ONLY DATA_FAR IBCC_FAR 0xD48000 TO 0xD4BFFF;
110 | PAGE_D5 = READ_ONLY DATA_FAR IBCC_FAR 0xD58000 TO 0xD5BFFF;
111 | PAGE_D6 = READ_ONLY DATA_FAR IBCC_FAR 0xD68000 TO 0xD6BFFF;
112 | PAGE_D7 = READ_ONLY DATA_FAR IBCC_FAR 0xD78000 TO 0xD7BFFF;
113 |
114 | PAGE_D8 = READ_ONLY DATA_FAR IBCC_FAR 0xD88000 TO 0xD8BFFF;
115 | PAGE_D9 = READ_ONLY DATA_FAR IBCC_FAR 0xD98000 TO 0xD9BFFF;
116 | PAGE_DA = READ_ONLY DATA_FAR IBCC_FAR 0xDA8000 TO 0xDABFFF;
117 | PAGE_DB = READ_ONLY DATA_FAR IBCC_FAR 0xDB8000 TO 0xDBBFFF;
118 | PAGE_DC = READ_ONLY DATA_FAR IBCC_FAR 0xDC8000 TO 0xDCBFFF;
119 | PAGE_DD = READ_ONLY DATA_FAR IBCC_FAR 0xDD8000 TO 0xDDBFFF;
120 | PAGE_DE = READ_ONLY DATA_FAR IBCC_FAR 0xDE8000 TO 0xDEBFFF;
121 | PAGE_DF = READ_ONLY DATA_FAR IBCC_FAR 0xDF8000 TO 0xDFBFFF;
122 |
123 | PAGE_E0 = READ_ONLY DATA_FAR IBCC_FAR 0xE08000 TO 0xE0BFFF;
124 | PAGE_E1 = READ_ONLY DATA_FAR IBCC_FAR 0xE18000 TO 0xE1BFFF;
125 | PAGE_E2 = READ_ONLY DATA_FAR IBCC_FAR 0xE28000 TO 0xE2BFFF;
126 | PAGE_E3 = READ_ONLY DATA_FAR IBCC_FAR 0xE38000 TO 0xE3BFFF;
127 | PAGE_E4 = READ_ONLY DATA_FAR IBCC_FAR 0xE48000 TO 0xE4BFFF;
128 | PAGE_E5 = READ_ONLY DATA_FAR IBCC_FAR 0xE58000 TO 0xE5BFFF;
129 | PAGE_E6 = READ_ONLY DATA_FAR IBCC_FAR 0xE68000 TO 0xE6BFFF;
130 | PAGE_E7 = READ_ONLY DATA_FAR IBCC_FAR 0xE78000 TO 0xE7BFFF;
131 |
132 | PAGE_E8 = READ_ONLY DATA_FAR IBCC_FAR 0xE88000 TO 0xE8BFFF;
133 | PAGE_E9 = READ_ONLY DATA_FAR IBCC_FAR 0xE98000 TO 0xE9BFFF;
134 | PAGE_EA = READ_ONLY DATA_FAR IBCC_FAR 0xEA8000 TO 0xEABFFF;
135 | PAGE_EB = READ_ONLY DATA_FAR IBCC_FAR 0xEB8000 TO 0xEBBFFF;
136 | PAGE_EC = READ_ONLY DATA_FAR IBCC_FAR 0xEC8000 TO 0xECBFFF;
137 | PAGE_ED = READ_ONLY DATA_FAR IBCC_FAR 0xED8000 TO 0xEDBFFF;
138 | PAGE_EE = READ_ONLY DATA_FAR IBCC_FAR 0xEE8000 TO 0xEEBFFF;
139 | PAGE_EF = READ_ONLY DATA_FAR IBCC_FAR 0xEF8000 TO 0xEFBFFF;
140 |
141 | PAGE_F0 = READ_ONLY DATA_FAR IBCC_FAR 0xF08000 TO 0xF0BFFF;
142 | PAGE_F1 = READ_ONLY DATA_FAR IBCC_FAR 0xF18000 TO 0xF1BFFF;
143 | PAGE_F2 = READ_ONLY DATA_FAR IBCC_FAR 0xF28000 TO 0xF2BFFF;
144 | PAGE_F3 = READ_ONLY DATA_FAR IBCC_FAR 0xF38000 TO 0xF3BFFF;
145 | PAGE_F4 = READ_ONLY DATA_FAR IBCC_FAR 0xF48000 TO 0xF4BFFF;
146 | PAGE_F5 = READ_ONLY DATA_FAR IBCC_FAR 0xF58000 TO 0xF5BFFF;
147 | PAGE_F6 = READ_ONLY DATA_FAR IBCC_FAR 0xF68000 TO 0xF6BFFF;
148 | PAGE_F7 = READ_ONLY DATA_FAR IBCC_FAR 0xF78000 TO 0xF7BFFF;
149 |
150 | PAGE_F8 = READ_ONLY DATA_FAR IBCC_FAR 0xF88000 TO 0xF8BFFF;
151 | PAGE_F9 = READ_ONLY DATA_FAR IBCC_FAR 0xF98000 TO 0xF9BFFF;
152 | PAGE_FA = READ_ONLY DATA_FAR IBCC_FAR 0xFA8000 TO 0xFABFFF;
153 | PAGE_FB = READ_ONLY DATA_FAR IBCC_FAR 0xFB8000 TO 0xFBBFFF;
154 | PAGE_FC = READ_ONLY DATA_FAR IBCC_FAR 0xFC8000 TO 0xFCBFFF;
155 | /* PAGE_FD = READ_ONLY 0xFD8000 TO 0xFDBFFF; intentionally not defined: equivalent to ROM_4000 */
156 | PAGE_FE = READ_ONLY DATA_FAR IBCC_FAR 0xFE8000 TO 0xFEBFFF;
157 | /* PAGE_FF = READ_ONLY 0xFF8000 TO 0xFFBFFF; intentionally not defined: equivalent to ROM_C000 */
158 | END
159 |
160 | PLACEMENT /* here all predefined and user segments are placed into the SEGMENTS defined above. */
161 | _PRESTART, /* Used in HIWARE format: jump to _Startup at the code start */
162 | STARTUP, /* startup data structures */
163 | ROM_VAR, /* constant variables */
164 | STRINGS, /* string literals */
165 | VIRTUAL_TABLE_SEGMENT, /* C++ virtual table segment */
166 | //.ostext, /* eventually OSEK code */
167 | NON_BANKED, /* runtime routines which must not be banked */
168 | COPY /* copy down information: how to initialize variables */
169 | /* in case you want to use ROM_4000 here as well, make sure
170 | that all files (incl. library files) are compiled with the
171 | option: -OnB=b */
172 | INTO ROM_C000/*, ROM_4000*/;
173 |
174 | DEFAULT_ROM INTO PAGE_FE, PAGE_FC, PAGE_FB, PAGE_FA, PAGE_F9, PAGE_F8,
175 | PAGE_F7, PAGE_F6, PAGE_F5, PAGE_F4, PAGE_F3, PAGE_F2, PAGE_F1, PAGE_F0,
176 | PAGE_EF, PAGE_EE, PAGE_ED, PAGE_EC, PAGE_EB, PAGE_EA, PAGE_E9, PAGE_E8,
177 | PAGE_E7, PAGE_E6, PAGE_E5, PAGE_E4, PAGE_E3, PAGE_E2, PAGE_E1, PAGE_E0,
178 | PAGE_DF, PAGE_DE, PAGE_DD, PAGE_DC, PAGE_DB, PAGE_DA, PAGE_D9, PAGE_D8,
179 | PAGE_D7, PAGE_D6, PAGE_D5, PAGE_D4, PAGE_D3, PAGE_D2, PAGE_D1, PAGE_D0,
180 | PAGE_CF, PAGE_CE, PAGE_CD, PAGE_CC, PAGE_CB, PAGE_CA, PAGE_C9, PAGE_C8,
181 | PAGE_C7, PAGE_C6, PAGE_C5, PAGE_C4, PAGE_C3, PAGE_C2, PAGE_C1, PAGE_C0;
182 |
183 | //.stackstart, /* eventually used for OSEK kernel awareness: Main-Stack Start */
184 | SSTACK, /* allocate stack first to avoid overwriting variables on overflow */
185 | //.stackend, /* eventually used for OSEK kernel awareness: Main-Stack End */
186 | DEFAULT_RAM /* all variables, the default RAM location */
187 | INTO RAM;
188 |
189 | PAGED_RAM INTO /* when using banked addressing for variable data, make sure to specify
190 | the option -D__FAR_DATA on the compiler command line */
191 | RAM_F0, RAM_F1, RAM_F2, RAM_F3, RAM_F4, RAM_F5, RAM_F6, RAM_F7,
192 | RAM_F8, RAM_F9, RAM_FA, RAM_FB, RAM_FC, RAM_FD;
193 |
194 | DISTRIBUTE DISTRIBUTE_INTO
195 | ROM_4000, PAGE_FE, PAGE_FC, PAGE_FB, PAGE_FA, PAGE_F9, PAGE_F8, PAGE_F7,
196 | PAGE_F6, PAGE_F5, PAGE_F4, PAGE_F3, PAGE_F2, PAGE_F1, PAGE_F0, PAGE_EF,
197 | PAGE_EE, PAGE_ED, PAGE_EC, PAGE_EB, PAGE_EA, PAGE_E9, PAGE_E8, PAGE_E7,
198 | PAGE_E6, PAGE_E5, PAGE_E4, PAGE_E3, PAGE_E2, PAGE_E1, PAGE_E0, PAGE_DF,
199 | PAGE_DE, PAGE_DD, PAGE_DC, PAGE_DB, PAGE_DA, PAGE_D9, PAGE_D8, PAGE_D7,
200 | PAGE_D6, PAGE_D5, PAGE_D4, PAGE_D3, PAGE_D2, PAGE_D1, PAGE_D0, PAGE_CF,
201 | PAGE_CE, PAGE_CD, PAGE_CC, PAGE_CB, PAGE_CA, PAGE_C9, PAGE_C8, PAGE_C7,
202 | PAGE_C6, PAGE_C5, PAGE_C4, PAGE_C3, PAGE_C2, PAGE_C1, PAGE_C0;
203 | CONST_DISTRIBUTE DISTRIBUTE_INTO
204 | ROM_4000, PAGE_FE, PAGE_FC, PAGE_FB, PAGE_FA, PAGE_F9, PAGE_F8, PAGE_F7,
205 | PAGE_F6, PAGE_F5, PAGE_F4, PAGE_F3, PAGE_F2, PAGE_F1, PAGE_F0, PAGE_EF,
206 | PAGE_EE, PAGE_ED, PAGE_EC, PAGE_EB, PAGE_EA, PAGE_E9, PAGE_E8, PAGE_E7,
207 | PAGE_E6, PAGE_E5, PAGE_E4, PAGE_E3, PAGE_E2, PAGE_E1, PAGE_E0, PAGE_DF,
208 | PAGE_DE, PAGE_DD, PAGE_DC, PAGE_DB, PAGE_DA, PAGE_D9, PAGE_D8, PAGE_D7,
209 | PAGE_D6, PAGE_D5, PAGE_D4, PAGE_D3, PAGE_D2, PAGE_D1, PAGE_D0, PAGE_CF,
210 | PAGE_CE, PAGE_CD, PAGE_CC, PAGE_CB, PAGE_CA, PAGE_C9, PAGE_C8, PAGE_C7,
211 | PAGE_C6, PAGE_C5, PAGE_C4, PAGE_C3, PAGE_C2, PAGE_C1, PAGE_C0;
212 | DATA_DISTRIBUTE DISTRIBUTE_INTO
213 | RAM, RAM_FD, RAM_FC, RAM_FB, RAM_FA, RAM_F9, RAM_F8, RAM_F7,
214 | RAM_F6, RAM_F5, RAM_F4, RAM_F3, RAM_F2, RAM_F1, RAM_F0;
215 | //.vectors INTO OSVECTORS; /* OSEK vector table */
216 | END
217 |
218 |
219 | ENTRIES /* keep the following unreferenced variables */
220 | /* OSEK: always allocate the vector table and all dependent objects */
221 | //_vectab OsBuildNumber _OsOrtiStackStart _OsOrtiStart
222 | END
223 |
224 | STACKSIZE 0x100 /* size of the stack (will be allocated in DEFAULT_RAM) */
225 |
226 | /* use these definitions in plane of the vector table ('vectors') above */
227 | VECTOR 0 _Startup /* reset vector: this is the default entry point for a C/C++ application. */
228 | //VECTOR 0 Entry /* reset vector: this is the default entry point for an Assembly application. */
229 | //INIT Entry /* for assembly applications: that this is as well the initialization entry point */
230 |
--------------------------------------------------------------------------------
/CCP_TEST_16/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 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ape_test/ccp-test/internal_FLASH.elf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ape_test/ccp-test/internal_FLASH.elf
--------------------------------------------------------------------------------
/CCP_TEST_32/ape_test/pro/Project/123.cna:
--------------------------------------------------------------------------------
1 | [FILE_INFO]
2 | Identification=CANape-Configuration-File
3 | FileName=123.cna
4 | FileNameAbsolute=C:\Users\xin.zhang\Desktop\CCP_32_TEST\ape_test\pro\Project\123.cna
5 | WorkingDirectory=C:\Users\xin.zhang\Desktop\CCP_32_TEST\ape_test\pro\Project
6 | ProjectId=07df-0007-0002-000a-0029-000b-0000
7 | FileVersion=702
8 | PrgVersion=Version 9.0.40.27237
9 | PrgDate=28.2.2011
10 | Description=
11 | CreationTime=11:03
12 | CreationDate=07/02/2015 ; Month/Day/Year
13 | ModificationTime=11:45
14 | ModificationDate=07/02/2015 ; Month/Day/Year
15 | Protected=0
16 |
17 | [CALIBRATION_LIST]
18 | Count=0
19 |
20 | [CANAPE_ENVIRONMENT]
21 | OBJECT_COUNT=0
22 |
23 | [DATAMINING]
24 | AnalysisFilename=Analysis-{YEAR}-{MONTH}-{DAY}_{HOUR}-{MINUTE}-{SECOND}
25 | AnalysisDirectory=
26 | Comment=
27 | OptionMaxFindingsPerFile=100
28 | OptionMaxFindings=1000
29 | FromTime=-1
30 | FromActive=0
31 | FromTimePartActive=0
32 | ToTime=-1
33 | ToActive=0
34 | ToTimePartActive=0
35 | MDFExtensions=*.mdf
36 | Methods=
37 | Signals=
38 | ConditionEpsilon=1e-009
39 | ConditionEpsilonRelative=0
40 |
41 | [DATAMINING_FILE_LIST]
42 | Count=0
43 |
44 | [DISPLAY_PAGE_1]
45 | Name=
46 | Comment=
47 | Maximized=0
48 | ActiveWindow=4294967295
49 |
50 | [DISPLAY_PAGES]
51 | Count=1
52 | Active=-1
53 |
54 | [EVENT_LIST]
55 | Count=0
56 |
57 | [FILE_COMMENT_TEMPLATE]
58 | 1="Name",""
59 | 2="Division",""
60 | 3="Project",""
61 | 4="Subject",""
62 | 5="Comment",""
63 | Count=5
64 |
65 | [FUNCTION_OBJECT_LIST]
66 | count=0
67 |
68 | [FUNCTIONS]
69 | COUNT=0
70 | COUNT_LIBRARY=0
71 |
72 | [JOB_LIST]
73 | Count=0
74 |
75 | [MDF_LIST]
76 | Count=0
77 |
78 | [MEASUREMENT_LIST]
79 | Count=3
80 | MeaCfgLabellistName=
81 |
82 | [MEASUREMENT_OBJECT_1]
83 | Module=new_database
84 | Name=cal1
85 | Row=0
86 | Column=0
87 | MeaReferenced=1
88 | Mode=2147483649
89 | Rate=10
90 | Disabled=0
91 | ArchivBy_1=Recorder
92 | DisplayCount=1
93 |
94 | [MEASUREMENT_OBJECT_1_DISPLAY_1]
95 | Window=6
96 | Index=0
97 | Color=589568
98 | ColorFunction=0
99 | LineTyp=2
100 | YMinHome=0
101 | YMaxHome=255
102 | YMin=0
103 | YMax=255
104 | XOffsetNS=0
105 | XOffset=0
106 | ValueFormat=3
107 | BitMask=1
108 | ShowYAxis=1
109 | Width=10
110 | LineStyle=1
111 | MarkerType=1
112 | LineWidth=1
113 | Precision=-2
114 | Enabled=1
115 | StoredFocused=1
116 | SublMask=25
117 | MeaSublMask=3
118 | Row=0
119 | Col=0
120 | YAxis_ID=0
121 |
122 | [MEASUREMENT_OBJECT_2]
123 | Module=new_database
124 | Name=cal2
125 | Row=0
126 | Column=0
127 | MeaReferenced=1
128 | Mode=2147483650
129 | Rate=100
130 | Disabled=0
131 | ArchivBy_1=Recorder
132 | DisplayCount=0
133 |
134 | [MEASUREMENT_OBJECT_3]
135 | Module=new_database
136 | Name=cal3
137 | Row=0
138 | Column=0
139 | MeaReferenced=1
140 | Mode=2147483650
141 | Rate=100
142 | Disabled=0
143 | ArchivBy_1=Recorder
144 | DisplayCount=0
145 |
146 | [MEASUREMENT_OPTIONS]
147 | MaxTime=60000
148 | BufferSize=30000
149 | TimeAxis=20000
150 | TimeLimited=0
151 | BufferSizeMem=5120
152 | ShowDialogForErrors=1
153 | SaveAllToDisplayBuffer=0
154 | TimeMode=0
155 | YMode=1
156 | PollingAlways=1
157 | PollingOnlyVisiblePage=0
158 | DrawLastValue=1
159 | UpdateCycleBar=100
160 | UpdateCycleVal=500
161 | UpdateCycleGraph=1000
162 | UpdateCycleArr=1000
163 | UpdateCycleCal=1000
164 | UpdateCycle2D3DMeasure=500
165 | UpdateCycleAx=100
166 | UpdateCycleWrt=100
167 | UpdateCycleTrace=100
168 | UpdateCycleTxt=1000
169 | TimeScrollSoft=0
170 | TimeScrollAt=100
171 | TimeScrollSoftAt=80
172 | TimeScrollBy=100
173 | FitTimeAxis=1
174 | FitYAxis=0
175 | AutoInsertComment=1
176 | OfflineFileSignals=1
177 | UpdateMeaInCalWindows=1
178 | MeaSaveParameterOnStart=0
179 | ShowFileSignalsDuringMeasurement=0
180 | AddOnSignalModes=1
181 | LiveMeasurementRate=1000
182 | EditCommentAfterSaveSignals=1
183 | ShowRejectFileMsg=1
184 | ParDeviceCount=0
185 | MeaSaveParameterFileName=Parameter
186 | StopMeasurementOnEvent=1
187 | StopMeasurementEventsCount=0
188 | StopMeasurementOnESC=1
189 |
190 | [MEASUREMENT_USERFILTER]
191 | Count=0
192 |
193 | [OPTIONS]
194 | WindowTextExtended=1
195 | WindowSymbols=1
196 | GlobalCursor=0
197 | GlobalCursorTime=0
198 | MainWindowPos=1, -15, 0, 1616, 876 ;cmd, x, y, w, h
199 |
200 | [PAR_COMMENT]
201 | Count=0
202 |
203 | [POST_ANALYSIS_SCRIPT]
204 | ScriptName=
205 |
206 | [POST_PROCESSEDFILE_SCRIPT]
207 | ScriptName=
208 |
209 | [PRE_ANALYSIS_SCRIPT]
210 | ScriptName=
211 |
212 | [PRE_PROCESSEDFILE_SCRIPT]
213 | ScriptName=
214 |
215 | [PRINTFORMAT]
216 | FormatPortrait=0
217 | PageSame=1
218 | ColorMono=0
219 | PreviewSignals=0
220 | ShowWindowTitle=0
221 | CompanyAlignement=0
222 | NbrPages=1
223 | CompanyLogo=
224 | PrintAlignment=0
225 | HeaderPos=1
226 | HeaderHeight=20
227 | CompanyComment_1="Print page: {PAGE} {DATE} {TIME}"
228 | CompanyComment_2="License name: {LICENSENAME}"
229 | CompanyComment_3="Serial number: {LICENSENO}"
230 | CompanyComment_Count=3
231 | Comment_1="File 1: {FILENAME 1}"
232 | Comment_2="Name: {NAME 1} Division: {DIVISION 1}"
233 | Comment_3="Project: {PROJECT 1} Measurement object: {SUBJECT 1}"
234 | Comment_4="Comment: {COMMENT 1}"
235 | Comment_Count=4
236 | TreeCount=0
237 |
238 | [RECORDER_1]
239 | Name=Recorder
240 | Comment=
241 | FilenameTemplate={RECORDER}_{YEAR}-{MONTH}-{DAY}_{HOUR}-{MINUTE}-{SECOND}.MDF
242 | ConverterId=
243 | MaxSize=4294967295
244 | Enabled=1
245 | DefaultRecorder=1
246 | EditComment=1
247 | StartWithoutRecording=0
248 | SaveMeasurementComment=1
249 | SaveWriteWindowText=0
250 | SaveCalibrationCommands=0
251 | SplitFileEnabled=0
252 | SplitFileTimeEnabled=0
253 | SplitFileSizeEnabled=1
254 | SplitFileEventEnabled=0
255 | SplitFileTimeS=3600
256 | SplitFileSizeBytes=104857600
257 | AutoSaveTime=60000
258 | DataReduction=-1
259 | SaveParameterOnStart=0
260 | FlushMode=0
261 | TrgEnabled=0
262 | TrgStopRecording=0
263 | TrgStartStop=0
264 | TrgEnableMaxStopTime=0
265 | TrgSaveInOneFile=0
266 | TrgPreTimeMS=5000
267 | TrgPostTimeMS=5000
268 | TrgMaxStopTimeMS=5000
269 | TrgMaxBlockCount=1
270 | StartEvCount=0
271 | StopEvCount=0
272 | SplitEvCount=0
273 |
274 | [RECORDER_1_FILE_COMMENT]
275 | 1="Name",""
276 | 2="Division",""
277 | 3="Project",""
278 | 4="Subject",""
279 | 5="Comment",""
280 | Count=5
281 |
282 | [RECORDER_LIST]
283 | RecorderCount=1
284 |
285 | [SIGNSELWND]
286 | Enabled=1
287 | Docked=1
288 | DockedVisible=1
289 | DockedLocation=3
290 | DockedWidth=200
291 | DockedHeight=150
292 | FloatedLeft=2
293 | FloatedTop=87
294 | FloatedWidth=200
295 | FloatedHeight=300
296 | DockEnable=1
297 | DockSignalSelWnd=1
298 | DockSignalSelShowWnd=1
299 | DockLoc=3
300 | DockWidth=198
301 | PosLeft=2
302 | PosTop=87
303 | PosRight=218
304 | PosBottom=423
305 | FocusID=2004
306 | ActiveTab=0
307 | FilterNodeID=All
308 | TreeExpand_0=@All
309 | TreeExpand_1=All\Devices\new_database\new_database.a2l\Software structure
310 | TreeExpand_2=All\Devices\new_database
311 | TreeExpand_3=All\Devices\new_database\new_database.a2l
312 | TreeExpand_4=All\Devices
313 | TreeExpand_5=$All\Devices
314 | TreeExpand_6=#All\Devices\new_database\new_database.a2l\cal3
315 | TreeExpand_7=@All\Devices
316 | TreeExpand_8=$
317 | TreeExpand_9=#
318 | TreeExpand_10=@All\Devices\Environment
319 | TreeExpand_11=$
320 | TreeExpand_12=#
321 | TreeExpand_13=@All\Devices\new_database
322 | TreeExpand_14=$
323 | TreeExpand_15=#
324 | TreeExpand_16=@All\Opened parameter set files
325 | TreeExpand_17=$
326 | TreeExpand_18=#
327 | TreeExpand_19=@All\Loaded measurement files
328 | TreeExpand_20=$
329 | TreeExpand_21=#
330 | TreeExpand_22=@All\Function Definitions
331 | TreeExpand_23=$
332 | TreeExpand_24=#
333 | TreeExpand_25=@All\Virtual file channels
334 | TreeExpand_26=$
335 | TreeExpand_27=#
336 | TreeExpand_28=@All\Measurement list
337 | TreeExpand_29=$
338 | TreeExpand_30=#
339 | TreeExpand_31=@All\Calibration objects
340 | TreeExpand_32=$
341 | TreeExpand_33=#
342 | TreeExpand_34=@All\Data Mining results
343 | TreeExpand_35=$
344 | TreeExpand_36=#
345 | TextSearchCaseSensitive=0
346 | TextSearchUseMode=1
347 | TextSearchSearchFullText=1
348 |
349 | [VIRTUAL_MDF_LIST]
350 | Count=0
351 |
352 | [WINDOW_1]
353 | DisplayMode=0
354 | Title=Device window
355 | Type=256
356 | Comment=Device window
357 | Number=1
358 | Position=0, 0, 0, 790, 446 ;cmd, x, y, w, h
359 | Position_Page01=0, 0, 0, 790, 446 ;cmd, x, y, w, h
360 | FloatingWindow=0
361 | ShowSignalComments=1
362 | DisplayMask=1 ; pages 1
363 |
364 | [WINDOW_2]
365 | BufferSize=131071
366 | OnlyMeasurement=0
367 | DropTraceEvents=0
368 | DeltaTimeEnabled=0
369 | LoggingEnabled=0
370 | LoggingFilePath=
371 | LoggingOverwriteOnConfigLoad=0
372 | TraceChannelCount=2
373 | CopyColumnTitles=1
374 | ClearStart=1
375 | AbsoluteTimeEnabled=0
376 | ColumnCount=7
377 | Column_0=0, 120
378 | Column_1=257, 40
379 | Column_2=4, 80
380 | Column_3=1, 50
381 | Column_4=2, 35
382 | Column_5=3, 180
383 | Column_6=513, 180
384 | Title=Trace
385 | Type=16384
386 | Comment=Trace window
387 | Number=2
388 | Position=0, 0, 446, 790, 217 ;cmd, x, y, w, h
389 | Position_Page01=0, 0, 446, 790, 217 ;cmd, x, y, w, h
390 | FloatingWindow=0
391 | ShowSignalComments=1
392 | DisplayMask=1 ; pages 1
393 |
394 | [WINDOW_2_CHANNEL_1]
395 | Module=new_database
396 | Channel=0
397 | CustomColorFlag=0
398 | Color=0
399 |
400 | [WINDOW_2_CHANNEL_2]
401 | Module=new_database
402 | Channel=1
403 | CustomColorFlag=0
404 | Color=0
405 |
406 | [WINDOW_3]
407 | ShowTime=1
408 | TimeWidth=120
409 | CopyColumnTitles=1
410 | ClearStart=1
411 | AbsoluteTimeEnabled=0
412 | ColumnCount=3
413 | Column_0=2, 38
414 | Column_1=0, 120
415 | Column_2=1, 600
416 | Title=Write
417 | Type=128
418 | Comment=Write window
419 | Number=3
420 | Position=0, 790, 200, 610, 295 ;cmd, x, y, w, h
421 | Position_Page01=0, 790, 200, 610, 295 ;cmd, x, y, w, h
422 | FloatingWindow=0
423 | ShowSignalComments=1
424 | DisplayMask=1 ; pages 1
425 |
426 | [WINDOW_4]
427 | ComponentCount=1
428 | Title=
429 | Type=65536
430 | Comment=Multi view window
431 | Number=5
432 | Position=0, 790, 0, 500, 200 ;cmd, x, y, w, h
433 | Position_Page01=0, 790, 0, 500, 200 ;cmd, x, y, w, h
434 | FloatingWindow=0
435 | ShowSignalComments=1
436 | DisplayMask=1 ; pages 1
437 |
438 | [WINDOW_5]
439 | XLen=20000
440 | XMin=0
441 | XMax=20000
442 | Grid=1
443 | Mark=1
444 | YValue=1
445 | ShowLegend=2
446 | ShowLegendHeader=1
447 | LegendPixWidth=112
448 | LegendPixHeight=105
449 | LegendPos=2
450 | Optimize=1
451 | Average=0
452 | XYModeIndexP1=-1
453 | DisplayModeAuto=0
454 | XStart=0
455 | AbsoluteTimeMode=0
456 | YAxisWidth=54
457 | ObjectMode=0
458 | DisplayMode=0
459 | ShowSignalMode=0
460 | AxisScrollPos=-47
461 | LegendScrollPos=0
462 | LegendShowLifeValues=1
463 | ShowXScrollbar=1
464 | YAxisDynScaleEnabled=0
465 | YAxisDynScaleEnlarge=25
466 | TimeStickToZero=0
467 | ShowMinMax=1
468 | MARKER_TIME_1=5000000000
469 | MARKER_TIME_2=15000000000
470 | OscilloscopeEnabled=0
471 | OsciEventCount=0
472 | Title=Graphic
473 | Type=1
474 | Comment=Graphic window
475 | Number=6
476 | Position=0, 0, 0, 494, 178 ;cmd, x, y, w, h
477 | Position_Page01=0, 0, 0, 494, 178 ;cmd, x, y, w, h
478 | FloatingWindow=0
479 | JointIndex=5
480 | ShowSignalComments=1
481 | ComponentOrder=0
482 | ComponentSpace=100
483 | LEGEND_HSCROLL_POS=0
484 | LEGEND_SHARED_COLUMNS=1
485 | DisplayMask=1 ; pages 1
486 |
487 | [WINDOW_5_LEG_COLUMNS]
488 | COUNT=1
489 | COL_0=31, 112
490 |
491 | [WINDOWS]
492 | Count=5
493 |
494 | [Y_COMMON_AXIS_LIST]
495 | Count=0
496 |
497 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ape_test/pro/Project/canape.0-0-0.ini:
--------------------------------------------------------------------------------
1 | ;-------------------------------------------------------------------------------
2 | ;
3 | ; CANAPE.INI
4 | ; CANape Project Configuration
5 | ;
6 | ;-------------------------------------------------------------------------------
7 | ; This file must be located in the working directory.
8 | ; Most settings are created by CANape and don't need to be changed manually.
9 | ; All timings values in ms
10 | ;
11 | ; To create a new CANape project, use the 'Create new Project' Icon.
12 | ;-------------------------------------------------------------------------------
13 |
14 | [CONFIG]
15 | ; Configurations
16 | ;----------------
17 |
18 | [FILE_INFO]
19 | Identification=CANape-Project-File
20 | FileName=canape.ini
21 | FileNameAbsolute=
22 | WorkingDirectory=
23 | FileVersion=702
24 | PrgVersion=
25 | PrgDate=
26 | Description=
27 | CreationTime=11:11
28 | CreationDate=10/28/2008 ; Month/Day/Year
29 | ModificationTime=16:43
30 | ModificationDate=07/06/2010 ; Month/Day/Year
31 | Protected=0
32 |
33 |
34 | [ADDON]
35 | ; ADDONs
36 | ;--------
37 |
38 | ;ADDON1_TEXT=Script DEMO.SCR
39 | ;ADDON1_EXE=DEMO.SCR
40 | ;ADDON2_TEXT=Call STARTUP.SCR
41 | ;ADDON2_EXE=STARTUP.SCR
42 |
43 |
44 | [MACRO_LABELS]
45 | ; MACRO_LABELS
46 | ;--------------
47 | ;Here you can define your personal macro labels. You can use them
48 | ;inside the print dialog and inside the measurement comment dialog
49 | ;(MDF comment dialog). The MDF comment file interpreter will replace
50 | ;the labels with the defined text.
51 | ;The first 10 labels are displaied in the popup menu.
52 | ;The maximum count of labels is not limited.
53 |
54 | ;Example
55 | ;COMPANY=Vector Informatik GmbH
56 |
57 |
58 | [CAN1]
59 | ; CAN bittiming for all channel 1
60 | ; Format is C200/527 style, same as in CANalyzer
61 | ;--------------------------------
62 | BTR0=0x01
63 | BTR1=0x23
64 |
65 | [CAN2]
66 | ; CAN bittiming for all channel 2
67 | ;--------------------------------
68 | BTR0=0x01
69 | BTR1=0x23
70 |
71 | [CAN3]
72 | ; CAN bittiming for all channel 3
73 | ;--------------------------------
74 | BTR0=0x01
75 | BTR1=0x23
76 |
77 | [CAN4]
78 | ; CAN bittiming for all channel 4
79 | ;--------------------------------
80 | BTR0=0x01
81 | BTR1=0x23
82 |
83 |
84 | [CANAPE]
85 | ; General Settings
86 | ;------------------
87 |
88 | ; Last Directory management
89 | ; The following keys regulate the initial directory, if the file open/save
90 | ; dialogs are opened:
91 | ; SAVE_LAST_xxx_DIRECTORY = 0
92 | ; The initial directory is always the current working directory or the
93 | ; directory specified under the key xxx_DIR, if this key exist and isn't empty
94 | ; SAVE_LAST_xxx_DIRECTORY = 1
95 | ; The first time after each programm start the initial directory is the
96 | ; current working directory or the directory specified under the key
97 | ; xxx_DIR. After that the last selected directory is the initial
98 | ; directory. The last directory isn't saved at the end of the programm.
99 | ; SAVE_LAST_xxx_DIRECTORY = 2
100 | ; Same as 1, but the the last directory is saved to the key xxx_DIR at
101 | ; the end of the programm.
102 | ; xxx_DIR =
103 | ; This is the initial directory after each programm start.
104 | SAVE_LAST_MDF_DIRECTORY=1
105 | MEASUREMENT_DIR=
106 | SAVE_LAST_CFG_DIRECTORY=1
107 | CONFIGURATION_DIR=
108 | SAVE_LAST_SCR_DIRECTORY=1
109 | SCRIPT_DIR=
110 | SAVE_LAST_PAR_DIRECTORY=1
111 | PARAMETER_DIR=
112 |
113 | ; To store the measurement filename here in CANape.INI and not in the CNA file
114 | ; set GLOBAL_MEASUREMENT_FILE=1
115 | GLOBAL_MEASUREMENT_FILE=0
116 | ; If option 'global measurement file name' is enabled, this is the file name
117 | MEASUREMENT_FILE=CANapeData001.MDF
118 | ; File format version of created MDF measurement files
119 | ; 200 = CN_BLOCK with signal names limited to 32 characters.
120 | ; Longer names are coded into the comment block
121 | ; 210 = CN_BLOCK with extra TX_BLOCK for signal names > 32 characters.
122 | ; INCA V3.0 compatible, but CANape V2.x/3.0 and CANgraph V1.x/2.0
123 | ; (and other older programms) can NOT read this files!
124 | ; 300 = CN_BLOCK with extra TX_BLOCK for display name and optional byte offset
125 | ; to address signals behind 8kB inside a record.
126 | ; Optional usage of verbal conversion tables with a linear conversion
127 | ; 310 = New datatypes with Motorola byte order, Signals which goes over a
128 | ; byte boundary need not to begin on a byte boundary.
129 | ; 320 = Extended HDBLOCK with ns time stamp and information about time source
130 | ; and quality. Changed LINK from signed to unsigned long.
131 | ; Fill Bytes for DG block.
132 | ; 400 = ASAM standard (details and hints see CANape online help)
133 | MDF_FORMAT=320
134 |
135 | ; If CANape creates measurement files using a 32 bit integer
136 | ; datatype as time channel (like CANape 3.x) the internal
137 | ; time resolution of 1 ns can not be saved. So the time resolution
138 | ; must be set to a higher value:
139 | ; CANAPE time base used for MDF time stamps in millionth parts of a second
140 | ; allowed values are 1, 10, 100 (default) or 1000 (1 ms)
141 | ; The maximum measure time for MDF files depends on this setting:
142 | ;
143 | ; TIME_BASE | maximum measure time
144 | ; ----------------------------------------------------------
145 | ; 1000 | 49,7 Days (Windows timer overflow)
146 | ; 100 | 4,9 Days (119 hours, default and fix in CANape 2.0)
147 | ; 10 | 11,9 Hours (Timebase of CANalyzer/CANoe)
148 | ; 1 | 71,5 Minutes
149 | ;
150 | MDF_UINT32_TIME_BASE=10
151 |
152 | ; Enable logging of calibration commands to CANAPE.LOG
153 | LOG=0
154 |
155 | ; Force INCA compatible ASAP2 Export
156 | ; INCA/VS100 can't handle all of the ASAP2 features
157 | INCA=0
158 |
159 | ; Force CANape to enable measurement for all CHARACTERISTIC objects
160 | ; imported from ASAP2-files.
161 | ; 0=Only the calibrateflags are set for CHARACTERISTIC objects
162 | ; 1=The calibrateflag and the measureflag are enabled for CHARACTERISTIC-objects
163 | ASAP2_CHARACTERISTIC=0
164 |
165 | ; Enable DOS like keyboard selection in signal listboxes
166 | DOS_LISTBOX_MODE=0
167 |
168 | ; The Measure Marker in Graphic Display jumps to next Measure Point (not next Pixel)
169 | ; if you move them by cursors keys.
170 | KEY_SNAP_IN=0
171 |
172 | ; Disable measurement thread event notification
173 | ; Set notification level to
174 | WIN32_EVENT=32
175 |
176 | ; Don't stop measurement on CAN driver buffer overruns
177 | ; A message will be displayed when the first overrun occurs
178 | IGNORE_OVERFLOW=1
179 |
180 | ; Redraw mode of signals in graphic windows
181 | ; 0 = Syncron redraw. No redraw thread is started. Redraw of measurement signals
182 | ; with a lot of values will block the user interface
183 | ; 1 = Asyncrone redraw. Each graphic window use a thread for signal redraw,
184 | ; user commands are accept during redraw.
185 | ; 2 = Optimized asyncrone redraw.
186 | ; Note: Asyncrone redraw is deactivated during measurement.
187 | ; If CANape runs with Windows95/98, Asyncrone redraw is deactivated always.
188 | ASYNCRON_REDRAW=2
189 |
190 | ; Database Cache
191 | ; Only for CANape HEX-Editor: Count of cached databases (default is 2)
192 | ; To deaktivate the cache set the count to zero (0)
193 | DATABASE_CACHE_COUNT=2
194 |
195 | ; Synchronize Timestamps from CCP or CAN drivers
196 | ; Use only if the hardware CAN driver time synchronisation is turned of or
197 | ; to synchronise TCP/IP timestamps
198 | TIME_SYNC=0
199 |
200 | ; Internal
201 | LAST_MEASUREMENT_FILE=CANape.MDF
202 | FLUSH_MODE=0
203 | USE_MMTIMER=0
204 |
205 |
206 | [MEASUREMENT_DEFAULT_OPTIONS]
207 | ; Default measurement options
208 | ; If menu command "File|New Config" is selected, the following values are used
209 | ; as default for the measurement options.
210 | MaxTime=60000
211 | BufferSize=30000
212 | TimeAxis=20000
213 | TimeLimited=0
214 | BufferSizeMem=5120
215 | SaveMeasureData=1
216 | TimeMode=0
217 | YMode=1
218 | PollingAlways=1
219 | DrawLastValue=1
220 | AutoIncName=0
221 | ConverterId=
222 | UpdateCycleBar=100
223 | UpdateCycleVal=500
224 | UpdateCycleGraph=1000
225 | UpdateCycleArr=1000
226 | UpdateCycleWrt=100
227 | UpdateCycleTxt=1000
228 | TimeScrollSoft=0
229 | TimeScrollAt=100
230 | TimeScrollBy=100
231 | FitTimeAxis=1
232 | FitYAxis=0
233 | AutoSaveTime=60000
234 |
235 |
236 | [DEFAULT_DISPLAY]
237 | ; General settings for new displays
238 | ; First this section is readed, then the display type spezific
239 | ; section is readed. If a entry doesn't exist, in the display
240 | ; spezific section, the following settings are used:
241 | ;
242 | ; Use color of existing displays of the same object as default
243 | SAME_DEFAULT_COLOR=1
244 | ; Value format: 0=Hex, 1=Dec, 2=unused, 3=Phys, 4=Bin, 5=Ascii
245 | FORMAT=3
246 | ; Line between two points: 1=horizontal, 2=lined, 3=stairs
247 | LINE_TYPE=2
248 | ; Show Y-Axis of this signal in graphic windows
249 | SHOW_Y_AXIS=1
250 | ; X-Offset (time offset) in ms
251 | X_OFFSET=0
252 | ; Column width in characters for tabular text windows
253 | WIDTH=10
254 |
255 | [DEFAULT_GRAPH_DISPLAY]
256 | ; special settings for new graphic and digital displays
257 |
258 | [DEFAULT_TEXT_DISPLAY]
259 | ; special settings for new text displays
260 |
261 | [DEFAULT_BAR_DISPLAY]
262 | ; special settings for new bar displays
263 |
264 | [DEFAULT_VAL_DISPLAY]
265 | ; special settings for new val displays
266 |
267 |
268 | [WRITEWINDOW]
269 | ; Default BufferSize is 10kByte. This is enough for about 150 lines.
270 | ; Possible values are 1k - 65k Byte.
271 | BUFFERSIZE=10240
272 |
273 | ; Flag to configure the type of displaied messages. The flag is
274 | ; a bit mask, multiple flags can be combined. E.g. a value of 0xFF
275 | ; shows all messages. A value of 0x00 (zero) disables the write
276 | ; window, it can't be opend then.
277 | ; 0x01 Enables Clear message (should be set always)
278 | ; 0x02 Show messages from functions
279 | ; 0x04 Show warning messages
280 | ; 0x08 Show error messages
281 | ; 0x10 Show trigger messages (if a trigger is fired)
282 | ; 0x20 Show command messages (with a hand symbol)
283 | ; As default all messages are shown
284 | SHOW_MESSAGES=0xFF
285 |
286 | ; Flag to disable the jump to the write window in case of an error
287 | ; If this flag is not zero (default), the write window becomes
288 | ; visible if an error occurs
289 | SHOW_FOR_ERRORS=1
290 |
291 |
292 | [WINDOW]
293 | ; CANape internal settings
294 | ;--------------------------
295 | X=0
296 | Y=0
297 | H=600
298 | W=800
299 | STATE=1
300 | CHILD_TOOL_LOC=1
301 | MAIN_TOOL_LOC=1
302 |
303 |
304 | [COLORS]
305 | ; If you want to save your own window background color set this option to 0
306 | USE_DEFAULT_BACKGROUND=1
307 | ; Color settings:
308 |
309 |
310 | [DB_EXPLORER]
311 | ; If CANape terminates with a blue screen after opening a dialog
312 | ; with a tree view set DO_NOT_LOAD_IMAGELIST=1
313 | DO_NOT_LOAD_IMAGELIST=0
314 | ; Database explorer
315 | EDITOR_X=44
316 | EDITOR_Y=44
317 | EDITOR_W=960
318 | EDITOR_H=750
319 | EDITOR_TV_W=200
320 | SELECT_X=100
321 | SELECT_Y=50
322 | SELECT_W=824
323 | SELECT_H=510
324 | SELECT_TV_W=150
325 | SELECT_COLW_NAME=150
326 | SELECT_COLW_ADDRESS=0
327 | SELECT_COLW_DATATYP=0
328 | SELECT_COLW_COMMENT=250
329 | EDITOR_COLW_NAME=230
330 | EDITOR_COLW_ADDRESS=90
331 | EDITOR_COLW_DATATYP=70
332 | EDITOR_COLW_COMMENT=250
333 |
334 |
335 | [ASAP2_EXPORT]
336 | CREATE_IF_DATA_CCP=1
337 | CREATE_IF_DATA_KWP2000=0
338 | CREATE_IF_DATA_ETK=0
339 | FORMAT=2
340 |
341 |
342 | [PARTIAL_LOAD_EXPLORER]
343 |
344 |
345 | [CONVERTER]
346 | ; Last used measurement file extension
347 | LAST=.mdf
348 |
349 | ; Save/load the import/export converter options from this
350 | ; ini file -> set LOCAL_CONVERTER_OPTIONS=1 (default)
351 | ; To save/load the options from VECTOR.INI set
352 | ; LOCAL_CONVERTER_OPTIONS=0
353 | LOCAL_CONVERTER_OPTIONS=1
354 |
355 |
356 | [FUNCTIONS]
357 |
358 | ; Functions
359 | ;-----------------------------------------------
360 |
361 | COUNT=0
362 |
363 | [FUNCTION_1]
364 | [FUNCTION_2]
365 | [FUNCTION_3]
366 | [FUNCTION_4]
367 | [FUNCTION_5]
368 | [FUNCTION_6]
369 | [FUNCTION_7]
370 | [FUNCTION_8]
371 | [FUNCTION_9]
372 | [FUNCTION_10]
373 | [FUNCTION_11]
374 | [FUNCTION_12]
375 | [FUNCTION_13]
376 | [FUNCTION_14]
377 | [FUNCTION_15]
378 | [FUNCTION_16]
379 | [FUNCTION_17]
380 | [FUNCTION_18]
381 | [FUNCTION_19]
382 |
383 |
384 | [MODULES]
385 |
386 | ; Modules
387 | ;-----------------------------------------------
388 |
389 | COUNT=0
390 |
391 |
392 |
393 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/bin/RAM.elf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/bin/RAM.elf
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/bin/internal_FLASH.elf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/bin/internal_FLASH.elf
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/ccp_test_32.old.mcp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/ccp_test_32.old.mcp
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/ccp_test_32.old.old.mcp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/ccp_test_32.old.old.mcp
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/ccp_test_32.old.old_Data/CWSettingsWindows.stg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/ccp_test_32.old.old_Data/CWSettingsWindows.stg
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/ccp_test_32.old.old_Data/RAM/TargetDataWindows.tdt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/ccp_test_32.old.old_Data/RAM/TargetDataWindows.tdt
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/ccp_test_32.old.old_Data/internal_FLASH/TargetDataWindows.tdt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/ccp_test_32.old.old_Data/internal_FLASH/TargetDataWindows.tdt
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/ccp_test_32.old_Data/CWSettingsWindows.stg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/ccp_test_32.old_Data/CWSettingsWindows.stg
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/ccp_test_32.old_Data/RAM/TargetDataWindows.tdt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/ccp_test_32.old_Data/RAM/TargetDataWindows.tdt
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/ccp_test_32.old_Data/internal_FLASH/TargetDataWindows.tdt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/ccp_test_32.old_Data/internal_FLASH/TargetDataWindows.tdt
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/ccp_test_32_Data/CWSettingsWindows.stg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/ccp_test_32_Data/CWSettingsWindows.stg
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/ccp_test_32_Data/RAM/TargetDataWindows.tdt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/ccp_test_32_Data/RAM/TargetDataWindows.tdt
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/ccp_test_32_Data/internal_FLASH/TargetDataWindows.tdt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/ccp_test_32_Data/internal_FLASH/TargetDataWindows.tdt
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/config.t32:
--------------------------------------------------------------------------------
1 |
2 |
3 | ; Environment variables
4 | OS=
5 | ID=T32
6 | TMP=C:\T32\Temp
7 | SYS=C:\T32
8 |
9 |
10 | PBI=
11 | USB
12 |
13 | ; Printer settings
14 | PRINTER=WINDOWS
15 |
16 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/jpc564xa.cmm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/jpc564xa.cmm
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/lcf/MPC5644A.lcf:
--------------------------------------------------------------------------------
1 | /* lcf file for MPC560xB processors */
2 | /* */
3 | /* Note internal memory configurations vary among the various family */
4 | /* devices. */
5 | /* */
6 | /* +-----------+------------+ */
7 | /* | Device | MPC5644A | */
8 | /* +-----------+------------+ */
9 | /* |SRAM/Flash | 192KB/ | */
10 | /* | | 4MB | */
11 | /* +-----------+------------+ */
12 | /* */
13 | /* These memory definitions will allow the stationery example to run on */
14 | /* the smallest */
15 |
16 | MEMORY
17 | {
18 | resetvector: org = 0x00000000, len = 0x00000008
19 | init: org = 0x00000020, len = 0x00000FE0
20 | exception_handlers: org = 0x00001000, len = 0x00001000
21 | internal_flash: org = 0x00002000, len = 0x003FE000
22 | internal_ram: org = 0x40000000, len = 0x00020000
23 | heap : org = 0x40020000, len = 0x00008000
24 | stack : org = 0x40028000, len = 0x00008000
25 |
26 | }
27 |
28 | /* This will ensure the rchw and reset vector are not stripped by the linker */
29 | FORCEACTIVE { "bam_rchw" "bam_resetvector" }
30 |
31 | SECTIONS
32 | {
33 | .__bam_bootarea LOAD (0x00000000): {} > resetvector
34 |
35 | GROUP : {
36 | .init LOAD (0x00000020) : {}
37 | .init_vle (VLECODE) LOAD (_e_init) : {
38 | *(.init)
39 | *(.init_vle)
40 | }
41 | } > init
42 |
43 | GROUP : {
44 | .ivor_branch_table (VLECODE) LOAD (0x00001000) : {}
45 | .__exception_handlers (VLECODE) LOAD (_e_ivor_branch_table) : {}
46 | } > exception_handlers
47 |
48 | GROUP : {
49 | .text : {}
50 | .text_vle (VLECODE) ALIGN(0x08): {
51 | *(.text)
52 | *(.text_vle)
53 | }
54 | .rodata (CONST) : {
55 | *(.rdata)
56 | *(.rodata)
57 | }
58 | .ctors : {}
59 | .dtors : {}
60 | extab : {}
61 | extabindex : {}
62 | } > internal_flash
63 |
64 | GROUP : {
65 | .__uninitialized_intc_handlertable ALIGN(2048) : {}
66 | .data : {}
67 | .sdata : {}
68 | .sbss : {}
69 | .sdata2 : {}
70 | .sbss2 : {}
71 | .bss : {}
72 | } > internal_ram
73 | }
74 |
75 | /* Freescale CodeWarrior compiler address designations */
76 |
77 | _stack_addr = ADDR(stack)+SIZEOF(stack);
78 | _stack_end = ADDR(stack);
79 | _heap_addr = ADDR(heap);
80 | _heap_end = ADDR(heap)+SIZEOF(heap);
81 |
82 |
83 | /* Exceptions Handlers Location (used in Exceptions.c IVPR initialization)*/
84 |
85 | EXCEPTION_HANDLERS = ADDR(exception_handlers);
86 |
87 | /* L2 SRAM Location (used for L2 SRAM initialization) */
88 |
89 | L2SRAM_LOCATION = 0x40000000;
90 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/lcf/MPC5644A_DEBUG.lcf:
--------------------------------------------------------------------------------
1 | /* lcf file for MPC560xB (debug RAM version) */
2 | /* Note internal memory configurations vary among the various family */
3 | /* devices. */
4 | /* */
5 | /* +-----------+------------+ */
6 | /* | Device | MPC5644A | */
7 | /* +-----------+------------+ */
8 | /* |SRAM/Flash | 192KB/ | */
9 | /* | | 4MB | */
10 | /* +-----------+------------+ */
11 | /* */
12 | /* These memory definitions will allow the stationery example to run on */
13 | /* the smallest */
14 |
15 | MEMORY
16 | {
17 | pseudo_rom: org = 0x40000000, len = 0x00003000
18 | init: org = 0x40003000, len = 0x00001000
19 | exception_handlers: org = 0x40004000, len = 0x00001000
20 | internal_ram: org = 0x40005000, len = 0x0001B000
21 | heap : org = 0x40020000, len = 0x00008000
22 | stack : org = 0x40028000, len = 0x00008000
23 | }
24 |
25 | SECTIONS
26 | {
27 | GROUP : {
28 | .init : {}
29 | .init_vle (VLECODE) : {
30 | *(.init)
31 | *(.init_vle)
32 | }
33 | } > init
34 |
35 | GROUP : {
36 | .ivor_branch_table (VLECODE) ALIGN (4096) : {}
37 | .__exception_handlers (VLECODE) LOAD (_e_ivor_branch_table) : {}
38 | } > exception_handlers
39 |
40 | GROUP : {
41 | .text (TEXT) ALIGN(0x10) : {}
42 | .text_vle (VLECODE) ALIGN(0x10): {
43 | *(.text)
44 | *(.text_vle)
45 | }
46 | .rodata (CONST) : {
47 | *(.rdata)
48 | *(.rodata)
49 | }
50 | .ctors : {}
51 | .dtors : {}
52 | extab : {}
53 | extabindex : {}
54 | } > pseudo_rom
55 |
56 | GROUP : {
57 | .__uninitialized_intc_handlertable ALIGN(0x10) : {}
58 | .data : {}
59 | .sdata : {}
60 | .sbss : {}
61 | .sdata2 : {}
62 | .sbss2 : {}
63 | .bss : {}
64 | } > internal_ram
65 | }
66 |
67 | /* Freescale CodeWarrior compiler address designations */
68 |
69 | _stack_addr = ADDR(stack)+SIZEOF(stack);
70 | _stack_end = ADDR(stack);
71 | _heap_addr = ADDR(heap);
72 | _heap_end = ADDR(heap)+SIZEOF(heap);
73 |
74 | /* Exceptions Handlers Location (used in Exceptions.c for IVPR initialization) */
75 |
76 | EXCEPTION_HANDLERS = ADDR(exception_handlers);
77 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/readme.txt:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------
2 | // Readme.txt
3 | //------------------------------------------------------------------------
4 | This project stationery is designed to get you up and running
5 | quickly with CodeWarrior on your MPC5644A target.
6 |
7 | The wizard has created the following CodeWarrior target(s):
8 |
9 |
10 | The targets are set up for the selected CPU and options,
11 | but can be easily modified.
12 |
13 | *************
14 | * IMPORTANT *
15 | *************
16 |
17 | If your application will run from flash memory, you should
18 | initialize some additional registers to improve system
19 | performance. For MPC551x devices, initialize the PFCRP0 and
20 | PFCRP1 registers; for other devices, initialize the BIUCR.
21 |
22 | Please review the MPC5644A reference manual to determine
23 | appropriate values.
24 |
25 | Sample code for the following language(s) is at your disposal:
26 |
27 |
28 | Other options may be available:
29 |
30 | //------------------------------------------------------------------------
31 | // Getting Started
32 | //------------------------------------------------------------------------
33 | To build your project, use the menu Project > Make or press F7.
34 | This will build the selected target.
35 |
36 | //------------------------------------------------------------------------
37 | // Project structure
38 | //------------------------------------------------------------------------
39 | The project generated contains various files/groups:
40 | - readme.txt: this file
41 | - Sources: folder with the application source code
42 | - Header Files: all application and runtime header files
43 | - Startup Code: user customizable startup code
44 | - Lcf Files: the linker command files for the different build targets.
45 | - Runtime: the libraries
46 |
47 | //------------------------------------------------------------------------
48 | // Adding your own code
49 | //------------------------------------------------------------------------
50 | Once everything is working as expected, you can begin adding your own code
51 | to the project. Keep in mind that we provide this as an example of how to
52 | get up and running quickly with CodeWarrior. There are certainly other
53 | ways to handle interrupts and set up your linker command file. Feel free
54 | to modify any of the source files provided.
55 |
56 | //------------------------------------------------------------------------
57 | // Additional documentation
58 | //------------------------------------------------------------------------
59 | Read the online documentation provided. From within the CodeWarrior IDE,
60 | select Help > CodeWarrior Help.
61 |
62 | //------------------------------------------------------------------------
63 | // Contacting Freescale
64 | //------------------------------------------------------------------------
65 | For bug reports, technical questions, and suggestions, please use the
66 | forms installed in the Release_Notes folder and send them to:
67 |
68 | cw_support@freescale.com
69 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/source/CAN/CAN.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/source/CAN/CAN.c
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/source/CAN/CAN.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/source/CAN/CAN.h
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/source/CAN/IntcInterrupts.c:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * FILE: IntcInterrupts.c
4 | *
5 | * DESCRIPTION: Contains an implementations of generic interrupt
6 | * controller handling routines for the MPC55xx.
7 | */
8 |
9 | /*---------------------------------------------------------------------------*/
10 | /* By default we do not use nested interrupts, interrupts are handled in C. */
11 | /* In case you want to use nested interrupts, set INTC_NESTED_INTERRUPT. */
12 | /* In this case make sure all the needed registers are saved in the prolog */
13 | /* and epilog of asm void INTC_INTCInterruptHandler(void) */
14 | /*---------------------------------------------------------------------------*/
15 |
16 | #ifndef INTC_NESTED_INTERRUPT
17 | #define INTC_NESTED_INTERRUPT 0
18 | #endif
19 |
20 | /*---------------------------------------------------------------------------*/
21 | /* Includes */
22 | /*---------------------------------------------------------------------------*/
23 |
24 | #include "MPC5644A.h" /* MPC55xx platform development header */
25 |
26 | #include "IntcInterrupts.h" /* Implement functions from this file */
27 |
28 | /*---------------------------------------------------------------------------*/
29 | /* Inline Assembler Defines */
30 | /*---------------------------------------------------------------------------*/
31 |
32 | /** This macro allows to use C defined address with the inline assembler */
33 | #define MAKE_HLI_ADDRESS(hli_name, c_expr) /*lint -e753 */enum { hli_name=/*lint -e30*/((int)(c_expr)) /*lint -esym(749, hli_name) */ };
34 |
35 | /** Address of the IACKR Interrupt Controller register. */
36 | MAKE_HLI_ADDRESS(INTC_IACKR, &INTC.IACKR.R)
37 | /** Address of the EOIR End-of-Interrupt Register register. */
38 | MAKE_HLI_ADDRESS(INTC_EOIR, &INTC.EOIR.R)
39 |
40 | /** Address of the MCR -- used for e200z0h initialization */
41 | MAKE_HLI_ADDRESS(INTC_MCR, &INTC.MCR.R)
42 |
43 | /*---------------------------------------------------------------------------*/
44 | /* Function Implementations */
45 | /*---------------------------------------------------------------------------*/
46 |
47 | /** This is the Interrupt Service Routine Branch Table placed in memory */
48 | #define INTC_INTERRUPTS_REQUEST_VECTOR_TABLE_SIZE (308*4)
49 |
50 | #pragma push /* Save the current state */
51 | #pragma section data_type ".__initialized_intc_handlertable" ".__uninitialized_intc_handlertable"
52 | /* The INTC vector table will be placed in RAM.
53 | We will use the ".__uninitialized_intc_handlertable" name to do the
54 | placement in the Linker Command File (.lcf) to avoid the initialization at
55 | startup time. This will decrease the code size, but the table won't be
56 | initialized to zero.
57 | */
58 | INTCInterruptFn INTCInterruptsHandlerTable[INTC_INTERRUPTS_REQUEST_VECTOR_TABLE_SIZE];
59 | #pragma pop
60 |
61 | #pragma push /* save the current state */
62 | #pragma force_active on
63 | #pragma function_align 16 /* We use 16 bytes alignment for Exception handlers */
64 | /** Handle the interrupt source by jumping to the ISR branch table (IACKR) */
65 |
66 | #if INTC_NESTED_INTERRUPT == 0
67 |
68 | __declspec(interrupt)
69 | __declspec(section ".__exception_handlers")
70 | void INTC_INTCInterruptHandler(void)
71 | {
72 | INTCInterruptFn *handlerFn = (INTCInterruptFn*)(*(unsigned int*)&INTC.IACKR.R);
73 |
74 | (**handlerFn)();
75 |
76 | INTC.EOIR.R = 0;
77 | }
78 |
79 | #else
80 |
81 | __declspec(interrupt)
82 | __declspec(section ".__exception_handlers")
83 | __asm void INTC_INTCInterruptHandler(void)
84 | {
85 | nofralloc
86 | prolog:
87 | stwu r1, -0x50 (r1) /* Create stack frame */
88 | stw r0, 0x24 (r1) /* Store r0 working register */
89 |
90 | /* Save SRR0 and SRR1 */
91 | mfsrr1 r0 /* Store SRR1 (must be done before enabling EE) */
92 | stw r0, 0x10 (r1)
93 | mfsrr0 r0 /* Store SRR0 (must be done before enabling EE) */
94 | stw r0, 0x0C (r1)
95 |
96 | /* Clear request to processor; r3 contains the address of the ISR */
97 | stw r3, 0x28 (r1) /* Store r3 */
98 | lis r3, INTC_IACKR@h /* Read pointer into ISR Vector Table & store in r3 */
99 | ori r3, r3, INTC_IACKR@l
100 | lwz r3, 0x0(r3) /* Load INTC_IACKR, which clears request to processor */
101 | lwz r3, 0x0(r3) /* Read ISR address from ISR Vector Table using pointer */
102 |
103 | /* Enable processor recognition of interrupts */
104 | wrteei 1 /* Set MSR[EE]=1 */
105 |
106 | /* Save rest of context required by EABI */
107 | stw r12, 0x4C (r1) /* Store r12 */
108 | stw r11, 0x48 (r1) /* Store r11 */
109 | stw r10, 0x44 (r1) /* Store r10 */
110 | stw r9, 0x40 (r1) /* Store r9 */
111 | stw r8, 0x3C (r1) /* Store r8 */
112 | stw r7, 0x38 (r1) /* Store r7 */
113 | stw r6, 0x34 (r1) /* Store r6 */
114 | stw r5, 0x30 (r1) /* Store r5 */
115 | stw r4, 0x2C (r1) /* Store r4 */
116 | mfcr r0 /* Store CR */
117 | stw r0, 0x20 (r1)
118 | mfxer r0 /* Store XER */
119 | stw r0, 0x1C (r1)
120 | mfctr r0 /* Store CTR */
121 | stw r0, 0x18 (r1)
122 | mflr r0 /* Store LR */
123 | stw r0, 0x14 (r1)
124 |
125 | /* Branch to ISR handler address from SW vector table */
126 | mtlr r3 /* Store ISR address to LR to use for branching later */
127 | blrl /* Branch to ISR, but return here */
128 |
129 | epilog:
130 | /* Restore context required by EABI (except working registers) */
131 | lwz r0, 0x14 (r1) /* Restore LR */
132 | mtlr r0
133 | lwz r0, 0x18 (r1) /* Restore CTR */
134 | mtctr r0
135 | lwz r0, 0x1C (r1) /* Restore XER */
136 | mtxer r0
137 | lwz r0, 0x20 (r1) /* Restore CR */
138 | mtcrf 0xff, r0
139 | lwz r5, 0x30 (r1) /* Restore r5 */
140 | lwz r6, 0x34 (r1) /* Restore r6 */
141 | lwz r7, 0x38 (r1) /* Restore r7 */
142 | lwz r8, 0x3C (r1) /* Restore r8 */
143 | lwz r9, 0x40 (r1) /* Restore r9 */
144 | lwz r10, 0x44 (r1) /* Restore r10 */
145 | lwz r11, 0x48 (r1) /* Restore r11 */
146 | lwz r12, 0x4C (r1) /* Restore r12 */
147 |
148 | /* Disable processor recognition of interrupts */
149 | wrteei 0
150 |
151 | /* Ensure interrupt flag has finished clearing */
152 | mbar 0
153 |
154 | /* Write 0 to INTC_EOIR, informing INTC to lower priority */
155 | li r3, 0
156 | lis r4, INTC_EOIR@h /* Load upper half of INTC_EOIR address to r4 */
157 | ori r4, r4, INTC_EOIR@l
158 | stw r3, 0(r4) /* Write 0 to INTC_EOIR */
159 |
160 | /* Restore Working Registers */
161 | lwz r3, 0x28 (r1) /* Restore r3 */
162 | lwz r4, 0x2C (r1) /* Restore r4 */
163 |
164 | /* Retrieve SRR0 and SRR1 */
165 | lwz r0, 0x0C (r1) /* Restore SRR0 */
166 | mtsrr0 r0
167 | lwz r0, 0x10 (r1) /* Restore SRR1 */
168 | mtsrr1 r0
169 |
170 | /* Restore Other Working Registers */
171 | lwz r0, 0x24 (r1) /* Restore r0 */
172 |
173 | /* Restore space on stack */
174 | addi r1, r1, 0x50
175 |
176 | /* End of Interrupt */
177 | rfi
178 | }
179 |
180 | #endif
181 |
182 | #pragma force_active off
183 | #pragma pop
184 |
185 | /**
186 | * This function can be used to install an interrupt handler for a given
187 | * interrupt vector. It will also set the Priority Status Register for the
188 | * source to the one given
189 | */
190 | void INTC_InstallINTCInterruptHandler(INTCInterruptFn handlerFn, unsigned short vectorNum,
191 | unsigned char psrPriority)
192 | {
193 | /* Set the function pointer in the ISR Handler table */
194 | INTCInterruptsHandlerTable[vectorNum] = handlerFn;
195 | /* Set the PSR Priority */
196 | INTC.PSR[vectorNum].B.PRI = psrPriority;
197 | }
198 |
199 | /**
200 | * This function will setup the PowerPC Zen core to jump to an Interrupt Service Routine
201 | * handler. This function can be used from user_init() (no stack frame, no memory access).
202 | */
203 | __asm void INTC_InitINTCInterrupts( void )
204 | {
205 | nofralloc
206 |
207 | mflr r29
208 |
209 | /* IVOR4 is for external interrupts (special purpose register #404)
210 | * This code enables the ISR handler for external interrupt code to address
211 | * INTC_INTCInterruptHandler (incl. large address by setting the IVPR value).
212 | */
213 | lis r0, INTC_INTCInterruptHandler@h
214 | ori r0, r0, INTC_INTCInterruptHandler@l
215 |
216 | #if !defined(Z0H_CORE)
217 | mtivor4 r0
218 | #else
219 | /* Set INTC.MCR = 0 VTES 4-bytes, HVEN - SW vector mode */
220 | lis r0,0
221 | lis r3,INTC_MCR@ha
222 | stw r0, INTC_MCR@l(r3)
223 | #endif
224 |
225 | /* Enable external interrupts in the Machine State Register. Set MSR[EE]=1. */
226 | wrteei 1
227 |
228 | /* Set the location of the ISR Handler Table in INTC IACKR Register */
229 | lis r0, INTCInterruptsHandlerTable@h
230 | ori r0, r0, INTCInterruptsHandlerTable@l
231 | lis r3,INTC_IACKR@h
232 | ori r3,r3,INTC_IACKR@l
233 | stw r0, 0(r3)
234 |
235 | mtlr r29
236 |
237 | blr
238 | }
239 |
240 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/source/CAN/IntcInterrupts.h:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * FILE: IntcInterrupts.h
4 | *
5 | * DESCRIPTION: Contains defines for utilizing the Interrupt Controller in the MPC5500.
6 | * There is also the function prototypes for the common interrupt handling
7 | * routines to be used on the MPC55xx (PowerPC Zen core).
8 | *
9 | */
10 |
11 | #ifndef _INTCINTERRUPTS_H_
12 | #define _INTCINTERRUPTS_H_
13 |
14 | /*----------------------------------------------------------------------------*/
15 | /* Types */
16 | /*----------------------------------------------------------------------------*/
17 |
18 | /** All interrupt handlers should be of this type */
19 | typedef void(*INTCInterruptFn)(void);
20 |
21 | /*----------------------------------------------------------------------------*/
22 | /* Function declarations */
23 | /*----------------------------------------------------------------------------*/
24 |
25 | #ifdef __cplusplus
26 | extern "C" {
27 | #endif
28 |
29 | /**
30 | * This function will setup the PowerPC Zen core to jump to an Interrupt Service Routine
31 | * handler. This function can be used from user_init() (no stack frame, no memory access).
32 | */
33 | __asm void INTC_InitINTCInterrupts(void);
34 |
35 | /**
36 | * This function can be used to install an interrupt handler for a given
37 | * interrupt vector. It will also set the Priority Status Register for the
38 | * source to the one given.
39 | * parameter handlerFn: The function to call when the interrupt occurs.
40 | * parameter vectoryNum: The number of the INTC Interrupt Request Source we wish
41 | * to install the handler for.
42 | * parameter psrPriority: The priority to set in the Interrupt Controller Priority
43 | * Select Register.
44 | */
45 | void INTC_InstallINTCInterruptHandler(INTCInterruptFn handlerFn, unsigned short vectorNum,
46 | unsigned char psrPriority);
47 |
48 | #pragma section RX ".__exception_handlers"
49 |
50 | /**
51 | * This function is used to Handle the interrupt source by jumping to the ISR
52 | * branch table (IACKR)
53 | */
54 | __declspec (section ".__exception_handlers") void INTC_INTCInterruptHandler(void);
55 |
56 | #ifdef __cplusplus
57 | }
58 | #endif
59 |
60 | #endif
61 |
62 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/source/CAN/SPI.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/source/CAN/SPI.c
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/source/CAN/SPI.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/source/CAN/SPI.h
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/source/CAN/ZTypes.h:
--------------------------------------------------------------------------------
1 | #ifndef _BMS_ZTYPES_H
2 | #define _BMS_ZTYPES_H
3 | typedef unsigned char UINT_8;
4 | typedef volatile unsigned char VUINT_8;
5 | typedef char INT_8;
6 | typedef volatile char VINT_8;
7 |
8 | typedef unsigned short UINT_16;
9 | typedef volatile unsigned short VUINT_16;
10 | typedef int INT_16;
11 | typedef volatile short VINT_16;
12 |
13 | typedef unsigned int UINT_32;
14 | typedef volatile unsigned int VUINT_32;
15 | typedef int INT_32;
16 | typedef volatile int VINT_32;
17 |
18 |
19 | /*system clock 120Mhz*/
20 | #define SYSTEM_CLOCK 120
21 | #define INTERRUPT_PRIORITY 15
22 |
23 | #endif
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/source/CAN/can_message.h:
--------------------------------------------------------------------------------
1 | /* $Revision: 1.1.6.13 $ */
2 | /**
3 | * @file: can_message.h
4 | *
5 | * Purpose: Declare custom and register CAN datatype.
6 | *
7 | * $Authors: Shankar Subramanian $
8 | *
9 | * $Copyright: 2008 The MathWorks, Inc.$
10 | *
11 | * $Date: 2011/05/13 18:05:25 $
12 | */
13 |
14 | #ifndef __CANMESSAGE__HEADER__
15 | #define __CANMESSAGE__HEADER__
16 | #include "tmwtypes.h"
17 |
18 | /* @DO NOT REMOVE: The following typedef is required for targets (FM5, C166 etc.) to actually
19 | use it for their code generation TLC file. Since their datatype is being
20 | discarded, this is being defined in our header which they will be referencing.*/
21 | typedef enum { CAN_MESSAGE_STANDARD, CAN_MESSAGE_EXTENDED } CanFrameType;
22 |
23 | /* Define invalid CAN Identifier value. This can be used to specify invalid CAN Message
24 | This represents a uint32_T value */
25 | #define INVALID_CAN_ID 0xFFFFFFFF
26 |
27 | /*
28 | The CAN_DATATYPE structure has been structured so that it is tightly packed.
29 | Size of structure (without timestamp field) :16 bytes
30 | Size of structure (with timestamp field) :24 bytes
31 | */
32 | typedef struct {
33 | /* Is Extended frame */
34 | uint8_T Extended;
35 |
36 | /* Length */
37 | uint8_T Length;
38 |
39 | /* RTR */
40 | uint8_T Remote;
41 |
42 | /* Error */
43 | uint8_T Error;
44 |
45 | /* CAN ID */
46 | uint32_T ID;
47 |
48 | /*
49 | TIMESTAMP_NOT_REQUIRED is a macro that will be defined by Target teams
50 | PIL, C166, FM5, xPC if they do not require the timestamp field during code
51 | generation. By default, timestamp is defined. If the targets do not require
52 | the timestamp field, they should define the macro TIMESTAMP_NOT_REQUIRED before
53 | including this header file for code generation.
54 | */
55 | #ifndef TIMESTAMP_NOT_REQUIRED
56 |
57 | /* Timestamp */
58 | double Timestamp;
59 |
60 | #endif
61 |
62 | /* Data field */
63 | uint8_T Data[8];
64 | } CAN_MESSAGE;
65 |
66 | typedef CAN_MESSAGE CAN_DATATYPE;
67 |
68 | /**
69 | * Hold 1xN array of CAN_DATATYPE
70 | *
71 | * @param nmsgs: Indicates how many messages are in the array.
72 | * @param canMsg: The array of messages.
73 | */
74 | typedef struct {
75 | int nmsgs;
76 | CAN_DATATYPE* canMsg;
77 | } CAN_DATATYPE_ARRAY;
78 |
79 | /**
80 | * Hold CAN ID information.
81 | *
82 | * @param nmsgs: Indicates how many messages are in the array.
83 | * @param canMsg: The array of messages.
84 | */
85 | typedef struct {
86 | size_t nIDs;
87 | uint32_T* IDs;
88 | } CAN_ID_ARRAY;
89 |
90 | /**
91 | * Initialize a CAN message.
92 | *
93 | * @param CAN_DATATYPE: CAN Message structure
94 | */
95 | void initializeCANMessage(CAN_DATATYPE* canmsg, uint8_T Extended);
96 |
97 | #endif
98 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/source/ccp/CCP.C:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/source/ccp/CCP.C
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/source/ccp/CCPPAR.H:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 |
3 | File Name : ccppar.c
4 | Date : 09.07.2001
5 | Version : 1.1
6 | Desciption : customization header for ccp.c
7 | CCP driver example
8 | see CCP.DOC for a complete description of all options
9 |
10 | *******************************************************************************/
11 |
12 |
13 | // -----------------------------------------------------------------------------
14 | // DEFINITION
15 | // -----------------------------------------------------------------------------
16 | #ifndef __CCPPAR_H__
17 | #define __CCPPAR_H__
18 | #define CCP_MOTOROLA
19 | #define C_MINI_CAN_DRIVER
20 |
21 | /*----------------------------------------------------------------------------*/
22 | /* Platform independant types */
23 |
24 | #define BYTE unsigned char
25 |
26 | #define WORD unsigned short
27 | #define DWORD unsigned long
28 | #define BYTEPTR unsigned char*
29 | #define MTABYTEPTR BYTEPTR
30 | #define ROM
31 | #define RAM
32 |
33 | /* #define DAQBYTEPTR */
34 | /* #define MTABYTEPTR */
35 |
36 | /*----------------------------------------------------------------------------*/
37 | /* Disable/Enable Interrupts */
38 |
39 |
40 | /* Has to be defined if ccpSendCallBack may interrupt ccpDaq */
41 |
42 |
43 | extern void disable_interrupt(void);
44 | extern void enable_interrupt(void);
45 |
46 | #define CCP_DISABLE_INTERRUPT disable_interrupt();
47 | #define CCP_ENABLE_INTERRUPT enable_interrupt();
48 |
49 |
50 | /*----------------------------------------------------------------------------*/
51 |
52 |
53 | /* CCP parameters */
54 |
55 | /* CCP Identifiers and Address */
56 | #define CCP_STATION_ADDR 0x0000 /* Define CCP_STATION_ADDR in Intel Format */
57 | /* High/Low byte swapped on motorola machines !!! (0x3900) */
58 |
59 | #define CCP_STATION_ID "Ccptest080709" /* Plug&Play station identification */
60 |
61 | #define CCP_DTO_ID 0x101 /* CAN identifier ECU -> Master */
62 | #define CCP_CRO_ID 0x100 /* CAN identifier Master -> ECU */
63 |
64 |
65 |
66 | /*----------------------------------------------------------------------------*/
67 | /* CCP Data Acuisition Parameters */
68 |
69 | #define CCP_DAQ /* Enable synchronous data aquisition in ccpDaq() */
70 | #define CCP_MAX_ODT 3 /* Number of ODTs in each DAQ lists */
71 | #define CCP_MAX_DAQ 2 /* Number of DAQ lists */
72 |
73 |
74 | /*----------------------------------------------------------------------------*/
75 | /* CCP Options */
76 |
77 | /* Use the transmit queue in CCP.C */
78 | /* Complete sampling is done in ccpDaq(x) and the messages are written into the queue */
79 | #define CCP_SEND_QUEUE
80 |
81 | /* Indicate queue overruns in the msb of pid */
82 | /* Will be displayed in CANape's status bar if CANAPE.INI: [asap1a] check_overflow=1 */
83 | #define CCP_SEND_QUEUE_OVERRUN_INDICATION
84 |
85 | /* Transmit only one message in one call to ccpDaq() */
86 | /* #define CCP_SEND_SINGLE */
87 |
88 | /* Use GET_SEED and UNLOCK */
89 | /* This is usually user dependant, just a skeleton here */
90 | /*#define CCP_SEED_KEY*/
91 |
92 | /* Implement the flash programming feature in the ECU*/
93 | /* This is usually user dependant, just a skeleton here */
94 | // #define CCP_PROGRAM
95 |
96 | /* Activate the flash programming kernel download */
97 | #define CCP_BOOTLOADER_DOWNLOAD
98 |
99 | /* Implement the memory checksum feature */
100 | /* The checksum will be calculated in ccpBackground() */
101 | /* This may be implementation specific */
102 | #define CCP_CHECKSUM
103 | #define CCP_CHECKSUM_TYPE WORD
104 |
105 | /* Use a 16 bit CRC algorithm */
106 | /* Note:
107 | This will need additional 512 byte of ROM
108 | CCP_CHECKSUM_TYPE has to be WORD !
109 | */
110 | /* #define CCP_CHECKSUM_CCITT*/
111 |
112 | /* Check for pending CCP commands in ccpBackground() */
113 | /* #ifdef CCP_CMD_NOT_IN_INTERRUPT */
114 |
115 | /* Enable Memory Write Protection */
116 | /*#define CCP_WRITE_PROTECTION*/
117 |
118 | /* Enable EEPROM Read/Write Access */
119 | /* #define CCP_WRITE_EEPROM */
120 | /* #define CCP_READ_EEPROM */
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 | /*----------------------------------------------------------------------------*/
132 | /* Special values for the CCPsim WIN32 Application */
133 | #if defined(__WIN32__) || defined(WIN32)
134 |
135 | #define CCP_TESTMODE /* Turn on screen output via printf */
136 | #define CCPPRINT printf
137 |
138 | extern DWORD gDtoId;
139 | extern DWORD gCroId;
140 | extern WORD gStationAddr;
141 | #undef CCP_CRO_ID
142 | #define CCP_CRO_ID gCroId
143 | #undef CCP_DTO_ID
144 | #define CCP_DTO_ID gDtoId
145 | #undef CCP_STATION_ADDR
146 | #define CCP_STATION_ADDR gStationAddr
147 | #undef CCP_STATION_ID
148 | #define CCP_STATION_ID "CCPSIM"
149 |
150 | #undef CCP_MAX_ODT
151 | #undef CCP_MAX_DAQ
152 | #define CCP_MAX_ODT 10
153 | #define CCP_MAX_DAQ 5
154 | #undef CCP_SEND_SINGLE
155 | #undef CCP_SEND_QUEUE
156 | #define CCP_SEND_QUEUE_OVERRUN_INDICATION
157 | #define CCP_SEND_QUEUE_SIZE (CCP_MAX_ODT*CCP_MAX_DAQ)
158 | #define CCP_SEED_KEY
159 | #undef CCP_BOOTLOADER_DOWNLOAD
160 | #define CCP_PROGRAM
161 | #define CCP_WRITE_PROTECTION
162 | /*#define CCP_CHECKSUM_CCITT*/
163 |
164 | #endif
165 |
166 | #endif
167 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/source/ccp/Configure.h:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | #pragma LINK_INFO DERIVATIVE "MC9S12XEP100"
5 |
6 |
7 | #define ABS_EC1 0x67fe4016
8 | #define ABS_TEST 0x67fe4216
9 |
10 | #define HCU_EC3 0x67fe0442
11 | #define NO_ERR 0x00
12 | #define ERR_BUFFER_FULL 0x80
13 |
14 | typedef unsigned char byte;
15 | typedef unsigned int word;
16 | typedef unsigned long dword;
17 | word ABS_EC1data[4];
18 | byte *p,*t;
19 | byte length, index;
20 | byte rxdata[8];
21 | dword RXID;
22 | byte test[4],a=0;
23 | byte errorflag = NO_ERR;
24 | struct
25 | {
26 | byte ABSActive ;
27 | byte BrakeState;
28 | byte BrakePedalPos;
29 | word RearAxisBrakeMaxForce;
30 | }ABS_EC1_msg;
31 | struct
32 | {
33 | word MtrRegenerateTorque;
34 | } HCU_EC3_msg;
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/source/ccp/boot_can.c:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 |
3 | File Name : boot_can.c
4 | Date : 14.08.2001
5 | Version : 1.0
6 | Desciption : free CAN driver for CCP without using interrupts
7 |
8 | *******************************************************************************/
9 |
10 |
11 | // -----------------------------------------------------------------------------
12 | // INCLUDE FILES
13 | // -----------------------------------------------------------------------------
14 | //#include // standard HC12 IO
15 | #include "ccppar.h" // CPP config file
16 |
17 | #include "boot_can.h" // CAN driver
18 |
19 |
20 |
21 | #include "ccp_includes.h"
22 | // -----------------------------------------------------------------------------
23 |
24 |
25 | // -----------------------------------------------------------------------------
26 | // DEFINES
27 | // -----------------------------------------------------------------------------
28 |
29 |
30 | // -----------------------------------------------------------------------------
31 |
32 |
33 |
34 |
35 | // -----------------------------------------------------------------------------
36 | // VARIABLES and Structs
37 | // -----------------------------------------------------------------------------
38 | unsigned int g_ccp_dto_id; // global DTO-ID
39 | unsigned int g_ccp_cro_id; // global CRO-ID
40 |
41 |
42 | // -----------------------------------------------------------------------------
43 | // CAN INITIALISATION
44 | // -----------------------------------------------------------------------------
45 | void ccpBootInit (int cro_id, int dto_id)
46 | {
47 | g_ccp_dto_id = dto_id; // handover IDs (CRO, DTO)
48 | g_ccp_cro_id = cro_id;
49 |
50 | InitCAN(1,250000,0,0,0,0);
51 |
52 | // -----------------------------------------------------------------------------
53 | } /* ccpBootInit */
54 |
55 |
56 | // -----------------------------------------------------------------------------
57 | // CAN TRANSMIT (Data Frame)
58 | // -----------------------------------------------------------------------------
59 | int ccpBootTransmitCrmPossible( void )
60 | {
61 | return CanTransmitPossible();
62 | // return ((CAN0TFLG_TXE0) == 1); // return 1 if so
63 | }
64 | // -----------------------------------------------------------------------------
65 | void ccpBootTransmitCrm (unsigned char *msg)
66 | {
67 |
68 | SendCANMsg(1,0,1,g_ccp_dto_id,8,msg);
69 |
70 | } /* ccpBootTransmitCrm */
71 | // -----------------------------------------------------------------------------
72 |
73 |
74 | // -----------------------------------------------------------------------------
75 | // CAN RECEIVE (Data Frame)
76 | // -----------------------------------------------------------------------------
77 | int ccpBootReceiveCro (unsigned char *msg)
78 | {
79 | UINT_8 ext=0;
80 | UINT_8 dataframe=1;
81 | UINT_32 canid=100;
82 | UINT_8 datalen=8;
83 |
84 | if(ERROR_OK == GetCANMsg(1,&ext,&dataframe,&canid,&datalen,msg))
85 | {
86 | //return 1;
87 | if (canid == g_ccp_cro_id) return 1; // if correctly received, return 1
88 | }
89 |
90 | // if (canid == g_ccp_cro_id) return 1; // if correctly received, return 1
91 |
92 | return 0;
93 |
94 | } /* ccpBootReceiveCro */
95 | // -----------------------------------------------------------------------------
96 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/source/ccp/boot_can.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 |
3 | File Name : boot_can.h
4 | Date : 14.08.2001
5 | Version : 1.0
6 | Desciption : header for boot_can.c
7 | CCP Driver Example
8 |
9 | *******************************************************************************/
10 |
11 |
12 | // -----------------------------------------------------------------------------
13 | // DEFINITION
14 | // -----------------------------------------------------------------------------
15 | #ifndef __BOOT_CAN_H_
16 | #define __BOOT_CAN_H_
17 | // -----------------------------------------------------------------------------
18 |
19 |
20 | // -----------------------------------------------------------------------------
21 | // CAN Transmit / Receive functions
22 | // -----------------------------------------------------------------------------
23 |
24 | void ccpBootInit (int, int);
25 | int ccpBootTransmitCrmPossible( void );
26 | void ccpBootTransmitCrm (unsigned char *msg);
27 | int ccpBootReceiveCro (unsigned char *msg);
28 |
29 | // -----------------------------------------------------------------------------
30 | #endif
31 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/source/ccp/ccp.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/source/ccp/ccp.h
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/source/ccp/ccp_can_interface.C:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/source/ccp/ccp_can_interface.C
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/source/ccp/ccp_can_interface.H:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 |
3 | File Name : ccp_can_interface.h
4 | Date : 27.07.2001
5 | Version : 1.0
6 | Desciption : additional functions for CCP
7 |
8 |
9 | *******************************************************************************/
10 | #ifndef _CCP_CAN_INTERFACE_
11 | #define _CCP_CAN_INTERFACE_
12 |
13 |
14 | #include "ccppar.h" // CPP config file
15 |
16 | // -----------------------------------------------------------------------------
17 | // PROTOTYPES
18 | // -----------------------------------------------------------------------------
19 |
20 | BYTE ccpSend( BYTEPTR msg );
21 | MTABYTEPTR ccpGetPointer( BYTE addr_ext, DWORD addr );
22 |
23 | void ccpUserBackground( void );
24 |
25 | void disable_interrupt(); // I-bit SET
26 | void enable_interrupt(); // I-bit CLEAR
27 | // -----------------------------------------------------------------------------
28 |
29 |
30 | #endif
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/source/includes/ccp_global_def.h:
--------------------------------------------------------------------------------
1 | #ifndef _CCP_GLOBAL_DEF_H_
2 | #define _CCP_GLOBAL_DEF_H_
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | #endif
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/source/includes/ccp_includes.h:
--------------------------------------------------------------------------------
1 | #ifndef _CCP_INCLUDES_H_
2 | #define _CCP_INCLUDES_H_
3 |
4 | #include "MPC5644A.h"
5 | #include "ccp_types.h"
6 | #include "ccp_global_def.h"
7 |
8 |
9 | #include "CAN.h"
10 |
11 |
12 | #endif
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/source/includes/ccp_types.h:
--------------------------------------------------------------------------------
1 | #ifndef _CCP_TYPES_H_
2 | #define _CCP_TYPES_H_
3 |
4 |
5 | /*
6 | *********************************************************************************************************
7 | * DATA TYPES
8 | *********************************************************************************************************
9 | */
10 |
11 |
12 | typedef unsigned char UINT_8; /* Unsigned 8 bit quantity */
13 | typedef signed char INT_8; /* Signed 8 bit quantity */
14 | typedef unsigned short UINT_6; /* Unsigned 16 bit quantity */
15 | typedef signed short INT_16; /* Signed 16 bit quantity */
16 | typedef unsigned long UINT_32; /* Unsigned 32 bit quantity */
17 | typedef signed long INT_32; /* Signed 32 bit quantity */
18 |
19 |
20 | typedef volatile unsigned int VUINT_32;
21 |
22 |
23 |
24 |
25 | #endif
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/src/Exceptions.c:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * FILE: Exceptions.c
4 | *
5 | * DESCRIPTION: Setup of IVPR to point to the EXCEPTION_HANDLERS memory area
6 | * defined in the linker command file.
7 | * Default setup of the IVORxx registers.
8 | */
9 |
10 |
11 | /*----------------------------------------------------------------------------*/
12 | /* Includes */
13 | /*----------------------------------------------------------------------------*/
14 |
15 | #include "Exceptions.h" /* Implement functions from this file */
16 |
17 | /*----------------------------------------------------------------------------*/
18 | /* Function Implementations */
19 | /*----------------------------------------------------------------------------*/
20 |
21 | #pragma push /* Save the current state */
22 | /* Symbol EXCEPTION_HANDLERS is defined in the application linker command file (.lcf)
23 | It is defined to the start of the code memory area used for the .__exception_handlers section.
24 | */
25 | /*lint -esym(752, EXCEPTION_HANDLERS) */
26 | __declspec (section ".__exception_handlers") extern long EXCEPTION_HANDLERS;
27 | #pragma force_active on
28 | #pragma function_align 16 /* We use 16 bytes alignment for Exception handlers */
29 | __declspec(interrupt)
30 | __declspec (section ".__exception_handlers")
31 | void EXCEP_DefaultExceptionHandler(void)
32 | {
33 |
34 | }
35 | #pragma force_active off
36 | #pragma pop
37 |
38 | __asm void EXCEP_InitExceptionHandlers(void)
39 | {
40 | nofralloc
41 |
42 | /* Set the IVPR to the Exception Handlers memory area defined in the lcf file */
43 | lis r0, EXCEPTION_HANDLERS@h
44 | ori r0, r0, EXCEPTION_HANDLERS@l
45 | mtivpr r0
46 |
47 | /* Set all IVOR registers to the Default Exception Handler */
48 | lis r0, EXCEP_DefaultExceptionHandler@h
49 | ori r0, r0, EXCEP_DefaultExceptionHandler@l
50 |
51 | #if !defined(Z0H_CORE)
52 | /* IVORx registers are "hard-wired" in the e200z0 and z0h cores */
53 |
54 | /* IVOR0 Critical input (SPR 400) */
55 | mtivor0 r0
56 | /* IVOR1 Machine check interrupt (SPR 401) */
57 | mtivor1 r0
58 | /* IVOR2 Data storage interrupt (SPR 402) */
59 | mtivor2 r0
60 | /* IVOR3 Instruction storage interrupt (SPR 403) */
61 | mtivor3 r0
62 | /* IVOR4 External input interrupt (SPR 404) */
63 | mtivor4 r0
64 | /* IVOR5 Alignment interrupt (SPR 405) */
65 | mtivor5 r0
66 | /* IVOR6 Program interrupt (SPR 406) */
67 | mtivor6 r0
68 | /* IVOR7 Floating-point unavailable interrupt (SPR 407) */
69 | mtivor7 r0
70 | /* IVOR8 System call interrupt (SPR 408) */
71 | mtivor8 r0
72 | /* IVOR9 Auxiliary processor (SPR 409) */
73 | mtivor9 r0
74 | /* IVOR10 Decrementer interrupt (SPR 410) */
75 | mtivor10 r0
76 | /* IVOR11 Fixed-interval timer interrupt (SPR 411) */
77 | mtivor11 r0
78 | /* IVOR12 Watchdog timer interrupt (SPR 412) */
79 | mtivor12 r0
80 | /* IVOR13 Data TLB error interrupt (SPR 413) */
81 | mtivor13 r0
82 | /* IVOR14 Instruction TLB error interrupt (SPR 414) */
83 | mtivor14 r0
84 | /* IVOR15 Debug interrupt (SPR 415) */
85 | mtivor15 r0
86 |
87 | /* IVOR32 SPE APU unavailable interrupt (SPR 528) */
88 | mtivor32 r0
89 | /* IVOR33 SPE floating-point data exception interrupt (SPR 529) */
90 | mtivor33 r0
91 | /* IVOR34 SPE floating-point round exception interrupt (SPR 530) */
92 | mtivor34 r0
93 |
94 | #endif
95 |
96 | blr
97 | }
98 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/src/Exceptions.h:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * FILE: Exceptions.h
4 | *
5 | * DESCRIPTION: Setup of IVPR to point to the EXCEPTION_HANDLERS memory area
6 | * defined in the linker command file.
7 | * Default setup of the IVORxx registers.
8 | *
9 | */
10 |
11 | #ifndef _EXCEPTIONS_H_
12 | #define _EXCEPTIONS_H_
13 |
14 | /*----------------------------------------------------------------------------*/
15 | /* Function declarations */
16 | /*----------------------------------------------------------------------------*/
17 |
18 | #ifdef __cplusplus
19 | extern "C" {
20 | #endif
21 |
22 | #pragma section RX ".__exception_handlers"
23 |
24 | /**
25 | * This function is used as default exceptions handler
26 | */
27 | __declspec (section ".__exception_handlers") void EXCEP_DefaultExceptionHandler(void);
28 |
29 |
30 | /**
31 | * This function will setup the PowerPC Zen core IVPR and IVORxx registers.
32 | * IVPR will be set to the EXCEPTION_HANDLERS memory area defined in the
33 | * linker command file (.lcf of the current build target)
34 | * IVORxx will be set by default to the exception handler function: __DefaultExceptionHandler__.
35 | *
36 | * If an Exception is used in the application code, the exception handler routine
37 | * should be defined like the EXCEP_DefaultExceptionHandler function
38 | * (i.e. interrupt function, forced active and placed in the ".__exception_handlers"
39 | * code section). The corresponding IVORxx register should then be set to this address.
40 | *
41 | */
42 | __asm void EXCEP_InitExceptionHandlers(void);
43 |
44 | #ifdef __cplusplus
45 | }
46 | #endif
47 |
48 | #endif
49 |
50 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/src/IntcInterrupts.c:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * FILE: IntcInterrupts.c
4 | *
5 | * DESCRIPTION: Contains an implementations of generic interrupt
6 | * controller handling routines for the MPC55xx.
7 | */
8 |
9 | /*---------------------------------------------------------------------------*/
10 | /* By default we do not use nested interrupts, interrupts are handled in C. */
11 | /* In case you want to use nested interrupts, set INTC_NESTED_INTERRUPT. */
12 | /* In this case make sure all the needed registers are saved in the prolog */
13 | /* and epilog of asm void INTC_INTCInterruptHandler(void) */
14 | /*---------------------------------------------------------------------------*/
15 |
16 | #ifndef INTC_NESTED_INTERRUPT
17 | #define INTC_NESTED_INTERRUPT 0
18 | #endif
19 |
20 | /*---------------------------------------------------------------------------*/
21 | /* Includes */
22 | /*---------------------------------------------------------------------------*/
23 |
24 | #include "MPC5644A.h" /* MPC55xx platform development header */
25 |
26 | #include "IntcInterrupts.h" /* Implement functions from this file */
27 |
28 | /*---------------------------------------------------------------------------*/
29 | /* Inline Assembler Defines */
30 | /*---------------------------------------------------------------------------*/
31 |
32 | /** This macro allows to use C defined address with the inline assembler */
33 | #define MAKE_HLI_ADDRESS(hli_name, c_expr) /*lint -e753 */enum { hli_name=/*lint -e30*/((int)(c_expr)) /*lint -esym(749, hli_name) */ };
34 |
35 | /** Address of the IACKR Interrupt Controller register. */
36 | MAKE_HLI_ADDRESS(INTC_IACKR, &INTC.IACKR.R)
37 | /** Address of the EOIR End-of-Interrupt Register register. */
38 | MAKE_HLI_ADDRESS(INTC_EOIR, &INTC.EOIR.R)
39 |
40 | /** Address of the MCR -- used for e200z0h initialization */
41 | MAKE_HLI_ADDRESS(INTC_MCR, &INTC.MCR.R)
42 |
43 | /*---------------------------------------------------------------------------*/
44 | /* Function Implementations */
45 | /*---------------------------------------------------------------------------*/
46 |
47 | /** This is the Interrupt Service Routine Branch Table placed in memory */
48 | #define INTC_INTERRUPTS_REQUEST_VECTOR_TABLE_SIZE (308*4)
49 |
50 | #pragma push /* Save the current state */
51 | #pragma section data_type ".__initialized_intc_handlertable" ".__uninitialized_intc_handlertable"
52 | /* The INTC vector table will be placed in RAM.
53 | We will use the ".__uninitialized_intc_handlertable" name to do the
54 | placement in the Linker Command File (.lcf) to avoid the initialization at
55 | startup time. This will decrease the code size, but the table won't be
56 | initialized to zero.
57 | */
58 | INTCInterruptFn INTCInterruptsHandlerTable[INTC_INTERRUPTS_REQUEST_VECTOR_TABLE_SIZE];
59 | #pragma pop
60 |
61 | #pragma push /* save the current state */
62 | #pragma force_active on
63 | #pragma function_align 16 /* We use 16 bytes alignment for Exception handlers */
64 | /** Handle the interrupt source by jumping to the ISR branch table (IACKR) */
65 |
66 | #if INTC_NESTED_INTERRUPT == 0
67 |
68 | __declspec(interrupt)
69 | __declspec(section ".__exception_handlers")
70 | void INTC_INTCInterruptHandler(void)
71 | {
72 | INTCInterruptFn *handlerFn = (INTCInterruptFn*)(*(unsigned int*)&INTC.IACKR.R);
73 |
74 | (**handlerFn)();
75 |
76 | INTC.EOIR.R = 0;
77 | }
78 |
79 | #else
80 |
81 | __declspec(interrupt)
82 | __declspec(section ".__exception_handlers")
83 | __asm void INTC_INTCInterruptHandler(void)
84 | {
85 | nofralloc
86 | prolog:
87 | stwu r1, -0x50 (r1) /* Create stack frame */
88 | stw r0, 0x24 (r1) /* Store r0 working register */
89 |
90 | /* Save SRR0 and SRR1 */
91 | mfsrr1 r0 /* Store SRR1 (must be done before enabling EE) */
92 | stw r0, 0x10 (r1)
93 | mfsrr0 r0 /* Store SRR0 (must be done before enabling EE) */
94 | stw r0, 0x0C (r1)
95 |
96 | /* Clear request to processor; r3 contains the address of the ISR */
97 | stw r3, 0x28 (r1) /* Store r3 */
98 | lis r3, INTC_IACKR@h /* Read pointer into ISR Vector Table & store in r3 */
99 | ori r3, r3, INTC_IACKR@l
100 | lwz r3, 0x0(r3) /* Load INTC_IACKR, which clears request to processor */
101 | lwz r3, 0x0(r3) /* Read ISR address from ISR Vector Table using pointer */
102 |
103 | /* Enable processor recognition of interrupts */
104 | wrteei 1 /* Set MSR[EE]=1 */
105 |
106 | /* Save rest of context required by EABI */
107 | stw r12, 0x4C (r1) /* Store r12 */
108 | stw r11, 0x48 (r1) /* Store r11 */
109 | stw r10, 0x44 (r1) /* Store r10 */
110 | stw r9, 0x40 (r1) /* Store r9 */
111 | stw r8, 0x3C (r1) /* Store r8 */
112 | stw r7, 0x38 (r1) /* Store r7 */
113 | stw r6, 0x34 (r1) /* Store r6 */
114 | stw r5, 0x30 (r1) /* Store r5 */
115 | stw r4, 0x2C (r1) /* Store r4 */
116 | mfcr r0 /* Store CR */
117 | stw r0, 0x20 (r1)
118 | mfxer r0 /* Store XER */
119 | stw r0, 0x1C (r1)
120 | mfctr r0 /* Store CTR */
121 | stw r0, 0x18 (r1)
122 | mflr r0 /* Store LR */
123 | stw r0, 0x14 (r1)
124 |
125 | /* Branch to ISR handler address from SW vector table */
126 | mtlr r3 /* Store ISR address to LR to use for branching later */
127 | blrl /* Branch to ISR, but return here */
128 |
129 | epilog:
130 | /* Restore context required by EABI (except working registers) */
131 | lwz r0, 0x14 (r1) /* Restore LR */
132 | mtlr r0
133 | lwz r0, 0x18 (r1) /* Restore CTR */
134 | mtctr r0
135 | lwz r0, 0x1C (r1) /* Restore XER */
136 | mtxer r0
137 | lwz r0, 0x20 (r1) /* Restore CR */
138 | mtcrf 0xff, r0
139 | lwz r5, 0x30 (r1) /* Restore r5 */
140 | lwz r6, 0x34 (r1) /* Restore r6 */
141 | lwz r7, 0x38 (r1) /* Restore r7 */
142 | lwz r8, 0x3C (r1) /* Restore r8 */
143 | lwz r9, 0x40 (r1) /* Restore r9 */
144 | lwz r10, 0x44 (r1) /* Restore r10 */
145 | lwz r11, 0x48 (r1) /* Restore r11 */
146 | lwz r12, 0x4C (r1) /* Restore r12 */
147 |
148 | /* Disable processor recognition of interrupts */
149 | wrteei 0
150 |
151 | /* Ensure interrupt flag has finished clearing */
152 | mbar 0
153 |
154 | /* Write 0 to INTC_EOIR, informing INTC to lower priority */
155 | li r3, 0
156 | lis r4, INTC_EOIR@h /* Load upper half of INTC_EOIR address to r4 */
157 | ori r4, r4, INTC_EOIR@l
158 | stw r3, 0(r4) /* Write 0 to INTC_EOIR */
159 |
160 | /* Restore Working Registers */
161 | lwz r3, 0x28 (r1) /* Restore r3 */
162 | lwz r4, 0x2C (r1) /* Restore r4 */
163 |
164 | /* Retrieve SRR0 and SRR1 */
165 | lwz r0, 0x0C (r1) /* Restore SRR0 */
166 | mtsrr0 r0
167 | lwz r0, 0x10 (r1) /* Restore SRR1 */
168 | mtsrr1 r0
169 |
170 | /* Restore Other Working Registers */
171 | lwz r0, 0x24 (r1) /* Restore r0 */
172 |
173 | /* Restore space on stack */
174 | addi r1, r1, 0x50
175 |
176 | /* End of Interrupt */
177 | rfi
178 | }
179 |
180 | #endif
181 |
182 | #pragma force_active off
183 | #pragma pop
184 |
185 | /**
186 | * This function can be used to install an interrupt handler for a given
187 | * interrupt vector. It will also set the Priority Status Register for the
188 | * source to the one given
189 | */
190 | void INTC_InstallINTCInterruptHandler(INTCInterruptFn handlerFn, unsigned short vectorNum,
191 | unsigned char psrPriority)
192 | {
193 | /* Set the function pointer in the ISR Handler table */
194 | INTCInterruptsHandlerTable[vectorNum] = handlerFn;
195 | /* Set the PSR Priority */
196 | INTC.PSR[vectorNum].B.PRI = psrPriority;
197 | }
198 |
199 | /**
200 | * This function will setup the PowerPC Zen core to jump to an Interrupt Service Routine
201 | * handler. This function can be used from user_init() (no stack frame, no memory access).
202 | */
203 | __asm void INTC_InitINTCInterrupts( void )
204 | {
205 | nofralloc
206 |
207 | mflr r29
208 |
209 | /* IVOR4 is for external interrupts (special purpose register #404)
210 | * This code enables the ISR handler for external interrupt code to address
211 | * INTC_INTCInterruptHandler (incl. large address by setting the IVPR value).
212 | */
213 | lis r0, INTC_INTCInterruptHandler@h
214 | ori r0, r0, INTC_INTCInterruptHandler@l
215 |
216 | #if !defined(Z0H_CORE)
217 | mtivor4 r0
218 | #else
219 | /* Set INTC.MCR = 0 VTES 4-bytes, HVEN - SW vector mode */
220 | lis r0,0
221 | lis r3,INTC_MCR@ha
222 | stw r0, INTC_MCR@l(r3)
223 | #endif
224 |
225 | /* Enable external interrupts in the Machine State Register. Set MSR[EE]=1. */
226 | wrteei 1
227 |
228 | /* Set the location of the ISR Handler Table in INTC IACKR Register */
229 | lis r0, INTCInterruptsHandlerTable@h
230 | ori r0, r0, INTCInterruptsHandlerTable@l
231 | lis r3,INTC_IACKR@h
232 | ori r3,r3,INTC_IACKR@l
233 | stw r0, 0(r3)
234 |
235 | mtlr r29
236 |
237 | blr
238 | }
239 |
240 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/src/IntcInterrupts.h:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * FILE: IntcInterrupts.h
4 | *
5 | * DESCRIPTION: Contains defines for utilizing the Interrupt Controller in the MPC5500.
6 | * There is also the function prototypes for the common interrupt handling
7 | * routines to be used on the MPC55xx (PowerPC Zen core).
8 | *
9 | */
10 |
11 | #ifndef _INTCINTERRUPTS_H_
12 | #define _INTCINTERRUPTS_H_
13 |
14 | /*----------------------------------------------------------------------------*/
15 | /* Types */
16 | /*----------------------------------------------------------------------------*/
17 |
18 | /** All interrupt handlers should be of this type */
19 | typedef void(*INTCInterruptFn)(void);
20 |
21 | /*----------------------------------------------------------------------------*/
22 | /* Function declarations */
23 | /*----------------------------------------------------------------------------*/
24 |
25 | #ifdef __cplusplus
26 | extern "C" {
27 | #endif
28 |
29 | /**
30 | * This function will setup the PowerPC Zen core to jump to an Interrupt Service Routine
31 | * handler. This function can be used from user_init() (no stack frame, no memory access).
32 | */
33 | __asm void INTC_InitINTCInterrupts(void);
34 |
35 | /**
36 | * This function can be used to install an interrupt handler for a given
37 | * interrupt vector. It will also set the Priority Status Register for the
38 | * source to the one given.
39 | * parameter handlerFn: The function to call when the interrupt occurs.
40 | * parameter vectoryNum: The number of the INTC Interrupt Request Source we wish
41 | * to install the handler for.
42 | * parameter psrPriority: The priority to set in the Interrupt Controller Priority
43 | * Select Register.
44 | */
45 | void INTC_InstallINTCInterruptHandler(INTCInterruptFn handlerFn, unsigned short vectorNum,
46 | unsigned char psrPriority);
47 |
48 | #pragma section RX ".__exception_handlers"
49 |
50 | /**
51 | * This function is used to Handle the interrupt source by jumping to the ISR
52 | * branch table (IACKR)
53 | */
54 | __declspec (section ".__exception_handlers") void INTC_INTCInterruptHandler(void);
55 |
56 | #ifdef __cplusplus
57 | }
58 | #endif
59 |
60 | #endif
61 |
62 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/src/MPC55xx_init.c:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | *
4 | * FILE : MPC55xx_init.c
5 | *
6 | * DESCRIPTION:
7 | * This file contains the MPC55xx derivative needed initializations.
8 | * usr_init() is called by the startup code of the application at initialization time
9 | * You can add needed hardware initializations here.
10 | * This file also contains the RCHW and Reset Vector setup:
11 | /* The chip is by default setup to boot from internal Flash and the watchdog is disabled.
12 | */
13 |
14 | #include "Exceptions.h" /* IVPR and default exception handlers setup */
15 | #include "INTCInterrupts.h" /* INTC Interrupts Requests configuration */
16 | #include "MPC5644A_HWInit.h"
17 |
18 | #pragma section code_type ".init"
19 |
20 | #define INIT_DERIVATIVE_INTERNAL_SETUP 1
21 | #define INIT_EXTERNAL_BUS_INTERFACE_SETUP 0
22 |
23 | #ifndef INIT_DERIVATIVE_INTERNAL_SETUP
24 | #pragma error INIT_DERIVATIVE_INTERNAL_SETUP should be defined !
25 | #endif
26 |
27 | #ifndef INIT_EXTERNAL_BUS_INTERFACE_SETUP
28 | #pragma error INIT_EXTERNAL_BUS_INTERFACE_SETUP should be defined !
29 | #endif
30 |
31 | #ifdef __cplusplus
32 | extern "C" {
33 | #endif
34 |
35 | extern __asm void __start();
36 | __asm void usr_init();
37 | /*lint -esym(752,__start) */
38 |
39 | #ifdef __cplusplus
40 | }
41 | #endif
42 |
43 | /*****************************************************************/
44 | /* usr_init(): */
45 | /* Define here the needed hardware initializations at startup */
46 |
47 | __asm void usr_init()
48 | {
49 | /* Add needed hardware initializations in this function */
50 | nofralloc
51 |
52 | mflr r30 /* Save off return address in NV reg */
53 |
54 | #if INIT_DERIVATIVE_INTERNAL_SETUP==1
55 | bl INIT_Derivative /* Derivative specific hardware initializations */
56 | #endif
57 | #if INIT_EXTERNAL_BUS_INTERFACE_SETUP==1
58 | bl INIT_ExternalBusAndMemory /* Set up access to external memory (inc. chip select and MMU) */
59 | #endif
60 | bl EXCEP_InitExceptionHandlers /* Set up Default Exception handling */
61 | bl INTC_InitINTCInterrupts /* Set up INTC Interrupts Requests handling */
62 |
63 | mtlr r30 /* Get saved return address */
64 |
65 | blr
66 | }
67 |
68 | #ifdef __cplusplus
69 | extern "C" {
70 | #endif
71 |
72 | /**************************************************************/
73 | /* RCHW and Reset Vector setup: */
74 | /* The chip is by default setup to boot from internal Flash */
75 | /* and the watchdog is disabled. */
76 |
77 | typedef void (*resetfuncptr)(void);
78 |
79 | #pragma push /* Save the current state */
80 | #pragma section const_type sconst_type ".__bam_bootarea"
81 | extern const unsigned long bam_rchw;
82 | extern const resetfuncptr bam_resetvector;
83 |
84 | /* RCHW_VALUE Flags */
85 | #define RCHW_WTE 0x0400L /* Enable Watchdog */
86 | #define RCHW_VLE 0x0100L /* Enable Variable Length Encoding*/
87 | #define RCHW_PS0_32BITS 0x0000L /* Boot from External Bus CS0, 32-bit CS0 port size. */
88 | #define RCHW_PS0_16BITS 0x0200L /* Boot from External Bus CS0, 16-bit CS0 port size. */
89 | #define RCHW_BOOTIDENTIFIER 0x005AL
90 |
91 | /* Used RCHW value: boot from internal flash, watchdog disabled */
92 | #if VLE_IS_ON == 1
93 | #define RCHW_VALUE RCHW_BOOTIDENTIFIER|RCHW_PS0_32BITS|RCHW_VLE
94 | #else
95 | #define RCHW_VALUE RCHW_BOOTIDENTIFIER|RCHW_PS0_32BITS
96 | #endif
97 |
98 | const unsigned long bam_rchw = ((RCHW_VALUE)<<16) + (RCHW_VALUE);
99 | const resetfuncptr bam_resetvector = __start;
100 |
101 | #pragma pop
102 |
103 | #ifdef __cplusplus
104 | }
105 | #endif
106 |
107 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/src/MPC55xx_init_debug.c:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | *
4 | * FILE : MPC55xx_init_debug.c
5 | *
6 | * DESCRIPTION:
7 | * This file contains the MPC55xx derivative needed initializations.
8 | * MPC55xx_init_debug.c is only used when willing to debug in RAM. Otherwise,
9 | * MPC55xx_init.c shall be used.
10 | * usr_init() is called by the startup code of the application at initialization time
11 | * You can add needed hardware initializations here.
12 | */
13 |
14 | #include "Exceptions.h" /* IVPR and default exception handlers setup */
15 | #include "INTCInterrupts.h" /* INTC Interrupts Requests configuration */
16 | #include "MPC5644A_HWInit.h"
17 |
18 | #pragma section code_type ".init"
19 |
20 | #define INIT_DERIVATIVE_INTERNAL_SETUP 0
21 | #define INIT_EXTERNAL_BUS_INTERFACE_SETUP 0
22 |
23 | #ifndef INIT_DERIVATIVE_INTERNAL_SETUP
24 | #pragma error INIT_DERIVATIVE_INTERNAL_SETUP should be defined !
25 | #endif
26 |
27 | #ifndef INIT_EXTERNAL_BUS_INTERFACE_SETUP
28 | #pragma error INIT_EXTERNAL_BUS_INTERFACE_SETUP should be defined !
29 | #endif
30 |
31 | #ifdef __cplusplus
32 | extern "C" {
33 | #endif
34 |
35 | extern __asm void __start();
36 | __asm void usr_init();
37 | /*lint -esym(752,__start) */
38 |
39 | #ifdef __cplusplus
40 | }
41 | #endif
42 |
43 | /*****************************************************************/
44 | /* usr_init(): */
45 | /* Define here the needed hardware initializations at startup */
46 |
47 | __asm void usr_init()
48 | {
49 | /* Add needed hardware initializations in this function */
50 |
51 | nofralloc
52 |
53 | mflr r30 /* Save off return address in NV reg */
54 |
55 | #if INIT_DERIVATIVE_INTERNAL_SETUP==1
56 | bl INIT_Derivative /* Derivative specific hardware initializations */
57 | #endif
58 | #if INIT_EXTERNAL_BUS_INTERFACE_SETUP==1
59 | bl INIT_ExternalBusAndMemory /* Set up access to external memory (inc. chip select and MMU) */
60 | #endif
61 | bl EXCEP_InitExceptionHandlers /* Set up Default Exception handling */
62 | bl INTC_InitINTCInterrupts /* Set up INTC Interrupts Requests handling */
63 |
64 | mtlr r30 /* Get saved return address */
65 |
66 | blr
67 | }
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/src/MPC5644A.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/src/MPC5644A.h
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/src/MPC5644A_HWInit.c:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | *
4 | * FILE : MPC5644A_HWInit.c
5 | *
6 | * DESCRIPTION:
7 | * This file contains all MPC5644A derivative needed initializations,
8 | * and all initializations for the MPC5644A boards which are supported.
9 | * This includes setting up the External Bus Interface to allow access
10 | * to memory on the external bus, and ensuring there is a valid entry in
11 | * the MMU for the external memory access.
12 | */
13 |
14 | /*----------------------------------------------------------------------------*/
15 | /* Includes */
16 | /*----------------------------------------------------------------------------*/
17 |
18 | #include "MPC5644A.h" /* MPC55xx platform development header */
19 | #include "MPC5644A_HWInit.h"
20 |
21 | #ifdef __cplusplus
22 | extern "C" {
23 | #endif
24 |
25 | /*******************************************************/
26 | /* MPC5644A derivative specific hardware initialization */
27 | /*******************************************************/
28 |
29 | /* Symbol L2SRAM_LOCATION is defined in the application linker command file (.lcf)
30 | It is defined to the start of the L2SRAM of the MPC5644A.
31 | */
32 | /*lint -esym(752, L2SRAM_LOCATION) */
33 | extern long L2SRAM_LOCATION;
34 |
35 |
36 | __asm void INIT_Derivative(void)
37 | {
38 | nofralloc
39 |
40 | /* MPC5644A L2SRAM initialization code */
41 | lis r11,L2SRAM_LOCATION@h /* Base address of the L2SRAM, 64-bit word aligned */
42 | ori r11,r11,L2SRAM_LOCATION@l
43 |
44 | li r12,1536 /* Loop counter to get all of L2SRAM; 192k/4 bytes/32 GPRs = 1536 */
45 | mtctr r12
46 |
47 | init_l2sram_loop:
48 | stmw r0,0(r11) /* Write all 32 GPRs to L2SRAM */
49 | addi r11,r11,128 /* Inc the ram ptr; 32 GPRs * 4 bytes = 128 */
50 | bdnz init_l2sram_loop /* Loop for 192k of L2SRAM */
51 |
52 | blr
53 | }
54 |
55 | /*******************************************************/
56 | /* MPC5644A boards specific hardware initializations */
57 | /*******************************************************/
58 |
59 | /** This macro allows to use C defined address with the inline assembler */
60 | #define MAKE_HLI_COMPATIBLE(hli_name, c_expr) enum { hli_name=/*lint -e30*/((int)(c_expr)) };
61 |
62 | /*----------------------------------------------------------------------------*/
63 | /* Function declarations */
64 | /*----------------------------------------------------------------------------*/
65 |
66 | /* Initialize a set of contiguous PCRs */
67 | __asm void InitPCRs(void);
68 |
69 | /* Initialize the SIU External Bus Interface */
70 | __asm void __initSIUExtBusInterface(void);
71 |
72 | /* Initialize the used EBI Chip Selects */
73 | __asm void __initEBIChipSelects(void);
74 |
75 | /* Write one MMU Table Entry */
76 | __asm void WriteMMUTableEntry( void );
77 |
78 | /* Initialize the needed MMU Table entries */
79 | __asm void __initMMUExternalMemory(void);
80 |
81 | /*----------------------------------------------------------------------------*/
82 | /* Function implementations */
83 | /*----------------------------------------------------------------------------*/
84 |
85 | __asm void INIT_ExternalBusAndMemory(void)
86 | {
87 | nofralloc
88 |
89 | mflr r28
90 |
91 | /* Initialize the SIU External Bus Interface */
92 | bl __initSIUExtBusInterface
93 | /* Initialize the used EBI Chip Selects */
94 | bl __initEBIChipSelects
95 | /* Initialize the needed MMU Table entries */
96 | bl __initMMUExternalMemory
97 |
98 | mtlr r28
99 |
100 | blr
101 | }
102 |
103 | /*----------------------------------------------------------------------------*/
104 | /* External Memory Locations from lcf file */
105 | /*----------------------------------------------------------------------------*/
106 |
107 | #if INIT_USED_BOARD==MPC5644ADEMO_AXM_0321
108 | /* Symbol AXM_0321_EXTERNAL_RAM is defined in the application linker command file (.lcf)
109 | It is defined to the start of the external memory on the MPC5644ADEMO_AXM-0321 board
110 | */
111 | extern unsigned long AXM_0321_EXTERNAL_RAM[];
112 | #endif
113 |
114 | /*----------------------------------------------------------------------------*/
115 | /* SIU External Bus Interface */
116 | /*----------------------------------------------------------------------------*/
117 |
118 | /* Initialize a set of contiguous PCRs: */
119 | /* r3: the firts PCR to initialize */
120 | /* r4: the value to write in the PCRs */
121 | /* r5: the number of PCRs to initialize */
122 | __asm void InitPCRs(void)
123 | {
124 | nofralloc
125 |
126 | mtctr r5 /* intialize ctr with the number of PCRs to initialize */
127 | pcr_init_loop:
128 | sth r4,0(r3) /* Write r4 to current PCR address */
129 | addi r3,r3, 2 /* Inc the memory ptr by 2 to point to the next PCR */
130 | bdnz pcr_init_loop /* Loop for ctr PCRs */
131 |
132 | blr
133 | }
134 |
135 | /* Initialize the SIU External Bus Interface */
136 | __asm void __initSIUExtBusInterface(void)
137 | {
138 | MAKE_HLI_COMPATIBLE(SIU_PCR0,&SIU.PCR[0].R)
139 | MAKE_HLI_COMPATIBLE(SIU_PCR4,&SIU.PCR[4].R)
140 | MAKE_HLI_COMPATIBLE(SIU_PCR28,&SIU.PCR[28].R)
141 | MAKE_HLI_COMPATIBLE(SIU_PCR62,&SIU.PCR[62].R)
142 | MAKE_HLI_COMPATIBLE(SIU_PCR64,&SIU.PCR[64].R)
143 | MAKE_HLI_COMPATIBLE(SIU_PCR68,&SIU.PCR[68].R)
144 | nofralloc
145 |
146 | mflr r27
147 |
148 | /* This initializes the MPC5644A external bus
149 | Set up the pins
150 | Address bus PCR 4 - 27
151 | Configure address bus pins
152 | */
153 | lis r3,SIU_PCR4@h /* First PCR Address bus is PCR 4 */
154 | ori r3,r3,SIU_PCR4@l
155 | li r5,24 /* Loop counter to get all address bus PCR (4 to 27) -> 24 PCRs */
156 | li r4, 0x0440 /* PCRs initialization value */
157 | bl InitPCRs
158 |
159 | /* Data bus PCR 28-59
160 | Configure data bus pins
161 | */
162 | lis r3,SIU_PCR28@h /* First PCR for data bus is PCR 28 */
163 | ori r3,r3,SIU_PCR28@l
164 | li r5,32 /* Loop counter to get all data bus PCR (28-59) -> 32 PCRs */
165 | li r4, 0x0440 /* PCRs initialization value */
166 | bl InitPCRs
167 |
168 | /* Configure minimum bus control pins
169 | RD/WR & BDIP PCR 62/63
170 | */
171 | lis r3,SIU_PCR62@h /* First PCR for is PCR 62 */
172 | ori r3,r3,SIU_PCR62@l
173 | li r5,2 /* Loop counter to get all PCR (62-63) -> 2 PCRs */
174 | li r4, 0x0440 /* PCRs initialization value */
175 | bl InitPCRs
176 |
177 | /* WE[0-4] PCR 64-67
178 | */
179 | lis r3,SIU_PCR64@h /* First PCR for is PCR 64 */
180 | ori r3,r3,SIU_PCR64@l
181 | li r5,4 /* Loop counter to get all PCR (64-67) -> 4 PCRs */
182 | li r4, 0x0443 /* PCRs initialization value */
183 | bl InitPCRs
184 |
185 | /* OE & TS
186 | */
187 | lis r3,SIU_PCR68@h /* First PCR for is PCR 68 */
188 | ori r3,r3,SIU_PCR68@l
189 | li r5,2 /* Loop counter to get all PCR (68-69) -> 2 PCRs */
190 | li r4, 0x0443 /* PCRs initialization value */
191 | bl InitPCRs
192 |
193 | /* Configure the chip selects
194 | CS[0-3]
195 | */
196 | lis r3,SIU_PCR0@h /* First PCR for is PCR 0 */
197 | ori r3,r3,SIU_PCR0@l
198 | li r5,4 /* Loop counter to get all PCR (0-3) -> 4 PCRs */
199 | li r4, 0x0443 /* PCRs initialization value */
200 | bl InitPCRs
201 |
202 | mtlr r27
203 |
204 | blr
205 | }
206 |
207 | /*----------------------------------------------------------------------------*/
208 | /* EBI Chip Selects */
209 | /*----------------------------------------------------------------------------*/
210 |
211 | /* Initialize the used EBI Chip Selects */
212 | __asm void __initEBIChipSelects(void)
213 | {
214 | #if INIT_USED_BOARD==MPC5644ADEMO_AXM_0321
215 | MAKE_HLI_COMPATIBLE(EBBI_CS0_BR,&EBI.CS[0].BR.R)
216 | MAKE_HLI_COMPATIBLE(EBBI_CS0_OR,&EBI.CS[0].OR.R)
217 | #endif
218 | nofralloc
219 |
220 | #if INIT_USED_BOARD==MPC5644ADEMO_AXM_0321
221 | /* CY7C1338 512K External SRAM - 4 beat burst, 0 wait
222 | Set up Memory Controller CS0 @ AXM_0321_EXTERNAL_RAM
223 | */
224 | /* EBI.CS[0].BR.R = (unsigned long)AXM_0321_EXTERNAL_RAM | 0x41UL;
225 | */
226 | lis r3,AXM_0321_EXTERNAL_RAM@h
227 | addi r0,r3,AXM_0321_EXTERNAL_RAM@l
228 | ori r0,r0,0x0041
229 | lis r3,EBBI_CS0_BR@ha
230 | ori r3,r3,EBBI_CS0_BR@l
231 | stw r0,0(r3)
232 | /* EBI.CS[0].OR.R = 0xfff80000;
233 | */
234 | lis r0,0xfff8
235 | lis r3,EBBI_CS0_OR@h
236 | ori r3,r3,EBBI_CS0_OR@l
237 | stw r0,0(r3)
238 | #endif
239 |
240 | blr
241 | }
242 |
243 | /*----------------------------------------------------------------------------*/
244 | /* Writing to MMU Table Entries */
245 | /*----------------------------------------------------------------------------*/
246 |
247 | /* Write one MMU Table Entry: */
248 | /* r3, r4, r5 and r6 must hold */
249 | /* the values of MAS0, MAS1, MAS2 and MAS3 */
250 | __asm void WriteMMUTableEntry( void )
251 | {
252 | nofralloc
253 |
254 | /* Write MMU Assist Register 0 (MAS0); SPR 624 */
255 | mtspr 624, r3
256 | /* Write MMU Assist Register 1 (MAS1); SPR 625 */
257 | mtspr 625, r4
258 | /* Write MMU Assist Register 2 (MAS2); SPR 626 */
259 | mtspr 626, r5
260 | /* Write MMU Assist Register 3 (MAS3); SPR 627 */
261 | mtspr 627, r6
262 | /* Write the table entry */
263 | tlbwe
264 |
265 | blr
266 | }
267 |
268 | /* Initialize the needed MMU Table entries */
269 | __asm void __initMMUExternalMemory(void)
270 | {
271 | #if INIT_USED_BOARD==MPC5644ADEMO_AXM_0321
272 | /* Set up MMU for External Memory
273 | Base address = 0x2000_0000
274 | 16 MByte Memory Space, Not Guarded, Cachable, All Access
275 | */
276 | MAKE_HLI_COMPATIBLE(AXM_0321_EXT_RAM_MAS0_VALUE,MAS0_VALUE(2))
277 | /* 16 MB memory space, valid, protected, global which matches with all process IDs */
278 | MAKE_HLI_COMPATIBLE(AXM_0321_EXT_RAM_MAS1_VALUE,MAS1_VALUE(V_VALID, IPROT_PROTECTED, TID_GLOBAL, 0, TSIZE_16MB))
279 | MAKE_HLI_COMPATIBLE(AXM_0321_EXT_RAM_MAS2_FLAGS,MAS2_FLAGS(SHARED_CACHE_STATE_NOT_USED, WRITE_BACK, CACHEABLE, MEM_COHERENCE_NREQ, NOT_GUARDED, BIG_ENDIAN ))
280 | MAKE_HLI_COMPATIBLE(AXM_0321_EXT_RAM_MAS3_FLAGS,MAS3_FLAGS(READ_WRITE_EXECUTE))
281 | #endif
282 | nofralloc
283 |
284 | mflr r27
285 |
286 | #if INIT_USED_BOARD==MPC5644ADEMO_AXM_0321
287 | /* load r3 with MAS0 value */
288 | lis r3,AXM_0321_EXT_RAM_MAS0_VALUE@h
289 | ori r3,r3,AXM_0321_EXT_RAM_MAS0_VALUE@l
290 |
291 | /* load r4 with MAS1 value */
292 | lis r4,AXM_0321_EXT_RAM_MAS1_VALUE@h
293 | ori r4,r4,AXM_0321_EXT_RAM_MAS1_VALUE@l
294 |
295 | /* load r5 with the external RAM address from the lcf file */
296 | lis r5,AXM_0321_EXTERNAL_RAM@h
297 | ori r5,r5,AXM_0321_EXTERNAL_RAM@l
298 |
299 | /* mask with 0xfffff000 */
300 | clrrwi r5,r5,12
301 |
302 | /* copy the masked external ram address to r6 also */
303 | mr r6,r5
304 |
305 | /* end MAS2 setup in r3 */
306 | ori r5,r5,AXM_0321_EXT_RAM_MAS2_FLAGS@l
307 |
308 | /* end MAS3 setup in r4 */
309 | ori r6,r6,AXM_0321_EXT_RAM_MAS3_FLAGS@l
310 |
311 | /* write the MMU entry defined through r3, r4, r5 and r6 */
312 | bl WriteMMUTableEntry
313 | #endif
314 |
315 | mtlr r27
316 |
317 | blr
318 | }
319 |
320 | #ifdef __cplusplus
321 | }
322 | #endif
323 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/src/MPC5644A_HWInit.h:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | *
4 | * FILE : MPC5644A_HWInit.h
5 | *
6 | * DESCRIPTION:
7 | * This file contains all MPC5644A derivative needed initializations,
8 | * and all initializations for the MPC5644A boards which are supported.
9 | * This includes setting up the External Bus Interface to allow access to
10 | * memory on the external bus, and ensuring there is a valid entry in the
11 | * MMU for the external memory access.
12 | */
13 |
14 | #ifndef _MPC5644A_HWINIT_H_
15 | #define _MPC5644A_HWINIT_H_
16 |
17 | /*----------------------------------------------------------------------------*/
18 | /* Includes */
19 | /*----------------------------------------------------------------------------*/
20 |
21 | #ifdef __cplusplus
22 | extern "C" {
23 | #endif
24 |
25 | /*******************************************************/
26 | /* MPC5644A derivative specific hardware initialization */
27 | /*******************************************************/
28 |
29 | __asm void INIT_Derivative(void);
30 |
31 | /*******************************************************/
32 | /* MPC5644A boards specific hardware initializations */
33 | /*******************************************************/
34 |
35 | /*----------------------------------------------------------------------------*/
36 | /* Used Board selection */
37 | /*----------------------------------------------------------------------------*/
38 |
39 | /* Supported Boards */
40 | #define NO_EXTERNAL_MEMORY 0
41 | #define MPC5644ADEMO_AXM_0321 1
42 |
43 | /* Used board */
44 | #define INIT_USED_BOARD NO_EXTERNAL_MEMORY
45 |
46 | #ifndef INIT_USED_BOARD
47 | #pragma error INIT_USED_BOARD should be defined !
48 | #endif
49 |
50 | /*----------------------------------------------------------------------------*/
51 | /* Function declarations */
52 | /*----------------------------------------------------------------------------*/
53 |
54 | /* call this function to setup the external bus,
55 | chip selects and MMU entries for the selected board
56 | */
57 | __asm void INIT_ExternalBusAndMemory(void);
58 |
59 | /*----------------------------------------------------------------------------*/
60 | /* MMU Table Entries Defines */
61 | /*----------------------------------------------------------------------------*/
62 |
63 | /**
64 | * Generate MMU Assist 0 value from the parameters provided.
65 | * In accordance with the PowerPC Zen core specification the TLBSEL value
66 | * is always set to 01b to maintain future compatibility.
67 | *
68 | */
69 | #define MAS0_VALUE(eselcam) ((unsigned long)(0x10000000 | (eselcam << 16)))
70 |
71 | /**
72 | * Generate MMU Assist 1 value from the parameters provided
73 | *
74 | * parameter valid: 1 if the MMU entry is valid, otherwise \c 0 (invalid).
75 | * parameter iprot: Invalidation protection value
76 | * parameter tid: the translation ID
77 | * parameter ts: the translation space value
78 | * parameter tsize: the translation size
79 | */
80 | #define MAS1_VALUE(valid, iprot, tid, ts, tsize) \
81 | ((unsigned long)((valid << 31) | (iprot << 30) | (tid << 16) | (ts << 12) | (tsize << 8)))
82 |
83 | /** V TLB valid bit */
84 | #define V_INVALID 0
85 | #define V_VALID 1
86 |
87 | /** IPROT TLB Invalidate protect bit */
88 | #define IPROT_NOTPROTECTED 0
89 | #define IPROT_PROTECTED 1
90 |
91 | /** Translation ID defines the TID as global and matches all process IDs */
92 | #define TID_GLOBAL 0
93 |
94 | /** Translation size */
95 | #define TSIZE_4KB 1
96 | #define TSIZE_16KB 2
97 | #define TSIZE_64KB 3
98 | #define TSIZE_256KB 4
99 | #define TSIZE_1MB 5
100 | #define TSIZE_4MB 6
101 | #define TSIZE_16MB 7
102 | #define TSIZE_64MB 8
103 | #define TSIZE_256MB 9
104 |
105 | /**
106 | * Generate MMU Assist 2 value from the parameters provided
107 | *
108 | * Effective Page Number (start address of logical memory region)
109 | * must be computed directely in the assembly code.
110 | *
111 | * parameter w: Write-through Required
112 | * parameter i: Cache Inhibited
113 | * parameter m: Memory Coherency Required
114 | * parameter g: Guarded
115 | * parameter e: Endianness
116 | */
117 | #define MAS2_FLAGS(sharen, w, i, m, g, e) \
118 | ((unsigned long)((sharen << 9)| (w << 4)| (i << 3)| (m << 2)| (g << 1)| (e)))
119 |
120 | /** MAS2[SHAREN]: Cache fills do not use the shared cache state for this page. */
121 | #define SHARED_CACHE_STATE_NOT_USED 0
122 | /** MAS2[SHAREN]: Cache fills use the shared cache state for this page. */
123 | #define SHARED_CACHE_STATE_USED 1
124 |
125 | /** MAS2[W]: Update data in the cache only */
126 | #define WRITE_BACK 0
127 | /** MAS2[W]: All stores performed are written through to memory */
128 | #define WRITE_THROUGH 1
129 |
130 | /** MAS2[I]: The page is considered cacheable */
131 | #define CACHEABLE 0
132 | /** MAS2[I]: The page is cache-inhibited */
133 | #define CACHE_INHIBIT 1
134 |
135 | /** MAS2[M]: Memory Coherence is not-required */
136 | #define MEM_COHERENCE_NREQ 0
137 | /** MAS2[M]: Memory Coherence is required */
138 | #define MEM_COHENRECE_REQ 1
139 |
140 | /** MAS2[G]: Access to page is not guarded */
141 | #define NOT_GUARDED 0
142 | /** MAS2[G]: All loads and stores are performed without speculation */
143 | #define GUARDED 1
144 |
145 | /** MAS2[E]: Page is accessed in big-endian order */
146 | #define BIG_ENDIAN 0
147 | /** MAS2[E]: Page is accessed in little-endian order */
148 | #define LITTLE_ENDIAN 1
149 |
150 | /**
151 | * Generate MMU Assist 3 flags from the parameters provided
152 | *
153 | * Real Page Number (start address of physical memory region)
154 | * must be computed directely in the assembly code
155 | *
156 | * parameter permissions: Permission bits
157 | */
158 | #define MAS3_FLAGS(permissions) ((unsigned long)(permissions))
159 |
160 | /** MAS3[U/S{XWR}]: Read. Write and Execute permission */
161 | #define READ_WRITE_EXECUTE 0x3f
162 | /** MAS3[U/S{XWR}]: Read and Execute permission */
163 | #define READ_EXECUTE 0x33
164 |
165 |
166 | #ifdef __cplusplus
167 | }
168 | #endif
169 |
170 | #endif
171 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/src/PIT/PIT.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/src/PIT/PIT.c
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/src/PIT/PIT.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/src/PIT/PIT.h
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/src/main.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Se7enXin/CCP_CANape/ff5bfee532a7b6aaf55160d351809a9cfcc2598b/CCP_TEST_32/ccp_test_32/src/main.c
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/src/typedefs.h:
--------------------------------------------------------------------------------
1 | /**************************************************************************
2 | * FILE NAME: $RCSfile: typedefs.h,v $ COPYRIGHT (c) Freescale 2005 *
3 | * DESCRIPTION: All Rights Reserved *
4 | * This file defines all of the data types for the Motorola header file. *
5 | *========================================================================*
6 | * ORIGINAL AUTHOR: Jeff Loeliger (r12110) *
7 | * $Log: typedefs.h,v $
8 | * Revision 1.7 2007/05/02 22:46:00 dfreeland
9 | * Use latest web version
10 | *
11 | * Revision 1.4 2006/03/27 09:59:34 r47354
12 | * change __GHS__ to __ghs__. As per bug 13213
13 | *
14 | * Revision 1.3 2005/02/22 13:09:38 r47354
15 | * Fix copyright date.
16 | *
17 | * Revision 1.2 2004/11/17 12:43:12 r12110
18 | * -Removed #ifdef DEBUG from around initial comment block.
19 | *
20 | * Revision 1.1 2004/11/17 12:38:48 r12110
21 | * -Initial version checked into CVS.
22 | * -Updated copyright from Motorola to Freescale.
23 | *
24 | *........................................................................*
25 | * 0.1 J. Loeliger 17/Feb/03 Initial version of file. *
26 | * 0.2 J. Loeliger 06/Mar/03 Added DCC support. *
27 | * 0.3 J. Loeliger 07/May/03 Change to fully use ISO data types. *
28 | * 0.4 J. Loeliger 17/Jun/03 Change name to motint.h and merge *
29 | * MPC5500 and MAC7100 files. *
30 | * 0.5 J. Loeliger 04/Nov/03 Changed name to typedefs.h. *
31 | * 0.6 J. Loeliger 09/May/04 Changed to support GHS and GCC. *
32 | **************************************************************************/
33 |
34 | #ifndef _TYPEDEFS_H_
35 | #define _TYPEDEFS_H_
36 |
37 | #ifdef __MWERKS__ //Metrowerk CodeWarrior
38 | #include
39 |
40 | // Standard typedefs used by header files, based on ISO C standard
41 | typedef volatile int8_t vint8_t;
42 | typedef volatile uint8_t vuint8_t;
43 |
44 | typedef volatile int16_t vint16_t;
45 | typedef volatile uint16_t vuint16_t;
46 |
47 | typedef volatile int32_t vint32_t;
48 | typedef volatile uint32_t vuint32_t;
49 |
50 | #else
51 | #ifdef __ghs__ //GreenHills
52 | #include
53 |
54 | // Standard typedefs used by header files, based on ISO C standard
55 | typedef volatile int8_t vint8_t;
56 | typedef volatile uint8_t vuint8_t;
57 |
58 | typedef volatile int16_t vint16_t;
59 | typedef volatile uint16_t vuint16_t;
60 |
61 | typedef volatile int32_t vint32_t;
62 | typedef volatile uint32_t vuint32_t;
63 |
64 | #else
65 |
66 | // This is needed for compilers that don't have a stdint.h file
67 |
68 | typedef signed char int8_t;
69 | typedef unsigned char uint8_t;
70 | typedef volatile signed char vint8_t;
71 | typedef volatile unsigned char vuint8_t;
72 |
73 | typedef signed short int16_t;
74 | typedef unsigned short uint16_t;
75 | typedef volatile signed short vint16_t;
76 | typedef volatile unsigned short vuint16_t;
77 |
78 | typedef signed int int32_t;
79 | typedef unsigned int uint32_t;
80 | typedef volatile signed int vint32_t;
81 | typedef volatile unsigned int vuint32_t;
82 |
83 | #endif
84 | #endif
85 | #endif
86 |
87 | /*********************************************************************
88 | *
89 | * Copyright:
90 | * Freescale Semiconductor, INC. All Rights Reserved.
91 | * You are hereby granted a copyright license to use, modify, and
92 | * distribute the SOFTWARE so long as this entire notice is
93 | * retained without alteration in any modified and/or redistributed
94 | * versions, and that such modified versions are clearly identified
95 | * as such. No licenses are granted by implication, estoppel or
96 | * otherwise under any patents or trademarks of Freescale
97 | * Semiconductor, Inc. This software is provided on an "AS IS"
98 | * basis and without warranty.
99 | *
100 | * To the maximum extent permitted by applicable law, Freescale
101 | * Semiconductor DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED,
102 | * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
103 | * PARTICULAR PURPOSE AND ANY WARRANTY AGAINST INFRINGEMENT WITH
104 | * REGARD TO THE SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF)
105 | * AND ANY ACCOMPANYING WRITTEN MATERIALS.
106 | *
107 | * To the maximum extent permitted by applicable law, IN NO EVENT
108 | * SHALL Freescale Semiconductor BE LIABLE FOR ANY DAMAGES WHATSOEVER
109 | * (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS,
110 | * BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER
111 | * PECUNIARY LOSS) ARISING OF THE USE OR INABILITY TO USE THE SOFTWARE.
112 | *
113 | * Freescale Semiconductor assumes no responsibility for the
114 | * maintenance and support of this software
115 | *
116 | ********************************************************************/
117 |
118 |
119 |
--------------------------------------------------------------------------------
/CCP_TEST_32/ccp_test_32/windows.cmm:
--------------------------------------------------------------------------------
1 | // T32 Wed Aug 09 15:12:43 2006
2 |
3 | B::
4 |
5 | TOOLBAR ON
6 | STATUSBAR ON
7 | WINPAGE.RESET
8 |
9 | WINCLEAR
10 | WINPOS 99.625 0.5625 23. 4. 0. 0. W001
11 | Var.Watch %E %SPOTLIGHT DECctr
12 |
13 |
14 | WINPOS 1.625 13.625 77. 20. 0. 0. W003
15 | r /spotlight
16 |
17 | WINPOS 0.0 0.125 95. 9. 13. 1. W001
18 | WINTABS 10. 10. 25. 62.
19 | Data.List
20 |
21 | WINPAGE.SELECT P000
22 |
23 | ENDDO
24 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CCP_CANape
2 |
3 |
4 | > **CCP移植.md** :CCP移植说明
5 |
6 | > **CCP_CANape.md** :CCP上位机软件使用说明
7 |
--------------------------------------------------------------------------------
/ccp移植.md:
--------------------------------------------------------------------------------
1 | # CCP移植(MPC5644A_32位 & S12XEP100_16位)
2 |
3 | ## 1、和CCP移植相关的资料
4 |
5 | Vector所提供的资料中有几个文档,下图中画红色方框的需要在移植之前看完。
6 |
7 | 
8 |
9 | > **AN-IMC-1-001_Integration_of the_Vector_CCP_Driver_with_a_free_CAN_Driver.pdf** 介绍了完整的移植过程
10 |
11 |
12 | > **CCP21.pdf** 介绍了2.1版本的CCP协议
13 |
14 | ## 2、CCP文件介绍
15 |
16 | 移植后的工程中应该包含以下文件:
17 | 
18 |
19 | 文件名称|描述
20 | ------|--------
21 | ccp.c |Vector提供的CCP Driver的源代码
22 | ccp.h |CCP Driver的头文件
23 | ccppar.h|CCP Driver的配置文件
24 | ccp_can_interface.c|CCP Driver的接口函数
25 | ccp_can_interface.h|CCP Driver接口函数的头文件
26 | boot_can.c|CAN的底层驱动
27 | boot_can.h|CAN底层驱动的头文件
28 |
29 | 其中***ccp.c、ccp.h、ccppar.h***由Vector提供,我们不需要进行改动,而其余的文件需要我们针对具体的芯片来进行改写。
30 |
31 | ## 3、CCP Driver在ECU上的集成
32 |
33 | ### (1)ccppar.h
34 |
35 | CCP Driver数据类型的声明(针对不同硬件平台需要进行改动):
36 |
37 | /*----------------------------------------------------------------------------*/
38 | /* Platform independant types */
39 | #define BYTE unsigned char
40 | #define WORD unsigned short
41 | #define DWORD unsigned long
42 | #define BYTEPTR unsigned char*
43 | #define MTABYTEPTR BYTEPTR
44 | #define ROM
45 | #define RAM
46 |
47 | CCP开关中断宏定义,具体的实现在ccp_can_interface.c中:
48 |
49 | #define CCP_DISABLE_INTERRUPT disable_interrupt();
50 | #define CCP_ENABLE_INTERRUPT enable_interrupt();
51 |
52 | ECU Address、DTO_ID、CRO_ID:
53 |
54 | /* CCP Identifiers and Address */
55 | #define CCP_STATION_ADDR 0x0000 /* Define CCP_STATION_ADDR in Intel Format */
56 | /* High/Low byte swapped on motorola machines !!! (0x3900) */
57 | #define CCP_STATION_ID "Ccptest080709" /* Plug&Play station identification */
58 | #define CCP_DTO_ID 0x101 /* CAN identifier ECU -> Master */
59 | #define CCP_CRO_ID 0x100 /* CAN identifier Master -> ECU */
60 |
61 | ### (2)ccp_can_interface.c
62 |
63 | 该文件实现对底层CAN驱动的封装:
64 |
65 | CAN发送:
66 |
67 | // -----------------------------------------------------------------------------
68 | // SENDING an CRM-DTO when receiving an CRO
69 | // -----------------------------------------------------------------------------
70 | BYTE ccpSend( BYTEPTR msg )
71 | {
72 | ccpBootTransmitCrm(msg); // callup CAN-send
73 | return 1;
74 | }
75 |
76 | -----
77 | // -----------------------------------------------------------------------------
78 | // CONVERT pointer
79 | // -----------------------------------------------------------------------------
80 | MTABYTEPTR ccpGetPointer( BYTE addr_ext, DWORD addr ) // get Pointer into
81 | { // normal C
82 | return (MTABYTEPTR) addr;
83 | }
84 | // -----------------------------------------------------------------------------
85 | // -----------------------------------------------------------------------------
86 | // CALCULATE new measuerments
87 | // -----------------------------------------------------------------------------
88 | void ccpUserBackground( void )
89 | {
90 | }
91 | // -----------------------------------------------------------------------------
92 | // -----------------------------------------------------------------------------
93 | // Define
94 | // -----------------------------------------------------------------------------
95 | BYTE ccpDisableNormalOperation( MTABYTEPTR a, WORD s )
96 | {
97 | disable_interrupt(); // disables all interrupts, e.g. TIMER_0
98 | return 1;
99 | }
100 | // -----------------------------------------------------------------------------
101 |
102 | 开关中断:
103 |
104 | VUINT_32 cur_func_pri;
105 | // -----------------------------------------------------------------------------
106 | // Disable/Enable Interrupt Functions
107 | // -----------------------------------------------------------------------------
108 | BYTE disable_interrupt_count = 0; // init counter
109 |
110 | void disable_interrupt() {
111 | cur_func_pri = INTC.CPR.B.PRI; //通过改变优先级来禁止中断,先保存当前任务优先级,再把该任务优先级设为15(最高)
112 | INTC.CPR.B.PRI = 15; // set I-Bit
113 | disable_interrupt_count++; // incr. counter
114 | }
115 |
116 | void enable_interrupt() {
117 | if (--disable_interrupt_count==0) { // if interrupts only one time disabled
118 | INTC.CPR.B.PRI = cur_func_pri; //恢复该任务优先级 // enable them
119 | }
120 | }
121 | // -----------------------------------------------------------------------------
122 |
123 | ### (3)boot_can.c
124 |
125 | 该文件中需要完成4个CAN接口函数,也是CCP中CAN模块的底层驱动
126 |
127 | CAN模块初始化:
128 |
129 | // -----------------------------------------------------------------------------
130 | // CAN INITIALISATION
131 | // -----------------------------------------------------------------------------
132 | void ccpBootInit (int cro_id, int dto_id)
133 | {
134 | g_ccp_dto_id = dto_id; // handover IDs (CRO, DTO)
135 | g_ccp_cro_id = cro_id;
136 |
137 | CAN0CTL0 = 0x01;
138 | while (!(CAN0CTL1&0x01)){};
139 | CAN0CTL1 = 0x80;
140 | CAN0BTR0 = 0xC3;
141 | CAN0BTR1 = 0x3A;
142 |
143 | CAN0IDAC_IDAM = 0; // use 2*32bit Acceptance Filters
144 |
145 | CAN0IDAR0 = 0x20; // TS_PM_1 & TS_PM2 ID 1st Reg Byte = 0x20 both
146 | CAN0IDAR1 = 0x00; // TS_PM_1 2nd Byte = 0x00;TS_PM_2 2nd Byte = 0x20; Need Mask
147 | CAN0IDAR2 = 0; // Not useful in Standard Frame
148 | CAN0IDAR3 = 0; // Not useful in Standard Frame
149 |
150 | CAN0IDMR0 = 0xFF; // No Mask, care first 3 bits
151 | CAN0IDMR1 = 0xFF; // Mask All
152 | CAN0IDMR2 = 0; // Not useful in Standard Frame
153 | CAN0IDMR3 = 0; // Not useful in Standard Frame
154 |
155 | CAN0CTL0 = 0x00;
156 | while ((CAN0CTL1&0x01) != 0){};
157 |
158 | CAN0RFLG_RXF = 1; // clear receive full flag
159 | CAN0CTL0_RXFRM = 1; // clear Received Frame Flag
160 | // -----------------------------------------------------------------------------
161 | } /* ccpBootInit */
162 |
163 | 判断CAN是否可以发送:
164 |
165 | // -----------------------------------------------------------------------------
166 | // CAN TRANSMIT (Data Frame)
167 | // -----------------------------------------------------------------------------
168 | int ccpBootTransmitCrmPossible( void ) {
169 | return ((CAN0TFLG_TXE0) == 1); // return 1 if so
170 | }
171 |
172 | CAN发送:
173 |
174 | void ccpBootTransmitCrm (unsigned char *msg)
175 | {
176 | CAN0TBSEL = 0; // clear "Tx buffer select Reg" first
177 | CAN0TBSEL = 0x1; // select Tx0 buffer
178 |
179 | CAN0TXIDR0=((g_ccp_dto_id<<5)>>8);
180 | CAN0TXIDR1=(g_ccp_dto_id<<5);
181 |
182 | CAN0TXDLR=8;
183 | CAN0TXDSR0=*msg++;
184 | CAN0TXDSR1=*msg++;
185 | CAN0TXDSR2=*msg++;
186 | CAN0TXDSR3=*msg++;
187 | CAN0TXDSR4=*msg++;
188 | CAN0TXDSR5=*msg++;
189 | CAN0TXDSR6=*msg++;
190 | CAN0TXDSR7=*msg++;
191 |
192 | CAN0TFLG = 0x01;
193 |
194 | } /* ccpBootTransmitCrm */
195 |
196 | CAN接收:
197 |
198 | // -----------------------------------------------------------------------------
199 | // CAN RECEIVE (Data Frame)
200 | // -----------------------------------------------------------------------------
201 | int ccpBootReceiveCro (unsigned char *msg)
202 | {
203 | WORD id;
204 |
205 | if (CAN0RFLG_RXF == 0) return 0; // check if receive buffer is full
206 |
207 | id = CAN0RXIDR0;
208 | id = (id<<8) + CAN0RXIDR1;
209 | id = id >> 5;
210 |
211 | *msg++ = CAN0RXDSR0; // store received message in buffer
212 | *msg++ = CAN0RXDSR1;
213 | *msg++ = CAN0RXDSR2;
214 | *msg++ = CAN0RXDSR3;
215 | *msg++ = CAN0RXDSR4;
216 | *msg++ = CAN0RXDSR5;
217 | *msg++ = CAN0RXDSR6;
218 | *msg++ = CAN0RXDSR7;
219 |
220 |
221 | CAN0RFLG_RXF = 1;// clear receive full flag
222 |
223 | CAN0CTL0_RXFRM = 1; // clear Received Frame Flag
224 |
225 | if (id == g_ccp_cro_id) return 1; // if correctly received, return 1
226 |
227 | return 0;
228 |
229 | } /* ccpBootReceiveCro */
--------------------------------------------------------------------------------