Not completely sure where to start, so forgive me if this is in the wrong area.
I've built a project using the headers and C files from the kinetis example projects folders:
Source:
09/10/2011 01:13 3,015 alloc.c
09/10/2011 00:30 5,139 arm_cm4.c
09/10/2011 00:37 702 assert.c
09/10/2011 00:06 1,085 gpio.c
09/10/2011 00:37 655 io.c
09/10/2011 00:40 1,231 main.c
09/10/2011 00:34 9,823 mcg.c
08/10/2011 23:03 20,499 MCUinit.c
08/10/2011 23:03 2,989 MCUinit.h
09/10/2011 00:37 6,694 memtest.c
09/10/2011 00:37 17,116 printf.c
09/10/2011 00:37 2,585 queue.c
09/10/2011 00:37 3,178 startup.c
09/10/2011 00:37 8,187 stdlib.c
09/10/2011 00:38 4,127 uart.c
09/10/2011 00:37 8,254 uif.c
Headers:
09/10/2011 01:13 2,146 arm_cm4.h
09/10/2011 00:37 546 assert.h
09/10/2011 00:35 1,368 common.h
09/10/2011 00:35 1,334 cw.h
08/10/2011 22:56 210 derivative.h
09/10/2011 00:37 423 io.h
09/10/2011 00:34 1,405 k60_tower.h
09/10/2011 01:01 1,214 mcg.h
09/10/2011 00:37 1,128 memtest.h
08/10/2011 22:56 812,262 MK60N512VMD100.h
09/10/2011 00:37 787 queue.h
09/10/2011 00:37 369 startup.h
09/10/2011 00:37 1,121 stdlib.h
09/10/2011 00:38 505 uart.h
09/10/2011 00:37 2,876 uif.h
I'm getting several errors on the compiler:
C:/Program Files (x86)/Freescale/CW MCU v10.1/MCU/ARM_Tools/Command_Line_Tools/mwccarm|Compiler|Error(E:\Kinetis Projects\TowerTest\Project_Headers\arm_cm4.h|69|32|1|1448|1)=typedef unsigned long int uint32; /* 32 bits */ >illegal name overloadingC:/Program Files (x86)/Freescale/CW MCU v10.1/MCU/ARM_Tools/Command_Line_Tools/mwccarm|Compiler|Error(E:\Kinetis Projects\TowerTest\Project_Headers\arm_cm4.h|83|25|7|1954|7)=typedef volatile uint32 vuint32; /* 32 bits */ >illegal name overloading
Errors caused tool to abort.C:\Program Files (x86)\Freescale\CW MCU v10.1\gnu\bin\make: *** [Sources/main.obj] Error 1
Looking in the files, the errors are down to typedef declarations for "unsigned long int" and "volatile uint32" both in arm_cm4.h. Also, the set_sys_dividers function is causing the "illegal name overloading" - I can't see this declared anywhere else in my project except mcg.h.
What I'm trying to do is get a basepoint from which to start accessing peripherals such as the uart, GPIO, touch sense etc and so uart.c has required uart.h and common.h, otherwise the functions are declared illegal, and so on, until I've got the files you see above.
I'm using CW10.1, with PnE USB OS JTAG I believe, at least the USB debugger / programmer built into the K60 twr module.
Any suggestions?