caddr_t

cancel
Showing results for 
Search instead for 
Did you mean: 

caddr_t

994 Views
wesee
Contributor I


I tried to build hello_world with Kinetis SDK 130 and encounter this error:

 

###

D:/tools/KSDK130/platform/utilities/src/fsl_misc_utilities.c:57:1: error: unknown type name 'caddr_t'

caddr_t

^

D:/tools/KSDK130/platform/utilities/src/fsl_misc_utilities.c: In function '_sbrk':

D:/tools/KSDK130/platform/utilities/src/fsl_misc_utilities.c:77:15: error: 'caddr_t' undeclared (first use in this function)

       return (caddr_t) -1;

 

###

 

appreciate any help provided.

 

regards.

Labels (1)
0 Kudos
8 Replies

197 Views
wesee
Contributor I

fyi, i am using windows 10.

0 Kudos

197 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

"the newer version does not need to build the platform lib?"-- Yes, you only need refer to the video

i refered.

And please take a screenshot or video show the steps you done.

BR

Alice

0 Kudos

197 Views
wesee
Contributor I

i tried the SDK v20 and KDS v3.2.1 and followed the videos attached.  but encountered different error.

btw, the newer version does not need to build the platform lib?

12:23:32 **** Incremental Build of configuration Debug for project test ****

make -j4 all

Building target: test.elf

Invoking: Cross ARM C++ Linker

arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall  -g3 -T "../MK82FN256xxx15_flash.ld" -Xlinker --gc-sections -Wl,-Map,"test.map" -specs=nosys.specs -specs=nano.specs -Xlinker -z -Xlinker muldefs -o "test.elf"  ./utilities/fsl_debug_console.o  ./startup/startup_MK82F25615.o ./startup/system_MK82F25615.o  ./source/main.o  ./drivers/fsl_clock.o ./drivers/fsl_common.o ./drivers/fsl_gpio.o ./drivers/fsl_lpuart.o ./drivers/fsl_smc.o  ./board/board.o ./board/clock_config.o ./board/pin_mux.o  

./drivers/fsl_clock.o: In function `CLOCK_GetOsc0ErClkUndivFreq':

D:\ws\workspace.kds\test\Debug/../drivers/fsl_clock.c:361: undefined reference to `_assert'

./drivers/fsl_clock.o: In function `CLOCK_EnablePll0':

D:\ws\workspace.kds\test\Debug/../drivers/fsl_clock.c:864: undefined reference to `_assert'

./drivers/fsl_clock.o: In function `CLOCK_BootToPeeMode':

D:\ws\workspace.kds\test\Debug/../drivers/fsl_clock.c:1649: undefined reference to `_assert'

./drivers/fsl_lpuart.o: In function `LPUART_GetInstance':

D:\ws\workspace.kds\test\Debug/../drivers/fsl_lpuart.c:134: undefined reference to `_assert'

./drivers/fsl_lpuart.o: In function `LPUART_Init':

D:\ws\workspace.kds\test\Debug/../drivers/fsl_lpuart.c:196: undefined reference to `_assert'

