AnsweredAssumed Answered

Getting started project gpio_led_output doesn't build.

Question asked by Randy Seedle on Mar 6, 2019
Latest reply on Mar 7, 2019 by Ricardo Delsordo

I am trying to work through the getting started project at:

FRDM-K64F Platform|Freedom Development Board|Kinetis MCUs | NXP 

 

The webpage seems to be different than the actual software. The software I am using is:

MCUXpresso Confi Tools Version 5.0
MCUXpresso IDE v10.3.1 [Build 2233] [2019-02-20]

 

Anyways I tried to wonder through the gpio_led_output project.

It seems to have a build error because the webpage description is different from the actual project source code. Here is the build output.

22:11:25 **** Incremental Build of configuration Debug for project frdmk64f_gpio_led_output ****
make -r -j4 all
Building file: ../source/gpio_led_output.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -std=gnu99 -DFRDM_K64F -DFREEDOM -DSDK_DEBUGCONSOLE=1 -DCR_INTEGER_PRINTF -DPRINTF_FLOAT_ENABLE=0 -DCPU_MK64FN1M0VLL12 -DCPU_MK64FN1M0VLL12_cm4 -D__MCUXPRESSO -D__USE_CMSIS -DDEBUG -D__REDLIB__ -I../board -I../source -I../ -I../drivers -I../device -I../CMSIS -I../utilities -I../component/serial_manager -I../component/uart -I../component/lists -O0 -fno-common -g3 -Wall -c -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -D__REDLIB__ -specs=redlib.specs -MMD -MP -MF"source/gpio_led_output.d" -MT"source/gpio_led_output.o" -MT"source/gpio_led_output.d" -o "source/gpio_led_output.o" "../source/gpio_led_output.c"
In file included from ../device/fsl_device_registers.h:24:0,
from ../drivers/fsl_common.h:22,
from ../board/clock_config.h:12,
from ../board/board.h:13,
from ../source/gpio_led_output.c:9:
../source/gpio_led_output.c: In function 'main':
../device/MK64F12.h:12162:50: error: called object is not a function or function pointer
#define GPIOB ((GPIO_Type *)GPIOB_BASE)
^
../source/pin_mux.h:56:27: note: in expansion of macro 'GPIOB'
#define BOARD_My_LED_GPIO GPIOB /*!<@brief GPIO device name: GPIOB */
^~~~~
../source/gpio_led_output.c:65:18: note: in expansion of macro 'BOARD_My_LED_GPIO'
GPIO_PinInit(BOARD_My_LED_GPIO GPIOB, BOARD_My_LED_PIN, &led_config);
^~~~~~~~~~~~~~~~~
../device/MK64F12.h:12162:50: error: called object is not a function or function pointer
#define GPIOB ((GPIO_Type *)GPIOB_BASE)
^
../source/pin_mux.h:56:27: note: in expansion of macro 'GPIOB'
#define BOARD_My_LED_GPIO GPIOB /*!<@brief GPIO device name: GPIOB */
^~~~~
../source/gpio_led_output.c:70:25: note: in expansion of macro 'BOARD_My_LED_GPIO'
GPIO_PortToggle(BOARD_My_LED_GPIO GPIOB, 1u << BOARD_My_LED_PIN);
^~~~~~~~~~~~~~~~~
make: *** [source/subdir.mk:26: source/gpio_led_output.o] Error 1

22:11:26 Build Finished (took 370ms)

 

 

 

I attached a zip file of the project to this email. The project was intend to build on a FRDM-K64F platform.

So any ideas what I did wrong ?

Outcomes