./drivers/fsl_lpuart.o:D:\ws\workspace.kds\test\Debug/../drivers/fsl_lpuart.c:198: more undefined references to `_assert' follow

collect2.exe: error: ld returned 1 exit status

makefile:61: recipe for target 'test.elf' failed

make: *** [test.elf] Error 1

12:23:33 Build Finished (took 777ms)

0 Kudos

197 Views
wesee
Contributor I

capture_kds_processorexpert.PNG

0 Kudos

197 Views
wesee
Contributor I

this is the full trace at the KDS console when building the demo app:

10:55:04 **** Incremental Build of configuration debug for project hello_world_frdmk82f ****

make -k -j4 all

Building file: D:/tools/KSDK130/platform/utilities/src/fsl_debug_console.c

Building file: D:/tools/KSDK130/platform/utilities/src/fsl_misc_utilities.c

Building file: D:/tools/KSDK130/platform/utilities/src/print_scan.c

Building file: D:/tools/KSDK130/platform/devices/startup.c

Invoking: Cross ARM C Compiler

arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall  -g -DDEBUG -DCPU_MK82FN256VDC15 -DFRDM_K82F -DFREEDOM -I../../../../../../platform/osa/inc -I../../../../../../platform/utilities/inc -I../../../../../../platform/CMSIS/Include -I../../../../../../platform/devices -I../../../../../../platform/devices/MK82F25615/include -I../../../../../../platform/devices/MK82F25615/startup -I../../../../../../platform/hal/inc -I../../../../../../platform/drivers/inc -I../../../../../../platform/system/inc -I../../../.. -I"C:\MinGW\include" -I"C:\MinGW\lib\gcc\mingw32\4.9.3\include" -std=gnu99 -fno-common  -ffreestanding  -fno-builtin  -mapcs -MMD -MP -MF"utilities/fsl_debug_console.d" -MT"utilities/fsl_debug_console.o" -c -o "utilities/fsl_debug_console.o" "D:/tools/KSDK130/platform/utilities/src/fsl_debug_console.c"

Invoking: Cross ARM C Compiler

Invoking: Cross ARM C Compiler

arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall  -g -DDEBUG -DCPU_MK82FN256VDC15 -DFRDM_K82F -DFREEDOM -I../../../../../../platform/osa/inc -I../../../../../../platform/utilities/inc -I../../../../../../platform/CMSIS/Include -I../../../../../../platform/devices -I../../../../../../platform/devices/MK82F25615/include -I../../../../../../platform/devices/MK82F25615/startup -I../../../../../../platform/hal/inc -I../../../../../../platform/drivers/inc -I../../../../../../platform/system/inc -I../../../.. -I"C:\MinGW\include" -I"C:\MinGW\lib\gcc\mingw32\4.9.3\include" -std=gnu99 -fno-common  -ffreestanding  -fno-builtin  -mapcs -MMD -MP -MF"utilities/fsl_misc_utilities.d" -MT"utilities/fsl_misc_utilities.o" -c -o "utilities/fsl_misc_utilities.o" "D:/tools/KSDK130/platform/utilities/src/fsl_misc_utilities.c"

Invoking: Cross ARM C Compiler

arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall  -g -DDEBUG -DCPU_MK82FN256VDC15 -DFRDM_K82F -DFREEDOM -I../../../../../../platform/osa/inc -I../../../../../../platform/utilities/inc -I../../../../../../platform/CMSIS/Include -I../../../../../../platform/devices -I../../../../../../platform/devices/MK82F25615/include -I../../../../../../platform/devices/MK82F25615/startup -I../../../../../../platform/hal/inc -I../../../../../../platform/drivers/inc -I../../../../../../platform/system/inc -I../../../.. -I"C:\MinGW\include" -I"C:\MinGW\lib\gcc\mingw32\4.9.3\include" -std=gnu99 -fno-common  -ffreestanding  -fno-builtin  -mapcs -MMD -MP -MF"utilities/print_scan.d" -MT"utilities/print_scan.o" -c -o "utilities/print_scan.o" "D:/tools/KSDK130/platform/utilities/src/print_scan.c"

arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall  -g -DDEBUG -DCPU_MK82FN256VDC15 -DFRDM_K82F -DFREEDOM -I../../../../../../platform/osa/inc -I../../../../../../platform/utilities/inc -I../../../../../../platform/CMSIS/Include -I../../../../../../platform/devices -I../../../../../../platform/devices/MK82F25615/include -I../../../../../../platform/devices/MK82F25615/startup -I../../../../../../platform/hal/inc -I../../../../../../platform/drivers/inc -I../../../../../../platform/system/inc -I../../../.. -I"C:\MinGW\include" -I"C:\MinGW\lib\gcc\mingw32\4.9.3\include" -std=gnu99 -fno-common  -ffreestanding  -fno-builtin  -mapcs -MMD -MP -MF"startup/startup.d" -MT"startup/startup.o" -c -o "startup/startup.o" "D:/tools/KSDK130/platform/devices/startup.c"

D:/tools/KSDK130/platform/utilities/src/fsl_misc_utilities.c:57:1: error: unknown type name 'caddr_t'

caddr_t

^

D:/tools/KSDK130/platform/utilities/src/fsl_misc_utilities.c: In function '_sbrk':

D:/tools/KSDK130/platform/utilities/src/fsl_misc_utilities.c:77:15: error: 'caddr_t' undeclared (first use in this function)

       return (caddr_t) -1;

               ^

D:/tools/KSDK130/platform/utilities/src/fsl_misc_utilities.c:77:15: note: each undeclared identifier is reported only once for each function it appears in

D:/tools/KSDK130/platform/utilities/src/fsl_misc_utilities.c:82:20: error: expected ';' before 'prev_heap_end'

   return (caddr_t) prev_heap_end;

                    ^

D:/tools/KSDK130/platform/utilities/src/fsl_misc_utilities.c:63:17: warning: variable 'prev_heap_end' set but not used [-Wunused-but-set-variable]

   char *        prev_heap_end;

                 ^

D:/tools/KSDK130/platform/utilities/src/fsl_misc_utilities.c:83:1: warning: control reaches end of non-void function [-Wreturn-type]

}

^

utilities/subdir.mk:31: recipe for target 'utilities/fsl_misc_utilities.o' failed

make: *** [utilities/fsl_misc_utilities.o] Error 1

Building file: D:/tools/KSDK130/platform/devices/MK82F25615/startup/gcc/startup_MK82F25615.S

Invoking: Cross ARM GNU Assembler

arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall  -g -x assembler-with-cpp -DDEBUG -I"C:\MinGW\include" -I"C:\MinGW\lib\gcc\mingw32\4.9.3\include" -fno-common  -ffunction-sections  -fdata-sections  -ffreestanding  -fno-builtin  -mapcs  -std=gnu99 -MMD -MP -MF"startup/startup_MK82F25615.d" -MT"startup/startup_MK82F25615.o" -c -o "startup/startup_MK82F25615.o" "D:/tools/KSDK130/platform/devices/MK82F25615/startup/gcc/startup_MK82F25615.S"

Finished building: D:/tools/KSDK130/platform/devices/startup.c

Finished building: D:/tools/KSDK130/platform/utilities/src/print_scan.c

Finished building: D:/tools/KSDK130/platform/utilities/src/fsl_debug_console.c

Building file: D:/tools/KSDK130/platform/devices/MK82F25615/startup/system_MK82F25615.c

Building file: D:/tools/KSDK130/examples/frdmk82f/demo_apps/hello_world/fsl_lptmr_irq.c

Building file: D:/tools/KSDK130/examples/frdmk82f/demo_apps/hello_world/main.c

Invoking: Cross ARM C Compiler

arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall  -g -DDEBUG -DCPU_MK82FN256VDC15 -DFRDM_K82F -DFREEDOM -I../../../../../../platform/osa/inc -I../../../../../../platform/utilities/inc -I../../../../../../platform/CMSIS/Include -I../../../../../../platform/devices -I../../../../../../platform/devices/MK82F25615/include -I../../../../../../platform/devices/MK82F25615/startup -I../../../../../../platform/hal/inc -I../../../../../../platform/drivers/inc -I../../../../../../platform/system/inc -I../../../.. -I"C:\MinGW\include" -I"C:\MinGW\lib\gcc\mingw32\4.9.3\include" -std=gnu99 -fno-common  -ffreestanding  -fno-builtin  -mapcs -MMD -MP -MF"startup/system_MK82F25615.d" -MT"startup/system_MK82F25615.o" -c -o "startup/system_MK82F25615.o" "D:/tools/KSDK130/platform/devices/MK82F25615/startup/system_MK82F25615.c"

Invoking: Cross ARM C Compiler

arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall  -g -DDEBUG -DCPU_MK82FN256VDC15 -DFRDM_K82F -DFREEDOM -I../../../../../../platform/osa/inc -I../../../../../../platform/utilities/inc -I../../../../../../platform/CMSIS/Include -I../../../../../../platform/devices -I../../../../../../platform/devices/MK82F25615/include -I../../../../../../platform/devices/MK82F25615/startup -I../../../../../../platform/hal/inc -I../../../../../../platform/drivers/inc -I../../../../../../platform/system/inc -I../../../.. -I"C:\MinGW\include" -I"C:\MinGW\lib\gcc\mingw32\4.9.3\include" -std=gnu99 -fno-common  -ffreestanding  -fno-builtin  -mapcs -MMD -MP -MF"source/fsl_lptmr_irq.d" -MT"source/fsl_lptmr_irq.o" -c -o "source/fsl_lptmr_irq.o" "D:/tools/KSDK130/examples/frdmk82f/demo_apps/hello_world/fsl_lptmr_irq.c"

Invoking: Cross ARM C Compiler

arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall  -g -DDEBUG -DCPU_MK82FN256VDC15 -DFRDM_K82F -DFREEDOM -I../../../../../../platform/osa/inc -I../../../../../../platform/utilities/inc -I../../../../../../platform/CMSIS/Include -I../../../../../../platform/devices -I../../../../../../platform/devices/MK82F25615/include -I../../../../../../platform/devices/MK82F25615/startup -I../../../../../../platform/hal/inc -I../../../../../../platform/drivers/inc -I../../../../../../platform/system/inc -I../../../.. -I"C:\MinGW\include" -I"C:\MinGW\lib\gcc\mingw32\4.9.3\include" -std=gnu99 -fno-common  -ffreestanding  -fno-builtin  -mapcs -MMD -MP -MF"source/main.d" -MT"source/main.o" -c -o "source/main.o" "D:/tools/KSDK130/examples/frdmk82f/demo_apps/hello_world/main.c"

Finished building: D:/tools/KSDK130/platform/devices/MK82F25615/startup/gcc/startup_MK82F25615.S

Building file: D:/tools/KSDK130/examples/frdmk82f/board.c

Invoking: Cross ARM C Compiler

arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall  -g -DDEBUG -DCPU_MK82FN256VDC15 -DFRDM_K82F -DFREEDOM -I../../../../../../platform/osa/inc -I../../../../../../platform/utilities/inc -I../../../../../../platform/CMSIS/Include -I../../../../../../platform/devices -I../../../../../../platform/devices/MK82F25615/include -I../../../../../../platform/devices/MK82F25615/startup -I../../../../../../platform/hal/inc -I../../../../../../platform/drivers/inc -I../../../../../../platform/system/inc -I../../../.. -I"C:\MinGW\include" -I"C:\MinGW\lib\gcc\mingw32\4.9.3\include" -std=gnu99 -fno-common  -ffreestanding  -fno-builtin  -mapcs -MMD -MP -MF"board/board.d" -MT"board/board.o" -c -o "board/board.o" "D:/tools/KSDK130/examples/frdmk82f/board.c"

Finished building: D:/tools/KSDK130/platform/devices/MK82F25615/startup/system_MK82F25615.c

Finished building: D:/tools/KSDK130/examples/frdmk82f/demo_apps/hello_world/fsl_lptmr_irq.c

Building file: D:/tools/KSDK130/examples/frdmk82f/gpio_pins.c

Building file: D:/tools/KSDK130/examples/frdmk82f/demo_apps/hello_world/hardware_init.c

Invoking: Cross ARM C Compiler

Invoking: Cross ARM C Compiler

arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall  -g -DDEBUG -DCPU_MK82FN256VDC15 -DFRDM_K82F -DFREEDOM -I../../../../../../platform/osa/inc -I../../../../../../platform/utilities/inc -I../../../../../../platform/CMSIS/Include -I../../../../../../platform/devices -I../../../../../../platform/devices/MK82F25615/include -I../../../../../../platform/devices/MK82F25615/startup -I../../../../../../platform/hal/inc -I../../../../../../platform/drivers/inc -I../../../../../../platform/system/inc -I../../../.. -I"C:\MinGW\include" -I"C:\MinGW\lib\gcc\mingw32\4.9.3\include" -std=gnu99 -fno-common  -ffreestanding  -fno-builtin  -mapcs -MMD -MP -MF"board/gpio_pins.d" -MT"board/gpio_pins.o" -c -o "board/gpio_pins.o" "D:/tools/KSDK130/examples/frdmk82f/gpio_pins.c"

Finished building: D:/tools/KSDK130/examples/frdmk82f/demo_apps/hello_world/main.c

arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall  -g -DDEBUG -DCPU_MK82FN256VDC15 -DFRDM_K82F -DFREEDOM -I../../../../../../platform/osa/inc -I../../../../../../platform/utilities/inc -I../../../../../../platform/CMSIS/Include -I../../../../../../platform/devices -I../../../../../../platform/devices/MK82F25615/include -I../../../../../../platform/devices/MK82F25615/startup -I../../../../../../platform/hal/inc -I../../../../../../platform/drivers/inc -I../../../../../../platform/system/inc -I../../../.. -I"C:\MinGW\include" -I"C:\MinGW\lib\gcc\mingw32\4.9.3\include" -std=gnu99 -fno-common  -ffreestanding  -fno-builtin  -mapcs -MMD -MP -MF"board/hardware_init.d" -MT"board/hardware_init.o" -c -o "board/hardware_init.o" "D:/tools/KSDK130/examples/frdmk82f/demo_apps/hello_world/hardware_init.c"

Building file: D:/tools/KSDK130/examples/frdmk82f/pin_mux.c

Invoking: Cross ARM C Compiler

arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall  -g -DDEBUG -DCPU_MK82FN256VDC15 -DFRDM_K82F -DFREEDOM -I../../../../../../platform/osa/inc -I../../../../../../platform/utilities/inc -I../../../../../../platform/CMSIS/Include -I../../../../../../platform/devices -I../../../../../../platform/devices/MK82F25615/include -I../../../../../../platform/devices/MK82F25615/startup -I../../../../../../platform/hal/inc -I../../../../../../platform/drivers/inc -I../../../../../../platform/system/inc -I../../../.. -I"C:\MinGW\include" -I"C:\MinGW\lib\gcc\mingw32\4.9.3\include" -std=gnu99 -fno-common  -ffreestanding  -fno-builtin  -mapcs -MMD -MP -MF"board/pin_mux.d" -MT"board/pin_mux.o" -c -o "board/pin_mux.o" "D:/tools/KSDK130/examples/frdmk82f/pin_mux.c"

Finished building: D:/tools/KSDK130/examples/frdmk82f/board.c

Finished building: D:/tools/KSDK130/examples/frdmk82f/gpio_pins.c

Finished building: D:/tools/KSDK130/examples/frdmk82f/demo_apps/hello_world/hardware_init.c

Finished building: D:/tools/KSDK130/examples/frdmk82f/pin_mux.c

make: Target 'all' not remade because of errors.

10:55:07 Build Finished (took 3s.80ms)

0 Kudos

197 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello vincent,

What about your PC system ?

And do you meaning you use the KSDK1.3 build the FRDM-K82 demo ?

In my KSDK1.3 , i have not find the demo project for this board.

And you can download the sdk_2.0_FRDM-K64F , about the detail download

and use , you can refer to Using Kinetis Design Studio v3.x with Kinetis SDK v2.0

Hope it helps

Alice

0 Kudos

197 Views
wesee
Contributor I

hi,

i am using KDS.  i have build the KSDK platform without any error.  when i tried to build the hello_world demo, the error occured.

i follow the instructions from Getting Started with Kinetis SDK (KSDK) v.1.3 document (KSDK13GSUG)

i have MinGW installed.

regards.

vincent

0 Kudos

197 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

Which IDE do you use , and which chip.

Have you build the KSDK lib ?

In order to reproduce your problem ,Please show me the steps you did , and then i can test on my side .

BR

Alice

0 Kudos